Re: [IronPython] IP 2 Hosting

2008-03-31 Thread Michael Foord
, 2008 10:51 AM > To: Discussion of IronPython > Subject: Re: [IronPython] IP 2 Hosting > > 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

Re: [IronPython] IP 2 Hosting

2008-03-31 Thread Dino Viehland
ith what I just said somewhat...). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Saturday, March 29, 2008 10:51 AM To: Discussion of IronPython Subject: Re: [IronPython] IP 2 Hosting Curt Hagenlocher wrote: > On Sat, Mar 29, 200

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 engin

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.

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 vari

Re: [IronPython] IP 2 Hosting

2008-03-29 Thread Curt Hagenlocher
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 DLR hosting specs than A9 was --

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: > 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 > > Th

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 = engine.CreateSc

[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 evalu