[IronPython] pickling exceptions and differences between IronPython and cpython

2006-07-14 Thread Jason Ferrara
Using the pickle modules from cpython to pickle built in exceptions fails under IronPython because IronPython adds a clsException attribute which pickle can't handle. And example is below. Should this be considered a bug? IronPython 1.0.60712 (Beta) on .NET 2.0.50727.42 Copyright (c) Microso

[IronPython] Need help using IronPython from C#

2006-08-11 Thread Jason Ferrara
I'd like to do the equivalent of something like... import RemoteAdmin ls = RemoteAdmin.ConnectToService("localhost","LogViewer") numEntries = ls.GetNumberOfEntries() e = ls.GetEntry(numEntries - 1) entryString = str(e) in C#. So I get as far as PythonEngine e = new PythonEngine(); # The R

Re: [IronPython] Need help using IronPython from C#

2006-08-11 Thread Jason Ferrara
et to the methods and attributes of ls? > > -Original Message- > From: [EMAIL PROTECTED] [mailto:users- > [EMAIL PROTECTED] On Behalf Of Jason Ferrara > Sent: Friday, August 11, 2006 12:08 PM > To: Discussion of IronPython > Subject: [IronPython] Need help using Iron

Re: [IronPython] Need help using IronPython from C#

2006-08-12 Thread Jason Ferrara
On Aug 11, 2006, at 5:32 PM, Dino Viehland wrote: > You're quickly getting into the guts of the runtime, so you'll find > most of what you want over in Ops. > > To get an attribute off of an object you can do TryGetAttr(object > o, SymbolId name, out object ret). o would be your ls, SymbolId

[IronPython] custom ConfigurationSection in IronPython

2006-08-30 Thread Jason Ferrara
I want to write a custon ConfigurationSection in IronPython. So I try... class MySettings(System.Configuration.ConfigurationSection): # custom configuration stuff here c = System.Configuration.ConfigurationManager.OpenExeConfiguration( \ System.Configuration.ConfigurationUserLeve

Re: [IronPython] custom ConfigurationSection in IronPython

2006-08-31 Thread Jason Ferrara
Python? Thanks - Jason On Aug 30, 2006, at 2:33 PM, Jason Ferrara wrote: > I want to write a custon ConfigurationSection in IronPython. So I > try... > > class MySettings(System.Configuration.ConfigurationSection): > # custom

Re: [IronPython] custom ConfigurationSection in IronPython

2006-08-31 Thread Jason Ferrara
fine this class in IronPython. You could define a stub in C# > that calls into your Python using the engine APIs but that might be > more work than it's worth. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:users- > [EMAIL PROTECTED] On Behalf Of Jason

Re: [IronPython] custom ConfigurationSection in IronPython

2006-09-01 Thread Jason Ferrara
On Aug 31, 2006, at 4:00 PM, Dino Viehland wrote: > The Item property is the default indexer, so you should be able to > access it using foo[index]. > > As for your other question - Martin looked into this but I didn't > see a response from him... The problem seems to be that we don't > de

Re: [IronPython] What PythonEngine called my C# code? (was: custom ConfigurationSection in IronPython)

2006-09-18 Thread Jason Ferrara
Not that I saw. On Sep 18, 2006, at 11:14 AM, J. Merrill wrote: > Was an answer to this ever given? > > At 12:34 PM 9/1/2006, Jason Ferrara wrote >> If I wanted to write a stub in C#, how do I get access to a >> PythonEngine that represents the python environment that called

Re: [IronPython] What PythonEngine called my C# code? (was: custom ConfigurationSection in IronPython)

2006-09-20 Thread Jason Ferrara
In my case I'm looking to write assemblies in C# that makes use of modules defined in IronPython that others can use without having to know or care that they use IronPython (except for having to have the IronPython dlls around). Things are complicated by the fact that some of the modules us