O'Reilly logo

Python 2.6 Graphics Cookbook by Mike Ohlson de Fine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running a shortest Python program

We need a one line Python program that will prove that the Python interpreter is installed and working on our computer platform.

How to do it...

  1. Create a folder (directory) called something like construction_work or constr for short. You will place all your Python programs inside this directory. In a text editor such as gedit on Linux or notepad on Windows. If we are working in Windows, there is a nice editor called "Context" that can be downloaded for free from http://www.contexteditor.org/ Context, that is sensitive to Python syntax and has a search-and-replace function that is useful.
  2. Type the following line:
    Print 'My wereld is "my world" in Dutch'
    
  3. Save this as a file named simple_1.py, inside the directory called ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required