944,156 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 3791
  • Python RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Nov 6th, 2009
0
Re: How to permenantly set PYTHONPATH for 2.6 and 3.0?
Click to Expand / Collapse  Quote originally posted by prouty ...
Python Syntax (Toggle Plain Text)
  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.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,656 posts
since Jul 2008
Nov 6th, 2009
0
Re: How to permenantly set PYTHONPATH for 2.6 and 3.0?
That means that the startup code from Gribouillis could also be written this way ...
python Syntax (Toggle Plain Text)
  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.
Moderator
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: loops and parameters?
Next Thread in Python Forum Timeline: List convert to string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC