In python beyond 'exec string' is there a way to 'import' using the db as a filesystem

Posted by molicule on Stack Overflow See other posts from Stack Overflow or by molicule
Published on 2010-05-03T20:32:28Z Indexed on 2010/05/03 20:58 UTC
Read the original article Hit count: 166

Filed under:

Although it does not seem possible, I wanted to put this out there to see if others had some innovative solutions to 'dynamically loading and executing code in python'

So if one saved code in a database, one could read it and 'exec it', however if one wanted to use it in a similar fashion to the filesystem, one would need to

  1. 'save and load the compiled .pyc'
  2. create an 'import dbimp' ala 'import imp' etc.

any pointers? ideas? thoughts?

© Stack Overflow or respective owner

Related posts about python