Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python program saving

Status
Not open for further replies.

NerdThreeThousands

Programmer
Jan 30, 2005
1
CZ
Hello, I have Python v2.4 running on windows and need to know how to save a program in it.

When I wrote a text in the dosbox I need to save it. I know that I can write it in IDLE and save, but I am trying to figure out how to save the file when I have written the code in dosbox in Python if it is possible.

I have searched this forum and did not find anything, also google was not much helpfull and I did not noticed any thing about saving in manuals what I read. So I tried to figure out in the dos but my try failed. Can somebody tell me(sorry I am a total noob) how to save without IDLE ?

Thanks for replies and plz do not flame me much
 
If the question you are asking is: How do I save a Python Script that I have created in an external editor like Notepad or Wordpad? then the answer is simple ->

File > Save As...

navigate to the desired location like My Documents and save the files as FILE.py

The .py extension is very important. Especially on Windows systems. Also you need to ensure that the path to python (C:\python24) is available on your PATH variable, so that anything that you write is executable.

If the question is how to save a file output to a file, that is clearly explained in the documentation.

If you are new to Python, the I suggest that you get one or both of the following:

Learning Python by Mark Lutz and David Asher on O'Reilly
Python Visual Quickstart Guide by Chris Fehily on Peachpit

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top