1.3.2 Writing a Python Script

In addition to using the Python IDE interactively, you can also type out a complete Python program, saving it incrementally, and execute it or smaller selections of it.

You can create a new script, open a previously saved script, and save your currently open script by selecting the appropriate item in the ``File'' menu. Dropping a Python script onto the Python IDE will open it for editting.

If you try to open a script with the Python IDE but either can't locate it from the ``Open'' dialog box, or you get an error message like ``Can't open file of type ...'' see section 1.2.2.

When the Python IDE saves a script, it uses the creator code settings which are available by clicking on the small black triangle on the top right of the document window, and selecting ``save options''. The default is to save the file with the Python IDE as the creator, this means that you can open the file for editing by simply double-clicking on its icon. You might want to change this behaviour so that it will be opened by the PythonInterpreter, and run. To do this simply choose ``Python Interpreter'' from the ``save options''. Note that these options are associated with the file not the application.

See About this document... for information on suggesting changes.