Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Where python looks for path

Reply
Thread Tools

Where python looks for path

 
 
Philippe Martin
Guest
Posts: n/a
 
      04-08-2006
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




 
Reply With Quote
 
 
 
 
Philippe Martin
Guest
Posts: n/a
 
      04-08-2006
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


 
Reply With Quote
 
 
 
 
Philippe Martin
Guest
Posts: n/a
 
      04-08-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
python loggingL filter limitation, looks intentional? Chris Withers Python 0 01-16-2012 01:10 PM
What Python looks like iu2 Python 9 08-06-2008 05:27 AM
Torrent looks good. . . converted DVD files looks horrible. . . WHY!?! novak.arthur@gmail.com DVD Video 4 02-11-2007 06:57 PM
It looks like my mails to @python.org are all blocked Thomas Moore Python 1 11-16-2005 01:49 AM
SWT and Python (was: Re: What GUI toolkit looks the best?) Oren Tirosh Python 6 12-18-2003 02:13 AM



Advertisments