Python path help 2

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

Join Date: Oct 2006
Posts: 179
Reputation: HLA91 is an unknown quantity at this point 
Solved Threads: 2
HLA91 HLA91 is offline Offline
Junior Poster

Python path help 2

 
0
  #1
Oct 21st, 2006
Hi
The info "joeprogrammer's" gave me to place the python directory at the end of my path but im confused.
My path at the moment looks like this

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Adobe\AGL

Python on my pc is in my H:\ drive under a folder called python.
can somebody please write what my path should look like with python on it thanks.


HLA91

BE COOL AND DONT GET STRESSED!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,546
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 174
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Python path help 2

 
0
  #2
Oct 21st, 2006
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Adobe\AGL;H:\Python24
or whatever version of Python you have.

Normally you don't have to do this kind of thing, when you install Python properly with the downloaded MSI installer file.
Last edited by Ene Uran; Oct 21st, 2006 at 12:45 pm.
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 134
Reputation: LaMouche is on a distinguished road 
Solved Threads: 19
LaMouche's Avatar
LaMouche LaMouche is offline Offline
Junior Poster

Re: Python path help 2

 
0
  #3
Oct 21st, 2006
If you just want to add that directory instead of having to rewrite the PATH, just type in:

PATH = H:\Python24; %PATH%

(or whatever version of python... maybe H:\Python25)

The %PATH% is your current path, so this method just adds that directory.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,109
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: 943
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Python path help 2

 
0
  #4
Oct 21st, 2006
A short code to show PYTHONPATH ...
  1. # show the system path for Python --> PYTHONPATH
  2.  
  3. import sys
  4.  
  5. print "These are the directories Python looks into for modules and source files:"
  6. for folder in sys.path:
  7. print folder
  8.  
  9. print "-"*30 # print 30 dashes
  10.  
  11. print "This would be your present working folder/directory:"
  12. print sys.path[0]
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
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC