How to permenantly set PYTHONPATH for 2.6 and 3.0?

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #11
Nov 6th, 2009
Originally Posted by prouty View Post
  1. from distutils.sysconfig import get_python_lib
Yes, I knew there was a function like this, but I couldn't remember where it was. Thanks.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,141
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 948
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite
 
0
  #12
Nov 6th, 2009
That means that the startup code from Gribouillis could also be written this way ...
  1. # mystartup.py
  2. import sys
  3. from distutils.sysconfig import get_python_lib
  4. sys.path.append(get_python_lib())
Well, both ways ought to work equally well.

The advantage with the code from Gribouillis is that is somewhat self-documenting.
Last edited by vegaseat; Nov 6th, 2009 at 3:17 pm.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum


Views: 537 | Replies: 11
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC