Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PYTHONPATH x *.pth???

Reply
Thread Tools

PYTHONPATH x *.pth???

 
 
Carlos Moreira
Guest
Posts: n/a
 
      09-04-2003
I want to install Python third packages in a
non-default directory.
What´s the better way?

- PYTHONPATH variable?
- *.pth files in site-packages?

I know that the two methos above are equivalents. But
what method will be keep in future Python releases
(for example)?

[]´s

Cadu


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      09-04-2003
Carlos Moreira wrote:

> I want to install Python third packages in a
> non-default directory.
> What´s the better way?
>
> - PYTHONPATH variable?
> - *.pth files in site-packages?


It depends on your requirements. For example:

- Why is it that you don't want to install the
packages in the default directory? Then, considering
that reason, why would it be acceptable to install
a .pth file there?

- Is it acceptable that users of your application set
PYTHONPATH?

- Do you have to consider multiple installations of Python

And so on.

You should also consider a third alternative:

- Extend sys.path explicitly in the application,
before importing the third package.

> I know that the two methos above are equivalents. But
> what method will be keep in future Python releases
> (for example)?


Both with be kept indefinitely.

Regards,
Martin

 
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
PythonPath not working with 2.2.3 on Win ME Rami A. Kishek Python 0 08-16-2003 06:54 AM
Re: Python..Tkinter..PYTHONPATH.. Steven Taschuk Python 0 07-30-2003 05:21 PM
Re: Python..Tkinter..PYTHONPATH.. klappnase Python 0 07-30-2003 10:12 AM
CGIHTTPserver looze PYTHONPATH vincent delft Python 1 07-13-2003 06:07 PM
jython and PYTHONPATH Harald Kirsch Python 1 06-29-2003 11:28 PM



Advertisments