Hello

This is a completely foreign thing to me, so, forgive my "Noob-ness"
I'm so embarassed.
You programmers out there are prob gonna say,
"how much easier can we MAKE it for you?"

I just installed the python gui on vista.
(I will re-install it on THIS xp machine also if someone is walking me through anything to do with the install, later...)

I actually found the window that came up during the installation cryptic. It LOOKED like there were checkboxes on the screen.
but, they allowed me to do NOTHING to them.

remember, I'm accustomed to standard windows (software) installations.

I ended up just going ahead with the installation.
since it appeared I couldn't change the check boxes...
I just went ahead with the assumption that all the options would BE installed.

But--- I do not KNOW for sure WHAT the screen was telling me.

Okay. now that THAT was "done"
I then tried to (again... forgive such extreme NOOBness)
I tried to make/save/run the "Hello Monty Python" one-line program.

(I THINK I saved it, but again, I'm not sure... I think I saved it in the directory that the python gui runs from actually)

I also wonder, do python programs REQUIRE line numbers?
or is it an option? (or what?)

to run the program,
In the suggestion, it said click on "F5 or RunModule"

I found no such thing as a "run module" option in the python gui.

I am confused. Obviously.
if anyone just guides me a bit... so I can save/run my very first python ONE LINE program... I'd be very greatful.

I mean, you'll probably have to be very literal and explicit on what to LOOK for/at and what to CLICK on or what to type in.
yah, I've got NOOB written all over me. Good Lord. It's prob right IN FRONT of my face...

In the meantime, I'll go back, look some more, re-read a couple things and see if I can figure out what is most likely right IN FRONT of me. I actually have to leave for a short while. be back in about two or 3 hours... to try again

(sheepishly and humbly, yours)
thank you

Recommended Answers

All 19 Replies

In the past I've done things like install the java envirnoment and make compile programs (java2) like THAT and they'd even run. But I'm confused with this python gui... at the moment.

"Ee's not DEAD... Ee's SLEEPING!"

Hi,

As far as I know your installation went fine, and I'm assuming you downloaded either 2.6 or 3.1 from here. Those two come with IDLE (The GUI you're probably using).
You can play around with it when you don't want to save your program, but if you're intending to write a program you want to save, you should press 'file' -> New Window.

I hope this has helped, if not you can always ask for more help.

And this is a good guide to begin playing with IDLE: One Day of IDLE Toying

commented: thank you for "checking" on me +1

thanx I ended up not spending any time on it yesterday afternoon. I'll continue now/this morning. see what I can do.

No, the line numbers are not part of the code. They are added by DaniWeb for your convenience. Click on (Toggle Plain Text), if you want to see the code without them, or you want to copy and paste code into your editor (in your case the IDLE editor). If IDLE shows >>> prompts, you are not in the editor part.

commented: tanx 4 lking in as I struggled to get it "going" +1

Hmmm I'm in the tutorial "One day of IDLE toying" and I am AT the prompt and I type in what they say to, (at >>>) ...ie:

>>> for i in range(10):
print i,

And in the example, you get a row of numbers counted out. displaying immediately upon execution of the simple loop
as in: 0 1 2 3 4 5 6 7 8 9

But, I get---

SyntaxError: invalid syntax (<pyshell#2>, line 2)
>>>

I thought I was doing the "right thing" in the right "place"
in the python gui, at the >>> prompt.

Mine is

IDLE version 3.1
Tk version 8.5

re: "if >>> shows you are not in the editor"

gotchya
thanx

Okay, basic progress.
I went into "New Window" since that gives you the editor in 3.1
then, I SAVED it (the small counting loop) as "test1.py"
THEN when to the drop down menu for "Run/ Run Module (or F5)

ok
THEN I got the interactive environment to actually run the program and it DID give me an error, highlighting the final "i"
and reporting "invalid syntax"

(the babe takes his first tottering step in python)

I click on "ok" in the "syntax error" popup, to get rid of it and acknowledge it. And go BACK to staring at the tutorials and the screen trying to understand what I am missing.

I THOUGHT I entered it exactly as suggested....

but, no nifty line of numbers counted out...

I should also mention.
in the tutorials it LOOKS like they are saying that I --SHOULD-- be able to simply type in a command at the prompt, like:

>>> print "hello world"

and get it to just automatically repeat the words HELLO WORLD

but... that is not happening. Instead I get the error:

SyntaxError: invalid syntax (<pyshell#0>, line 1)
>>>

I AM beginning to suspect that something is not 'right' with my installation of python gui.

WELL!!!

what do you know? I finally got it to print "Hello world"
now
the simple loop.

I'm on the python.org site. looking at their tutorials. I've got to just be mis-typing something.

THERE we go....

parenthesis. I was missing parenthesis.
that's all.

for i in range(10):
print (i),

That's the ticket. (paren around the 'i')

What a noob... LoL
I think I'm "getting it"
just simple syntax errors.
everything is probably fine.

all right!!!!
finally.

I think I'm getting past all the "simple stuff"!

I just assigned strings to a variable,
measured variable (string) length
AND counted in a loop as well...!

cool

I know I was just being silly... and this was all super basic, but
thanx for looking "In On It"
I'm positive I will need some "real" help with it soon enough!

Yes syntax is very important, just a note for now don't forget it's,
print("string")
or print('string')
The reason you can use either of those is because for instance.
print("it's")
or
print('<HTML BGCOLOR ="black">')
So yes when you are just beggining its good to for good habits now to save headaches later on :).

commented: thank you for checking on me +1

Appreciate it.... thanx!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.