That will generate a SyntaxError just as if you passed a partial block to exec. If you're interested in experimenting with embeddable consoles, you should take a look at the code for IronPythonConsole which also uses PythonEngine to do its loops.
Ultimately, I think that IronPython should ship with a standard interactive console for both winforms and avalon that have a few customization hooks but are designed to be easily plugged into your apps. I'm still not sure if this embeddable console should be written in C# or in IronPython itself and am curious to hear the results of experiments using either approach. I'm leaning towards the idea of building it, and even the standard command-line console, in IronPython. Thanks - Jim ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith J. Farmer Sent: Friday, April 29, 2005 10:35 AM To: Discussion of IronPython Subject: RE: [IronPython] Executing a python source from C# What happens if we send in a partial block, as might happen when creating an embeddable console? string stmt = "for i in range(6):"; engine.Execute(stmt); Or is it expected that we ensure that such things don't happen? _______________________________________________ users-ironpython.com mailing list users-ironpython.com@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com