Created: 05-Dec-1997 Updated: 05-Dec-1997
Site Index of Changed Web Pages

Usage Tips and Frequently Asked Questions

While there is a General FAQ available, we will be collecting those questions specific to OS/2 below. Periodically, we'll submit the entries for inclusion into the General FAQ.

We are also collecting advice and tricks on using Python. Like any programming language, there are some nifty things you can do with it if you just know how.


1.0 How can I transparently use Python scripts as a batch language?

Under Unix a technique is used where the first line of the script is examined by the command shell to indicate which program to use to interpret the script. It looks like:
    #!/usr/bin/python

    print "Hello from Python"
The equivalent under OS/2 (when using my modified binaries) is:
    extproc c:\bin\python.exe -x

    print "Hello from Python"
One other requirement is that the name of the script file must end in .cmd not .py for the 'extproc' to be recognized.
Pagemaster <jrush@summit-research.com>