[IronPython] CreateScriptSourceFrom ... database?

Mark Grice markjoel60 at gmail.com
Mon Mar 1 14:53:48 CET 2010

I have a series of Python scripts that I am running from my C# program.

I use the CreateScriptSourceFromFile() method to read in the file and
execute it.

I would like, however, to move these scripts to a databse file -- simply a
large memo/text field containing the full script, and then execute them from
there instead of the file (to simplify my management).

I thought I could just convert the python file to a string, save it, and
then bring it back with CreateScriptSourceFromString() instead. But
the parser doesn't seem to like the embedded \r, \n. \t, etc.

Is there a simple way of accomplishing this that is escaping me? Has anyone
ever done anything similar?


-Mark Grice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100301/b786cbd4/attachment.html>

More information about the Ironpython-users mailing list