943,931 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 4156
  • Python RSS
Aug 13th, 2005
0

I need help with setting up a "Path"......

Expand Post »
Hey I'm a new member here. I just need some help. I need help with setting the path for python. I must set a path in Windows to the directory where the Python.exe is located so that I can execute Python script. I need to get the directory containing the file names python.exe to be listed in my system environment variable named "path." If you guys can give me a step by step procedure that'll be great. I need to set the path because I want to execute my script at the "Command Prompt" to see if I did it correctly and also to see if I get the value "13." Thanks, I'll be in contact.

My regards,
luxnova
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
luxnova is offline Offline
2 posts
since Aug 2005
Aug 13th, 2005
0

Re: I need help with setting up a "Path"......

PYTHONPATH is installed by the python installer package (python-2.4.1.msi or python-2.4.1.exe) that you hopefully downloaded from: http://www.python.org

This program will show you the path ...
Python Syntax (Toggle Plain Text)
  1. import sys
  2. print sys.path

The result will be a list looking something like that:
Python Syntax (Toggle Plain Text)
  1. ['D:\\Python24\\Atest', 'D:\\Python24\\python24.zip', 'D:\\Python24\\Atest', 'D:\\Python24\\DLLs', 'D:\\Python24\\lib', 'D:\\Python24\\lib\\plat-win', 'D:\\Python24\\lib\\lib-tk', 'D:\\Python24', 'D:\\Python24\\lib\\site-packages', 'D:\\Python24\\lib\\site-packages\\Numeric', 'D:\\Python24\\lib\\site-packages\\PIL', 'D:\\Python24\\lib\\site-packages\\win32', 'D:\\Python24\\lib\\site-packages\\win32\\lib', 'D:\\Python24\\lib\\site-packages\\Pythonwin', 'D:\\Python24\\lib\\site-packages\\wx-2.5.4-msw-unicode']
depending on what you have installed and where Python is installed. The first element in the list is the present working directory.

It should not be necessary, but on Windows XP the path can be entered manually via the control panel, these are the steps:
control panel>System>Advanced>Environment Variable
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004

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: Classes in Tk
Next Thread in Python Forum Timeline: I have a problem with python....help





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


Follow us on Twitter


© 2011 DaniWeb® LLC