Re: Python windows interactive.
- From: "abcd" <codecraig@xxxxxxxxx>
- Date: 30 Oct 2006 13:15:01 -0800
How do I do sometihing simple like that in python?
print "hello"
print "Jim"
How do I enter line numbers, or if none, what do I do.
no line numbers needed
Can the interpreter load a text file with my program in it?
read in a text file:
data = open("something.txt").read()
How do I list a program or the parts of a program I am interested in
looking at?
say you want to know what you can do with a list....
x = [1,2,3,4,5]
dir(x)
help(x)
help(x.append)
How do I run a python program?
create a file, type some code. then to at the end of the file (put
this)...
if __name__ == "__main__":
# call your functions here
this will let you run it from command line like this:
c:> python foo.py
.
- References:
- Python windows interactive.
- From: notejam
- Python windows interactive.
- Prev by Date: Re: Python windows interactive.
- Next by Date: Re: CHM help file for Python 2.5
- Previous by thread: Re: Python windows interactive.
- Next by thread: Re: Python windows interactive.
- Index(es):