Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Jeff Hardy
On Tue, Mar 18, 2008 at 9:49 PM, Dino Viehland [EMAIL PROTECTED] wrote: Evaling __builtins__ should work (or import __builtin__ and then eval that). Evaluate, not Execute :). Thanks, Dino. The code, for anyone else who's interested, is: private static object MakePythonFile(ScriptEngine engine,

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Curt Hagenlocher
On Mon, Mar 17, 2008 at 5:26 PM, Dino Viehland [EMAIL PROTECTED] wrote: CodeContext isn't actually internal but it's also not available to you via the hosting APIs. Does this mean that we shouldn't be creating CodeContexts? I'm using the class

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Tarun Kapoor
. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher Sent: Wednesday, March 19, 2008 2:15 PM To: Discussion of IronPython Subject: Re: [IronPython] 2.0B1 Hosting: Creating Python Types On Mon, Mar 17, 2008 at 5:26 PM, Dino Viehland [EMAIL

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Curt Hagenlocher
On Wed, Mar 19, 2008 at 12:34 PM, Tarun Kapoor [EMAIL PROTECTED] wrote: Curt - at pycon, I heard that you are working on a CLR wrapper project. Under which python code will be have automatically generated wrappers and that way they can called in C# more easily... Can you pls provide some

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Tarun Kapoor
Hagenlocher Sent: Wednesday, March 19, 2008 2:55 PM To: Discussion of IronPython Subject: Re: [IronPython] 2.0B1 Hosting: Creating Python Types On Wed, Mar 19, 2008 at 12:34 PM, Tarun Kapoor [EMAIL PROTECTED] wrote: Curt - at pycon, I heard that you are working on a CLR wrapper project. Under which

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Curt Hagenlocher
On Wed, Mar 19, 2008 at 1:11 PM, Tarun Kapoor [EMAIL PROTECTED] wrote: If you need any help let me know. I am up for it. It is personally going to help me a lot, so I have vested interests in the project :) Is there a project webpage by the way, where I can read etc? It's on CodePlex at

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-19 Thread Dino Viehland
] On Behalf Of Curt Hagenlocher Sent: Wednesday, March 19, 2008 12:15 PM To: Discussion of IronPython Subject: Re: [IronPython] 2.0B1 Hosting: Creating Python Types On Mon, Mar 17, 2008 at 5:26 PM, Dino Viehland [EMAIL PROTECTED] wrote: CodeContext isn't actually internal but it's also not available

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-18 Thread Jeff Hardy
Hi Dino, Until then probably the only way to do it right now is to call __builtin__.file through Python code (to which you can pass in a stream). The ObjectOperations class should make that fairly easy (you can convert file to a delegate and then call it). I get the gist of this, but I

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-18 Thread Dino Viehland
Evaling __builtins__ should work (or import __builtin__ and then eval that). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Hardy Sent: Tuesday, March 18, 2008 7:29 PM To: Discussion of IronPython Subject: Re: [IronPython] 2.0B1 Hosting: Creating

[IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-17 Thread Jeff Hardy
Hi, I'm trying to figure out how to create an instance of a Python type (i.e. tuple and file) using the hosting interface (from C#). In older versions there was PythonTuple.MakeTuple, for example, but that seems to have disappeared. Now PythonTuple and PythonFile both require a CodeContext, which

Re: [IronPython] 2.0B1 Hosting: Creating Python Types

2008-03-17 Thread Dino Viehland
To: Discussion of IronPython Subject: [IronPython] 2.0B1 Hosting: Creating Python Types Hi, I'm trying to figure out how to create an instance of a Python type (i.e. tuple and file) using the hosting interface (from C#). In older versions there was PythonTuple.MakeTuple, for example, but that seems