[XML-SIG] Has anyone frozen scripts that use pyxml with freeze.py on unix ?

Joshua M Rhoades jrhoades at us.ibm.com
Sat May 14 01:44:06 CEST 2005


Has anyone frozen scripts that use pyxml with freeze.py on unix ?  I used 
py2exe for windows but am having difficulty with freeze.py on AIX.
I'm using python 2.4.1 and pyxml 0.8.4.
The piece of code currently causing problems is within xpath.
The problem I am having is with it loading shared object files at run time 
via a "from" import statement.  In particular, xml/utils/boolean.so.

Traceback (most recent call last):
  File "HelloWorld.py", line 53, in ?
  File "/usr/opt/lib/python2.4/xml/xpath/__init__.py", line 105, in ?
    import Context
  File "/usr/opt/lib/python2.4/xml/xpath/Context.py", line 15, in ?
    import CoreFunctions
  File "/usr/opt/lib/python2.4/xml/xpath/CoreFunctions.py", line 20, in ?
    from xml.xpath import Util, Conversions
  File "/usr/opt/lib/python2.4/xml/xpath/Conversions.py", line 22, in ?
    from xml.utils import boolean
ImportError: cannot import name boolean

Previous to this hurdle I had a problem with loading cStringIO.so

  File "/usr/opt/lib/python2.4/xml/xpath/CoreFunctions.py", line 14, in ?
    import string, cStringIO
ImportError: No module named cStringIO

I discovered cStringIO was a shared object file so just put it and other 
*.so into my current dir.  Then I hit the boolean.so thing.  I copied 
boolean.so into my current dir but still get the ImportError.  The problem 
is that it wants to import "from xml.utils".  I tried creating a 
xml/utils/boolean.so under the current dir to see what happened but no 
luck.
I don't want to mess with modifying PyXML code to get it to work.
Is there an option to build PyXML without shared objects?
Has anyone frozen scripts that use pyxml with freeze.py on unix ?

Thanks.

Joshua M. Rhoades
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/xml-sig/attachments/20050513/282d023e/attachment.html


More information about the XML-SIG mailing list