Forum Archive

Suds on Pythonista

stjbrown67

Hi all,
I am looking for a bit of help getting Suds to work on Pythonista. I have written a quick script to install the actual library.(Well I actually just modified one from here, but it seems to do the job.

https://gist.github.com/stjbrown/09bfc9756a899d2fea61

The problem is that I get an error when I import suds. It looks to me like Pythonista does not contain the 'new' module. This seems to be a standard module in Python 2.x, any thoughts on adding it? Or modifying Suds?

omz

Sorry, seems like an oversight on my part. You should be able to get the new module running pretty easily though. Just copy the code from here and add it to the script library (name it "new", the .py extension is appended automatically, but not shown, or just modify your download script accordingly):

http://svn.python.org/projects/python/trunk/Lib/new.py

stjbrown67

Thanks. Thats seems to have moved me along a bit. But now I am getting the following error. Any thoughts?

Traceback (most recent call last):
File "", line 1, in
File "/var/mobile/Applications/87540C84-03EE-4FE0-89AC-A8BB0712E05A/Documents/suds/init.py", line 154, in
import client
File "/var/mobile/Applications/87540C84-03EE-4FE0-89AC-A8BB0712E05A/Documents/suds/client.py", line 23, in
import suds.metrics as metrics
AttributeError: 'module' object has no attribute 'metrics'

omz

I don't get that error when I import suds after running your script. What are you doing exactly that leads to this?

stjbrown67

I restarted pythonista and it imports now! Thx for the assistance.