- 1). Download and install Python from python.org/download/releases/2.7. Select the most current version appropriate for your system -- version 2.7.2 as of this writing -- and click the download link. Double-click the downloaded .msi file and follow the on-screen instructions to install Python on your system.
- 2). Open Notepad by selecting "Programs," "Accessories" and "Notepad" from your "Start" menu.
- 3). Write a simple Python script using Notepad as a simple text editor. As an example:
for x in range(5):
print x
This script prints the integers from zero to 4 in a command prompt window. Save the script to your desktop as "count.py." - 4). Open a command prompt by selecting "Programs," "Accessories" and "Command Prompt" from your "Start" menu.
- 5). Type "cd Desktop" to navigate to your Desktop folder.
- 6). Type "python count.py" to run the Python script you just created.
SHARE