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

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 ...

import sys
print sys.path

The result will be a list looking something like that:

['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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.