Python windows interactive.
Larry Bates
larry.bates at websafe.com
Mon Oct 30 16:43:33 EST 2006
notejam wrote:
> I am trying to get started with a interactive version of Python for
> windows and need some help.
> I have played with the tutorial, and now want to write a program.
>
> In basic language, I could write something like
> 10 print "hello"
> 20 print "Jim"
>
> and if I run it I would get
> hello
> Jim
>
> How do I do sometihing simple like that in python?
> How do I enter line numbers, or if none, what do I do.
> Can the interpreter load a text file with my program in it?
> How do I list a program or the parts of a program I am interested in
> looking at?
>
> How do I run a python program?
>
Start with the tutorial here:
http://docs.python.org/tut/tut.html
Your program in python would be:
print "hello"
print "jim"
You don't have line numbers in Python
Yes the interpreter can load a text file with your program.
A good "beginners" version of Python for windows is:
http://www.activestate.com/Products/ActivePython/?tn=1
It has an easy to use interpreter window with both your
program and interactive prompt open on the screen.
To run a program you click run icon. To run outside the
interpreter you type python programname.py
-Larry
More information about the Python-list
mailing list