Hi All,

I've written a Python replacement of fixbb, as shell/awk script that
will create tightly fitting bounding boxes for PostScript files.

Most of the functionality is encapsulated in a small function called
fixbb(filename). I'm importing this into other code via 'import'.

A few lines of code for command line handling make the module into a
freestanding program. For simplicity and ease of maintenance, I would
rather keep library and program as a single file.

However, the command line code is also executed when the module is
imported, not only when the stand-alone program is executed. That is
not, of course, intended (or working). 

Is there a (portable, standard) way for the program/module to find out
if it is imported or executed stand-alone?

You can find the code at
http://www.eprover.org/SOFTWARE/utilities.html

Bye,

    Stephan

-- 
-------------------------- It can be done! ---------------------------------
   Please email me as [EMAIL PROTECTED] (Stephan Schulz)
----------------------------------------------------------------------------
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to