Skip to content

Running the Application



Running the Application

Applications aren’t much good if you can’t run them. Python provides a variety of methods for running any application you create. This section explores the easiest method for running an application after you create  it. You see additional methods in the “Loading and Running Existing Applications” section of the chapter. The important thing to remember is that Python provides an extremely flexible environment, so if one method of performing a task doesn’t quite work, another method will almost cer- tainly  succeed.


To run this first application, choose Run➪Run Module. You see a new copy of the Python Shell window opens and then the output of your application appears, as shown in Figure 4-16.



Figure 4-16:

The output

of the example application appears in a Python Shell




The top two lines of the output in Figure 4-16 should be familiar by now — they’re the information that always appears when you start the shell. Next comes a



message. You see this message every time you run the application. To see this for yourself, select the Edit window and choose Run➪Run Module. The original Python Shell window is selected, another message appears, and you see the output from your application again, as shown in Figure 4-17.




Figure 4-17:

The Python

Shell window displays a Restart message each time

you run the application.