An absolute Newbie question

W

wpog

Hello,

I have a question about using "IDLE", and that is whenever I start write my
own program in the "Python Shell" it will automatically execute whatever
command I have written, for example: >>> print 'Hello World"

So, how to I get it to not execute, so that I can write a program that has
ordinary executable functions, and stuff like that?

I do have some experience with Turbo Pascal, and so I'm hoping that this
will be an even easier language to learn, and thus far it does seem so, but
I need to get past this first;-).

Thanks in advance,

wpog
 
S

Scott Durkin

wpog,

In IDLE, go to the File menu and select New Window. You can write your
program there. Just save the file with the extension .py, such as
hello.py

Once the program is written, you can save the changes and press F5 to run
the script.

If you haven't checked out the links below, you might want to refer to them:

http://www.ibiblio.org/obp/thinkCSpy
http://www.honors.montana.edu/~jjc/easytut/easytut/easytut.html

Scott Durkin


--------------------------------------------------------------------
S c o t t J. D u r k i n
--------------------------------------------------------------------

Computer Science |||| Preston Junior High

(e-mail address removed) |||| http://staffweb.psdschools.org/sdurkin
____________________________________________________________________
___ _ ___ _ ___ _ ___ _ ___ _
[(_)] |=| [(_)] |=| [(_)] |=| [(_)] |=| [(_)] |=|
'-` |_| '-` |_| '-` |_| '-` |_| '-` |_|
/mmm/ / /mmm/ / /mmm/ / /mmm/ / /mmm/ /
|____________|____________|____________|____________|
| | |
___ \_ ___ \_ ___ \_
Computer Room [(_)] |=| [(_)] |=| [(_)] |=|
Lab N205 '-` |_| '-` |_| '-` |_|
/mmm/ /mmm/ /mmm/
____________________________________________________________________

970.419.7358 |||| 2005-2006
 
D

dirk dierickx

So, how to I get it to not execute, so that I can write a program that has
ordinary executable functions, and stuff like that?

file > open new window

the new window will not execute your code you type in there.
 
B

Brian van den Broek

wpog said unto the world upon 10/07/2005 12:41:
Hello,

I have a question about using "IDLE", and that is whenever I start write my
own program in the "Python Shell" it will automatically execute whatever
command I have written, for example: >>> print 'Hello World"

So, how to I get it to not execute, so that I can write a program that has
ordinary executable functions, and stuff like that?

I do have some experience with Turbo Pascal, and so I'm hoping that this
will be an even easier language to learn, and thus far it does seem so, but
I need to get past this first;-).

Thanks in advance,

wpog

Take a look at <http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/>.

But the quick answer:

Launch IDLE.
File Menu -> New Window
Type away. (Be sure to explicitly save with the py or pyw extension,
as IDLE does not add it for you.)

HTH,

Brian vdB
 
W

wpog

WOW!!!

I really appreciate the immediate response from the community!!! I thank
you all for all the help, and now I can start programming, and I also now
have a resource for help for a Newbie;-)

Later on I will broach the subject of creating .exe programs so that anyone
can run them on Windows, but that won't be for a while yet, but I did
download ":cx_Freeze-3.0.1-win32-py24"; however, I don't have a clue on
what the hell I'm doing yet, so I'll get to that later.

Anyway, I once again thank you all for the support, and suggestions, and I
hope to actually create something that people might use, like a magic 8
ball generator!;-p

Best Regards,
wpog
 
J

Justin Straube

wpog said:
I have a question about using "IDLE", and that is whenever I start write my
own program in the "Python Shell" it will automatically execute whatever
command I have written, for example: >>> print 'Hello World"

So, how to I get it to not execute, so that I can write a program that has
ordinary executable functions, and stuff like that?

Also if you open IDLE and in the menu bar go to Options >> Configure IDLE,
select the 'General' tab and you can specify if you want the interactive prompt
or an Edit Window to open at startup.

Then hitting F5 will execute the written code, and you can also go to Run >>
Python Shell and open an interactive prompt window.

Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,261
Messages
2,571,308
Members
47,976
Latest member
AlanaKeech

Latest Threads

Top