There are of course methods for executing Python statements. Like the eval function within Perl we can execute another Python script from within an existing script using the execfile function:

>>> script = 'hello.py'
>>> execfile(script)

The Python language was written as much more than just a simple interpreter. We can embed the Python interpreter into a C or C++ application, and therefore execute Python statements and even entire modules within the confines of another application. This is too advanced for this manual, so we won't into any detail, but it is another practical and indeed very useful way of executing Python applications.

If you want to embed Python into an application, see the standard documentation set which includes the manual Extending and embedding the python interpreter which should contain all the information you need.

     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows