Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Srivatsn Narayanan
No. You'll have to sync and build From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hellosticky Sent: Tuesday, August 26, 2008 4:10 PM To: 'Curt Hagenlocher'; 'Discussion of IronPython' Subject: Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Michael Foord
el Thanks, *From:* Curt Hagenlocher [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, August 26, 2008 7:04 PM *To:* [EMAIL PROTECTED]; Discussion of IronPython *Subject:* Re: [IronPython] Loading DLL from pyc.py into ScriptEngine Are you using Beta 4? You probably need to grab a p

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
t: Re: [IronPython] Loading DLL from pyc.py into ScriptEngine Are you using Beta 4? You probably need to grab a post-beta-4 nightly drop; we got rid of the IsComObject constructions that don't work in partial trust, but it happened right around the time Beta 4 was released and may not have made it

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
ion of IronPython' > Subject: RE: [IronPython] Loading DLL from pyc.py into ScriptEngine > > Clr.AddReference basically does two things. One it loads the > dll and two it pokes into the dll to see if there are any > compiled scriptcodes. If there are any, it then inserts a > Co

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
ay, August 26, 2008 6:57 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Loading DLL from pyc.py into ScriptEngine > > hellosticky wrote: > > Okay, I tried it but got a Security Exception in > System.Scripting.Com.ComMetaObject.IsComObject. The > permiss

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Curt Hagenlocher
"") > ); >ScriptSource source = > engine.CreateScriptSourceFromString( >code, >SourceCodeKind.Statements >); > source.Execute(scope); > } >

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Srivatsn Narayanan
t 26, 2008 3:46 PM To: Srivatsn Narayanan; 'Discussion of IronPython' Subject: RE: [IronPython] Loading DLL from pyc.py into ScriptEngine Thanks, I will try that. Can you explain again how just doing "import test" executes the test.py file that was compiled into the DL

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Michael Foord
ery logical.. Thanks, -Original Message- From: Srivatsn Narayanan [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 6:34 PM To: Discussion of IronPython; [EMAIL PROTECTED] Subject: RE: [IronPython] Loading DLL from pyc.py into ScriptEngine Also Assembly.Load is not suffi

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 26, 2008 6:46 PM > To: 'Srivatsn Narayanan'; 'Discussion of IronPython' > Subject: RE: [IronPython] Loading DLL from pyc.py into ScriptEngine > > Thanks, I will try that. Can you explain again how just doing > &

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Michael Foord
-- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Tuesday, August 26, 2008 3:12 PM To: [EMAIL PROTECTED]; Discussion of IronPython Subject: Re: [IronPython] Loading DLL from pyc.py into ScriptEngine hellosticky wrote: I also tried: Assembly assembly = A

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
August 26, 2008 6:34 PM > To: Discussion of IronPython; [EMAIL PROTECTED] > Subject: RE: [IronPython] Loading DLL from pyc.py into ScriptEngine > > Also Assembly.Load is not sufficient to be able to import the > compiled code. A clr.AddReference needs to be done which > publishes

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Srivatsn Narayanan
y, August 26, 2008 3:12 PM To: [EMAIL PROTECTED]; Discussion of IronPython Subject: Re: [IronPython] Loading DLL from pyc.py into ScriptEngine hellosticky wrote: > I also tried: > > Assembly assembly = Assembly.Load(AssemblyName); > ScriptRuntim

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread Michael Foord
hellosticky wrote: I also tried: Assembly assembly = Assembly.Load(AssemblyName); ScriptRuntime runtime = ScriptRuntime.Create(); runtime.LoadAssembly(assembly); ScriptScope scope = runtime.ExecuteFile("test.py"); object o = scope.Execu

Re: [IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
I also tried: Assembly assembly = Assembly.Load(AssemblyName); ScriptRuntime runtime = ScriptRuntime.Create(); runtime.LoadAssembly(assembly); ScriptScope scope = runtime.ExecuteFile("test.py"); object o = scope.Execute(null); But that t

[IronPython] Loading DLL from pyc.py into ScriptEngine

2008-08-26 Thread hellosticky
Hi, I created an IronPython DLL with "ipy.exe pyc.py /out:test /target:dll test.py" which created test.dll. Now, from C#, I'd like to execute test.py from test.dll. I just opened up dlr-spec-hosting and there's a CreateScriptSourceFromStream, but I don't see that in 2.0 Beta 4 bits. Here is wh