Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PYTHONPATH unnecessary with PythonWin?

Reply
Thread Tools

PYTHONPATH unnecessary with PythonWin?

 
 
r.e.s.
Guest
Posts: n/a
 
      12-31-2003
I have no PYTHONPATH nor any other python-related environment
variables, yet everything seems fine. (I'm using PythonWin
with winxp.) As long as modules are loaded through PythonWin,
is PYTHONPATH unnecessary? Or am I missing something?
 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      12-31-2003
Python searches some directories by default. The documentation probably
describes this in more detail. Using PYTHONPATH, you can
add to that list. For instance, it's often useful (particularly on
Unix) to have a personal directory listed in PYTHONPATH (like
~/lib/python) for your own modules.

Jeff

 
Reply With Quote
 
 
 
 
John Roth
Guest
Posts: n/a
 
      12-31-2003

"r.e.s." <(E-Mail Removed)> wrote in message
news:gpGIb.14334$(E-Mail Removed) link.net...
> I have no PYTHONPATH nor any other python-related environment
> variables, yet everything seems fine. (I'm using PythonWin
> with winxp.) As long as modules are loaded through PythonWin,
> is PYTHONPATH unnecessary? Or am I missing something?


sys.path is initialized to automatically provide access to the
standard parts of the Python installation; it is not necessary
to have a PYTHONPATH environment variable for this.
You can also stick things in sys.path with a foo.pth file.
It's only when you want to get outside of the standard libraries
that you need the PYTHONPATH environment variable.

Since I'm running Windows, I don't have "a" command line,
I have one for each project, and I simply initialize PYTHONPATH
in the command line startup for what I need for that project.

John Roth


 
Reply With Quote
 
r.e.s.
Guest
Posts: n/a
 
      12-31-2003
"Jeff Epler" <(E-Mail Removed)> wrote ...
> Python searches some directories by default. The documentation probably
> describes this in more detail. Using PYTHONPATH, you can
> add to that list. For instance, it's often useful (particularly on
> Unix) to have a personal directory listed in PYTHONPATH (like
> ~/lib/python) for your own modules.


I've created one folder for that purpose, namely
C:\Python23\Lib\site-packages\MyProjects
and I put all my own modules in various subfolders of that one.
It seems to work, but maybe I'm breaking some protocols?

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a
 
      01-02-2004
"r.e.s." <(E-Mail Removed)> wrote:

>I have no PYTHONPATH nor any other python-related environment
>variables, yet everything seems fine. (I'm using PythonWin
>with winxp.) As long as modules are loaded through PythonWin,
>is PYTHONPATH unnecessary? Or am I missing something?


On Windows, the initial value of PYTHONPATH is stored in the registry:

HKEY_LOCAL_MACHINE\
SOFTWARE\
Python\
PythonCore\
2.3\
PythonPath
--
- Tim Roberts, http://www.velocityreviews.com/forums/(E-Mail Removed)
Providenza & Boekelheide, Inc.
 
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
how to prevent unnecessary table resizing Dominik Jain HTML 9 08-04-2005 06:02 PM
Re: Has DivX become unnecessary? sentry DVD Video 2 04-25-2005 04:10 AM
Has DivX become unnecessary? Yef DVD Video 36 04-02-2005 02:11 AM
XSLT: avoiding unnecessary ns declaration in HTML output Steffen Beyer XML 3 11-02-2004 12:53 PM
Unnecessary Network trafic generated between only two comp out of =?Utf-8?B?bWlja3l0ZWpzaW5naEB5YWhvby5jb20=?= Wireless Networking 1 10-29-2004 09:49 AM



Advertisments