[Tutor] (no subject)

Alan Gauld alan.gauld at freenet.co.uk
Fri Jan 13 10:41:03 CET 2006


Hello David,

> Thanks in advance for any help!How do you create a script in 
> python...sorry
> to be so remedial...first script.

It sounds like you are a complete beginner to programming?
If not forgive me for patronizing you with too much detail.

A Python script is simply a text file. You can create a text file using
any text editor such as notepad in Windows. There are many other
text editors more suited to programming such as vim or emacs
or Scite. Every programmer has his./her own  favourite.

Python also comes with its own programming environment called
IDLE and I would recommend you, as a beginner, to use that.
(If you downloaded Python from Activestate they also provide
Pythonwin which is better than IDLE in my view). IDLE (and
Pythonwin if its there ) should be available under Pyhon in
your Start menu.

When you launch IDLE it initially opens an "interactive shell"
with a >>> prompt at which you can type python commands.
To create a script you need to use the File->New menu and
a blank window will open. You then type your python program
(script) into that, save the file with a file extension of .py and
run the program using IDLEs Run->Ruin module menu.
The output will appear in the original interactive wi8ndow.

Once your script is working properly you will also be able
to run it by simply double clicking in Windows Explorer.

I hope that answers your question.
If you have not already done so you shjould visit the
Non-Programmers page on the Python web site and
choose one of the web tutorials listed there.

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers


Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld




More information about the Tutor mailing list