[IronPython] IronPython on Windows Mobile

2006-07-12 Thread Vagmi Mudumbai
Hi All,I was wondering if it was possible to have IronPython running on Windows Mobile. I started compiling IronMath initially but I found that certain cases like CompilerGeneratedAttribute, Double.TryParse() were creating problems. Before I try to investigate into this further, I wanted to know if

[IronPython] "IronPython on Mono" report archive

2006-07-12 Thread Sanghyeon Seo
I created a simple webpage to link to my "IronPython on Mono" posts. http://sparcs.kaist.ac.kr/~tinuviel/fepy/doc/ironpython-mono-report.html Can't believe I have done this crazy job for 6 months now. :-) I reorganized my directory a little and renamed "howto" to "doc", so old SimpleHTTPServer ho

Re: [IronPython] IronPython 1.0 Beta 9 on Mono

2006-07-12 Thread Sanghyeon Seo
2006/7/13, Sanghyeon Seo <[EMAIL PROTECTED]>: > IronPython nt module now uses Marshal.GetHRForException method which > is not yet implemented in Mono. I filed Mono bug #78839 for this and > linked a patch that fixes the problem for me. Fixed in Mono revision 62550. That was fast. Seo Sanghyeon __

[IronPython] unicodedata for IronPython

2006-07-12 Thread Sanghyeon Seo
For my needs, I hastily wrapped System.Globalization.CharUnicodeInfo to implement unicodedata module. If you have similar needs, you may find it helpful. Currently implemented: decimal, digit, numeric, category. http://sparcs.kaist.ac.kr/~tinuviel/fepy/lib/unicodedata.py Seo Sanghyeon __

[IronPython] RE_Match.start with named group

2006-07-12 Thread Sanghyeon Seo
# test.py import re match = re.match(r'(?Ptest)', 'test') print match.span('test') print match.start('test') print match.end('test') Only the second print raises. This is trivial to fix. At re.cs line 552: -public int Start(int group) { +public int Start(object group) { Seo Sanghyeon __

[IronPython] OsCon?

2006-07-12 Thread Dino Viehland
Is anyone out there on the mailing list going to OsCon?  Maybe we could all meet up for lunch or dinner some day or night?   I’ll be arriving in Portland Tuesday night and am planning on leaving Friday night.  There will be several other people from the team there as well, I’ll let them s

Re: [IronPython] IronPython 1.0 Beta 9 on Mono

2006-07-12 Thread M. David Peterson
Very cool!  Thanks Seo > http://www.oreillynet.com/windows/blog/2006/07/building_ironpython_beta_9_on_1.html On 7/12/06, Sanghyeon Seo <[EMAIL PROTECTED]> wrote: A long-standing issue regarding source code encoding declaration wasfixed recently. Mono bug #78714, revision 62079.There was a Mono bug

[IronPython] IronPython 1.0 Beta 9 on Mono

2006-07-12 Thread Sanghyeon Seo
A long-standing issue regarding source code encoding declaration was fixed recently. Mono bug #78714, revision 62079. There was a Mono bug preventing class definition to work on console, or in snippet mode. I wrongly reported it as an IronPython bug in March. This is finally fixed. Mono bug #78253

Re: [IronPython] Speed test

2006-07-12 Thread JoeSox
Just fyi, here is my beta9 run of the speed test using the two files referenced below. The sum was 0.60 seconds, which is the second highest out of the tested beta4 thru beta9. Also, after fixing my project to work under beta9, it has also slowed down. With beta8 loading ConceptNet's default of 3

Re: [IronPython] SetGlobal and GetGlobal in IPbeta 9

2006-07-12 Thread JoeSox
Ah, perfect! I didn't see the cn_pe.Globals IDictionary. Now I get it. Thanks --Joe On 7/12/06, Shri Borde <[EMAIL PROTECTED]> wrote: > Hi Joe, > > The model for the hostig APIs is that a module (represented by EngineModule) > is basically an IDictionary, just like in Python (for the > most pa

Re: [IronPython] SetGlobal and GetGlobal in IPbeta 9

2006-07-12 Thread Shri Borde
Hi Joe, The model for the hostig APIs is that a module (represented by EngineModule) is basically an IDictionary, just like in Python (for the most part). The user can create a IDictionary if she wants a customized implementation of a dictionary. This will allow the user to override reads and

Re: [IronPython] SetGlobal and GetGlobal in IPbeta 9

2006-07-12 Thread JoeSox
Ok, I am looking over the release notes one more time, and it looks like I need to create a Dictionary to store all of the globals? Do I need to also create a EngineModule? This is why I am getting confused. Thanks On 7/12/06, JoeSox <[EMAIL PROTECTED]> wrote: > Sorry, I am now confused. I don

Re: [IronPython] IronPython Console on Unix.

2006-07-12 Thread Dino Viehland
Thanks for the bug report Miguel. I think the reason we're doing this today is because we're using Console.ReadKey which returns the raw key info instead of EOF when there's no input available. I've opened CodePlex bug 904 to track the issue (http://www.codeplex.com/WorkItem/View.aspx?Project

[IronPython] SetGlobal and GetGlobal in IPbeta 9

2006-07-12 Thread JoeSox
Sorry, I am now confused. I don't understand how I need to update my implementation of PythonEngine.SetGlobal and GetGlobal I looked around in beta 9 and figured I probably figure it out faster by posting here. And I am also wondering if I am going to lose some scope. I have a bunch of C# method

[IronPython] IronPython 1.0 Beta 9

2006-07-12 Thread Dino Viehland
Hello IronPython Community, We have just released IronPython 1.0 Beta 9. This release focuses primarily on fixing bugs resolving around compatibility with CPython, finalizing the public API surface, and improving the new method binder. There's also some significant performance improvements as

Re: [IronPython] Getting a call stack from an exception?

2006-07-12 Thread Dino Viehland
It shouldn’t be too hard to just get the line numbers & filenames – the nice thing that the standard traceback.py file gives you is it can get the lines of source code and include it in the displayed call stack as well.   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [IronPython] Getting a call stack from an exception?

2006-07-12 Thread Lee Culver
I’m probably going to just reimplement the functionality in pure IP.  If I get anywhere with it I’ll post it up here.   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Henderson Sent: Wednesday, July 12, 2006 1:37 PM To: 'Discussion of IronPython' Subject: Re:

Re: [IronPython] Getting a call stack from an exception?

2006-07-12 Thread Alex Henderson
I would be interested to know how you get on with this problem Lee - I’ve got the same issue myself.   Chez,     - Alex   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lee Culver Sent: Thursday, 13 July 2006 6:57 a.m. To: Discussion of IronPython Subject: R

Re: [IronPython] Getting a call stack from an exception?

2006-07-12 Thread Lee Culver
Yikes.  I was hoping for a way to do it in pure IronPython.  Thanks though.   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland Sent: Wednesday, July 12, 2006 11:54 AM To: Discussion of IronPython Subject: Re: [IronPython] Getting a call stack from an ex

Re: [IronPython] Getting a call stack from an exception?

2006-07-12 Thread Dino Viehland
Tracebacks are the correct way to do this, I recommend you install the standard Python library against IronPython to make this really useful – then you can do import traceback and use its handy functions (otherwise you’ll be walking the traceback list in sys.exc_info() which won’t be much f

[IronPython] Getting a call stack from an exception?

2006-07-12 Thread Lee Culver
I would like to print out a call stack from an exception object, much like what the IronPython console does when an exception goes uncaught.  I have tried doing something like this:   try:     … #something that causes an exception except Exception, e:     print e   But, like python,

[IronPython] IronPython Console on Unix.

2006-07-12 Thread Miguel de Icaza
Hello, Something in IronPython is now looking for Control-z, which is fine on Windows, but on Unix, Control-Z stands for "suspend application". In Unix, the end-of-file descriptor is control-d; Am not sure why the code is actually looking for a Control-Z, while it could be checking whet

Re: [IronPython] Modules available for IronPython?

2006-07-12 Thread Dino Viehland
To answer your 2nd question: What mapping are you referring to in particular? Our List class does implement both IList and IList so it should pass through to anything that takes one of those. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Rowe S

Re: [IronPython] type.__call__

2006-07-12 Thread Bruce Christensen
I can verify that importing SQLAlchemy 0.2.5 doesn't work: C:\Ip\IronPython\External\Regress\Python24\Lib>ipy IronPython 1.0.2383 (Beta) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys, os.path >>> sys.path.append(os.path.realpath(os.path.join(os.path.

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Ryan Davis
You can keep your IP code in their own files, and then read those files into strings with C#, which makes it not quite as ugly.  Still not as nice as being able to reference a dll, but not so bad as embedding in C#. Ryan Davis Acceleration.net Director of Programming Services 2831 NW 41st stree

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Frédéric Cadier
I had something working using IronPython.Runtime.OldClass and IronPython.Runtime.OldInstance, but I don't even understand what i've done... First, my IP script "ClassIP.py", defining a small class : class MyClass:     def __init__ (self, text):         self.text = text     def test(se

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Frédéric Cadier
The embedded solution... is there a mean ? Thanks JoeSox a écrit : On 7/12/06, Frédéric Cadier <[EMAIL PROTECTED]> wrote: Thanks Eyvind, but this forces me to transfer my IP code in some C# strings ! What i want is being able to use the assembly generated from my ip scripts (usi

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Sanghyeon Seo
2006/7/12, Frédéric Cadier <[EMAIL PROTECTED]>: > I hope I won't be too annoying with a newbie question... but I'm > wondering how to run IP code from C# : I would for example define a > class MyClass in myclass.py, and want to instanciate it from some C# code. I believe this (defining CLS type in

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread JoeSox
On 7/12/06, JoeSox <[EMAIL PROTECTED]> wrote: > On 7/12/06, Frédéric Cadier <[EMAIL PROTECTED]> wrote: > > Thanks Eyvind, > > > > but this forces me to transfer my IP code in some C# strings ! What i > > want is being able to use the assembly generated from my ip scripts > > (using the language ser

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread JoeSox
On 7/12/06, Frédéric Cadier <[EMAIL PROTECTED]> wrote: > Thanks Eyvind, > > but this forces me to transfer my IP code in some C# strings ! What i > want is being able to use the assembly generated from my ip scripts > (using the language service of the VS20005 SDK) and then use it in my C# > code..

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Frédéric Cadier
Thanks Eyvind, but this forces me to transfer my IP code in some C# strings ! What i want is being able to use the assembly generated from my ip scripts (using the language service of the VS20005 SDK) and then use it in my C# code... Eyvind Axelsen a écrit : > 1 Add a reference to IronPython.dll

Re: [IronPython] Running IronPython code from C#

2006-07-12 Thread Eyvind Axelsen
1 Add a reference to IronPython.dll in your project 2 Instantiate the python engine: IronPython.Hosting.PythonEngine pe = new IronPython.Hosting.PythonEngine(); 3 Run your code: string myCode = "some python code here"; pe.Execute(myCode); HTH, Eyvind. -Opprinnelig melding- Fra: [EMA

[IronPython] Running IronPython code from C#

2006-07-12 Thread Frédéric Cadier
Hi everyone, I hope I won't be too annoying with a newbie question... but I'm wondering how to run IP code from C# : I would for example define a class MyClass in myclass.py, and want to instanciate it from some C# code. Can someone help me ? Thank you, Frédéric Cadier __