SOAPpy With Python 2.5 On Windows
I’ve been working a bit with RSOAP and one of the required packages is SOAPpy which unfortunately does not appear to be actively supported anymore. Attempts to compile SOAPpy on Windows or in Cygwin always resulted in the following error.
SyntaxError: from __future__ imports must occur at the beginning of the file
I’m no Python expert, but I managed to fix this by placing the following line,
from __future__ import nested_scopes
before any executed statements in the file, including the ident= statement. This had to be done in 3 files in the SOAPpy subdirectory.
Client.py
Types.py
Server.py
Doing that allowed me to build and install SOAPpy 0.12.0 on Windows XP. I haven’t checked this on Linux yet, but my guess is that this fix should work there since I think it is due to changes in Python going from version 2.3 to 2.5.
I’m passing this on here in case anyone else runs into this problem since googling it didn’t turn up any solutions for me in my own searches.
December 9th, 2007 at 8:27 am
Many thanks for posting this solution!!!
December 14th, 2007 at 5:50 pm
You’re welcome!
December 27th, 2007 at 3:51 pm
Thanks, you saved me some time!
February 5th, 2008 at 6:29 am
You migh just as well delete those, they’re not needed as of Python 2.2:
>>> from __future__ import nested_scopes
>>> nested_scopes.getMandatoryRelease()
(2, 2, 0, ‘alpha’, 0)
February 9th, 2008 at 8:33 pm
Thanks for the info!
April 22nd, 2008 at 9:00 am
Wow, thanks!
I’ll add some more lazy web keywords to this post
you’ll need SOAPpy.py for google api (apility) (awapi_python_lib)
thanks again
monk.e.boy
May 29th, 2008 at 3:07 am
Thanks Dude….