[IronPython] how do i get the ScriptModule for __main__

2007-07-16 Thread Iain Cartwright
I have built a C# class library based on RichTextBox as a drop-in ironpython (2.0A2) console for windows forms apps. I would like to access the __main__ module from my C# code via an IScriptModule but i cannot find a way to do this. I have a ScriptModule that represents the host applications o

Re: [IronPython] Perl to Python

2007-07-16 Thread Joe Mason
Depends entirely on the complexity of the Perl code. For simple scripts that I've had to make changes to, I've definitely found it easier to run through it once to convert the entire thing to Python, because the mental space you're in when converting code is very different from the one you're in

[IronPython] Perl to Python

2007-07-16 Thread Jon Cosby
Has anyone ever converted Perl code to Python or CSharp? Not knowing Perl is it even worth the undertaking? Jon Cosby ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

[IronPython] IronPython 2.0A2 performance problems

2007-07-16 Thread Arman Bostani
The following code runs about 13 times slower with version 2.0A2 than 1.1! -arman import System d = System.Collections.SortedList() t = System.DateTime.Now for k in xrange(10): d[k] = k print 'SortedList time', (System.DateTime.Now - t).Ticks/10 __

Re: [IronPython] Bug report

2007-07-16 Thread Simon Dahlbacka
On 7/16/07, 陶祖洪 <[EMAIL PROTECTED]> wrote: Yes, it just a demo path, not a real path, :-) But when I use capital character, it work well, please see follow example: yes of course, since \B isn't a recognized escape sequence (nor is \w)... (case sensitivity you know...) /S IronPython 1.1 (

Re: [IronPython] Bug report

2007-07-16 Thread Simon Dahlbacka
That's not a bug.. backslash is an escape character and \b happens to be the escape sequence for the bell character. You either need to escape the backslashes (with another backslash) or use raw strings e.g. "c:\\windows\\bin" r"c:\windows\bin" /Simon ps. who is adding a bin folder under c:\wi

[IronPython] Bug report

2007-07-16 Thread 陶祖洪
Hi Dino, I met a IronPython bug, does this bug has been reported? IronPython 1.1 (1.1) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append("c:\\bin") >>> sys.path ['D:\\Python\\IronPython', 'D:\\Python\\IronPython\\Lib', 'c:\\bin'] >