RE:Python path

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

Join Date: Apr 2008
Posts: 5
Reputation: happimani is an unknown quantity at this point 
Solved Threads: 0
happimani happimani is offline Offline
Newbie Poster

RE:Python path

 
0
  #1
May 3rd, 2008
Dear All,


Iam Using python 2.3,i have pythonpath in environment variables,is it possible to
rename Pythonpath because i have to use two path alternatively first is pythonpath and second is PythonPath1 any idea?????????



regards
Narain
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,047
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: 935
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Python path

 
0
  #2
May 3rd, 2008
You simply do that within the program that needs the additional path information ...
  1. # if you want to import a custom module that is not
  2. # normally on the PYTHONPATH let's say it is in directory my_directory
  3. import sys
  4. # put this line before you start importing the module
  5. sys.path.append(r'C:\Python25\my_directory')
Last edited by vegaseat; May 3rd, 2008 at 4:57 pm.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC