[IronPython] Accessing search path through ScriptEngine

2008-03-29 Thread Curt Hagenlocher
The script engine allows you to set the search path by calling ScriptEngine.SetScriptSourceSearchPaths, but it neither lets you query the existing path nor amend it -- just set it outright. Is this intentional? -- Curt Hagenlocher [EMAIL PROTECTED] ___

[IronPython] IP 2 Hosting

2008-03-29 Thread Michael Foord
Hello guys, I'm trying to do some simple examples of hosting with IronPython 2. Boy you made things more complicated than IronPython 1. :-) Unfortunately the DLR hosting spec document is out of date. I have a couple of questions (but will keep exploring). The simplest use case is just to

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Curt Hagenlocher
Some of those look like names from A9, which have changed in B1. The easiest way to evaluate an expression from scratch seems to be as follows: ScriptEngine engine = ScriptRuntime.Create().GetEngine(py); ScriptScope scope = engine.CreateScope(); ScriptSource source =

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Michael Foord
Curt Hagenlocher wrote: Some of those look like names from A9, which have changed in B1. I'm using B1. I expect they'll change in the next release though. *sigh* ;-) In the old days a beta used to mean the API was fixed and it was only bugfixes that would go in... 0.5 wink Michael The

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Michael Foord
Curt Hagenlocher wrote: Some of those look like names from A9, which have changed in B1. The easiest way to evaluate an expression from scratch seems to be as follows: ScriptEngine engine = ScriptRuntime.Create().GetEngine(py); ScriptScope scope = engine.CreateScope();

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Michael Foord
Curt Hagenlocher wrote: On Sat, Mar 29, 2008 at 10:32 AM, Michael Foord [EMAIL PROTECTED] wrote: In the old days a beta used to mean the API was fixed and it was only bugfixes that would go in... 0.5 wink heh It seems to me that B1 is more consistent with the various published

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Curt Hagenlocher
On Sat, Mar 29, 2008 at 10:51 AM, Michael Foord [EMAIL PROTECTED] wrote: Cool - I was just being rude. Hey, I feel your pain! I'd swear that I've rewritten more hosting code than I've written... Any ideas on switching on TrueDivision for the scope? This is what I was able to puzzle out. I

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Michael Foord
((IronPython.PythonEngineOptions)engine.Options).DivisionOptions = IronPython.PythonDivisionOptions.New; This worked! Thanks - it is for a simple embedding example which is a calculator. The winforms UI builds up expressions and the '=' button evaluates them with the Python

Re: [IronPython] Snippets in Trackback

2008-03-29 Thread Curt Hagenlocher
The snippets represent executable code that's generated dynamically by the DLR from your Python source. Do you have a small piece of sample code that reproduces the failure? On Sat, Mar 29, 2008 at 1:28 PM, Davy Mitchell [EMAIL PROTECTED] wrote: Hi All, IPY2.0 B1 Vista SP1 I keep seeing