[Tutor] "hello, python world!"

Anna Ravenscroft anna at aleax.it
Sat Mar 20 09:41:27 EST 2004


On Saturday 20 March 2004 04:31, python_simpleton wrote:
> i downloaded the python 2.3 installer and did a quick install. Icons are
> all over my desktop but I can get to all programs I need. I took a quick
> look at IDLE 1.0 (guess they have not updated this program)

IDLE is a separate development project from Python and IDLE version 1.0 is the 
updated version to run with Python 2.3 (I realize that's a little confusing 
but, basically, they left IDLE alone cuz it was working just fine for most of 
the time.) 

> I also opened 
> python command? It was black and white which brings me to my first
> question.

> 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)

As someone else mentioned, what you're looking at is a shell. I recommend just 
using IDLE for now while you're learning. As you saw, you can open a new 
window and create a text file there. I do that all the time. It gives you 
simple color-coding and automagical indentation. 

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

Yes - but that's gui programming and you don't want to go there, yet. Later.

> 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.

I've used notepad, but I recommend for now that you stick with IDLE's window 
and just use that. It'll give you a lot more help.

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

Don't attach them, cut and paste them into the email. 

> 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)

indent by 4 spaces whenever you indent. unindent when you're at the end of 
your block. (in IDLE, at the empty line after your block, just hit backspace 
once.) If you are "nesting" (putting one block of code inside another, just 
add another "level" of indentation. IDLE will help you do this.)

That's about as basic (and as complicated) as indentation gets. 

Good luck and keep up the good work. You may also want to check out Alan 
Gauld's Learn to Program (just google for it).

Anna




More information about the Tutor mailing list