"python exe" and "py plugins"

Miki Tebeka mikit at zoran.co.il
Tue Nov 18 10:35:11 EST 2003


Hello Marco,

> first of all ; sorry for my poor english ; i'm french ...
Hope my Israeli English will be good enough :-)

> but, i'd like to make my program "plugin'able" ...
> so i ask myself (and you too ;-), if i could do that :
> - release all "core program" in an exe (with py2exe)
> - release the plugins in ".py" files ... and distribute them in a subfolder
> of my core program.
> 
> and i like to call these "py files" from my core program ... (with
> execfile() ?)
> can the exe call theses, without an "installed python runtime" ? (i hope ;-)
I don't think there is a problem unless the plugin module uses some
libraries that py2exe didn't pack. In this case you need to provide
them as well. You can use distutils or py2exe --dry-run to determine
which packages are required by the plugin.

Also be aware of security hazard. If some plugin has
"sutil.rmtree("c:\\")" somewhere in it you're in big trouble. The
restricted execution modules in python are currently obsolete.

HTH.
Miki




More information about the Python-list mailing list