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.

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.

9 thoughts on “SOAPpy With Python 2.5 On Windows”

  1. 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)

  2. Wow, thanks!

    I’ll add some more lazy web keywords to this post πŸ™‚ you’ll need for google api (apility) (awapi_python_lib)

    thanks again πŸ™‚


  3. Thanks for the fix. The package hasn’t been updated since 2005, so I guess this problem is not going to be fixed. Nice to be able to find an easy fix.

Comments are closed.