[IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Jeff Slutter
I have a Python script that creates a class within it. This Python class is derived off of a class, or interface, I made in C# - something like: class MyClass(Test.MainForm.IScript): ... Now, back in C#, I have gotten access to MyClass by: object myclass = someScope.GetVariable(MyClass);

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Michael Foord
Hi Jeff, Probably the easiest way of doing this is to define a Python function that uses issubtype. You can use this as a delegate from the C# side (warning untested): ScriptScope scope = engine.CreateScope(); ScriptSource imports = engine.CreateScriptSourceFromString(from System import

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Seo Sanghyeon
2008/12/16 Michael Foord fuzzy...@voidspace.org.uk: Probably the easiest way of doing this is to define a Python function that uses issubtype. You can use this as a delegate from the C# side (warning untested): You mean issubclass... -- Seo Sanghyeon

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Dino Viehland
...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Slutter Sent: Monday, December 15, 2008 12:15 PM To: Discussion of IronPython Subject: [IronPython] Determine the classes/interfaces a Python implements I have a Python script that creates a class within

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Dino Viehland
Of Michael Foord Sent: Monday, December 15, 2008 1:20 PM To: Discussion of IronPython Subject: Re: [IronPython] Determine the classes/interfaces a Python implements Hi Jeff, Probably the easiest way of doing this is to define a Python function that uses issubtype. You can use this as a delegate from

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Curt Hagenlocher
the classes/interfaces a Python implements Hi Jeff, Probably the easiest way of doing this is to define a Python function that uses issubtype. You can use this as a delegate from the C# side (warning untested): ScriptScope scope = engine.CreateScope(); ScriptSource imports