I do have to do everything you describe here in the current implementation of my system. I realize that importing a pyc file and compiling a string results in two different things. This is okay though as I'm fairly sure this will still suit my needs.
As I said, the file format I plan to store these compiled scripts in is proprietary, but it would be very comparable storing them in XML elements as CDATA. I'm hoping that this would allow me to import and run them, thereby removing the need for my app to compile scripts. -- http://mail.python.org/mailman/listinfo/python-list