----- Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> The API documentation itself can be found at
> http://compilerlab.members.winisp.net/dlr-spec-hosting.pdf (PDF) or
> http://compilerlab.members.winisp.net/dlr-spec-hosting.doc (Word). An
> update was just pushed yesterday.
Excellent! Thanks much for this.
I've taken a look at the updated text, and have a question about evaluating
arbitrary user text. I'm allowing the user to evaluate an arbitrary expression
OR a sequence of statements. If I use:
source = engine.CreateScriptSourceFromString(code, SourceCodeKind.Statements);
object result = source.Execute(scope);
then it works for statements (with a null result). If I use:
source = engine.CreateScriptSourceFromString(code,
SourceCodeKind.InteractiveCode);
object result = source.Execute(scope);
then that works fine with REPL expressions. As there isn't a Kind for either,
would there be issues if I do:
try {
source = engine.CreateScriptSourceFromString(code,
SourceCodeKind.Statements);
} catch (Exception e1) {
try {
source = engine.CreateScriptSourceFromString(code,
SourceCodeKind.InteractiveCode);
} catch (Exception e2) {
// report error
}
}
or is there a better way?
Thanks!
-Doug
> On Fri, Oct 31, 2008 at 8:45 AM, Douglas Blank <[EMAIL PROTECTED]> wrote:
>
> > What sources do you recommended for the latest IronPython RC1 hosting API?
> > As far as I have found most docs still use older API's and I don't think
> > Foord and Muirhead's latest available MEAP e-version is out yet. Thanks!
> >
> > -Doug
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com