[IronPython] A few shameless plugs

2008-11-19 Thread Rob Oakes
Dear Group, I wanted to take a minute and bring a really cool series of articles to the groups attention. Over on DevHawk, Harry Pierson has been been writing about IronPython and WPF. He is currently up to article 4 in the series and I have found them to be really helpful. It also happens that

Re: [IronPython] Serial Port Commn: unhandled ObjectDisposedException though exception handler provided

2008-11-19 Thread Sheetal . Pawar
That close is kept just to ensure that the open call does not fail saying "port already open". It was just for testing purpose. Yes ReadTo is not an asynch API. The program execution is blocked at ReadTo till the timeout occurs. But the problem occurs when I try to abort the read operation in b

Re: [IronPython] Use of sys.exit

2008-11-19 Thread Michael Foord
Michael Foord wrote: Marty Nelson wrote: We have users writing extension scripts that execute from C#, and may be called multiple times (for example, hooked up to a Change event of some object or event in the main application) Is sys.exit(1) an acceptable way for them to exit the script

Re: [IronPython] Use of sys.exit

2008-11-19 Thread Michael Foord
Marty Nelson wrote: We have users writing extension scripts that execute from C#, and may be called multiple times (for example, hooked up to a Change event of some object or event in the main application) Is sys.exit(1) an acceptable way for them to exit the script (used like an early r

[IronPython] Use of sys.exit

2008-11-19 Thread Marty Nelson
We have users writing extension scripts that execute from C#, and may be called multiple times (for example, hooked up to a Change event of some object or event in the main application) Is sys.exit(1) an acceptable way for them to exit the script (used like an early return in C#)? Is there a

Re: [IronPython] IPy2: Problem inheriting from .Net object

2008-11-19 Thread Michael Foord
Curt Hagenlocher wrote: This looks like it's equivalent to 19434: http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19434 It does look to be the same issue - although that is marked for 2.1 and it does 'impinge upon subclassing' substantially. (The workaround, whilst not alway

Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Dino Viehland
Ok in that case I've closed mine :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Wednesday, November 19, 2008 8:49 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken Dino Viehland w

Re: [IronPython] IPy2: Problem inheriting from .Net object

2008-11-19 Thread Curt Hagenlocher
This looks like it's equivalent to 19434: http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19434 On Wed, Nov 19, 2008 at 8:42 AM, Glenn Jones <[EMAIL PROTECTED]<[EMAIL PROTECTED]> > wrote: > Hi all, > > It's us again! > With this object: > from System.IO import MemoryStream > > cl

Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Michael Foord
Dino Viehland wrote: Yeah, that's pretty bad... I've filed this as 19658 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19658. Thanks for reporting this. As well as 19656 that I reported it as. ;-) http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19656

[IronPython] List slicing in IPy 2

2008-11-19 Thread Glenn Jones
Hi all, Further discoveries from our update to use Ipy 2: In Ipy1: >>> from System import Int64 >>> i = Int64(3) >>> range(1, 100)[i:20] [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] in IPy2: >>> from System import Int64 >>> i = Int64(5) >>> range(1, 100)[i:20] Traceback (most re

Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Dino Viehland
Yeah, that's pretty bad... I've filed this as 19658 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19658. Thanks for reporting this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord Sent: Wednesday, November 19, 2008 5:

Re: [IronPython] List slicing in IPy 2

2008-11-19 Thread Dino Viehland
Thanks for the report. We should be defining __index__ on the .NET primitive numeric types as well. Filed as 19657 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19657 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Jones Sent: Wednesday, November 19,

[IronPython] IPy2: Problem inheriting from .Net object

2008-11-19 Thread Glenn Jones
Hi all, It's us again! With this object: from System.IO import MemoryStream class MockStream(MemoryStream): def __init__(self): MemoryStream.__init__(self) self.closed = False def Close(self): print 'Into close' MemoryStream.Close(self) print 'Past

Re: [IronPython] sys.argv is empty after compilation

2008-11-19 Thread Dino Viehland
Yep, we missed this again when we re-wrote precompilation support :( I have another pyc update I need to make and I'll update it to set sys.argv as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oren Held Sent: Tuesday, November 18, 2008 2:29 AM T

Re: [IronPython] Serial Port Commn: unhandled ObjectDisposedException though exception handler provided

2008-11-19 Thread Michael Foord
Well... I know nothing about these APIs and am guessing, but the traceback is in an AsyncCallback happening on another thread - so an exception handler in this thread isn't going to catch it. Why do you close the port before opening it? ReadTo doesn't look like an Async API [1]. You snipped th

Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Michael Foord
Curt Hagenlocher wrote: You're using the version in the IronPython_2_0 folder, yes? Yes. Michael On Wed, Nov 19, 2008 at 4:55 AM, Michael Foord <[EMAIL PROTECTED] > wrote: Hello guys, It looks like in source code drop 43712 module name lookup is broke

Re: [IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Curt Hagenlocher
You're using the version in the IronPython_2_0 folder, yes? On Wed, Nov 19, 2008 at 4:55 AM, Michael Foord <[EMAIL PROTECTED]>wrote: > Hello guys, > > It looks like in source code drop 43712 module name lookup is broken if the > name is also a .NET member name (presumably of Script or ScriptScope

[IronPython] IronPython 2 Bug: Module Name Lookup Broken

2008-11-19 Thread Michael Foord
Hello guys, It looks like in source code drop 43712 module name lookup is broken if the name is also a .NET member name (presumably of Script or ScriptScope) and clr has not been imported. To reproduce have a pure python module called 'check.py' containing: def check(module): print module