Re: Python windows interactive.



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
.



Relevant Pages

  • Re: pygame and python 2.5
    ... I committed to Python because it's a great language. ... modules on the Windows platform without having a copy of Visual Studio ... developing a math library based on GMPY to use ... obsolete compiler that's not even available. ...
    (comp.lang.python)
  • Re: Please test Phatch on Windows (was Re: ANN: Phatch = PHoto bATCH processor and renamer based on
    ... You'll be happy to hear that it appears to work on Vista, though I blush to admit I actually have a Python running on that platform. ... to port the code of Phatch fully to Windows as there were many issues. ... Common - Copies the most common pixel value ...
    (comp.lang.python)
  • ANN: wxPython 2.6.2.1
    ... There have been many enhancements ... wxPython is a GUI toolkit for the Python programming language. ... Currently supported platforms are 32-bit Microsoft Windows, ...
    (comp.lang.python)
  • ANN: wxPython 2.6.2.1
    ... There have been many enhancements ... wxPython is a GUI toolkit for the Python programming language. ... Currently supported platforms are 32-bit Microsoft Windows, ...
    (comp.lang.python.announce)
  • Re: Mac e programmazione
    ... Xcode, che istalli dal mpkg o /Installers, per creare le GUI; ... per programmarle poi in Python. ... Su Mac, Python e` parte dell'OS, come lo e` Aqua per le GUI; ... Per creare un binario eseguibile su Windows (ad esempio con py2exe, ...
    (it.comp.macintosh)