[IronPython] Expression printing in interactive mode

Seo Sanghyeon sanxiyn at gmail.com
Wed Apr 29 19:47:30 CEST 2009


In changeset 42603, a change was made to
IronPython.Hosting.PythonCommandLine.RunOneInteraction,

- SourceUnit su = Language.CreateSnippet(s, "<stdin>",
SourceCodeKind.InteractiveCode);
+ SourceUnit su = Language.CreateSnippet(s, "<stdin>",
(s.Contains(Environment.NewLine))? SourceCodeKind.Statements :
SourceCodeKind.InteractiveCode);

Why is this? It seems to me that s always contains newline, so its net
effect is making all interactive code non-interactive. In Python, this
means no expression is printed in interactive mode.

-- 
Seo Sanghyeon



More information about the Ironpython-users mailing list