Has anyone seen documentation about the python modules available within the Connectport devices? (I’m using an X2)
I need to “import urllib, urllib2, httplib” and maybe a suds (SOAP) module.
In my current setup if I just try to import urllib I get an error message indicating that it can’t be found.
Also, is there a process for adding a custom module? In my previous environment I would load the module components into a sub-directory and then run python setup.py.
You can make the .zip file of the compiled python library files and then import the modules from the zip archieve by adding the zip archieve path to sys.path.
Great tip. I think I saw a reference to this approach but have since been unable to find again.
So besides including the files associated with the module into the zip, I would need to compile them first (into .pyc files). Is there a particular compile trick/version, etc. I am working in Windows Vista with installed version of python 2.7.2. I use Notepad++ to edit scripts.
To use the compiled python files on ConnectPort X2, you need to install python 2.4.3 and then compile all the files in the folder by using ‘compileall’ module using python 2.4.3 IDLE.