Re: Python windows interactive.
- From: "notejam" <notejam@xxxxxxxxxxxxx>
- Date: 30 Oct 2006 16:15:32 -0800
Thanks everyone for the help. I got a simple two line program to work
from a text file.
Can not figure out how to write more than one line in interpreter mode.
Is that all interpreter is good for, testing one liners? I have it
run the program everytime I hit return, and can not figure out how to
enter multiple lines of code. I can do multiple lines in text file, so
no problem, but I am jsut wondering can a program with 2 or more lines
be wrote from the interpreter mode?
Larry Bates wrote:
notejam wrote:
I am trying to get started with a interactive version of Python forStart with the tutorial here:
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?
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
.
- Follow-Ups:
- Re: Python windows interactive.
- From: Fredrik Lundh
- Re: Python windows interactive.
- From: Hendrik van Rooyen
- Re: Python windows interactive.
- From: Steve Holden
- Re: Python windows interactive.
- From: Gabriel Genellina
- Re: Python windows interactive.
- From: BartlebyScrivener
- Re: Python windows interactive.
- References:
- Python windows interactive.
- From: notejam
- Re: Python windows interactive.
- From: Larry Bates
- Python windows interactive.
- Prev by Date: Re: I want to work on Python
- Next by Date: Re: scared about refrences...
- Previous by thread: Re: Python windows interactive.
- Next by thread: Re: Python windows interactive.
- Index(es):
Relevant Pages
|