please tell me where i should type a python script,i.e a program and how can i run it in the idle help me please
how to run a python script
Collapse
X
-
Tags: None
-
IDLE is a good editor for getting started. Many of use use it, still.Originally posted by selvanthiruplease tell me where i should type a python script,i.e a program and how can i run it in the idle help me please
Run IDLE from the menu: Start->Programs->Python 2.x-> IDLE (Python GUI).
In the File menu choose New Window.
Write a program ie script like
Save the file someplace that makes sense.Code:print "hello"
From the Run menu, choose Run Module F5.
That's it! Have fun and keep posting. -
how to run a python script
please tell me were should i type a script notepad or idle then where to save it ,
then how to run it in command line and idle also tell me the same for linux pleaseComment
-
On windows you can save it anywhere that you want to.Originally posted by selvanthiruplease tell me were should i type a script notepad or idle then where to save it ,
then how to run it in command line and idle also tell me the same for linux please
On Linux the first line must look something like
#! python
But I'm not sure about that.Comment
-
Just in case this information is situation specific, I am running python 2.5 on windows and use PythonWin as my editor.
Along the thoughts of where to save scripts and modules. I just create a directory for all my python stuff, then put it in the python search path by placing the full name of the directory in a file with a .pth extension in the python root directory (file can have any name, just needs that extension). That way wherever I am working, or when loading a script into pythonwin, python knows to look in that directory.Comment
Comment