Mailing List Archive

Problems importing Modules under win32
Hi,

I wanted to try out saxlib, but I can't import it under Windows NT:

dir-structure:

C:
|
- Users (dir)
|- thomsen (dir)
|- xml-python (dir)
|-saxlib (dir)
|-Saxlib (dir)
|-xml (dir)
|-sax (dir)
|-saxexts (file)

python-log:

>>> import sys
>>> sys.path
['' [stuff deleted] 'C:\\Users\\thomsen\\xml-python\\saxlib\\Saxlib\\',
'C:\\Users\\thomsen\\xml-python\\saxlib\\Saxdrv', [stuff deleted], 'C:
\\Program Files\\Python']
>>> import xml.sax.saxexts
Traceback (innermost last):
File "<stdin>", line 1, in ?
ImportError: No module named xml.sax.saxexts

As you can see, the path is correctly included, when I try to import
a testfile from C:\Users\thomsen\xml-python\saxlib\Saxlib it works.
When I put saxexts directly into e.g. ...../Python/Lib it is
found, but that's no solution....

Any suggestions?

Greetings,

Sven



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Problems importing Modules under win32 [ In reply to ]
Maybe an early version of sax with a later version of Python?

Is there an __init__.py in the xml and sax subdirectories?

What do:
>>> import xml
>>> import xml.sax

Yield?

Mark.


thomsensven@my-deja.com wrote in message <7oud1c$vcd$1@nnrp1.deja.com>...
>Hi,
>
>I wanted to try out saxlib, but I can't import it under Windows NT:
>
>dir-structure:
Problems importing Modules under win32 [ In reply to ]
Hi,

i found it, a __init__-File was missing.
Thanks to Lars Marius Garshol for the help...

Bye,

Sven Thomsen



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.