[Tutor] "hello, python world!"

Michael Janssen Janssen at rz.uni-frankfurt.de
Sat Mar 20 09:12:18 EST 2004


On Fri, 19 Mar 2004, python_simpleton wrote:


> Q. On my first night trying to learn Python 2.3, I noticed when I
> click on the program it opens a window that lookes like DOS, is
> this because Python for Windows is based on python for DOS?(Read
> that in the instalation)

it's not DOS, it's a shell-window. You can type commands in a shell
window or run programms that havn't a graphical interface. I would
suggest to learn how to start a raw shell window (without prestarted
python) and how to start python from there on or launch your
script-files (this suggestions is made by a linux user how can't
live without shells ;-). Or use IDLE to give you a python session
and run scripts.

> Q. Can python change the input or raw_input window to the size of
> a message box with color? (pixels, percent ect.)

You intermixes textmode programms (like the python interactive mode)
and GUI (graphical user interface) programms. The latter can spawn
all kinds of boxes and windows and - of course - can be programmed
in python. Doing GUI programming might be a huge steps for a
beginner (but some kind of steps you've allways to take).

The other possibility is to stay in textmode and think about
problems not grafical representation. Then you're stuck to whatever
your shell window provides.


> Q. I had a hard time figuring out how to do the password.py in the
> tutorial Josh Cogliati made. it took me hours trying to use the
> command line and IDLE and reading error after error to notice the
> text files that came with 2.3 then i typed the program in Notepad
> and opened it with IDLE (now i find you can just open new window!)
> Is Notepad suitable for programming on Windows XP? I use the
> internest on a Windows ME.

It's fine ;-) You probably want two more things: colored code and
help with indentation (last is more important, not because
indentation is that hard, but it's much to type with no help by the
text-editor). You need to get a real text-editor with those features
(perhaps other can suggest what to use under MS-Windows).


> Q. Can I attach files, example code, print out of errors
> incountered?

To ask us about it? Yes, definitly. Keep it to the relevant parts
(tracebacks are allways relevant in full) and paste it directly into
your mail text. When showing some code it's best when the code is
actually runable which means don't cut it to tight to the relevant
parts ;-).


> Q. Since indentation is very important where can i go to find the
> rules in a way a non-programmer can understand(high school level)

What's difficult to understand (I even don't know that rules exist
;-) OTOH there must be rules ;-)? Make shure your text-editor does
a good job helping you here (mine is 80% correct about its guesses
where I want to have my indentation).

Search python.org :
http://www.python.org/topics/learn/
http://www.python.org/editors
http://www.python.org/doc/faq/gui.html


Michael



More information about the Tutor mailing list