.py source in interpreter exectuable?

Dan Connolly (connolly@ulua.hal.com)
17 Jun 1994 19:34:05 GMT

If I were shipping a product consisting of a python interpreter, some
custom C modules, and a bunch of .py source modules, I'd like to be
able to bind them all in one big happy executable to save my users all
the installation hassles involved with $PYTHONPATH and such.

I've done this with X resources files... write a little perl ditty
that converts .res files to a c array. Compile the array, and then at
runtime, iterate over the array and call XrmPutLineResource().
Presto! app-defaults without the $XUSERFILESEARCHPATH hassle.

I suppose one could use the same trick with python... just put
the .py in the executable as string constants and use ceval()
or whatever to introduce the modules into the interpreter.

Anybody done this?

Dan

-- 
Daniel W. Connolly        "We believe in the interconnectedness of all things"
Software Engineer, Hal Software Systems, OLIAS project   (512) 834-9962 x5010
<connolly@hal.com>                   http://www.hal.com/%7Econnolly/index.html