Writing a Python Program

David LeBlanc whisper at oz.net
Mon Aug 19 04:26:26 CEST 2002

When you click on Python in Windows, a command window (dos box) opens and
displays a python prompt. This isn't a particularly good way to create
programs for python: you should use an editor and then run the whatever.py
file you create instead. If you want python to run this script when you
double click it in a file explorer window, you have to associate the .py
file extension with python. This is usually done for you if you use an
automatic installer on Windows platforms. If the association isn't there,
click on any .py file, right click it, select "open with...", click on the
"other..." button at the bottom of the dialog and then use the file open
dialog to select python.exe. This associate python with all .py files.

Another alternative is to use Idle, which offers editing and debugging in
GUI windows (not a dos window). If it's not in the python group of your
start menu, you can navigate to python??\tools\idle (where ?? is your python
version) and click on idle.py (or idle.pyw).

I can think of several other meanings for your question, so if the above
doesn't answer your question, please ask again with more detail.


David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Ali K
> Sent: Sunday, August 18, 2002 17:35
> To: python-list at python.org
> Subject: Writing a Python Program
> I would like to know how to write a program on the interface that
> opens when
> you click on python.exe.
> --
> http://mail.python.org/mailman/listinfo/python-list

More information about the Python-list mailing list