2006/9/18, Gary Stephenson <[EMAIL PROTECTED]>:
> I started off trying to use standard "compile()" function and "exec"
> statement, but was unable to make it work, although I'm sure there must be a
> way. Is there? How?

This works for me:

IronPython 1.0.2449 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> code = "def add(x, y):\n\treturn x + y\n"
>>> exec code
>>> add(2, 3)
5

Seo Sanghyeon
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to