469,622 Members | 1,462 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,622 developers. It's quick & easy.

Where python looks for path

Hi,

I am currently packaging python and a few libraries: PyWin32, PySerial, PIL,
wxPython, HTML generator, numarray for U3 distribution.

Basically that means that the complete system initially in $path1\host will
be moved dynamically to $path2\at execution.
To take PIL as an example, I notice when I launch Idle in a "relative"
manner: I am in $path1\host that $path1\host\Lib\site-packages\PIL is in
the sys.path before I do anything.

I notice that there is a PIL.pch file in site-packages:

Q1) is that read by python ?
On the other hand, even after appending all I can think of in sys.path, I
still get an error (cannot find module) trying to load win32com.client: it
fails in the win32api import in win32com.client.

pywin32.pch is there.

I think all the .dlls are there also, so I'm a bit confused.

Q2) what should I be looking for ?
Also, I seemed to notice in the past that modules (my own) not listed in any
__init__.py where found under Linux but not Windows for which I had to
upgrade my __init__.py.
Q3: is that true ?
Regards,

Philippe


Apr 8 '06 #1
2 1243
PS: I forgot to say that on the win32api import I get a "DLL load failed"

Philippe
Philippe Martin wrote:
Hi,

I am currently packaging python and a few libraries: PyWin32, PySerial,
PIL, wxPython, HTML generator, numarray for U3 distribution.

Basically that means that the complete system initially in $path1\host
will be moved dynamically to $path2\at execution.
To take PIL as an example, I notice when I launch Idle in a "relative"
manner: I am in $path1\host that $path1\host\Lib\site-packages\PIL is in
the sys.path before I do anything.

I notice that there is a PIL.pch file in site-packages:

Q1) is that read by python ?
On the other hand, even after appending all I can think of in sys.path, I
still get an error (cannot find module) trying to load win32com.client: it
fails in the win32api import in win32com.client.

pywin32.pch is there.

I think all the .dlls are there also, so I'm a bit confused.

Q2) what should I be looking for ?
Also, I seemed to notice in the past that modules (my own) not listed in
any __init__.py where found under Linux but not Windows for which I had to
upgrade my __init__.py.
Q3: is that true ?
Regards,

Philippe


Apr 8 '06 #2
Hi,

I had to move the dlls from pywin32_system32 to where python.exe is.

PS: if someone has a great desire to have another library included in the
package, let me know.

Regards,

Philippe

Philippe Martin wrote:
Hi,

I am currently packaging python and a few libraries: PyWin32, PySerial,
PIL, wxPython, HTML generator, numarray for U3 distribution.

Basically that means that the complete system initially in $path1\host
will be moved dynamically to $path2\at execution.
To take PIL as an example, I notice when I launch Idle in a "relative"
manner: I am in $path1\host that $path1\host\Lib\site-packages\PIL is in
the sys.path before I do anything.

I notice that there is a PIL.pch file in site-packages:

Q1) is that read by python ?
On the other hand, even after appending all I can think of in sys.path, I
still get an error (cannot find module) trying to load win32com.client: it
fails in the win32api import in win32com.client.

pywin32.pch is there.

I think all the .dlls are there also, so I'm a bit confused.

Q2) what should I be looking for ?
Also, I seemed to notice in the past that modules (my own) not listed in
any __init__.py where found under Linux but not Windows for which I had to
upgrade my __init__.py.
Q3: is that true ?
Regards,

Philippe


Apr 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Pierre Rouleau | last post: by
699 posts views Thread by mike420 | last post: by
reply views Thread by Chris McKeever | last post: by
3 posts views Thread by Stephen Ferg | last post: by
4 posts views Thread by Helmut Jarausch | last post: by
8 posts views Thread by jmDesktop | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.