From niki at vintech.bg Mon Aug 1 16:46:04 2005 From: niki at vintech.bg (Niki Spahiev) Date: Mon, 01 Aug 2005 17:46:04 +0300 Subject: [IronPython] Plans for overloads? In-Reply-To: <200507212319.j6LNJYEq001270@aeimail.aei.ca> References: <200507212319.j6LNJYEq001270@aeimail.aei.ca> Message-ID: <42EE35AC.6050701@vintech.bg> Morgan Martinet wrote: >>Interesting, but this seems to be purely for decorating method definitions, >>not method calls, and I'm not sure how any similar syntax would help. > > This is not completely true. The way decorators work is that they wrap the > decorated object (either the function or another decorator if you cascade > them). The decorator is a Python object by itself, that can override > __call__ to implement its own behaviour, allowing you to route the call to > the proper method for instance. The decorator object can also contain its > own attributes that would help it take the right decision... > > >>The only thing I could think of would be to hint the parser, which may be >>what you had in mind. > > This is also a possibility as it would respect the Python syntax but would > allow you to introduce new attributes... ctypes uses decorators for describing calling signatures. HTH Niki Spahiev From martmaly at exchange.microsoft.com Tue Aug 2 19:20:07 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Tue, 2 Aug 2005 10:20:07 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: Hello IronPython community, it has been exactly seven weeks since the last IronPython release - 0.7.6. Back then we announced that the next release would take longer than our usual two weeks, it would include some larger-scale changes, and it would be version 0.8. The work did take couple weeks more than we expected and as OsCon approached, we decided to wait one extra week and announce our release at OsCon (as Keith correctly guessed). Additionally, once the changes were finished, we realized that given the extent of the changes, it was more appropriate to call the release a 0.9. So, what's new in IronPython 0.9? * The implementation of subclassing .Net classes and method overriding. * Improved overloaded method resolution. * Much better COM interop support * IronPython test suite is now part of the release (see below on the usage) * New example is included - Embedding IronPython * Multi-line import statement support: from x import ( ..., ... ) * Very simple support for tab-completion in the console window * Bug fixes There are many people who contributed to this release by providing feedback, reporting bugs and making valuable suggestions. Thank you very much: Jonathan Jacobs, Keith J. Farmer, Anthony Tarlano, Miguel de Icaza, Nicholas Jacobson, Luis M. Gonzalez, Michael Taylor, Ken Manheimer, Mike Hostetler, Morgan Martinet, David Wilson, J. Merrill, Richard Hsu, Niki Spahiev, xtian, Flexibal, grizlupo, Koly, perhaps. Few more notes: Test suite: The test suite resides in the Scripts\Tests folder and the easiest way to run the whole suite is to execute: bin\IronPythonConsole.exe Scripts\TestAll.py Executing individual test scripts also works: IronPythonConsole.exe Scripts\Tests\Assert.py Note that to run the tests, you need to build IronPythonTest.dll in the IronPythonTest folder. Improved console: The new console is turned off by default. To try it out, run IronPythonConsole with the command line parameter: "-X:TabCompletion". The parameter is case sensitive. The implementation is very simple for now. Known issues: The Community Technology Preview release of Visual Studio and .NET 2.0, version 2.0.50630.0. contains a change which is not compatible with IronPython built on .NET 2.0 Beta 2. The symptom is an exception: System.MissingFieldException: Field not found: 'System.Collections.Generic.KeyValuePair`2.Key'. The Key field on the KeyValuePair class became a property in the CTP release. Rebuilding IronPython on the Community Technology Preview release, version 2.0.50630.0 will fix the problem. We decided to maintain the dependency of the released binaries on .NET 2.0 Beta 2 (version 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. That is all for today, from the OsCon conference in Portland, OR Thank you and keep in touch The IronPython team http://workspaces.gotdotnet.com/ironpython http://lists.ironpython.com/listinfo.cgi/users-ironpython.com http://www.microsoft.com/downloads/details.aspx?FamilyID=cf5ae627-5df1-4f8a-ba8b-d64f0676f43f&displaylang=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From riltim at gmail.com Tue Aug 2 20:34:20 2005 From: riltim at gmail.com (Tim Riley) Date: Tue, 2 Aug 2005 14:34:20 -0400 Subject: [IronPython] IronPython 0.9/SharpDevelop 1.1 importing IronPython.dll error. Message-ID: I just downloaded IronPython 0.9 and when I try to import IronPython.dll I get an error message stating: "Setup Error: Failed to load resources from resource file Please check your Setup." Has anyone experienced this? If so is it an IronPython error or a SharpDevelop one? Any hints? From martmaly at exchange.microsoft.com Wed Aug 3 00:39:48 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Tue, 2 Aug 2005 15:39:48 -0700 Subject: [IronPython] IronPython 0.9/SharpDevelop 1.1 importingIronPython.dll error. Message-ID: <1DFB396200705E46B5338CA4B2E25BDE58F02E@DF-BANDIT-MSG.exchange.corp.microsoft.com> Unfortunatelly I don' have good answer for you. I actually did try it with both IronPython 0.9 and 0.7.6 and I got the same failure on both accounts. What I could not understand whether the 'setup' the dialog asked me to check, whether it was it setup of SharpDevelop, or IronPython. Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Tim Riley Sent: Tuesday, August 02, 2005 11:34 AM To: Discussion of IronPython Subject: [IronPython] IronPython 0.9/SharpDevelop 1.1 importingIronPython.dll error. I just downloaded IronPython 0.9 and when I try to import IronPython.dll I get an error message stating: "Setup Error: Failed to load resources from resource file Please check your Setup." Has anyone experienced this? If so is it an IronPython error or a SharpDevelop one? Any hints? _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sumitb at microsoft.com Wed Aug 3 00:44:10 2005 From: sumitb at microsoft.com (Sumit Basu) Date: Tue, 2 Aug 2005 15:44:10 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: Checked out the tab-support on the new console - COOL! I'm going to have to peek at this code shortly... ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Tuesday, August 02, 2005 10:20 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] IronPython 0.9 released Hello IronPython community, it has been exactly seven weeks since the last IronPython release - 0.7.6. Back then we announced that the next release would take longer than our usual two weeks, it would include some larger-scale changes, and it would be version 0.8. The work did take couple weeks more than we expected and as OsCon approached, we decided to wait one extra week and announce our release at OsCon (as Keith correctly guessed). Additionally, once the changes were finished, we realized that given the extent of the changes, it was more appropriate to call the release a 0.9. So, what's new in IronPython 0.9? * The implementation of subclassing .Net classes and method overriding. * Improved overloaded method resolution. * Much better COM interop support * IronPython test suite is now part of the release (see below on the usage) * New example is included - Embedding IronPython * Multi-line import statement support: from x import ( ..., ... ) * Very simple support for tab-completion in the console window * Bug fixes There are many people who contributed to this release by providing feedback, reporting bugs and making valuable suggestions. Thank you very much: Jonathan Jacobs, Keith J. Farmer, Anthony Tarlano, Miguel de Icaza, Nicholas Jacobson, Luis M. Gonzalez, Michael Taylor, Ken Manheimer, Mike Hostetler, Morgan Martinet, David Wilson, J. Merrill, Richard Hsu, Niki Spahiev, xtian, Flexibal, grizlupo, Koly, perhaps. Few more notes: Test suite: The test suite resides in the Scripts\Tests folder and the easiest way to run the whole suite is to execute: bin\IronPythonConsole.exe Scripts\TestAll.py Executing individual test scripts also works: IronPythonConsole.exe Scripts\Tests\Assert.py Note that to run the tests, you need to build IronPythonTest.dll in the IronPythonTest folder. Improved console: The new console is turned off by default. To try it out, run IronPythonConsole with the command line parameter: "-X:TabCompletion". The parameter is case sensitive. The implementation is very simple for now. Known issues: The Community Technology Preview release of Visual Studio and .NET 2.0, version 2.0.50630.0. contains a change which is not compatible with IronPython built on .NET 2.0 Beta 2. The symptom is an exception: System.MissingFieldException: Field not found: 'System.Collections.Generic.KeyValuePair`2.Key'. The Key field on the KeyValuePair class became a property in the CTP release. Rebuilding IronPython on the Community Technology Preview release, version 2.0.50630.0 will fix the problem. We decided to maintain the dependency of the released binaries on .NET 2.0 Beta 2 (version 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. That is all for today, from the OsCon conference in Portland, OR Thank you and keep in touch The IronPython team http://workspaces.gotdotnet.com/ironpython http://lists.ironpython.com/listinfo.cgi/users-ironpython.com http://www.microsoft.com/downloads/details.aspx?FamilyID=cf5ae627-5df1-4 f8a-ba8b-d64f0676f43f&displaylang=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Wed Aug 3 01:47:27 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Tue, 2 Aug 2005 16:47:27 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: <1DFB396200705E46B5338CA4B2E25BDE58F0AC@DF-BANDIT-MSG.exchange.corp.microsoft.com> Admitedly, the console is far from ideal. However I am happy it saves me type typing sys.LoadAssemblyFromFile :) M. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Sumit Basu Sent: Tuesday, August 02, 2005 3:44 PM To: Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9 released Checked out the tab-support on the new console - COOL! I'm going to have to peek at this code shortly... ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Tuesday, August 02, 2005 10:20 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] IronPython 0.9 released Hello IronPython community, it has been exactly seven weeks since the last IronPython release - 0.7.6. Back then we announced that the next release would take longer than our usual two weeks, it would include some larger-scale changes, and it would be version 0.8. The work did take couple weeks more than we expected and as OsCon approached, we decided to wait one extra week and announce our release at OsCon (as Keith correctly guessed). Additionally, once the changes were finished, we realized that given the extent of the changes, it was more appropriate to call the release a 0.9. So, what's new in IronPython 0.9? * The implementation of subclassing .Net classes and method overriding. * Improved overloaded method resolution. * Much better COM interop support * IronPython test suite is now part of the release (see below on the usage) * New example is included - Embedding IronPython * Multi-line import statement support: from x import ( ..., ... ) * Very simple support for tab-completion in the console window * Bug fixes There are many people who contributed to this release by providing feedback, reporting bugs and making valuable suggestions. Thank you very much: Jonathan Jacobs, Keith J. Farmer, Anthony Tarlano, Miguel de Icaza, Nicholas Jacobson, Luis M. Gonzalez, Michael Taylor, Ken Manheimer, Mike Hostetler, Morgan Martinet, David Wilson, J. Merrill, Richard Hsu, Niki Spahiev, xtian, Flexibal, grizlupo, Koly, perhaps. Few more notes: Test suite: The test suite resides in the Scripts\Tests folder and the easiest way to run the whole suite is to execute: bin\IronPythonConsole.exe Scripts\TestAll.py Executing individual test scripts also works: IronPythonConsole.exe Scripts\Tests\Assert.py Note that to run the tests, you need to build IronPythonTest.dll in the IronPythonTest folder. Improved console: The new console is turned off by default. To try it out, run IronPythonConsole with the command line parameter: "-X:TabCompletion". The parameter is case sensitive. The implementation is very simple for now. Known issues: The Community Technology Preview release of Visual Studio and .NET 2.0, version 2.0.50630.0. contains a change which is not compatible with IronPython built on .NET 2.0 Beta 2. The symptom is an exception: System.MissingFieldException: Field not found: 'System.Collections.Generic.KeyValuePair`2.Key'. The Key field on the KeyValuePair class became a property in the CTP release. Rebuilding IronPython on the Community Technology Preview release, version 2.0.50630.0 will fix the problem. We decided to maintain the dependency of the released binaries on .NET 2.0 Beta 2 (version 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. That is all for today, from the OsCon conference in Portland, OR Thank you and keep in touch The IronPython team http://workspaces.gotdotnet.com/ironpython http://lists.ironpython.com/listinfo.cgi/users-ironpython.com http://www.microsoft.com/downloads/details.aspx?FamilyID=cf5ae627-5df1-4 f8a-ba8b-d64f0676f43f&displaylang=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.hsu at gmail.com Wed Aug 3 03:22:33 2005 From: richard.hsu at gmail.com (Richard Hsu) Date: Tue, 02 Aug 2005 21:22:33 -0400 Subject: [IronPython] IronPython 0.9 released In-Reply-To: <20050802234737.5554B1BB71@che.dreamhost.com> References: <20050802234737.5554B1BB71@che.dreamhost.com> Message-ID: <42F01C59.4080600@gmail.com> Congratulations to the IronPython team for releasing v0.9 The tab feature is really cool indeed. Thanks to Sumit Basu for bringing it up. Has anyone has started to map C# [Ecma 3rd edition] language spec to IronPython ? I mean like feature by feature, how a C# thing can be done in IronPython. Sort of like IronPython for the C# programmer. Will you guys be writing a language spec for IronPython ? specially the part which in .NET realm. -- Richard Hsu. From korpse-ironpython at kaydash.za.net Wed Aug 3 09:31:17 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Wed, 03 Aug 2005 09:31:17 +0200 Subject: [IronPython] Overloads Message-ID: <42F072C5.8090004@kaydash.za.net> Hi, I'm pleased to see 0.9 is out and the thank you message. :-) Hopefully I'm just being stupid about this, but I can't seem to get this overload story to behave: >>> System.Random.Next >>> print System.Random.Next.__doc__ int Next() int Next(int, int) int Next(int) >>> print System.Random.Next[int].__doc__ int Next(int) >>> System.Random.Next[int](5) IronPython.Objects.PythonValueError: Bad args for the method at input_8.Run(Frame frame) Any suggestions are most welcome. -- Jonathan From korpse-ironpython at kaydash.za.net Wed Aug 3 15:15:58 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Wed, 03 Aug 2005 15:15:58 +0200 Subject: [IronPython] Overloads In-Reply-To: <42F072C5.8090004@kaydash.za.net> References: <42F072C5.8090004@kaydash.za.net> Message-ID: <42F0C38E.9020803@kaydash.za.net> Jonathan Jacobs wrote: > Hopefully I'm just being stupid about this, but I can't seem to get this > overload story to behave: Okay, now that I've had lunch and am fully awake, I realise I was being a clown. I first have to instantiate a System.Random instance, the bad args story was obviously because it was expecting a "this" argument. Sorry about that... -- Jonathan From martmaly at exchange.microsoft.com Wed Aug 3 17:52:38 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 3 Aug 2005 08:52:38 -0700 Subject: [IronPython] Overloads References: <42F072C5.8090004@kaydash.za.net> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F49@DF-BANDIT-MSG.exchange.corp.microsoft.com> One more thing. Random.Next is a good example to play with the overload method selection, but there is no need to do that. IronPython will resolve most cases automatically and the method selection is in place to handle the cases where IronPython doesn't seem to be doing the right thing. And we want to hear about those cases because they may be caused by the defficiency of the method resolution algorithm. Thanks again and I hope this works for you. Martin ________________________________________ From: Jonathan Jacobs Sent: 8/3/2005 12:31 AM To: users-ironpython.com at lists.ironpython.com Cc: Subject: [IronPython] Overloads Hi, I'm pleased to see 0.9 is out and the thank you message. :-) Hopefully I'm just being stupid about this, but I can't seem to get this overload story to behave: >>> System.Random.Next >>> print System.Random.Next.__doc__ int Next() int Next(int, int) int Next(int) >>> print System.Random.Next[int].__doc__ int Next(int) >>> System.Random.Next[int](5) IronPython.Objects.PythonValueError: Bad args for the method at input_8.Run(Frame frame) Any suggestions are most welcome. -- Jonathan _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Wed Aug 3 17:52:00 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 3 Aug 2005 08:52:00 -0700 Subject: [IronPython] Overloads References: <42F072C5.8090004@kaydash.za.net> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F48@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Jonathan, the Random.Next is not a static method. You can either pass the instance as the first argument: >>> System.Random.Next[int](System.Random(), 10) 7 >>> System.Random.Next[int](System.Random(), 10, 20) IronPython.Objects.PythonValueError: Bad args for the method at input_8.Run(Frame frame) >>> System.Random.Next(System.Random(), 10, 20) 18 or call: >>> r = System.Random() >>> r.Next.__doc__ 'int Next()\r\nint Next(int, int)\r\nint Next(int)' >>> r.Next[int](10, 20) IronPython.Objects.PythonValueError: Bad args for the method at input_12.Run(Frame frame) >>> r.Next[int](10) 5 However, I think your question brings up a valid point ... how do we distinguish between static and instance methods in the __doc__ strings? Surely there is not difference now and that is confusing. Martin ________________________________________ From: Jonathan Jacobs Sent: 8/3/2005 12:31 AM To: users-ironpython.com at lists.ironpython.com Cc: Subject: [IronPython] Overloads Hi, I'm pleased to see 0.9 is out and the thank you message. :-) Hopefully I'm just being stupid about this, but I can't seem to get this overload story to behave: >>> System.Random.Next >>> print System.Random.Next.__doc__ int Next() int Next(int, int) int Next(int) >>> print System.Random.Next[int].__doc__ int Next(int) >>> System.Random.Next[int](5) IronPython.Objects.PythonValueError: Bad args for the method at input_8.Run(Frame frame) Any suggestions are most welcome. -- Jonathan _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Wed Aug 3 20:23:25 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 3 Aug 2005 11:23:25 -0700 Subject: [IronPython] IronPython 0.9 released References: <20050802234737.5554B1BB71@che.dreamhost.com>, <42F01C59.4080600@gmail.com> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F4A@DF-BANDIT-MSG.exchange.corp.microsoft.com> I am not aware of any such effort being under way. We are, however, keenly aware of the need have the kind of documentation you are referring to. Martin ________________________________________ From: Richard Hsu Sent: 8/2/2005 6:22 PM To: users-ironpython.com at lists.ironpython.com Cc: Subject: RE: [IronPython] IronPython 0.9 released Congratulations to the IronPython team for releasing v0.9 The tab feature is really cool indeed. Thanks to Sumit Basu for bringing it up. Has anyone has started to map C# [Ecma 3rd edition] language spec to IronPython ? I mean like feature by feature, how a C# thing can be done in IronPython. Sort of like IronPython for the C# programmer. Will you guys be writing a language spec for IronPython ? specially the part which in .NET realm. -- Richard Hsu. _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdrucker at microsoft.com Tue Aug 2 22:50:05 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Tue, 2 Aug 2005 13:50:05 -0700 Subject: [IronPython] 'map' not working the same between IronPython-0.7.x and IronPython-0.9 ? Message-ID: I used to be able to do the following code: def foo(a): print a; filesraw = System.IO.Directory('D:\\temp\\photos"); map(foo,filesraw); and it would work just fine. Now, however, this is no longer working. The error I get is as follows: PythonTypeError: foo() takes exactly 1 argument, (97 given) This seems like it should work since filesraw is still enumerable and in fact, I can do the following: for file in filesraw: frint file -------------- next part -------------- An HTML attachment was scrubbed... URL: From korpse-ironpython at kaydash.za.net Wed Aug 3 21:50:49 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Wed, 03 Aug 2005 21:50:49 +0200 Subject: [IronPython] Overloads In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE212F48@DF-BANDIT-MSG.exchange.corp.microsoft.com> References: <42F072C5.8090004@kaydash.za.net> <1DFB396200705E46B5338CA4B2E25BDE212F48@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <42F12019.4010905@kaydash.za.net> Martin Maly wrote: > the Random.Next is not a static method. You can either pass the instance as the first argument: Hi Martin, Yes, I figured that out a little while later. Too bad I had already made a fool of myself. ;-) > However, I think your question brings up a valid point ... how do we distinguish between static and instance methods in the __doc__ strings? Surely there is not difference now and that is confusing. Fair enough. Something else that struck me while I was fishing around was that the doc string for both "ref" and "out" parameters show "&" (where "" appears as the real type name). Which, in turn, got me thinking about how one would go about specifying an overload for methods that took ref/out params? And finally, I'm having trouble calling functions with "ref" parameters: >>> print Foo.__doc__ int Foo(System.Int32&) >>> a = 5 >>> Foo(a) IronPython.Objects.PythonValueError: Bad args for the method at input_5.Run(Frame frame) Where "Foo" is defined as: public static int Foo(ref int a) { a *= 2; return a * 2; } Other than that, the new overload selector stuff lets me dump a whole bunch of my C# helper functions I had previously needed. Huzzah! Keep the good stuff coming! -- Jonathan From sdrucker at microsoft.com Wed Aug 3 21:54:51 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Wed, 3 Aug 2005 12:54:51 -0700 Subject: [IronPython] 'map' not working the same between IronPython-0.7.x and IronPython-0.9? Message-ID: I used to be able to do the following code: def foo(a): print a; filesraw = System.IO.Directory('D:\\temp\\photos"); map(foo,filesraw); and it would work just fine. Now, however, this is no longer working. The error I get is as follows: PythonTypeError: foo() takes exactly 1 argument, (97 given) This seems like it should work since filesraw is enumerable and in fact, I can do the following: for file in filesraw: print file -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdrucker at microsoft.com Wed Aug 3 22:01:51 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Wed, 3 Aug 2005 13:01:51 -0700 Subject: [IronPython] 'map' not working the same between IronPython-0.7.xand IronPython-0.9? Message-ID: Typo in the sample - should read: filesraw = System.IO.Directory.GetFiles('D:\\temp\\photos'); --S ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 12:55 PM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] 'map' not working the same between IronPython-0.7.xand IronPython-0.9? I used to be able to do the following code: def foo(a): print a; filesraw = System.IO.Directory('D:\\temp\\photos"); map(foo,filesraw); and it would work just fine. Now, however, this is no longer working. The error I get is as follows: PythonTypeError: foo() takes exactly 1 argument, (97 given) This seems like it should work since filesraw is enumerable and in fact, I can do the following: for file in filesraw: print file -------------- next part -------------- An HTML attachment was scrubbed... URL: From thane at magna-capital.com Wed Aug 3 23:35:41 2005 From: thane at magna-capital.com (Thane) Date: Wed, 3 Aug 2005 14:35:41 -0700 Subject: [IronPython] 'map' not working the same betweenIronPython-0.7.xand IronPython-0.9? In-Reply-To: Message-ID: <20050803213549.CB4891BB6D@che.dreamhost.com> I know that this isn't a solution, but, since map() may get deprecated sooner or later, why don't you use a list comprehension? [foo(a) for a in filesraw] Line above should do the trick. --Thane _____ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 1:02 PM To: Discussion of IronPython Subject: RE: [IronPython] 'map' not working the same betweenIronPython-0.7.xand IronPython-0.9? Typo in the sample - should read: filesraw = System.IO.Directory.GetFiles('D:\\temp\\photos'); --S _____ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 12:55 PM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] 'map' not working the same between IronPython-0.7.xand IronPython-0.9? I used to be able to do the following code: def foo(a): print a; filesraw = System.IO.Directory('D:\\temp\\photos"); map(foo,filesraw); and it would work just fine. Now, however, this is no longer working. The error I get is as follows: PythonTypeError: foo() takes exactly 1 argument, (97 given) This seems like it should work since filesraw is enumerable and in fact, I can do the following: for file in filesraw: print file -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Thu Aug 4 07:43:55 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 3 Aug 2005 22:43:55 -0700 Subject: [IronPython] Overloads Message-ID: <1DFB396200705E46B5338CA4B2E25BDE58F555@DF-BANDIT-MSG.exchange.corp.microsoft.com> The ref argument is, unfortunatelly, a bug. The conversion code tries to convert int into int& which it fails to do. I'll get the fix out in the next release. Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs Sent: Wednesday, August 03, 2005 12:51 PM To: Discussion of IronPython Subject: Re: [IronPython] Overloads Martin Maly wrote: > the Random.Next is not a static method. You can either pass the instance as the first argument: Hi Martin, Yes, I figured that out a little while later. Too bad I had already made a fool of myself. ;-) > However, I think your question brings up a valid point ... how do we distinguish between static and instance methods in the __doc__ strings? Surely there is not difference now and that is confusing. Fair enough. Something else that struck me while I was fishing around was that the doc string for both "ref" and "out" parameters show "&" (where "" appears as the real type name). Which, in turn, got me thinking about how one would go about specifying an overload for methods that took ref/out params? And finally, I'm having trouble calling functions with "ref" parameters: >>> print Foo.__doc__ int Foo(System.Int32&) >>> a = 5 >>> Foo(a) IronPython.Objects.PythonValueError: Bad args for the method at input_5.Run(Frame frame) Where "Foo" is defined as: public static int Foo(ref int a) { a *= 2; return a * 2; } Other than that, the new overload selector stuff lets me dump a whole bunch of my C# helper functions I had previously needed. Huzzah! Keep the good stuff coming! -- Jonathan _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From martmaly at exchange.microsoft.com Thu Aug 4 08:02:27 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 3 Aug 2005 23:02:27 -0700 Subject: [IronPython] 'map' not working the same betweenIronPython-0.7.xand IronPython-0.9? Message-ID: <1DFB396200705E46B5338CA4B2E25BDE58F562@DF-BANDIT-MSG.exchange.corp.microsoft.com> This is an interesting bug. The method resolution actually chooses the better method to call from the parameter binding perspective, but unfortunatelly, the map method then doesn't do what it should. Again, this is something I am going to fix soon. Thanks for the great repro, Steven Martin ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 1:02 PM To: Discussion of IronPython Subject: RE: [IronPython] 'map' not working the same betweenIronPython-0.7.xand IronPython-0.9? Typo in the sample - should read: filesraw = System.IO.Directory.GetFiles('D:\\temp\\photos'); --S ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 12:55 PM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] 'map' not working the same between IronPython-0.7.xand IronPython-0.9? I used to be able to do the following code: def foo(a): print a; filesraw = System.IO.Directory('D:\\temp\\photos"); map(foo,filesraw); and it would work just fine. Now, however, this is no longer working. The error I get is as follows: PythonTypeError: foo() takes exactly 1 argument, (97 given) This seems like it should work since filesraw is enumerable and in fact, I can do the following: for file in filesraw: print file -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Aug 4 11:17:30 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 02:17:30 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: Just noticing this warning.. Is LoadWithPartialName expected to remain in 2.0 since it's close to RTM? 'System.Reflection.Assembly.LoadWithPartialName(string)' is obsolete: 'This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202' C:\Program Files (x86)\IronPython-0.9\IronPython\Objects\ReflectedPackage.cs line 72 column 25 ..... Tab completion's cool :-) Have you been able to run the tests on XP x64 yet? I tried TestAll.py and it skipped Pystone, ParrotBench, and Python Regression. ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lbolognini at gmail.com Thu Aug 4 11:40:50 2005 From: lbolognini at gmail.com (Lorenzo Bolognini) Date: Thu, 4 Aug 2005 10:40:50 +0100 Subject: [IronPython] IronPython 0.9 released In-Reply-To: References: Message-ID: On 8/2/05, Martin Maly wrote: > Known issues: >Rebuilding IronPython on the Community Technology Preview release, > version 2.0.50630.0 will fix the problem. We decided to maintain the > dependency of the released binaries on .NET 2.0 Beta 2 (version > 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. So basically what's the story for the .NET 2 runtime support? Will you make it possible to integrate IronPy in VS .NET 2005 final release and use the .NET 2 runtime to develop ASP .NET apps? If I remember correctly IronPy 1.0 will only be compatible with the 1.1 runtime. Will it support something like partial classes ? la C# so that the code-behind file doesn't get polluted with the IDE generated code? I wouldn't really care about other .NET 2 features if I could have that so I would happily use .NET 1.1 to develop aspx. Thanks, Lorenzo From kfarmer at thuban.org Thu Aug 4 11:44:15 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 02:44:15 -0700 Subject: [IronPython] [0.9] Tab completion bug Message-ID: Enter in several lines, play around with tab completion. Then enter: >>> def foo(): ... Yields: ... previous tab completion results Apparently the buffer holding the expression to complete isn't cleared after a new line is started. Also, in the event that we are at the start of a line, such that the expression buffer is clear, could we insert a tab? I know others out there love their space bar, but I'm a tab guy, myself :-) ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Aug 4 12:11:06 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 03:11:06 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: I'm not sure where you got the idea that IronPython 1.0 only works with .NET 1.1? I can compile the IronPython solution using the VS 2005 Beta 2 release (and have, several times tonight). For what it's worth, IronPython needs the 2.0 runtime, since it uses 2.0 code generation, and supports 2.0 generics. As far as ASP.NET compiling pages written in IronPython, my memory is that ASP.NET would need to be modified to recognize a new language. At least, that's the case in 1.1; it's possible that 2.0 is more extensible in this regard (wish list if not). Speculation: you should be able to subclass Pages in IronPython, and then modify the aspx page to inherit from your IronPython class. Of course, we'd need to have compilation running (is that on the list for 1.0?). ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Lorenzo Bolognini So basically what's the story for the .NET 2 runtime support? Will you make it possible to integrate IronPy in VS .NET 2005 final release and use the .NET 2 runtime to develop ASP .NET apps? If I remember correctly IronPy 1.0 will only be compatible with the 1.1 runtime. Will it support something like partial classes ? la C# so that the code-behind file doesn't get polluted with the IDE generated code? I wouldn't really care about other .NET 2 features if I could have that so I would happily use .NET 1.1 to develop aspx. From tinuviel at sparcs.kaist.ac.kr Thu Aug 4 14:02:25 2005 From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon) Date: Thu, 4 Aug 2005 21:02:25 +0900 Subject: [IronPython] Building IronPython 0.9 with Mono Message-ID: <20050804120225.GA17288@sparcs.kaist.ac.kr> Hello, I tried to build IronPython 0.9 with Mono. I used Debian package currently in Sid to do so. With attached "patch", I succeeded building it, but it doesn't really run. Transcript follows: * * * tinuviel at debian:~/fepy$ mono --version Mono JIT compiler version 1.1.8.2, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal Globalization: normal tinuviel at debian:~/fepy$ gmcs --version Mono C# compiler version 1.1.5.0 * * * tinuviel at debian:~/fepy$ ls IronPython-0.9.zip mono-build.patch tinuviel at debian:~/fepy$ unzip -q IronPython-0.9.zip tinuviel at debian:~/fepy$ patch -p0 < mono-build.patch patching file IronPython-0.9/IronPython/Hosting/PythonEngine.cs patching file IronPython-0.9/IronPython/Modules/__builtin__.cs patching file IronPython-0.9/IronPython/Objects/PythonFile.cs patching file IronPython-0.9/IronPython/Objects/ReflectedPackage.cs patching file IronPython-0.9/IronPython/Objects/StringOps.cs patching file IronPython-0.9/IronPythonConsole/PythonCommandLine.cs patching file IronPython-0.9/IronPythonConsole/SuperConsole.cs patching file IronPython-0.9/makefile * * * tinuviel at debian:~/fepy$ cd IronPython-0.9 tinuviel at debian:~/fepy/IronPython-0.9$ rm -rf bin tinuviel at debian:~/fepy/IronPython-0.9$ mkdir bin tinuviel at debian:~/fepy/IronPython-0.9$ make gmcs -warn:0 -t:library -out:bin/IronMath.dll -recurse:IronMath/*.cs gmcs -warn:0 -t:library -r:bin/IronMath.dll -out:bin/IronPython.dll -recurse:IronPython/*.cs gmcs -warn:0 -t:exe -r:bin/IronPython.dll -out:bin/IronPythonConsole.exe -recurse:IronPythonConsole/*.cs * * * tinuviel at debian:~/fepy/IronPython-0.9$ mono bin/IronPythonConsole.exe IronPython 0.9.2042 on .NET 2.0.50215.16 Copyright (c) Microsoft Corporation. All rights reserved. >>> 1 + 1 System.NullReferenceException: Object reference not set to an instance of an object in <0x00010> IronPython.Objects.Frame:SetGlobal (System.String name, System.Object value) in <0x00067> input_0:Run (IronPython.Objects.Frame frame) in <0x002b0> IronPython.Hosting.PythonEngine:DoOneInteractive (IronPython.Objects.Frame topFrame) in <0x00064> IronPython.Hosting.PythonEngine:RunInteractive () >>> * * * Any idea? Seo Sanghyeon -------------- next part -------------- diff -ur IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs IronPython-0.9/IronPython/Hosting/PythonEngine.cs --- IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs 2005-07-29 11:21:38.000000000 +0900 +++ IronPython-0.9/IronPython/Hosting/PythonEngine.cs 2005-08-04 11:52:59.426015816 +0900 @@ -258,19 +258,10 @@ if (ExceptionDetail) { MyConsole.WriteLine(e.ToString(), Style.Error); } else { - string stack = e.StackTrace; MyConsole.Write(e.GetType().ToString(), Style.Error); MyConsole.Write(": ", Style.Error); MyConsole.WriteLine(e.Message, Style.Error); - string[] frames = stack.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - foreach (string frame in frames) { - if (frame.StartsWith(" at IronPython.") || - frame.StartsWith(" at ReflectOpt.") || - frame.StartsWith(" at IronPythonConsole.")) { - continue; - } - MyConsole.WriteLine(frame, Style.Error); - } + MyConsole.WriteLine(e.StackTrace, Style.Error); } e = e.InnerException; } diff -ur IronPython-0.9.old/IronPython/Modules/__builtin__.cs IronPython-0.9/IronPython/Modules/__builtin__.cs --- IronPython-0.9.old/IronPython/Modules/__builtin__.cs 2005-07-26 03:53:24.000000000 +0900 +++ IronPython-0.9/IronPython/Modules/__builtin__.cs 2005-08-04 11:54:10.899150248 +0900 @@ -576,13 +576,13 @@ } public static double round(double x) { - return Math.Round(x, MidpointRounding.AwayFromZero); + return Math.Round(x); } public static double round(double x, int n) { if (n < 0) { //!!! certinaly imprecise double factor = Math.Pow(10.0, -n); - return factor * Math.Round(x / factor, MidpointRounding.AwayFromZero); + return factor * Math.Round(x / factor); } return Math.Round(x, n); } @@ -725,4 +725,4 @@ public static object WindowsError = Ops.GetDynamicTypeFromType(typeof(PythonWindowsError)); #endregion } -} \ No newline at end of file +} diff -ur IronPython-0.9.old/IronPython/Objects/PythonFile.cs IronPython-0.9/IronPython/Objects/PythonFile.cs --- IronPython-0.9.old/IronPython/Objects/PythonFile.cs 2005-07-23 22:48:06.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/PythonFile.cs 2005-08-04 11:55:00.207654216 +0900 @@ -188,13 +188,6 @@ stream.Flush(); } - public int fileno() { - if (fstream != null) { - System.Runtime.InteropServices.SafeHandle sh = fstream.SafeFileHandle; - return (int)sh.DangerousGetHandle(); - } else return -1; - } - public bool isatty() { return false; } diff -ur IronPython-0.9.old/IronPython/Objects/ReflectedPackage.cs IronPython-0.9/IronPython/Objects/ReflectedPackage.cs --- IronPython-0.9.old/IronPython/Objects/ReflectedPackage.cs 2005-07-26 23:53:20.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/ReflectedPackage.cs 2005-08-04 11:55:41.801331016 +0900 @@ -24,12 +24,7 @@ [PythonType("package#")] public class ReflectedPackage : ICustomAttributes { public static string GetCoreTypeName(Type type) { - string name = type.Name; - if (type.IsGenericType) { - int backtick = name.IndexOf('`'); - if (backtick != -1) return name.Substring(0, backtick); - } - return name; + return type.Name; } private static ReflectedPackage topPackage = new ReflectedPackage(""); diff -ur IronPython-0.9.old/IronPython/Objects/StringOps.cs IronPython-0.9/IronPython/Objects/StringOps.cs --- IronPython-0.9.old/IronPython/Objects/StringOps.cs 2005-07-23 22:48:08.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/StringOps.cs 2005-08-04 11:57:09.976926288 +0900 @@ -707,14 +707,6 @@ return ret; } - private static List split(string _value, string[] seps, int maxsplit) { - string[] r = maxsplit == -1 ? _value.Split(seps, StringSplitOptions.None) - : _value.Split(seps, maxsplit + 1, StringSplitOptions.None); - List ret = List.MakeEmptyList(r.Length); - foreach (string s in r) ret.Add(s); //Str.make(s)); //!!! more evidence that multple strings is bad - return ret; - } - public static List split(string _value) { return split(_value, (char[])null, -1); } @@ -731,7 +723,7 @@ } else if (sep.Length == 1) { return split(_value, new char[] { sep[0] }, maxsplit); } else { - return split(_value, new string[] { sep }, maxsplit); + throw new Exception("non-char separator"); } } // diff -ur IronPython-0.9.old/IronPythonConsole/PythonCommandLine.cs IronPython-0.9/IronPythonConsole/PythonCommandLine.cs --- IronPython-0.9.old/IronPythonConsole/PythonCommandLine.cs 2005-07-29 11:21:38.000000000 +0900 +++ IronPython-0.9/IronPythonConsole/PythonCommandLine.cs 2005-08-04 11:57:25.817518152 +0900 @@ -204,7 +204,7 @@ if (tabState == null) tabState = new TabState(this, null); //ComputeChoiceList(b.ToString(), topFrame)); tabState.WriteNextChoice(); continue; - case ConsoleKey.Backspace: + case ConsoleKey.BackSpace: b.Remove(b.Length - 1, 1); Console.CursorLeft -= 1; Console.Write(' '); diff -ur IronPython-0.9.old/IronPythonConsole/SuperConsole.cs IronPython-0.9/IronPythonConsole/SuperConsole.cs --- IronPython-0.9.old/IronPythonConsole/SuperConsole.cs 2005-07-29 14:21:40.000000000 +0900 +++ IronPython-0.9/IronPythonConsole/SuperConsole.cs 2005-08-04 11:57:42.265017752 +0900 @@ -365,7 +365,7 @@ ConsoleKeyInfo key = Console.ReadKey(true); switch (key.Key) { - case ConsoleKey.Backspace: + case ConsoleKey.BackSpace: Backspace(); break; case ConsoleKey.Delete: diff -ur IronPython-0.9.old/makefile IronPython-0.9/makefile --- IronPython-0.9.old/makefile 2005-07-23 22:48:10.000000000 +0900 +++ IronPython-0.9/makefile 2005-08-04 11:51:30.437544120 +0900 @@ -1,4 +1,4 @@ -CSC=csc +CSC=gmcs -warn:0 all:bin/IronMath.dll bin/IronPython.dll bin/IronPythonConsole.exe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From mailinglist.account at gmail.com Thu Aug 4 18:12:28 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Thu, 4 Aug 2005 18:12:28 +0200 Subject: [IronPython] Access to Enumeration Values Message-ID: the namespace System.Net.Sockets contains an enumation type named SocketOptionName for retrieving Socket options. It's definition is: public enum SocketOptionName { // Fields AcceptConnection = 2, AddMembership = 12, AddSourceMembership = 15, BlockSource = 0x11, Broadcast = 0x20, BsdUrgent = 2, ChecksumCoverage = 20, Debug = 1, DontFragment = 14, DontLinger = -129, DontRoute = 0x10, DropMembership = 13, DropSourceMembership = 0x10, Error = 0x1007, ExclusiveAddressUse = -5, Expedited = 2, HeaderIncluded = 2, HopLimit = 0x15, IPOptions = 1, IpTimeToLive = 4, IPv6ProtectionLevel = 0x17, KeepAlive = 8, Linger = 0x80, MaxConnections = 0x7fffffff, MulticastInterface = 9, MulticastLoopback = 11, MulticastTimeToLive = 10, NoChecksum = 1, NoDelay = 1, OutOfBandInline = 0x100, PacketInformation = 0x13, ReceiveBuffer = 0x1002, ReceiveLowWater = 0x1004, ReceiveTimeout = 0x1006, ReuseAddress = 4, SendBuffer = 0x1001, SendLowWater = 0x1003, SendTimeout = 0x1005, Type = 0x1008, TypeOfService = 3, UnblockSource = 0x12, UpdateAcceptContext = 0x700b, UpdateConnectContext = 0x7010, UseLoopback = 0x40 } Upon accessing an enumeration value by name IronPython only returns its name as a string... If this isn't a bug then it should be... see this output IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> from System.Net.Sockets import SocketOptionName >>> SocketOptionName >>> SocketOptionName.MaxConnections MaxConnections >>> SocketOptionName.MaxConnections.value__ 2147483647 >>> Anthony From martmaly at exchange.microsoft.com Thu Aug 4 19:03:47 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 10:03:47 -0700 Subject: [IronPython] Access to Enumeration Values Message-ID: <1DFB396200705E46B5338CA4B2E25BDE58F635@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Anthony, I don't think it is a bug. The value you get when getting an enum value (SocketOptionName.Broadcast) is indeed the value itself: x = SocketOptions.Broadcast x becomes a boxed enum object. It is the ToString() method of the enum object prints the name. Consider following C# code that does exactly the same: using System.Net.Sockets; namespace Test { public class Program { static void Main(string[] args) { Console.WriteLine(SocketOptionName.Broadcast); } } } Does that answer the question? Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Anthony Tarlano Sent: Thursday, August 04, 2005 9:12 AM To: Discussion of IronPython Subject: [IronPython] Access to Enumeration Values the namespace System.Net.Sockets contains an enumation type named SocketOptionName for retrieving Socket options. It's definition is: public enum SocketOptionName { // Fields AcceptConnection = 2, AddMembership = 12, AddSourceMembership = 15, BlockSource = 0x11, Broadcast = 0x20, BsdUrgent = 2, ChecksumCoverage = 20, Debug = 1, DontFragment = 14, DontLinger = -129, DontRoute = 0x10, DropMembership = 13, DropSourceMembership = 0x10, Error = 0x1007, ExclusiveAddressUse = -5, Expedited = 2, HeaderIncluded = 2, HopLimit = 0x15, IPOptions = 1, IpTimeToLive = 4, IPv6ProtectionLevel = 0x17, KeepAlive = 8, Linger = 0x80, MaxConnections = 0x7fffffff, MulticastInterface = 9, MulticastLoopback = 11, MulticastTimeToLive = 10, NoChecksum = 1, NoDelay = 1, OutOfBandInline = 0x100, PacketInformation = 0x13, ReceiveBuffer = 0x1002, ReceiveLowWater = 0x1004, ReceiveTimeout = 0x1006, ReuseAddress = 4, SendBuffer = 0x1001, SendLowWater = 0x1003, SendTimeout = 0x1005, Type = 0x1008, TypeOfService = 3, UnblockSource = 0x12, UpdateAcceptContext = 0x700b, UpdateConnectContext = 0x7010, UseLoopback = 0x40 } Upon accessing an enumeration value by name IronPython only returns its name as a string... If this isn't a bug then it should be... see this output IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> from System.Net.Sockets import SocketOptionName SocketOptionName >>> SocketOptionName.MaxConnections MaxConnections >>> SocketOptionName.MaxConnections.value__ 2147483647 >>> Anthony From martmaly at exchange.microsoft.com Thu Aug 4 21:07:35 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 12:07:35 -0700 Subject: [IronPython] [0.9] Tab completion bug References: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F4C@DF-BANDIT-MSG.exchange.corp.microsoft.com> Yes, it is a known problem. The tab-completion is far, far from finished and this is probably the first thing for me to fix - pressing tab at the beginning of the line should not offer options, but simply tab out. Thanks for feedback! MArtin ________________________________ From: Keith J. Farmer Sent: 8/4/2005 2:44 AM To: Discussion of IronPython Subject: [IronPython] [0.9] Tab completion bug Enter in several lines, play around with tab completion. Then enter: >>> def foo(): ... Yields: ... previous tab completion results Apparently the buffer holding the expression to complete isn't cleared after a new line is started. Also, in the event that we are at the start of a line, such that the expression buffer is clear, could we insert a tab? I know others out there love their space bar, but I'm a tab guy, myself :-) ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Thu Aug 4 21:19:51 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 12:19:51 -0700 Subject: [IronPython] IronPython 0.9 released References: , Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F4D@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Lorenzo, Since the .Net 2.0 final has not yet been released, we continue to product our builds on .NET 2.0 Beta 2 which was publicly released and is, in our opinion, most widely adopted by our users. As soon as .Net 2.0 ships its final version, IronPython will start using that build to run on. The known issue I was referring to is caused by the fact that IronPython was caught betwen two different .Net 2.0 public preview releases - Beta 2 and Community Technology Preview. We decided to stay with Beta 2 as the version to work with out of the box (you can still compile IronPython on the Technology preview of.Net and run it just fine). As I said, come the final release of .Net 2.0, IronPython will move forward to run on that out of the box. This may mean some necessary changes in the IronPython code base (so far there are none required, but there may be some) but obviously, it is the right thing to do. As for running IronPython on .Net 1.1 ... currently IronPython doesn't run on 1.1 and we are currently thinking whether we should create version of IronPython that would run on .Net 1.1. It would mean that some IronPython features may not be available on .Net 1.1 but it may be useful for some users who for some reason may not be switching to .Net 2.0 immediately. We haven't reached decision on this one yet and it would be interesting to hear feedback as to how important having a version if IronPython running on .Net 1.1 is for you. I hope I didn't miss anything and this answers your question. Martin ________________________________________ From: Lorenzo Bolognini Sent: 8/4/2005 2:40 AM To: Discussion of IronPython Cc: Subject: Re: [IronPython] IronPython 0.9 released On 8/2/05, Martin Maly wrote: > Known issues: >Rebuilding IronPython on the Community Technology Preview release, > version 2.0.50630.0 will fix the problem. We decided to maintain the > dependency of the released binaries on .NET 2.0 Beta 2 (version > 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. So basically what's the story for the .NET 2 runtime support? Will you make it possible to integrate IronPy in VS .NET 2005 final release and use the .NET 2 runtime to develop ASP .NET apps? If I remember correctly IronPy 1.0 will only be compatible with the 1.1 runtime. Will it support something like partial classes ? la C# so that the code-behind file doesn't get polluted with the IDE generated code? I wouldn't really care about other .NET 2 features if I could have that so I would happily use .NET 1.1 to develop aspx. Thanks, Lorenzo _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Thu Aug 4 21:21:07 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 12:21:07 -0700 Subject: [IronPython] IronPython 0.9 released References: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F4E@DF-BANDIT-MSG.exchange.corp.microsoft.com> As for the static compilation, it is another 'maybe' for 1.0 and we are not decided one way or another (it is another topic you can provide feedback on and let us know how important it is to you). For the 0.9 I actually went somewhat further with the static compilation story and made the whole test suite to run from the compiled exes. Surely, it is not the answer to the 'static compilation' problem, but in the least somewhat more complicated scripts (i.e. those that used import) can run in some cases. So the story is slowly getting better already, but it still has a long way to go to be perfect and we are trying to determine the importance for our users to help use choose whether to try and implement it for 1.0 or later. Martin ________________________________________ From: Keith J. Farmer Sent: 8/4/2005 3:11 AM To: Discussion of IronPython Cc: Subject: RE: [IronPython] IronPython 0.9 released I'm not sure where you got the idea that IronPython 1.0 only works with .NET 1.1? I can compile the IronPython solution using the VS 2005 Beta 2 release (and have, several times tonight). For what it's worth, IronPython needs the 2.0 runtime, since it uses 2.0 code generation, and supports 2.0 generics. As far as ASP.NET compiling pages written in IronPython, my memory is that ASP.NET would need to be modified to recognize a new language. At least, that's the case in 1.1; it's possible that 2.0 is more extensible in this regard (wish list if not). Speculation: you should be able to subclass Pages in IronPython, and then modify the aspx page to inherit from your IronPython class. Of course, we'd need to have compilation running (is that on the list for 1.0?). ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Lorenzo Bolognini So basically what's the story for the .NET 2 runtime support? Will you make it possible to integrate IronPy in VS .NET 2005 final release and use the .NET 2 runtime to develop ASP .NET apps? If I remember correctly IronPy 1.0 will only be compatible with the 1.1 runtime. Will it support something like partial classes ? la C# so that the code-behind file doesn't get polluted with the IDE generated code? I wouldn't really care about other .NET 2 features if I could have that so I would happily use .NET 1.1 to develop aspx. _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Thu Aug 4 21:36:11 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 12:36:11 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: Hi Keith! LoadWithPartialName may be indeed removed as the build-time warning suggests suggests. There is a good reasoning behind removing the method (what version, from where, etc ... would the method call load? I think there is a blog out there that talks more about the reasoning: http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx When the method is removed, IronPython will have to cease using it. At the alpha-stage of the development we chose to take advantage of it, but we will find a long-term solution in the due time. The test skipping Pystone, Parrotbench and CPython regression test suites is correct behavior. These tests are not shipping with our code so I wrote the test script so that if it doesn't find them in expected locations, it will skip the tests. Once I am back in Redmond, I am going to post instructions where from to download what to get the tests running. At least pystone and partotbench. Problem with CPython regression test suite is that we had to make few modifications to the test suite code to get it running so it may be more complicated to get those tests running. However, as we work on running the CPython tests (one of major items on our list from now on) the need for modifying them will be less and hopefully soon everyone will be able to run them without modifications. Martin ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, August 04, 2005 2:18 AM To: Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9 released Just noticing this warning.. Is LoadWithPartialName expected to remain in 2.0 since it's close to RTM? 'System.Reflection.Assembly.LoadWithPartialName(string)' is obsolete: 'This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202' C:\Program Files (x86)\IronPython-0.9\IronPython\Objects\ReflectedPackage.cs line 72 column 25 ..... Tab completion's cool :-) Have you been able to run the tests on XP x64 yet? I tried TestAll.py and it skipped Pystone, ParrotBench, and Python Regression. ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Aug 4 21:42:03 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 12:42:03 -0700 Subject: [IronPython] IronPython 0.9 released Message-ID: Yeah, I think you've got the priority right for my tastes: CPython parity before CLR producer status. Somehow, I don't think it'll take much longer for y'all. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Thu 8/4/2005 12:21 PM To: Discussion of IronPython; Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9 released As for the static compilation, it is another 'maybe' for 1.0 and we are not decided one way or another (it is another topic you can provide feedback on and let us know how important it is to you). -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3761 bytes Desc: not available URL: From tclancy at gmail.com Thu Aug 4 21:50:53 2005 From: tclancy at gmail.com (Tom Clancy) Date: Thu, 4 Aug 2005 15:50:53 -0400 Subject: [IronPython] IronPython 0.9 released In-Reply-To: <20050804193849.59A3A1BB6E@che.dreamhost.com> References: <20050804193849.59A3A1BB6E@che.dreamhost.com> Message-ID: >We haven't reached decision on this one yet and it would be interesting to hear feedback as >to how important having a version if IronPython running on .Net 1.1 is for you. It would be the only way I'd get to use it at work, so I'd love to have a 1.1 version, even if it sacrifices some support. Thanks, Tom From martmaly at exchange.microsoft.com Thu Aug 4 23:34:18 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 4 Aug 2005 14:34:18 -0700 Subject: [IronPython] Access to Enumeration Values References: <1DFB396200705E46B5338CA4B2E25BDE58F635@DF-BANDIT-MSG.exchange.corp.microsoft.com>, <48debf4c050804132213f45ff1@mail.gmail.com> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE212F4F@DF-BANDIT-MSG.exchange.corp.microsoft.com> I agree with the automatic conversion and the ability to pass then into int(enum) to get the value out. I think that it makes sense to keep the rest as is, such as print the "Broadcast" when the enum value is such. Thanks for the feedback, it is a good point. Martin ________________________________________ From: Anthony Tarlano Sent: 8/4/2005 1:22 PM To: Martin Maly Cc: Anthony TarlanoDiscussion of IronPython Subject: Re: [IronPython] Access to Enumeration Values Martin, I still think it can be made better. For example, if in c# I could say: i = (int) SocketOptionName.Broadcast; I can get the correct value, but in IronPython I can't say: int(SocketOptionName.Broadcast) since I will not get the correct value back. I do see your point, but I think that for enumerations they should either support conversion using standards functions such as int(), or hex(), and not make programmers have to append the ".value__" just to get the value, which in my humble opinion is unpythonic and just so far off c# that some thought should be given to fix it. Anthony On 8/4/05, Martin Maly wrote: > Hi Anthony, > > I don't think it is a bug. The value you get when getting an enum value > (SocketOptionName.Broadcast) is indeed the value itself: > > x = SocketOptions.Broadcast > > x becomes a boxed enum object. It is the ToString() method of the enum > object prints the name. Consider following C# code that does exactly the > same: > > using System.Net.Sockets; > namespace Test { > public class Program { > static void Main(string[] args) { > Console.WriteLine(SocketOptionName.Broadcast); > } > } > } > > Does that answer the question? > > Martin > > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of > Anthony Tarlano > Sent: Thursday, August 04, 2005 9:12 AM > To: Discussion of IronPython > Subject: [IronPython] Access to Enumeration Values > > the namespace System.Net.Sockets contains an enumation type named > SocketOptionName for retrieving Socket options. It's definition is: > > public enum SocketOptionName > { > // Fields > AcceptConnection = 2, > AddMembership = 12, > AddSourceMembership = 15, > BlockSource = 0x11, > Broadcast = 0x20, > BsdUrgent = 2, > ChecksumCoverage = 20, > Debug = 1, > DontFragment = 14, > DontLinger = -129, > DontRoute = 0x10, > DropMembership = 13, > DropSourceMembership = 0x10, > Error = 0x1007, > ExclusiveAddressUse = -5, > Expedited = 2, > HeaderIncluded = 2, > HopLimit = 0x15, > IPOptions = 1, > IpTimeToLive = 4, > IPv6ProtectionLevel = 0x17, > KeepAlive = 8, > Linger = 0x80, > MaxConnections = 0x7fffffff, > MulticastInterface = 9, > MulticastLoopback = 11, > MulticastTimeToLive = 10, > NoChecksum = 1, > NoDelay = 1, > OutOfBandInline = 0x100, > PacketInformation = 0x13, > ReceiveBuffer = 0x1002, > ReceiveLowWater = 0x1004, > ReceiveTimeout = 0x1006, > ReuseAddress = 4, > SendBuffer = 0x1001, > SendLowWater = 0x1003, > SendTimeout = 0x1005, > Type = 0x1008, > TypeOfService = 3, > UnblockSource = 0x12, > UpdateAcceptContext = 0x700b, > UpdateConnectContext = 0x7010, > UseLoopback = 0x40 > } > > Upon accessing an enumeration value by name IronPython only returns its > name as a string... If this isn't a bug then it should be... see this > output > > IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft > Corporation. All rights reserved. > >>> from System.Net.Sockets import SocketOptionName SocketOptionName > > >>> SocketOptionName.MaxConnections > MaxConnections > >>> SocketOptionName.MaxConnections.value__ > 2147483647 > >>> > > Anthony > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Aug 4 23:44:07 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 14:44:07 -0700 Subject: [IronPython] IronPython in ASP.NET Message-ID: [Python.. ASP.. the combination seems natural to me ;)] Got this reponse from Scott Guthrie. So I suppose it's a matter of digging around and seeing exactly how to use the hooks: Hi Keith, ASP.NET actually has pluggable language support even in V1.1. It is driven using the CodeDOM model, and can be configured in your machine.config and web.config files. Hope this helps, Scott -----Original Message----- From: Keith J. Farmer [mailto:kfarmer at thuban.org ] Sent: Thursday, August 04, 2005 12:47 PM To: Scott Guthrie Subject: RE: Atlas -- CodeDOM? (via ScottGu's Blog) Since you're there -- there was a question on the IronPython list about using it to create aspx. I'm pretty certain the language offerings in 1.1 were hardcoded: is that still the case in 2.0, or is there a build-provider-like registry of filetypes and language tags to compilers? -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3658 bytes Desc: not available URL: From kfarmer at thuban.org Thu Aug 4 23:52:47 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 4 Aug 2005 14:52:47 -0700 Subject: [IronPython] RE: IronPython in ASP.NET Message-ID: So as soon as there's a PythonCodeProvider, I think it could be done. configuration/system.web/compilation/compilers/compiler Here's from my 1.1 machine.config: - - - ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Keith J. Farmer Sent: Thu 8/4/2005 2:44 PM To: Discussion of IronPython Subject: IronPython in ASP.NET [Python.. ASP.. the combination seems natural to me ;)] Got this reponse from Scott Guthrie. So I suppose it's a matter of digging around and seeing exactly how to use the hooks: Hi Keith, ASP.NET actually has pluggable language support even in V1.1. It is driven using the CodeDOM model, and can be configured in your machine.config and web.config files. Hope this helps, Scott -----Original Message----- From: Keith J. Farmer [mailto:kfarmer at thuban.org ] Sent: Thursday, August 04, 2005 12:47 PM To: Scott Guthrie Subject: RE: Atlas -- CodeDOM? (via ScottGu's Blog) Since you're there -- there was a question on the IronPython list about using it to create aspx. I'm pretty certain the language offerings in 1.1 were hardcoded: is that still the case in 2.0, or is there a build-provider-like registry of filetypes and language tags to compilers? -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 13062 bytes Desc: not available URL: From rocco_2003_ at libero.it Fri Aug 5 10:14:22 2005 From: rocco_2003_ at libero.it (Rocco) Date: Fri, 5 Aug 2005 10:14:22 +0200 Subject: [IronPython] IronPython 0.9 released References: , <1DFB396200705E46B5338CA4B2E25BDE212F4D@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <006901c59995$b707b680$2a065097@user592f26235a> RE: [IronPython] IronPython 0.9 releasedHi Martin I hope with Lorenzo for a a version if IronPython running on .Net 1.1. Many servers are running on .Net 1.1. Rocco Pellegrini ----- Original Message ----- From: Martin Maly To: Lorenzo Bolognini ; Discussion of IronPython ; Discussion of IronPython Sent: Thursday, August 04, 2005 9:19 PM Subject: RE: [IronPython] IronPython 0.9 released Hi Lorenzo, It would mean that some IronPython features may not be available on .Net 1.1 but it may be useful for some users who for some reason may not be switching to .Net 2.0 immediately. We haven't reached decision on this one yet and it would be interesting to hear feedback as to how important having a version if IronPython running on .Net 1.1 is for you. I hope I didn't miss anything and this answers your question. Martin ________________________________________ From: Lorenzo Bolognini Sent: 8/4/2005 2:40 AM To: Discussion of IronPython Cc: Subject: Re: [IronPython] IronPython 0.9 released On 8/2/05, Martin Maly wrote: > Known issues: >Rebuilding IronPython on the Community Technology Preview release, > version 2.0.50630.0 will fix the problem. We decided to maintain the > dependency of the released binaries on .NET 2.0 Beta 2 (version > 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. So basically what's the story for the .NET 2 runtime support? Will you make it possible to integrate IronPy in VS .NET 2005 final release and use the .NET 2 runtime to develop ASP .NET apps? If I remember correctly IronPy 1.0 will only be compatible with the 1.1 runtime. Will it support something like partial classes ? la C# so that the code-behind file doesn't get polluted with the IDE generated code? I wouldn't really care about other .NET 2 features if I could have that so I would happily use .NET 1.1 to develop aspx. Thanks, Lorenzo _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ------------------------------------------------------------------------------ _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lbolognini at gmail.com Fri Aug 5 13:32:06 2005 From: lbolognini at gmail.com (Lorenzo Bolognini) Date: Fri, 5 Aug 2005 12:32:06 +0100 Subject: [IronPython] IronPython 0.9 released In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE212F4D@DF-BANDIT-MSG.exchange.corp.microsoft.com> References: <1DFB396200705E46B5338CA4B2E25BDE212F4D@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: On 8/4/05, Martin Maly wrote: Hi Martin, thanks very much for the reply. Actually I think I didn't phrase my questions very well because all I really wanted to know was: - Will I be able to code ASP .NET v. 2 pages with IronPython? - Will it be integrated in VS .NET 2005 IDE? - What about SQL Server 2005 stored procedures? Will I be able to code them in IronPython? I don't really care about 1.1 compatibility (don't have any legacy code) and if I had and it worked I wouldn't bother rewriting it in IronPython. Ok that's it. Take care everybody. I'm really excited about Python on .NET! ;-) Lorenzo From ironpython at kolossi.co.uk Fri Aug 5 22:02:18 2005 From: ironpython at kolossi.co.uk (Paul Sweeney) Date: Fri, 5 Aug 2005 21:02:18 +0100 Subject: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9 released) Message-ID: Hi Martin/Jim, > it would be interesting to hear feedback as to how important having > a version if IronPython running on .Net 1.1 is for you. Really, Really important !!!!! :-) I'm a total CPython convert having been a Python developer for the last 1 1/2 years, but just took a .NET role. I'd love to convince my organisation of the power of Python, but I'm going to need to show them what it can do. They've shelled out for VS.NET 2003 (v1.1) recently and aren't likely to fork out for VS 2005 (v2.0) even when it's released - they are still running W2K on the desktop too!. I can't believe this is a unique situation. Out here beyond the walls of the Redmond Campus, we don't all queue up to buy the latest as soon as it is released ;-), much less large organisations trying to leverage the most value from substantial existing investment in software. Of course I could develop with the SDK without Visual Studio, but in reality I would have thought that in a large number of organisations that's not going to happen either. Finally, on a personal level I have a licensed copy of VS 2003 at home, and again can't justify the cost of VS 2005 when it comes out. (Wife and two kids to support, sob, sob ;-) So IronPython (albeit with reduced features/functionality) under .Net v1.1: please, please, pretty please !!! Paul Sweeney --- [This E-mail was scanned for viruses for your protection] From kfarmer at thuban.org Fri Aug 5 22:14:19 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 5 Aug 2005 13:14:19 -0700 Subject: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9released) Message-ID: I think this raises the question of how to best flag a script as requiring a certain set of features (generics, 32 vs 64 bit assemblies, etc). -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3246 bytes Desc: not available URL: From monty at inaugust.com Fri Aug 5 22:58:48 2005 From: monty at inaugust.com (Monty Taylor) Date: Fri, 5 Aug 2005 13:58:48 -0700 (PDT) Subject: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9released) In-Reply-To: References: Message-ID: <12027.167.88.200.30.1123275528.squirrel@167.88.200.30> Could you use the CPython mechanisms for new language features, i.e.: from __future__ import generics > I think this raises the question of how to best flag a script as requiring > a certain set of features (generics, 32 vs 64 bit assemblies, etc). > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From monty at inaugust.com Fri Aug 5 23:04:01 2005 From: monty at inaugust.com (Monty Taylor) Date: Fri, 5 Aug 2005 14:04:01 -0700 (PDT) Subject: [IronPython] IronPython 0.9 released In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE212F4E@DF-BANDIT-MSG.exchange.corp.mi crosoft.com> References: <1DFB396200705E46B5338CA4B2E25BDE212F4E@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <50149.167.88.200.30.1123275841.squirrel@167.88.200.30> Static compilation is a big ticket item for me. I'm doing work for a shop that has a .NET-driven reporting package that is a replacement for an older collection of scripts. Some of them are Python, which I would like to see more of, but we have to shell out to them. A co-worker tried to rewrite them in C#, but didn't have too good of a time of it. If we could compile the Python to .NET assemblies and instantiate them, it would make so many things better. PLUS, we could write more Python code and just plug it in to the framework. Monty > As for the static compilation, it is another 'maybe' for 1.0 and we are > not decided one way or another (it is another topic you can provide > feedback on and let us know how important it is to you). > > For the 0.9 I actually went somewhat further with the static compilation > story and made the whole test suite to run from the compiled exes. Surely, > it is not the answer to the 'static compilation' problem, but in the least > somewhat more complicated scripts (i.e. those that used import) can run in > some cases. So the story is slowly getting better already, but it still > has a long way to go to be perfect and we are trying to determine the > importance for our users to help use choose whether to try and implement > it for 1.0 or later. > > Martin > > ________________________________________ > From: Keith J. Farmer > Sent: 8/4/2005 3:11 AM > To: Discussion of IronPython > Cc: > Subject: RE: [IronPython] IronPython 0.9 released > > I'm not sure where you got the idea that IronPython 1.0 only works with > .NET 1.1? > I can compile the IronPython solution using the VS 2005 Beta 2 release > (and have, several times tonight). For what it's worth, IronPython needs > the 2.0 runtime, since it uses 2.0 code generation, and supports 2.0 > generics. > As far as ASP.NET compiling pages written in IronPython, my memory is that > ASP.NET would need to be modified to recognize a new language. At least, > that's the case in 1.1; it's possible that 2.0 is more extensible in this > regard (wish list if not). > Speculation: you should be able to subclass Pages in IronPython, and then > modify the aspx page to inherit from your IronPython class. Of course, > we'd need to have compilation running (is that on the list for 1.0?). > ----- > Keith J. Farmer > kfarmer at thuban.org > > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of > Lorenzo Bolognini > > So basically what's the story for the .NET 2 runtime support? Will you > make it possible to integrate IronPy in VS .NET 2005 final release and > use the .NET 2 runtime to develop ASP .NET apps? > > If I remember correctly IronPy 1.0 will only be compatible with the > 1.1 runtime. Will it support something like partial classes ? la C# so > that the code-behind file doesn't get polluted with the IDE generated > code? I wouldn't really care about other .NET 2 features if I could > have that so I would happily use .NET 1.1 to develop aspx. > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From redmoon17 at gmail.com Sat Aug 6 04:37:07 2005 From: redmoon17 at gmail.com (Chu Kevin) Date: Sat, 6 Aug 2005 10:37:07 +0800 Subject: [IronPython] Python Lib Socket Message-ID: <41d7f4a905080519374294f597@mail.gmail.com> >>> import SocketServer IronPython.Objects.PythonImportError: No module named _socket at socket.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin e 45 at SocketServer.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS erver.py:line 132 at input_5.Run(Frame frame) Bug or Uncomplete? From korpse-ironpython at kaydash.za.net Sat Aug 6 10:59:55 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Sat, 06 Aug 2005 10:59:55 +0200 Subject: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9 released) In-Reply-To: References: Message-ID: <42F47C0B.40606@kaydash.za.net> Paul Sweeney wrote: > Finally, on a personal level I have a licensed copy of VS 2003 at home, and > again can't justify the cost of VS 2005 when it comes out. (Wife and two > kids to support, sob, sob ;-) Microsoft do plan to offer the 2005 Express products for US$49 each (http://lab.msdn.microsoft.com/express/faq/default.aspx), granted, you don't get the "professional" extras (one that I find quite useful is remote debugging.) Just thought I'd say something, in case you weren't aware. -- Jonathan When you meet a master swordsman, show him your sword. When you meet a man who is not a poet, do not show him your poem. -- Rinzai, ninth century Zen master From sriramk at gmail.com Sat Aug 6 11:11:57 2005 From: sriramk at gmail.com (Sriram Krishnan) Date: Sat, 6 Aug 2005 14:41:57 +0530 Subject: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9 released) In-Reply-To: <42F47C0B.40606@kaydash.za.net> References: <42F47C0B.40606@kaydash.za.net> Message-ID: Also, the .NET framework itself has alwayd been a free download. Sriram On 8/6/05, Jonathan Jacobs wrote: > Paul Sweeney wrote: > > Finally, on a personal level I have a licensed copy of VS 2003 at home, and > > again can't justify the cost of VS 2005 when it comes out. (Wife and two > > kids to support, sob, sob ;-) > > Microsoft do plan to offer the 2005 Express products for US$49 each > (http://lab.msdn.microsoft.com/express/faq/default.aspx), granted, you > don't get the "professional" extras (one that I find quite useful is > remote debugging.) > > Just thought I'd say something, in case you weren't aware. > > -- > Jonathan > > When you meet a master swordsman, > show him your sword. > When you meet a man who is not a poet, > do not show him your poem. > -- Rinzai, ninth century Zen master > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From mailinglist.account at gmail.com Sat Aug 6 11:34:53 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Sat, 6 Aug 2005 11:34:53 +0200 Subject: [IronPython] Python Lib Socket In-Reply-To: <41d7f4a905080519374294f597@mail.gmail.com> References: <41d7f4a905080519374294f597@mail.gmail.com> Message-ID: Kevin, Incomplete, would be the answer to your question. Currently, IronPython doesn't come with batteries include (python std libraries). I am actively thinking about creating an effort to complete this part of the puzzel and port all the python standard library interfaces to .NET with community support, but I have been holding off on this action until hearing from the IronPython developers. Just think what a difference that would make! It would be amazing! Stay tuned since something has to give shortly... Anthony On 8/6/05, Chu Kevin wrote: > >>> import SocketServer > IronPython.Objects.PythonImportError: No module named _socket > at socket.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin > e 45 > at SocketServer.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS > erver.py:line 132 > at input_5.Run(Frame frame) > > Bug or Uncomplete? > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From mailinglist.account at gmail.com Sat Aug 6 17:14:30 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Sat, 6 Aug 2005 17:14:30 +0200 Subject: [IronPython] function thread target delegates Message-ID: I have a quick question regarding threads and IronPython. I need to code a python function having an input parameter to be the target delegate of a newly created thread using the ThreadStart method to pass the parameter. Here an example of the code that fails: IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> from System import Threading >>> def echo(parm): ... print parm ... >>> td = Threading.Thread(echo) >>> td.Start('test') System.InvalidOperationException: The thread was created with a ThreadStart dele gate that does not accept a parameter. at input_3.Run(Frame frame) >>> Obviously, I need to tell the interpreter that the ThreadStart delegate should take a parameter, but I don't know much about delegates and thus don't how to do it. If i don't use a delegate function with a parameter the ThreadStart works fine.. IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> def talk(): ... print 'talking' ... >>> from System.Threading import Thread >>> td = Thread(talk) >>> td.Start() talking >>> Thanks in advanced for any light that you could provide, Anthony From kfarmer at thuban.org Sat Aug 6 20:25:44 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 6 Aug 2005 11:25:44 -0700 Subject: [IronPython] function thread target delegates Message-ID: Okay, had a brief check. You should take a look at delegates. They're not the same as passing around Python methods. In particular, they're typed. The type of a delegate is its signature. In particular: ThreadStart -> void foo() ParameterizedThreadStart -> void foo(object) The Thread constructor you're picking up is Thread(ThreadStart foo), where you want Thread(ParameterizedThreadStart foo). What you want, somehow, is to get the overload to pick the ParameterizedThreadStart version. However, the following seems to encounter a conflict between generics and method resolution: >>> t = Threading.Thread[Threading.ParameterizedThreadStart](echo) System.InvalidOperationException: System.Threading.Thread is not a GenericTypeDefinition. MakeGenericType may only be called on a type for which Type.IsGenericTypeDefinition is true. at System.RuntimeType.MakeGenericType(Type[] instantiation, Boolean verify) at input_11.Run(Frame frame) ----- Keith J. Farmer kfarmer at thuban.org From mailinglist.account at gmail.com Sat Aug 6 22:01:41 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Sat, 6 Aug 2005 22:01:41 +0200 Subject: [IronPython] function thread target delegates In-Reply-To: References: Message-ID: Keith, Thanks for your insight and reply. I found that it works if instead of using generics, I just wrapped the function as an ParameterizedThreadStart instance.. Take a look: Anthony IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> from System import Threading >>> def echo(arg): ... print arg ... >>> t = Threading.Thread(Threading.ParameterizedThreadStart(echo)) >>> t.Start('hi') >>> hi () >>> On 8/6/05, Keith J. Farmer wrote: > Okay, had a brief check. You should take a look at delegates. They're > not the same as passing around Python methods. In particular, they're > typed. > The type of a delegate is its signature. In particular: > ThreadStart -> void foo() > ParameterizedThreadStart -> void foo(object) > The Thread constructor you're picking up is Thread(ThreadStart foo), > where you want Thread(ParameterizedThreadStart foo). > What you want, somehow, is to get the overload to pick the > ParameterizedThreadStart version. > However, the following seems to encounter a conflict between generics > and method resolution: > >>> t = Threading.Thread[Threading.ParameterizedThreadStart](echo) > System.InvalidOperationException: System.Threading.Thread is not a > GenericTypeDefinition. MakeGenericType may only be called on a type for > which Type.IsGenericTypeDefinition is true. > at System.RuntimeType.MakeGenericType(Type[] instantiation, Boolean > verify) > at input_11.Run(Frame frame) > > ----- > Keith J. Farmer > kfarmer at thuban.org > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From kfarmer at thuban.org Sat Aug 6 22:08:24 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 6 Aug 2005 13:08:24 -0700 Subject: [IronPython] function thread target delegates Message-ID: I *knew* there had to be a way to create a Delegate object :) Delegates are great. They're what you get when you create a DynamicMethod using Lightweight Code Generation. You can put them to interesting uses (IronPython, getting around the lack of operator overloads in generics, etc). ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Anthony Tarlano >>> t = Threading.Thread(Threading.ParameterizedThreadStart(echo)) From redmoon17 at gmail.com Sun Aug 7 06:24:48 2005 From: redmoon17 at gmail.com (Chu Kevin) Date: Sun, 7 Aug 2005 12:24:48 +0800 Subject: [IronPython] Python Lib Socket In-Reply-To: References: <41d7f4a905080519374294f597@mail.gmail.com> Message-ID: <41d7f4a9050806212479aafc0d@mail.gmail.com> I suggest create project ".NET port of Python standard lib" in gotdotnet workspace and I can join this work. 2005/8/6, Anthony Tarlano : > Kevin, > > Incomplete, would be the answer to your question. Currently, > IronPython doesn't come with batteries include (python std libraries). > > I am actively thinking about creating an effort to complete this part > of the puzzel and port all the python standard library interfaces to > .NET with community support, but I have been holding off on this > action until hearing from the IronPython developers. Just think what a > difference that would make! It would be amazing! > > Stay tuned since something has to give shortly... > > Anthony > > On 8/6/05, Chu Kevin wrote: > > >>> import SocketServer > > IronPython.Objects.PythonImportError: No module named _socket > > at socket.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin > > e 45 > > at SocketServer.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS > > erver.py:line 132 > > at input_5.Run(Frame frame) > > > > Bug or Uncomplete? > > _______________________________________________ > > users-ironpython.com mailing list > > users-ironpython.com at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From glc at well.com Mon Aug 8 00:31:31 2005 From: glc at well.com (Greg Chapman) Date: Sun, 7 Aug 2005 22:31:31 +0000 (UTC) Subject: [IronPython] typeof equivalent? Message-ID: If I wanted to write something like this: from System import DateTime runtimeType = typeof(DateTime) for propinfo in runtimeType.GetProperties(): print propinfo.Name (prints "Date", "Day", etc.) Is there something in IronPython that could play the role of typeof in the above (that is, that would give me the RuntimeType corresponding to the python representation of a CLR type)? If not, I think it would be useful to add this capability in some form. --- Greg Chapman From mailinglist.account at gmail.com Mon Aug 8 09:52:26 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Mon, 8 Aug 2005 09:52:26 +0200 Subject: [IronPython] Python Lib Socket In-Reply-To: <41d7f4a9050806212479aafc0d@mail.gmail.com> References: <41d7f4a905080519374294f597@mail.gmail.com> <41d7f4a9050806212479aafc0d@mail.gmail.com> Message-ID: Kevin, I agree with your suggestion to create a new gotdotnet group for porting the std library packages, but only if the ironpython folks are not going to do it. I have recently sent an email to Jim to get some clarity on their plans on this issue, and I prefer to wait just a little bit longer to allow him the opportunity to reply. I will keep you posted. Anthony On 8/7/05, Chu Kevin wrote: > I suggest create project ".NET port of Python standard lib" in > gotdotnet workspace > and I can join this work. > > 2005/8/6, Anthony Tarlano : > > Kevin, > > > > Incomplete, would be the answer to your question. Currently, > > IronPython doesn't come with batteries include (python std libraries). > > > > I am actively thinking about creating an effort to complete this part > > of the puzzel and port all the python standard library interfaces to > > .NET with community support, but I have been holding off on this > > action until hearing from the IronPython developers. Just think what a > > difference that would make! It would be amazing! > > > > Stay tuned since something has to give shortly... > > > > Anthony > > > > On 8/6/05, Chu Kevin wrote: > > > >>> import SocketServer > > > IronPython.Objects.PythonImportError: No module named _socket > > > at socket.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin > > > e 45 > > > at SocketServer.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS > > > erver.py:line 132 > > > at input_5.Run(Frame frame) > > > > > > Bug or Uncomplete? > > > _______________________________________________ > > > users-ironpython.com mailing list > > > users-ironpython.com at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > > users-ironpython.com mailing list > > users-ironpython.com at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From kfarmer at thuban.org Mon Aug 8 11:10:05 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 8 Aug 2005 02:10:05 -0700 Subject: [IronPython] typeof equivalent? Message-ID: I take it that: from System import Type from System import DateTime Type.GetType(DateTime).GetProperties() Isn't what you're looking for? It is, admittedly, not what *I* would expect for the DateTime type. Perhaps DateTime.__dict__ ? ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Greg Chapman Is there something in IronPython that could play the role of typeof in the above (that is, that would give me the RuntimeType corresponding to the python representation of a CLR type)? If not, I think it would be useful to add this capability in some form. From redmoon17 at gmail.com Mon Aug 8 11:32:59 2005 From: redmoon17 at gmail.com (Chu Kevin) Date: Mon, 8 Aug 2005 17:32:59 +0800 Subject: [IronPython] Python Lib Socket In-Reply-To: References: <41d7f4a905080519374294f597@mail.gmail.com> <41d7f4a9050806212479aafc0d@mail.gmail.com> Message-ID: <41d7f4a905080802322b4d4723@mail.gmail.com> I agree that wait IronPython release 1.0,and begin work for std lib. But I wonder which lib need to port? or which level lib need to port? ex:_socket module or socket.py or SocketServer.py ? I think _socket is Low-level module write-by C,but socket.py invoke _socket,so we just need to implement _socket built-in module with C#. In a word ,we implement a IronPython.Modules._socket class. 2005/8/8, Anthony Tarlano : > Kevin, > > I agree with your suggestion to create a new gotdotnet group for > porting the std library packages, but only if the ironpython folks are > not going to do it. I have recently sent an email to Jim to get some > clarity on their plans on this issue, and I prefer to wait just a > little bit longer to allow him the opportunity to reply. > > I will keep you posted. > > Anthony > > > On 8/7/05, Chu Kevin wrote: > > I suggest create project ".NET port of Python standard lib" in > > gotdotnet workspace > > and I can join this work. > > > > 2005/8/6, Anthony Tarlano : > > > Kevin, > > > > > > Incomplete, would be the answer to your question. Currently, > > > IronPython doesn't come with batteries include (python std libraries). > > > > > > I am actively thinking about creating an effort to complete this part > > > of the puzzel and port all the python standard library interfaces to > > > .NET with community support, but I have been holding off on this > > > action until hearing from the IronPython developers. Just think what a > > > difference that would make! It would be amazing! > > > > > > Stay tuned since something has to give shortly... > > > > > > Anthony > > > > > > On 8/6/05, Chu Kevin wrote: > > > > >>> import SocketServer > > > > IronPython.Objects.PythonImportError: No module named _socket > > > > at socket.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin > > > > e 45 > > > > at SocketServer.Initialize() in F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS > > > > erver.py:line 132 > > > > at input_5.Run(Frame frame) > > > > > > > > Bug or Uncomplete? > > > > _______________________________________________ > > > > users-ironpython.com mailing list > > > > users-ironpython.com at lists.ironpython.com > > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > _______________________________________________ > > > users-ironpython.com mailing list > > > users-ironpython.com at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > > users-ironpython.com mailing list > > users-ironpython.com at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From redmoon17 at gmail.com Mon Aug 8 11:35:24 2005 From: redmoon17 at gmail.com (Chu Kevin) Date: Mon, 8 Aug 2005 17:35:24 +0800 Subject: [IronPython] Set not implement? Message-ID: <41d7f4a905080802359da40e1@mail.gmail.com> a simple example: >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] >>> fruits = set(basket) # create a set without duplicates a error raise: >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] >>> fruits = set(basket) IronPython.Objects.PythonNameError: name 'set' is not defined at input_6.Run(Frame frame) From martmaly at exchange.microsoft.com Mon Aug 8 18:53:10 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Mon, 8 Aug 2005 09:53:10 -0700 Subject: [IronPython] Set not implement? Message-ID: <1DFB396200705E46B5338CA4B2E25BDE5FDFE5@DF-BANDIT-MSG.exchange.corp.microsoft.com> Set is not implemented yet. There is a bug in GotDotNet bug database open already. Martin > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On > Behalf Of Chu Kevin > Sent: Monday, August 08, 2005 2:35 AM > To: Discussion of IronPython > Subject: [IronPython] Set not implement? > > a simple example: > >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] > >>> fruits = set(basket) # create a set without > duplicates > a error raise: > >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] > >>> fruits = set(basket) > IronPython.Objects.PythonNameError: name 'set' is not defined > at input_6.Run(Frame frame) > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From martmaly at exchange.microsoft.com Mon Aug 8 19:45:56 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Mon, 8 Aug 2005 10:45:56 -0700 Subject: [IronPython] Python Lib Socket Message-ID: <1DFB396200705E46B5338CA4B2E25BDE5FE05C@DF-BANDIT-MSG.exchange.corp.microsoft.com> Incomplete. Many of the builtin modules are not yet implemented. It is going to be the focus of our work between now and 1.0 to implement more and more of those. Martin > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On > Behalf Of Chu Kevin > Sent: Friday, August 05, 2005 7:37 PM > To: Discussion of IronPython > Subject: [IronPython] Python Lib Socket > > >>> import SocketServer > IronPython.Objects.PythonImportError: No module named _socket > at socket.Initialize() in > F:\Tech\Python\IronPython-0.9\bin\Lib\socket.py:lin > e 45 > at SocketServer.Initialize() in > F:\Tech\Python\IronPython-0.9\bin\Lib\SocketS > erver.py:line 132 > at input_5.Run(Frame frame) > > Bug or Uncomplete? > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From tinuviel at sparcs.kaist.ac.kr Thu Aug 4 05:18:53 2005 From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon) Date: Thu, 4 Aug 2005 12:18:53 +0900 Subject: [IronPython] Building IronPython 0.9 with Mono 1.1.8.2 Message-ID: <20050804031853.GA10518@sparcs.kaist.ac.kr> Hello, I tried to build IronPython 0.9 with Mono 1.1.8.2. I used Debian package currently in Sid. With attached "patch", I succeeded building it, but it doesn't really run. Transcript follows: * * * tinuviel at debian:~/fepy$ mono --version Mono JIT compiler version 1.1.8.2, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal Globalization: normal tinuviel at debian:~/fepy$ gmcs --version Mono C# compiler version 1.1.5.0 * * * tinuviel at debian:~/fepy$ ls IronPython-0.9.zip mono-build.patch tinuviel at debian:~/fepy$ unzip -q IronPython-0.9.zip tinuviel at debian:~/fepy$ patch -p0 < mono-build.patch patching file IronPython-0.9/IronPython/Hosting/PythonEngine.cs patching file IronPython-0.9/IronPython/Modules/__builtin__.cs patching file IronPython-0.9/IronPython/Objects/PythonFile.cs patching file IronPython-0.9/IronPython/Objects/ReflectedPackage.cs patching file IronPython-0.9/IronPython/Objects/StringOps.cs patching file IronPython-0.9/IronPythonConsole/PythonCommandLine.cs patching file IronPython-0.9/IronPythonConsole/SuperConsole.cs patching file IronPython-0.9/makefile * * * tinuviel at debian:~/fepy$ cd IronPython-0.9 tinuviel at debian:~/fepy/IronPython-0.9$ rm -rf bin tinuviel at debian:~/fepy/IronPython-0.9$ mkdir bin tinuviel at debian:~/fepy/IronPython-0.9$ make gmcs -warn:0 -t:library -out:bin/IronMath.dll -recurse:IronMath/*.cs gmcs -warn:0 -t:library -r:bin/IronMath.dll -out:bin/IronPython.dll -recurse:IronPython/*.cs gmcs -warn:0 -t:exe -r:bin/IronPython.dll -out:bin/IronPythonConsole.exe -recurse:IronPythonConsole/*.cs * * * tinuviel at debian:~/fepy/IronPython-0.9$ mono bin/IronPythonConsole.exe IronPython 0.9.2042 on .NET 2.0.50215.16 Copyright (c) Microsoft Corporation. All rights reserved. >>> 1 + 1 System.NullReferenceException: Object reference not set to an instance of an object in <0x00010> IronPython.Objects.Frame:SetGlobal (System.String name, System.Object value) in <0x00067> input_0:Run (IronPython.Objects.Frame frame) in <0x002b0> IronPython.Hosting.PythonEngine:DoOneInteractive (IronPython.Objects.Frame topFrame) in <0x00064> IronPython.Hosting.PythonEngine:RunInteractive () >>> * * * Any idea? Seo Sanghyeon -------------- next part -------------- diff -ur IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs IronPython-0.9/IronPython/Hosting/PythonEngine.cs --- IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs 2005-07-29 11:21:38.000000000 +0900 +++ IronPython-0.9/IronPython/Hosting/PythonEngine.cs 2005-08-04 11:52:59.426015816 +0900 @@ -258,19 +258,10 @@ if (ExceptionDetail) { MyConsole.WriteLine(e.ToString(), Style.Error); } else { - string stack = e.StackTrace; MyConsole.Write(e.GetType().ToString(), Style.Error); MyConsole.Write(": ", Style.Error); MyConsole.WriteLine(e.Message, Style.Error); - string[] frames = stack.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); - foreach (string frame in frames) { - if (frame.StartsWith(" at IronPython.") || - frame.StartsWith(" at ReflectOpt.") || - frame.StartsWith(" at IronPythonConsole.")) { - continue; - } - MyConsole.WriteLine(frame, Style.Error); - } + MyConsole.WriteLine(e.StackTrace, Style.Error); } e = e.InnerException; } diff -ur IronPython-0.9.old/IronPython/Modules/__builtin__.cs IronPython-0.9/IronPython/Modules/__builtin__.cs --- IronPython-0.9.old/IronPython/Modules/__builtin__.cs 2005-07-26 03:53:24.000000000 +0900 +++ IronPython-0.9/IronPython/Modules/__builtin__.cs 2005-08-04 11:54:10.899150248 +0900 @@ -576,13 +576,13 @@ } public static double round(double x) { - return Math.Round(x, MidpointRounding.AwayFromZero); + return Math.Round(x); } public static double round(double x, int n) { if (n < 0) { //!!! certinaly imprecise double factor = Math.Pow(10.0, -n); - return factor * Math.Round(x / factor, MidpointRounding.AwayFromZero); + return factor * Math.Round(x / factor); } return Math.Round(x, n); } @@ -725,4 +725,4 @@ public static object WindowsError = Ops.GetDynamicTypeFromType(typeof(PythonWindowsError)); #endregion } -} \ No newline at end of file +} diff -ur IronPython-0.9.old/IronPython/Objects/PythonFile.cs IronPython-0.9/IronPython/Objects/PythonFile.cs --- IronPython-0.9.old/IronPython/Objects/PythonFile.cs 2005-07-23 22:48:06.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/PythonFile.cs 2005-08-04 11:55:00.207654216 +0900 @@ -188,13 +188,6 @@ stream.Flush(); } - public int fileno() { - if (fstream != null) { - System.Runtime.InteropServices.SafeHandle sh = fstream.SafeFileHandle; - return (int)sh.DangerousGetHandle(); - } else return -1; - } - public bool isatty() { return false; } diff -ur IronPython-0.9.old/IronPython/Objects/ReflectedPackage.cs IronPython-0.9/IronPython/Objects/ReflectedPackage.cs --- IronPython-0.9.old/IronPython/Objects/ReflectedPackage.cs 2005-07-26 23:53:20.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/ReflectedPackage.cs 2005-08-04 11:55:41.801331016 +0900 @@ -24,12 +24,7 @@ [PythonType("package#")] public class ReflectedPackage : ICustomAttributes { public static string GetCoreTypeName(Type type) { - string name = type.Name; - if (type.IsGenericType) { - int backtick = name.IndexOf('`'); - if (backtick != -1) return name.Substring(0, backtick); - } - return name; + return type.Name; } private static ReflectedPackage topPackage = new ReflectedPackage(""); diff -ur IronPython-0.9.old/IronPython/Objects/StringOps.cs IronPython-0.9/IronPython/Objects/StringOps.cs --- IronPython-0.9.old/IronPython/Objects/StringOps.cs 2005-07-23 22:48:08.000000000 +0900 +++ IronPython-0.9/IronPython/Objects/StringOps.cs 2005-08-04 11:57:09.976926288 +0900 @@ -707,14 +707,6 @@ return ret; } - private static List split(string _value, string[] seps, int maxsplit) { - string[] r = maxsplit == -1 ? _value.Split(seps, StringSplitOptions.None) - : _value.Split(seps, maxsplit + 1, StringSplitOptions.None); - List ret = List.MakeEmptyList(r.Length); - foreach (string s in r) ret.Add(s); //Str.make(s)); //!!! more evidence that multple strings is bad - return ret; - } - public static List split(string _value) { return split(_value, (char[])null, -1); } @@ -731,7 +723,7 @@ } else if (sep.Length == 1) { return split(_value, new char[] { sep[0] }, maxsplit); } else { - return split(_value, new string[] { sep }, maxsplit); + throw new Exception("non-char separator"); } } // diff -ur IronPython-0.9.old/IronPythonConsole/PythonCommandLine.cs IronPython-0.9/IronPythonConsole/PythonCommandLine.cs --- IronPython-0.9.old/IronPythonConsole/PythonCommandLine.cs 2005-07-29 11:21:38.000000000 +0900 +++ IronPython-0.9/IronPythonConsole/PythonCommandLine.cs 2005-08-04 11:57:25.817518152 +0900 @@ -204,7 +204,7 @@ if (tabState == null) tabState = new TabState(this, null); //ComputeChoiceList(b.ToString(), topFrame)); tabState.WriteNextChoice(); continue; - case ConsoleKey.Backspace: + case ConsoleKey.BackSpace: b.Remove(b.Length - 1, 1); Console.CursorLeft -= 1; Console.Write(' '); diff -ur IronPython-0.9.old/IronPythonConsole/SuperConsole.cs IronPython-0.9/IronPythonConsole/SuperConsole.cs --- IronPython-0.9.old/IronPythonConsole/SuperConsole.cs 2005-07-29 14:21:40.000000000 +0900 +++ IronPython-0.9/IronPythonConsole/SuperConsole.cs 2005-08-04 11:57:42.265017752 +0900 @@ -365,7 +365,7 @@ ConsoleKeyInfo key = Console.ReadKey(true); switch (key.Key) { - case ConsoleKey.Backspace: + case ConsoleKey.BackSpace: Backspace(); break; case ConsoleKey.Delete: diff -ur IronPython-0.9.old/makefile IronPython-0.9/makefile --- IronPython-0.9.old/makefile 2005-07-23 22:48:10.000000000 +0900 +++ IronPython-0.9/makefile 2005-08-04 11:51:30.437544120 +0900 @@ -1,4 +1,4 @@ -CSC=csc +CSC=gmcs -warn:0 all:bin/IronMath.dll bin/IronPython.dll bin/IronPythonConsole.exe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From tarlano at gmail.com Thu Aug 4 22:22:53 2005 From: tarlano at gmail.com (Anthony Tarlano) Date: Thu, 4 Aug 2005 22:22:53 +0200 Subject: [IronPython] Access to Enumeration Values In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE58F635@DF-BANDIT-MSG.exchange.corp.microsoft.com> References: <1DFB396200705E46B5338CA4B2E25BDE58F635@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <48debf4c050804132213f45ff1@mail.gmail.com> Martin, I still think it can be made better. For example, if in c# I could say: i = (int) SocketOptionName.Broadcast; I can get the correct value, but in IronPython I can't say: int(SocketOptionName.Broadcast) since I will not get the correct value back. I do see your point, but I think that for enumerations they should either support conversion using standards functions such as int(), or hex(), and not make programmers have to append the ".value__" just to get the value, which in my humble opinion is unpythonic and just so far off c# that some thought should be given to fix it. Anthony On 8/4/05, Martin Maly wrote: > Hi Anthony, > > I don't think it is a bug. The value you get when getting an enum value > (SocketOptionName.Broadcast) is indeed the value itself: > > x = SocketOptions.Broadcast > > x becomes a boxed enum object. It is the ToString() method of the enum > object prints the name. Consider following C# code that does exactly the > same: > > using System.Net.Sockets; > namespace Test { > public class Program { > static void Main(string[] args) { > Console.WriteLine(SocketOptionName.Broadcast); > } > } > } > > Does that answer the question? > > Martin > > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of > Anthony Tarlano > Sent: Thursday, August 04, 2005 9:12 AM > To: Discussion of IronPython > Subject: [IronPython] Access to Enumeration Values > > the namespace System.Net.Sockets contains an enumation type named > SocketOptionName for retrieving Socket options. It's definition is: > > public enum SocketOptionName > { > // Fields > AcceptConnection = 2, > AddMembership = 12, > AddSourceMembership = 15, > BlockSource = 0x11, > Broadcast = 0x20, > BsdUrgent = 2, > ChecksumCoverage = 20, > Debug = 1, > DontFragment = 14, > DontLinger = -129, > DontRoute = 0x10, > DropMembership = 13, > DropSourceMembership = 0x10, > Error = 0x1007, > ExclusiveAddressUse = -5, > Expedited = 2, > HeaderIncluded = 2, > HopLimit = 0x15, > IPOptions = 1, > IpTimeToLive = 4, > IPv6ProtectionLevel = 0x17, > KeepAlive = 8, > Linger = 0x80, > MaxConnections = 0x7fffffff, > MulticastInterface = 9, > MulticastLoopback = 11, > MulticastTimeToLive = 10, > NoChecksum = 1, > NoDelay = 1, > OutOfBandInline = 0x100, > PacketInformation = 0x13, > ReceiveBuffer = 0x1002, > ReceiveLowWater = 0x1004, > ReceiveTimeout = 0x1006, > ReuseAddress = 4, > SendBuffer = 0x1001, > SendLowWater = 0x1003, > SendTimeout = 0x1005, > Type = 0x1008, > TypeOfService = 3, > UnblockSource = 0x12, > UpdateAcceptContext = 0x700b, > UpdateConnectContext = 0x7010, > UseLoopback = 0x40 > } > > Upon accessing an enumeration value by name IronPython only returns its > name as a string... If this isn't a bug then it should be... see this > output > > IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft > Corporation. All rights reserved. > >>> from System.Net.Sockets import SocketOptionName SocketOptionName > > >>> SocketOptionName.MaxConnections > MaxConnections > >>> SocketOptionName.MaxConnections.value__ > 2147483647 > >>> > > Anthony > From freddiewitherden at hotmail.com Sun Aug 7 15:36:19 2005 From: freddiewitherden at hotmail.com (Freddie Witherden) Date: Sun, 07 Aug 2005 13:36:19 +0000 Subject: [IronPython] An IronPython IDE Project? Message-ID: Does anyone know if there is currently a project to build an IronPython IDE (like CPython's IDLE/PyCrust)? If there is not currently a project, then would anyone be interested in helping me to create an IDE, I think that it really could give IronPython a boost; System.Windows.Forms is more than powerful enough to create a medium-size IDE and it could be a great oppotunity to showcase the power and flexibility of IronPython. From kfarmer at thuban.org Mon Aug 8 23:54:26 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 8 Aug 2005 14:54:26 -0700 Subject: [IronPython] An IronPython IDE Project? Message-ID: I'm not certain a separate IDE would be the way to go. Perhaps add-ins for SharpDevelop, MonoDevelop, Eclipse, and VS2k5 would be the better way? ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Freddie Witherden Sent: Sun 8/7/2005 6:36 AM Does anyone know if there is currently a project to build an IronPython IDE (like CPython's IDLE/PyCrust)? If there is not currently a project, then would anyone be interested in helping me to create an IDE, I think that it really could give IronPython a boost; System.Windows.Forms is more than powerful enough to create a medium-size IDE and it could be a great oppotunity to showcase the power and flexibility of IronPython. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3760 bytes Desc: not available URL: From glc at well.com Tue Aug 9 00:43:06 2005 From: glc at well.com (Greg Chapman) Date: Mon, 8 Aug 2005 22:43:06 +0000 (UTC) Subject: [IronPython] Re: typeof equivalent? References: Message-ID: Keith J. Farmer wrote: > I take it that: > from System import Type > from System import DateTime > Type.GetType(DateTime).GetProperties() > Isn't what you're looking for? It is, admittedly, not what I would > expect for the DateTime type. > Perhaps DateTime.__dict__ ? My example wasn't particularly well-chosen. What I'm really interested in is being able to do .NET reflection on a .NET type without having an instance of that type (with an instance, I could call GetType() to get the RuntimeType). After your suggestion, I found that the __dict__ actually has this information for properties (the instances of ReflectedProperty in the __dict__ have an info attribute which is the RuntimePropertyInfo for the property). However, instances of ReflectedMethod do not appear to have anything similar. And I'd still like to be able to get hold of the RuntimeType for the full range of reflection. Anyway, thanks for your suggestion. --- Greg Chapman From trimbo at gmail.com Tue Aug 9 00:53:31 2005 From: trimbo at gmail.com (Chris Trimble) Date: Mon, 8 Aug 2005 15:53:31 -0700 Subject: [IronPython] An IronPython IDE Project? In-Reply-To: References: Message-ID: On 8/8/05, Keith J. Farmer wrote: > I'm not certain a separate IDE would be the way to go. Perhaps > add-ins for SharpDevelop, MonoDevelop, Eclipse, and VS2k5 would > be the better way? I agree. Maybe just take one of the existing Python plugins for Eclipse and make it work with IronPython (PyDev or JyDT)? I just tried specifying IPy as an interpreter for PyDev and it didn't quite work, though it looked like it might not take that much effort to get it to play nice. - Chris From mailinglist.account at gmail.com Tue Aug 9 09:59:58 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Tue, 9 Aug 2005 09:59:58 +0200 Subject: [IronPython] An IronPython IDE Project? In-Reply-To: References: Message-ID: hi all: Another more lightweight IDE option (i.e. no java!) and one that I would actually use is a nice lisp package for Emacs/XEmacs that integrates IronPython compilation and the features of an object browser, such as the feature from the bicyclerepairman package for CPython.. Just another thought... Anthony On 8/9/05, Chris Trimble wrote: > On 8/8/05, Keith J. Farmer wrote: > > I'm not certain a separate IDE would be the way to go. Perhaps > > add-ins for SharpDevelop, MonoDevelop, Eclipse, and VS2k5 would > > be the better way? > > I agree. Maybe just take one of the existing Python plugins for > Eclipse and make it work with IronPython (PyDev or JyDT)? I just > tried specifying IPy as an interpreter for PyDev and it didn't quite > work, though it looked like it might not take that much effort to get > it to play nice. > > - Chris > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From alcarx at gmail.com Wed Aug 10 18:21:35 2005 From: alcarx at gmail.com (=?GB2312?B?0OzE/g==?=) Date: Thu, 11 Aug 2005 00:21:35 +0800 Subject: [IronPython] language Support-Chinese Message-ID: it seems that ironpython does not support chinese. i used ironpython in one project and tried to display some information in chinese , but these words can't be correctly displayed. i wonder if u could kindly give me some advice on sovling this problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Wed Aug 10 19:55:06 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 10 Aug 2005 10:55:06 -0700 Subject: [IronPython] language Support-Chinese In-Reply-To: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE5FE883@DF-BANDIT-MSG.exchange.corp.microsoft.com> Would it be possible for you to send us a short code snippet that you had problem with? I would like to find out whether the problem is in parsing, encoding usage, etc. Martin ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of ?? Sent: Wednesday, August 10, 2005 9:22 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] language Support-Chinese it seems that ironpython does not support chinese. i used ironpython in one project and tried to display some information in chinese , but these words can't be correctly displayed. i wonder if u could kindly give me some advice on sovling this problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alcarx at gmail.com Thu Aug 11 05:45:04 2005 From: alcarx at gmail.com (=?GB2312?B?0OzE/g==?=) Date: Thu, 11 Aug 2005 11:45:04 +0800 Subject: [IronPython] language Support-Chinese In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE5FE883@DF-BANDIT-MSG.exchange.corp.microsoft.com> References: <1DFB396200705E46B5338CA4B2E25BDE5FE883@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: Just use the example shiped with IronPython9.0. Add a class named Embed5 //////////////////////////////////////////////////////////////////////////////////////////// public class Embed5 { //the file to be executed const string fileName = @"D:/TestChinese.py"; public static void Run() { PythonEngine engine = new PythonEngine(); engine.ExecuteFile(fileName); Application.Run(); } } ////////////////////////////////////////////////////////////////////////////////////////////// And content of TestChinese.py is ########################################## from System import * from System.Windows.Forms import * MessageBox.Show("???IronPython") ######################################### in Program.cs add "Embed5.Run();" while i run this example, the string "??" can't be correctly displayed. but if i use IronPythonConsole to execute MessageBox.Show("???IronPython"), it works fine 2005/8/11, Martin Maly : > > Would it be possible for you to send us a short code snippet that you had > problem with? I would like to find out whether the problem is in parsing, > encoding usage, etc. > Martin > > ------------------------------ > *From:* users-ironpython.com-bounces at lists.ironpython.com [mailto: > users-ironpython.com-bounces at lists.ironpython.com] *On Behalf Of *?? > *Sent:* Wednesday, August 10, 2005 9:22 AM > *To:* users-ironpython.com at lists.ironpython.com > *Subject:* [IronPython] language Support-Chinese > > it seems that ironpython does not support chinese. > i used ironpython in one project > and tried to display some information in chinese , > but these words can't be correctly displayed. > i wonder if u could kindly give me some advice on sovling this problem. > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- The shift of focus (to patterns) will have a profound and enduring effect on the way we write programs. --Ward Cunningham and Ralph Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: From martmaly at exchange.microsoft.com Fri Aug 12 02:59:54 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Thu, 11 Aug 2005 17:59:54 -0700 Subject: [IronPython] Parrotbench and Pystone - adding external tests to IronPython Message-ID: <1DFB396200705E46B5338CA4B2E25BDE65F866@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hello, last week I promised to send out a description how to incorporate Pie-thon (a.k.a. parrotbench) and Pystone tests into the IronPython distribution to run the tests along with the IronPython test suite. Here is how to do it. The environment in which we run tests looks like this: IRONPYTHON_BASE ????External ? ????Parrotbench ? ????Regress ? ????Lib ????Src ????bin ????Examples ????IronMath ????IronPython ? ????AST ? ????Hosting ? ????Modules ? ????Objects ????IronPythonConsole ????IronPythonTest ????Scripts "External" directory contains all external tests: - CPython library + tests inside the "Regress" subdirectory - Parrotbench test in the "Parrotbench" subdirectory "Src" is the IronPython code that we release. - For the purpose of release we rename the directory (for example "IronPython-0.9"), renaming it back to "Src" will plug it right in place. "Parrotbench" directory contains the parrotbench benchmark files (b*.py, parrotrun.py, ...) To get parrotbench sources, download IronPython 0.6 from http://www.ironpython.com . The IronPython 0.6 distribution contains the Parrotbench in its "tests" directory. The parrotrun.py is a file Jim wrote to make running the tests easier. It has not been part of our releases yet and unfortunatelly I modified it so the version you get from IronPython 0.6 won't work. At the bottom of this email is the right version of the parrotrun.py that will work with the tests. Starting with our next release, we will include the parrotrun.py with the release so that things work smoother. Pystone + CPython regression test suite Download the 2.3.5 release of CPython from http://www.python.org/2.3.5 Library and tests are in the "Lib" directory of the Python installation. Copy the whole Lib directory into "Regress". Once you have combined IronPython release files with parrot-bench from IronPython 0.6 and standard CPython libraries, you can run the tests by exe Running the tests: To run the tests, execute: Src\bin\IronPythonConsole.exe Src\Scripts\RunTests.py The RunTests.py accepts command line parameters, one of them being the type of the test - short, medium, long (run "RunTests.py -?" for more details) Known issue is running "long" version of regression tests (runtests.py regr long). We had to make some changes to the Python test suite to get the long version running so if you run it, it will fail. For now, I would recommend running: "IronPythonConsole.exe RunTests.py iron pystone parrot long" I hope this helps for now and if you have any questions, don't hesitate to contact me so that we can address them. Thanks and keep in touch, Martin parrotrun.py file: ################################################## """ This provides a more convenient harness for running this benchmark and collecting separate timings for each component. """ from time import clock import sys def main(type="short"): t0 = clock() import b0 import b1 import b2 import b3 import b4 import b5 import b6 print 'import time = %.2f' % (clock()-t0) if type == "short": N = 1 tests = [b0,b1,b2,b3,b4,b6] elif type == "medium": N = 2 tests = [b0,b1,b2,b3,b4,b5,b6] elif type == "long": N = 4 tests = [b0,b1,b2,b3,b4,b5,b6] else: raise AssertionError("Unknown test type: %s" % type) results = {} t0 = clock() for i in range(N): for test in tests: ts0 = clock() test.main() tm = (clock()-ts0) results.setdefault(test, []).append(tm) print '%.2f sec running %s' % ( tm, test.__name__) for test in tests: print '%s = %f -- %r' % (test.__name__, sum(results[test])/N, results[test]) print 'all done in %.2f sec' % (clock()-t0) if __name__=="__main__": kind = "short" if len(sys.argv) > 1: kind = sys.argv[1] main(kind) ################################################## -------------- next part -------------- An HTML attachment was scrubbed... URL: From alcarx at gmail.com Fri Aug 12 10:39:12 2005 From: alcarx at gmail.com (=?GB2312?B?0OzE/g==?=) Date: Fri, 12 Aug 2005 16:39:12 +0800 Subject: [IronPython] language Support-Chinese In-Reply-To: References: <1DFB396200705E46B5338CA4B2E25BDE5FE883@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: i replaced (in class Parser, method fromFile) StreamReader sr = new StreamReader(File.OpenRead(filename), System.Text.Encoding.ASCII); with StreamReader sr = new StreamReader(File.OpenRead(filename), System.Text.Encoding.Default); and PythonEngine.ExecuteFile() now display correctly ?05-8-11??? ??? > > Just use the example shiped with IronPython9.0. > > Add a class named Embed5 > > > //////////////////////////////////////////////////////////////////////////////////////////// > public class Embed5 > { > //the file to be executed > const string fileName = @"D:/TestChinese.py"; > > public static void Run() > { > PythonEngine engine = new PythonEngine(); > engine.ExecuteFile(fileName); > Application.Run(); > } > } > > ////////////////////////////////////////////////////////////////////////////////////////////// > And content of TestChinese.py is > > ########################################## > > from System import * > from System.Windows.Forms import * > MessageBox.Show("???IronPython") > > ######################################### > > in Program.cs add "Embed5.Run();" > > while i run this example, the string "??" can't be correctly displayed. > > but if i use IronPythonConsole to execute MessageBox.Show > ("???IronPython"), > it works fine > > > > 2005/8/11, Martin Maly : > > > > Would it be possible for you to send us a short code snippet that you > > had problem with? I would like to find out whether the problem is in > > parsing, encoding usage, etc. > > Martin > > > > ------------------------------ > > *From:* users-ironpython.com-bounces at lists.ironpython.com [mailto: > > users-ironpython.com-bounces at lists.ironpython.com] *On Behalf Of *?? > > *Sent:* Wednesday, August 10, 2005 9:22 AM > > *To:* users-ironpython.com at lists.ironpython.com > > *Subject:* [IronPython] language Support-Chinese > > > > it seems that ironpython does not support chinese. > > i used ironpython in one project > > and tried to display some information in chinese , > > but these words can't be correctly displayed. > > i wonder if u could kindly give me some advice on sovling this problem. > > > > > > _______________________________________________ > > users-ironpython.com mailing list > > users-ironpython.com at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > > -- > The shift of focus (to patterns) will > have a profound and enduring effect > on the way we write programs. > --Ward Cunningham and Ralph Johnson -- The shift of focus (to patterns) will have a profound and enduring effect on the way we write programs. --Ward Cunningham and Ralph Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: From krzys at cs.cornell.edu Sat Aug 13 22:43:30 2005 From: krzys at cs.cornell.edu (Krzysztof Ostrowski) Date: Sat, 13 Aug 2005 16:43:30 -0400 Subject: [IronPython] How to use IronPython to generate DLLs consumable by other .NET modules? Message-ID: <90F8099F418E3F4F82336F6E2E670C72E0287C@EXCHVS1.cs.cornell.edu> Claims are that Iron Python can be statically compiled, promising higher performance. I'm interested in writing parts of my system, implemented mostly in C# for .NET under Win32 environment, in Python, mostly for fun, potentially also to save time if it proves to be useful. Dynamic compilation is not an option, I want to be able to call Python from C#, not the other way round, and without the overheads of invoking the Python engine on my way there. Is there indeed a way to achieve this? I don't see any clues on the web. Python does not seem to consume any sort of command line switches and does not offer help docs. Thanks a lot for all your responses. Cheers, Krzys -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvm_cop at spamcop.net Sun Aug 14 05:28:53 2005 From: jvm_cop at spamcop.net (J. Merrill) Date: Sat, 13 Aug 2005 23:28:53 -0400 Subject: [IronPython] How to use IronPython to generate DLLs consumable by other .NET modules? In-Reply-To: <90F8099F418E3F4F82336F6E2E670C72E0287C@EXCHVS1.cs.cornell. edu> Message-ID: <4.3.2.7.2.20050813232758.0479a3e0@mail.comcast.net> This is something that AFAIK is on the "planned for 1.0" list but it is not yet possible in any kind of straightforward fashion. At 04:43 PM 8/13/2005, Krzysztof Ostrowski wrote >Claims are that Iron Python can be statically compiled, promising higher performance. I'm interested in writing parts of my system, implemented mostly in C# for .NET under Win32 environment, in Python, mostly for fun, potentially also to save time if it proves to be useful. Dynamic compilation is not an option, I want to be able to call Python from C#, not the other way round, and without the overheads of invoking the Python engine on my way there. Is there indeed a way to achieve this? I don't see any clues on the web. Python does not seem to consume any sort of command line switches and does not offer help docs. Thanks a lot for all your responses. > >Cheers, >Krzys J. Merrill / Analytical Software Corp -------------- next part -------------- An HTML attachment was scrubbed... URL: From rayfd_2000 at yahoo.com Mon Aug 15 07:50:56 2005 From: rayfd_2000 at yahoo.com (Ray Djajadinata) Date: Sun, 14 Aug 2005 22:50:56 -0700 (PDT) Subject: [IronPython] Iron Python Library Usage Message-ID: <20050815055056.42420.qmail@web30709.mail.mud.yahoo.com> Hello, I wanted to say how great it is to hear about Iron Python because that means I can develop for .NET in my favourite language, just like I can write Java program in it as well, but... let me just ask my question :) I found that in Iron Python 0.9, a lot of modules that we've come to expect to see are not implemented yet--which is OK cos we've already got the whole .NET library already. But my question is, how is Iron Python meant to be used eventually? Is it: a. like Visual J++ for Java programmers, so you're using the familiar Java syntax to make use of .NET library? (e.g.: to do some string operations, we should use .NET String instead of importing the string module) b. meant to give the programmer an ability to run their (C)Python scripts unmodified on .NET? That is, if you want to do some string stuff, import string (which may be implemented using .NET String underneath), instead of importing System to make use of .NET's String? Even if right now we have to do with a mix of both approaches, surely there's a vision behind this that will favor one of them eventually? Thank you, Ray ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From martmaly at exchange.microsoft.com Mon Aug 15 21:53:35 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Mon, 15 Aug 2005 12:53:35 -0700 Subject: [IronPython] Iron Python Library Usage In-Reply-To: <20050815055056.42420.qmail@web30709.mail.mud.yahoo.com> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE65FD2A@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Ray, Thanks for your compliments, we are happy that you find IronPython useful. You are right, there are many built-in modules missing or incomplete in IronPython 0.9. Our focus for 0.9 was interoperability with .Net and between 0.9 and 1.0 we are going to invest a lot into making CPython and IronPython compatible in terms of using the same libraries, making sure that CPython regression test suite runs well on IronPython, that programs written in Python language that run well on CPython run also on IronPython. Out of your two "a" and "b" scenarios, we are planning on providing both and I hope we succeed. You bring up a good point with strings. If I am a .Net programmer and want to use string, I may want to see the .Net methods on the string object, i.e: "hi".ToUpper() whereas a Python programmer coming to IronPython could very well prefer to see the standard Python way: "hi".upper() It is not obvious how to approach this, but definitely our goal is to make sure that we stay true to the Python lanugage and its libraries and as I said, it is our focus from now on to make progress on the libraries and built-in modules etc. I hope this answers your question, Martin > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On > Behalf Of Ray Djajadinata > Sent: Sunday, August 14, 2005 10:51 PM > To: users-ironpython.com at lists.ironpython.com > Subject: [IronPython] Iron Python Library Usage > > Hello, > > I wanted to say how great it is to hear about Iron Python > because that means I can develop for .NET in my favourite > language, just like I can write Java program in it as well, > but... let me just ask my question :) > > I found that in Iron Python 0.9, a lot of modules that we've > come to expect to see are not implemented yet--which is OK > cos we've already got the whole .NET library already. > > But my question is, how is Iron Python meant to be used > eventually? Is it: > > a. like Visual J++ for Java programmers, so you're using the > familiar Java syntax to make use of .NET library? (e.g.: to > do some string operations, we should use .NET String instead > of importing the string > module) > > b. meant to give the programmer an ability to run their > (C)Python scripts unmodified on .NET? That is, if you want to > do some string stuff, import string (which may be implemented > using .NET String underneath), instead of importing System to > make use of .NET's String? > > Even if right now we have to do with a mix of both > approaches, surely there's a vision behind this that will > favor one of them eventually? > > Thank you, > Ray > From korpse-ironpython at kaydash.za.net Mon Aug 15 22:07:41 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Mon, 15 Aug 2005 22:07:41 +0200 Subject: [IronPython] Iron Python Library Usage In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE65FD2A@DF-BANDIT-MSG.exchange.corp.microsoft.com> References: <1DFB396200705E46B5338CA4B2E25BDE65FD2A@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <4300F60D.4010504@kaydash.za.net> Martin Maly wrote: > It is not obvious how to approach this, but definitely our goal is to > make sure that we stay true to the Python lanugage and its libraries and > as I said, it is our focus from now on to make progress on the libraries > and built-in modules etc. What about __future__ magic? -- Jonathan When you meet a master swordsman, show him your sword. When you meet a man who is not a poet, do not show him your poem. -- Rinzai, ninth century Zen master From martmaly at exchange.microsoft.com Mon Aug 15 22:10:25 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Mon, 15 Aug 2005 13:10:25 -0700 Subject: [IronPython] Iron Python Library Usage In-Reply-To: <4300F60D.4010504@kaydash.za.net> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE65FD48@DF-BANDIT-MSG.exchange.corp.microsoft.com> We did have discussion on this on the alias before that brought the __future__ magic as one option. Jim and I are thinking about the right approach, the __future__ is absolutely a valid candidate we are looking at. We surely want to find the right answer before 1.0 Martin > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On > Behalf Of Jonathan Jacobs > Sent: Monday, August 15, 2005 1:08 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Iron Python Library Usage > > Martin Maly wrote: > > It is not obvious how to approach this, but definitely our > goal is to > > make sure that we stay true to the Python lanugage and its > libraries > > and as I said, it is our focus from now on to make progress on the > > libraries and built-in modules etc. > > What about __future__ magic? > > -- > Jonathan > > When you meet a master swordsman, > show him your sword. > When you meet a man who is not a poet, > do not show him your poem. > -- Rinzai, ninth century Zen master > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From kfarmer at thuban.org Mon Aug 15 23:01:45 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 15 Aug 2005 14:01:45 -0700 Subject: [IronPython] Iron Python Library Usage Message-ID: I've been asked: Are there hopes for 1.0 release at PDC, or (as I think more likely) DevConnections/Whidbey release? ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Mon 8/15/2005 1:10 PM We surely want to find the right answer before 1.0 -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3515 bytes Desc: not available URL: From gogins at pipeline.com Sat Aug 13 23:26:09 2005 From: gogins at pipeline.com (Michael Gogins) Date: Sat, 13 Aug 2005 17:26:09 -0400 Subject: [IronPython] How to use IronPython to generate DLLs consumable byother .NET modules? References: <90F8099F418E3F4F82336F6E2E670C72E0287C@EXCHVS1.cs.cornell.edu> Message-ID: <000001c5a1ee$8d3757f0$6501a8c0@Generator> IronPython implements Python in C#, and can call .NET but not C. PythonNet implements Python in C, and can call both .NET and C. IronPython is probably the closest to what you want, since Python classes should also be .NET classes. Regards, Mike ----- Original Message ----- From: Krzysztof Ostrowski To: users-ironpython.com at lists.ironpython.com Sent: Saturday, August 13, 2005 4:43 PM Subject: [IronPython] How to use IronPython to generate DLLs consumable byother .NET modules? Claims are that Iron Python can be statically compiled, promising higher performance. I'm interested in writing parts of my system, implemented mostly in C# for .NET under Win32 environment, in Python, mostly for fun, potentially also to save time if it proves to be useful. Dynamic compilation is not an option, I want to be able to call Python from C#, not the other way round, and without the overheads of invoking the Python engine on my way there. Is there indeed a way to achieve this? I don't see any clues on the web. Python does not seem to consume any sort of command line switches and does not offer help docs. Thanks a lot for all your responses. Cheers, Krzys ------------------------------------------------------------------------------ _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Tue Aug 16 01:39:36 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 15 Aug 2005 16:39:36 -0700 Subject: [IronPython] How to use IronPython to generate DLLs consumablebyother .NET modules? Message-ID: By calling "C", you mean calling "CPython bytecode", right, since Python only calls C by virtue of having stubs available (eg, such as those produced by SWIG). IronPython could have these even more directly, I think (via DllImport, and no need for SWIG) As far as CPython bytecode, someone could probably make a Python bytecode to IL translator, once IronPython starts saving assemblies. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Michael Gogins Sent: Sat 8/13/2005 2:26 PM To: Discussion of IronPython Subject: Re: [IronPython] How to use IronPython to generate DLLs consumablebyother .NET modules? IronPython implements Python in C#, and can call .NET but not C. PythonNet implements Python in C, and can call both .NET and C. IronPython is probably the closest to what you want, since Python classes should also be .NET classes. From kfarmer at thuban.org Tue Aug 16 02:05:18 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 15 Aug 2005 17:05:18 -0700 Subject: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py Message-ID: Not terribly exciting, but if nobody's noticed: C:\IronPython-0.9\Scripts>mono \IronPython-0.9\bin\IronPythonConsole.exe .\TestAll.py ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: The class System.StringSplitOptions could not be loaded, used in \IronPython-0.9\bin\IronPython.dll (token 0x010000aa) ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: Missing method Split in assembly \IronPython-0.9\bin\IronPython.dll, type String ... This was using the IronPythonConsole binary generated using VC# 2005 Express.. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3215 bytes Desc: not available URL: From tinuviel at sparcs.kaist.ac.kr Tue Aug 16 02:12:39 2005 From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon) Date: Tue, 16 Aug 2005 09:12:39 +0900 Subject: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py In-Reply-To: References: Message-ID: <20050816001239.GA9364@sparcs.kaist.ac.kr> On Mon, Aug 15, 2005 at 05:05:18PM -0700, Keith J. Farmer wrote: > Not terribly exciting, but if nobody's noticed: > > C:\IronPython-0.9\Scripts>mono > \IronPython-0.9\bin\IronPythonConsole.exe .\TestAll.py > > ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: The > class System.StringSplitOptions could not be loaded, used in > \IronPython-0.9\bin\IronPython.dll (token 0x010000aa) You need SVN HEAD... StringSplitOptions and MidpointRounding, new .NET 2.0 enumerations are in HEAD, but not in any current releases. It is possible to recompile IronPython on Mono with gmcs and 2.0 class libraries, if you fix some stuffs. I haven't recorded details. Seo Sanghyeon From vargaz at gmail.com Tue Aug 16 02:15:21 2005 From: vargaz at gmail.com (Zoltan Varga) Date: Tue, 16 Aug 2005 02:15:21 +0200 Subject: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py In-Reply-To: References: Message-ID: <295e750a050815171537a2edba@mail.gmail.com> Hi, Hopefully this will work better in the next mono release. Speaking of the test suite, the makefile in the IronPython distribution does not seem to build the IronPythonTest.dll assembly. Zoltan On 8/16/05, Keith J. Farmer wrote: > Not terribly exciting, but if nobody's noticed: > > C:\IronPython-0.9\Scripts>mono \IronPython-0.9\bin\IronPythonConsole.exe .\TestAll.py > > ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: The class System.StringSplitOptions could not be loaded, used in \IronPython-0.9\bin\IronPython.dll (token 0x010000aa) > > ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: Missing method Split in assembly \IronPython-0.9\bin\IronPython.dll, type String > > > ... This was using the IronPythonConsole binary generated using VC# 2005 Express.. > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From kfarmer at thuban.org Tue Aug 16 02:29:34 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 15 Aug 2005 17:29:34 -0700 Subject: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py Message-ID: I'm not worried about compiling -- just execution. And I'm just allergic enough to not want to install cygwin and an svn browser just to recompile the latest mono. Really, I'm just checking mono + fepy for kicks. The fact that it runs at all makes me snigger behind the back of the Anti-MS League at work. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Seo Sanghyeon Sent: Mon 8/15/2005 5:12 PM You need SVN HEAD... StringSplitOptions and MidpointRounding, new .NET 2.0 enumerations are in HEAD, but not in any current releases. It is possible to recompile IronPython on Mono with gmcs and 2.0 class libraries, if you fix some stuffs. I haven't recorded details. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3988 bytes Desc: not available URL: From martmaly at exchange.microsoft.com Tue Aug 16 04:50:46 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Mon, 15 Aug 2005 19:50:46 -0700 Subject: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py In-Reply-To: <295e750a050815171537a2edba@mail.gmail.com> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE65FEA1@DF-BANDIT-MSG.exchange.corp.microsoft.com> Yes, you are right, I forgot to update the makefile. I am going to fix it for the next release, I hope local change will work for you in the meantime. Thanks Martin > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On > Behalf Of Zoltan Varga > Sent: Monday, August 15, 2005 5:15 PM > To: Discussion of IronPython > Subject: Re: [IronPython] [0.9 @ Mono 1.1.8.3] results of TestAll.py > > Hi, > > Hopefully this will work better in the next mono release. > > Speaking of the test suite, the makefile in the IronPython > distribution does not seem to build the IronPythonTest.dll assembly. > > Zoltan > > On 8/16/05, Keith J. Farmer wrote: > > Not terribly exciting, but if nobody's noticed: > > > > C:\IronPython-0.9\Scripts>mono > > \IronPython-0.9\bin\IronPythonConsole.exe .\TestAll.py > > > > ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: The > > class System.StringSplitOptions could not be loaded, used in > > \IronPython-0.9\bin\IronPython.dll (token 0x010000aa) > > > > ** (\IronPython-0.9\bin\IronPythonConsole.exe:316): WARNING **: > > Missing method Split in assembly > \IronPython-0.9\bin\IronPython.dll, > > type String > > > > > > ... This was using the IronPythonConsole binary generated > using VC# 2005 Express.. > > > > > > _______________________________________________ > > users-ironpython.com mailing list > > users-ironpython.com at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From rayfd_2000 at yahoo.com Tue Aug 16 05:21:38 2005 From: rayfd_2000 at yahoo.com (Ray Djajadinata) Date: Mon, 15 Aug 2005 20:21:38 -0700 (PDT) Subject: [IronPython] RE: Iron Python Library Usage In-Reply-To: <20050816000800.B4C851BB68@che.dreamhost.com> Message-ID: <20050816032138.92395.qmail@web30702.mail.mud.yahoo.com> Hi Martin, Thanks! It's great to hear you're planning to support both. I'm planning to jot down my experience with Iron Python and put it up in my site, but to make this more useful for .NET developers, I want to focus on "you have a concept. you express it this way in C#. now, here's how you express it in Python" It was at that point that I started asking myself this question (i.e.: whether to take approach a or b). I guess for the moment I'll just focus on doing stuff with .NET library using Python then, and probably update the articles later when 1.0 has come out. I'm really looking forward to this release! Cheers, Ray > > From: Martin Maly > To: "Discussion of IronPython" > > Date: Mon, 15 Aug 2005 12:53:35 -0700 > Subject: RE: [IronPython] Iron Python Library Usage > > Hi Ray, > > Thanks for your compliments, we are happy that you > find IronPython > useful. > > You are right, there are many built-in modules > missing or incomplete in > IronPython 0.9. > Our focus for 0.9 was interoperability with .Net and > between 0.9 and 1.0 > we are going to invest a lot into making CPython and > IronPython > compatible in terms of using the same libraries, > making sure that > CPython regression test suite runs well on > IronPython, that programs > written in Python language that run well on CPython > run also on > IronPython. > > Out of your two "a" and "b" scenarios, we are > planning on providing both > and I hope we succeed. You bring up a good point > with strings. If I am a > .Net programmer and want to use string, I may want > to see the .Net > methods on the string object, i.e: > > "hi".ToUpper() > > whereas a Python programmer coming to IronPython > could very well prefer > to see the standard Python way: > > "hi".upper() > > It is not obvious how to approach this, but > definitely our goal is to > make sure that we stay true to the Python lanugage > and its libraries and > as I said, it is our focus from now on to make > progress on the libraries > and built-in modules etc. > > I hope this answers your question, > > Martin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From sdrucker at microsoft.com Wed Aug 17 23:49:05 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Wed, 17 Aug 2005 14:49:05 -0700 Subject: [IronPython] bug in dir() function?? Message-ID: It looks like the dir() function does not list the functions for superclasses (either dirring the class or instance variable). Repro: class foo(): def foofunc(self): print 'foofunc'; class bar(foo): def barfunc(self): print 'barfunc'; In cpython: a = bar(); dir(a) produces the following: ['__doc__', '__module__', 'barfunc', 'foofunc'] But in IronPython [version 0.9.2306] this produces: a = bar(); dir(a) produces ['__doc__', 'barfunc'] The superclasses functions are all callable (a.foofunc() works). This same bug is there for inheriting from .NET classes, though of course .NET classes that inherit from other .NET classes show all pertinent functions. --Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From miuler at gmail.com Sat Aug 20 08:31:47 2005 From: miuler at gmail.com (Hector Miuler Malpica Gallegos) Date: Sat, 20 Aug 2005 01:31:47 -0500 Subject: [IronPython] Glade - Autoconnect - Error Message-ID: Hello, when treatment of Autoconnect with glade leaves an error to me. import sys sys.LoadAssemblyByName('gtk-sharp') sys.LoadAssemblyByName('glade-sharp') import Gtk import Glade class MonoBiblioteca: def __init__(self): self.prueba() self.BuildGUI() def BuildGUI(self): Gtk.Application.Init() self.gxml = Glade.XML('biblioteca.glade','winBusqueda',None) self.gxml.Autoconnect(self) Gtk.Application.Run() def Exit(self, args): sys.exit def on_winBusqueda_destroy(self): sys.exit def prueba(self): print "Prueba" Glade.HandlerNotFoundException: No handler on_winBusqueda_destroy found for signal destroy in <0x0033b> SignalConnector:ConnectFunc (intptr,intptr,intptr,intptr,intptr,int,intptr) in <0x00040> (wrapper native-to-managed) SignalConnector:ConnectFunc (intptr,intptr,intptr,intptr,intptr,int,intptr) in (unmanaged) 0xb659cf18 in <0x00004> (wrapper managed-to-native) SignalConnector:glade_xml_signal_autoconnect_full (intptr,Glade.XML /SignalConnector/RawXMLConnectFunc,intptr) in <0x00056> SignalConnector:Autoconnect () in <0x00045> Glade.XML:Autoconnect (object) in (unmanaged) 0x80e7544 in <0x00004> (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) in <0x0006f> System.Reflection.MonoMethod:Invoke (object, System.Reflection.BindingFlags,System.Reflection.Binder,object[], System.Globalization.CultureInfo) -- _\|/_ (O-O) --oOO-(_)-OOo---------------------------------------- Hector Miuler Malpica Gallegos Universidad Nacional del Callao - Peru Escuela de Ingenieria Electronica Jabber miuler at jabber.org usuario registrado #308608 -------------- next part -------------- An HTML attachment was scrubbed... URL: From plblackeagle at 163.com Mon Aug 22 17:04:41 2005 From: plblackeagle at 163.com (=?gb2312?B?cGxibGFja2VhZ2xl?=) Date: Mon, 22 Aug 2005 23:04:41 +0800 (CST) Subject: [IronPython] using ironpython write a code editor Message-ID: <4309E989.0000B0.03246@bj163app42.163.com> hello everyone,i'm english is not good. i like ironpython,it's very cool. so i write a code editor,using ironpython. the code not complete,but you can use it write python file or other one. you can downloads http://www.ctsen.org/irpy.rar the editor control i use ICSharpCode.TextEditor run run.bat file,startup it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Mon Aug 22 20:09:18 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 22 Aug 2005 11:09:18 -0700 Subject: [IronPython] using ironpython write a code editor Message-ID: :) A minor correction to your english: "i'm english is not good." -> "my english is not good" What you had written said: "I am English. To be English is not good." ... which is incorrect, but I believe Queen Elizabeth would forgive you. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of plblackeagle Sent: Mon 8/22/2005 8:04 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] using ironpython write a code editor hello everyone,i'm english is not good. From thane at magna-capital.com Mon Aug 22 21:20:47 2005 From: thane at magna-capital.com (Thane) Date: Mon, 22 Aug 2005 15:20:47 -0400 Subject: [IronPython] using ironpython write a code editor In-Reply-To: Message-ID: <20050822192049.B39F31BAC2@che.dreamhost.com> :) And yet another minor correction: ".. which is incorrect, but I believe Queen Elizabeth would forgive you.." I think you meant to use an ellipse (" ... "), defined as 3 dots separated by spaces, which denotes something left out or a voice trailing off. > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users- > ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer > Sent: Monday, August 22, 2005 2:09 PM > To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com > Subject: RE: [IronPython] using ironpython write a code editor > > :) > > A minor correction to your english: > > "i'm english is not good." -> "my english is not good" > > What you had written said: > > "I am English. To be English is not good." > > .. which is incorrect, but I believe Queen Elizabeth would forgive you.. > > ________________________________ > > From: users-ironpython.com-bounces at lists.ironpython.com on behalf of > plblackeagle > Sent: Mon 8/22/2005 8:04 AM > To: users-ironpython.com at lists.ironpython.com > Subject: [IronPython] using ironpython write a code editor > > > hello everyone,i'm english is not good. > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dmoody47 at comcast.net Mon Aug 22 21:33:12 2005 From: dmoody47 at comcast.net (David) Date: Mon, 22 Aug 2005 15:33:12 -0400 Subject: [IronPython] using ironpython write a code editor In-Reply-To: <20050822192049.B39F31BAC2@che.dreamhost.com> Message-ID: <20050822193318.6148A1BB71@che.dreamhost.com> Good one :) -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Thane Sent: Monday, August 22, 2005 3:21 PM To: 'Discussion of IronPython' Subject: RE: [IronPython] using ironpython write a code editor :) And yet another minor correction: ".. which is incorrect, but I believe Queen Elizabeth would forgive you.." I think you meant to use an ellipse (" ... "), defined as 3 dots separated by spaces, which denotes something left out or a voice trailing off. > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users- > ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer > Sent: Monday, August 22, 2005 2:09 PM > To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com > Subject: RE: [IronPython] using ironpython write a code editor > > :) > > A minor correction to your english: > > "i'm english is not good." -> "my english is not good" > > What you had written said: > > "I am English. To be English is not good." > > .. which is incorrect, but I believe Queen Elizabeth would forgive you.. > > ________________________________ > > From: users-ironpython.com-bounces at lists.ironpython.com on behalf of > plblackeagle > Sent: Mon 8/22/2005 8:04 AM > To: users-ironpython.com at lists.ironpython.com > Subject: [IronPython] using ironpython write a code editor > > > hello everyone,i'm english is not good. > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Mon Aug 22 21:43:39 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 22 Aug 2005 12:43:39 -0700 Subject: [IronPython] using ironpython write a code editor Message-ID: I meant what I said, and I said what I meant: My *ellipsis* is short, by thirty-three percent. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Thane Sent: Mon 8/22/2005 12:20 PM :) And yet another minor correction: ".. which is incorrect, but I believe Queen Elizabeth would forgive you.." I think you meant to use an ellipse (" ... "), defined as 3 dots separated by spaces, which denotes something left out or a voice trailing off. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3670 bytes Desc: not available URL: From kfarmer at thuban.org Mon Aug 22 22:17:00 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 22 Aug 2005 13:17:00 -0700 Subject: [IronPython] using ironpython write a code editor Message-ID: Corrected I am, and corrected in rhyme: 'Tis the best nitpick I've read in my time. ________________________________ From: Thane [mailto:thane at magna-capital.com] Sent: Mon 8/22/2005 1:00 PM To: Keith J. Farmer Subject: RE: [IronPython] using ironpython write a code editor If you don't count spaces, we still don't agree: Thirty-three and third, is one over three. ________________________________ From: Keith J. Farmer [mailto:kfarmer at thuban.org] Sent: Monday, August 22, 2005 3:44 PM To: thane at magna-capital.com; Discussion of IronPython Subject: RE: [IronPython] using ironpython write a code editor I meant what I said, and I said what I meant: My *ellipsis* is short, by thirty-three percent. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Thane Sent: Mon 8/22/2005 12:20 PM :) And yet another minor correction: ".. which is incorrect, but I believe Queen Elizabeth would forgive you.." I think you meant to use an ellipse (" ... "), defined as 3 dots separated by spaces, which denotes something left out or a voice trailing off. From kfarmer at thuban.org Mon Aug 22 22:34:54 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 22 Aug 2005 13:34:54 -0700 Subject: [IronPython] using ironpython write a code editor Message-ID: Incidentally, I note that my original email shows, in OWA, a proper ellipsis: "... which is incorrect, but I believe Queen Elizabeth would forgive you." ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Thane Sent: Mon 8/22/2005 12:20 PM To: 'Discussion of IronPython' Subject: RE: [IronPython] using ironpython write a code editor :) And yet another minor correction: ".. which is incorrect, but I believe Queen Elizabeth would forgive you.." I think you meant to use an ellipse (" ... "), defined as 3 dots separated by spaces, which denotes something left out or a voice trailing off. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3802 bytes Desc: not available URL: From martmaly at exchange.microsoft.com Wed Aug 24 01:12:50 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Tue, 23 Aug 2005 16:12:50 -0700 Subject: [IronPython] IronPython 0.9.1 released Message-ID: <1DFB396200705E46B5338CA4B2E25BDE6CF71E@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hello IronPython community, Today we have released IronPython 0.9.1, a small incremental release that contains several fixes for issues that were found in the 0.9 release and few changes in the console experience. The list of changes: * calling .Net methods with "ref" parameters is fixed * del with parentheses is fixed: "del(x)" * map called on array of strings now works * static methods now display better __doc__ strings * conversions from enums to integer types are implemented * The EXEs we generate for simple winforms scripts now run standalone * parrotrun.py is now included with the release to make running our full test suite easier. * Jim also changed the way we print exception traces and added the "-X:ColorfulConsole" command line parameter Our thanks for bug reports, opinions, feedback and ideas go to Anthony Tarlano, Nicholas Jacobson, Steven Drucker, grizlupo, Jonathan Jacobs, Keith J. Farmer and everybody else who we talked to in the course of the recent weeks, whether it was at OsCon in Portland or over email. After OsCon and two completely hectic weeks we are looking forward to implementing items from our todo list, the biggest of which is CPython 2.4 features and running more and more of the CPython test suite. Thank you very much for all your feedback and help and keep in touch, The IronPython Team. http://www.microsoft.com/downloads/details.aspx?FamilyID=8e34cfca-a843-4 96c-bf7e-3e6a250e36ce&displaylang=en http://workspaces.gotdotnet.com/ironpython From kfarmer at thuban.org Wed Aug 24 05:14:36 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Tue, 23 Aug 2005 20:14:36 -0700 Subject: [IronPython] IronPython 0.9.1 released Message-ID: I'm running on the x64 Framework. Re ColorfulConsole: the colors are dark, and difficult to view against black. Is there a way to set them? Re Stand-alone .exe: I see that .exe files are generated, but when I try to execute them from explorer, it gives an error with the following information sent to MS (for gui_winforms.py): AppName: gui_winforms.exe AppVer: 0.0.0.0 AppStamp:430be24e ModName: kernel32.dll ModVer: 5.2.3790.1830 ModStamp:42438b79 fDebug: 0 Offset: 000000000000dd30 Re TestAll.py: It cannot find the IronPythonTest.dll when I run from the command line. If I run a second time, after compiling the solution, all tests pass. If I try to run TestAll.exe, I get the same stand-alone .exe error noted above. Also, I see an x.txt document containing "Hello"? snippets.dll is back -- do I need to build using Release to hide it again? ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Tuesday, 23 August 2005 16:13 * calling .Net methods with "ref" parameters is fixed * del with parentheses is fixed: "del(x)" * map called on array of strings now works * static methods now display better __doc__ strings * conversions from enums to integer types are implemented * The EXEs we generate for simple winforms scripts now run standalone * parrotrun.py is now included with the release to make running our full test suite easier. * Jim also changed the way we print exception traces and added the "-X:ColorfulConsole" command line parameter From kfarmer at thuban.org Wed Aug 24 08:18:02 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Tue, 23 Aug 2005 23:18:02 -0700 Subject: [IronPython] TestAll.py & Mono 0.8.3 Message-ID: Got bored, decided to run TestAll.py under IronPython (0.9 and 0.9.1), under Mono (0.8.3), under Monad, under x64... In contrast, TestAll.py passes when run under MS CLR. Could the could-not-load errors be a matter of strong-name bindings going on in IronPython? ----- Keith J. Farmer kfarmer at thuban.org [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts [20] # > mono 'C:\Program Files `(x86`)\IronPython-0.9\bin\IronPythonConsole.exe' TestAll.py ** (C:\Program Files (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): WARNING **: bblock split failed in ModuleDef::Generate ======================================================= Testing ParrotBench suite long ======================================================= ParrotBench !!! SKIP !!! ======================================================= ======================================================= Testing Pystone suite long ======================================================= Pystone !!! SKIP !!! ======================================================= ======================================================= Testing IronPython suite long Running Arithmetics ... PASS Running Assert ... PASS Running Attrs ... ** (C:\Program Files (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): WARNING **: TypeRef ResolutionScope not yet handled (138) ** (C:\Program Files (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): WARNING **: The class Enumerator could not be loaded, used in C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll (token 0x010000c0) ** (C:\Program Files (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): WARNING **: The class System.StringSplitOptions could not be loaded, used in C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll (token 0x010000a3) ** (C:\Program Files (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): WARNING **: Missing method Split in assembly C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll, type String Unhandled Exception: System.NullReferenceException: Object reference not set toan instance of an object in <0x00000> in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile (IronPython.Hosting.PythonEngine engine, System.String filename) in <0x00131> IronPythonConsole.PythonCommandLine:Main (System.String[] rawArgs) [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts [21] # > mono 'C:\Program Files `(x86`)\IronPython-0.9.1\bin\IronPythonConsole.exe' TestAll.py ** (C:\Program Files (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): WARNING **: bblock split failed in ModuleDef::Generate ======================================================= Testing ParrotBench suite long ======================================================= ParrotBench !!! SKIP !!! ======================================================= ======================================================= Testing Pystone suite long ======================================================= Pystone !!! SKIP !!! ======================================================= ======================================================= Testing IronPython suite long Running Arithmetics ... PASS Running Assert ... PASS Running Attrs ... ** (C:\Program Files (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): WARNING **: TypeRef ResolutionScope not yet handled (164) ** (C:\Program Files (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): WARNING **: The class Enumerator could not be loaded, used in C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll (token 0x010000ac) ** (C:\Program Files (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): WARNING **: The class System.StringSplitOptions could not be loaded, used in C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll (token 0x01000088) ** (C:\Program Files (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): WARNING **: Missing method Split in assembly C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll, type String Unhandled Exception: System.NullReferenceException: Object reference not set toan instance of an object in <0x00000> in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile (IronPython.Hosting.PythonEngine engine, System.String filename) in <0x00131> IronPythonConsole.PythonCommandLine:Main (System.String[] rawArgs) [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts [22] # > fepy TestAll.py ======================================================= Testing ParrotBench suite long ======================================================= ParrotBench !!! SKIP !!! ======================================================= ======================================================= Testing Pystone suite long ======================================================= Pystone !!! SKIP !!! ======================================================= ======================================================= Testing IronPython suite long Running Arithmetics ... PASS Running Assert ... PASS Running Attrs ... PASS Running BigInt ... PASS Running BindingTest ... PASS Running Builtin ... PASS Running calls ... PASS Running Classes ... PASS Running conversions ... PASS Running Dictionary ... PASS Running doc ... PASS Running DocTest ... PASS Running Dynamic ... PASS Running errors ... PASS Running Exceptions ... PASS Running execfile ... PASS Running Formatting ... PASS Running Functions ... PASS Running Generators ... PASS Running Hosting ... PASS Running Import ... PASS Running ImportAs ... PASS Running Index ... PASS Running IndiceTest ... PASS Running Inheritance ... PASS Running Integers ... PASS Running InTest ... PASS Running Iterator ... PASS Running Lists ... PASS Running Loader ... PASS Running Math ... PASS Running Methods ... PASS Running Operators ... PASS Running ParserTest ... PASS Running properties ... PASS Running RangeTest ... PASS Running Slice ... PASS Running SuperDelegates ... PASS Running Thread ... PASS Running toimport ... PASS Running Types ... PASS Running Imp ... PASS ---------------------------------------- Test summary: !!! SUCCESS !!! ---------------------------------------- Tests ran: 42 Success: 42 Failure: 0 ---------------------------------------- ======================================================= IronPython !!! PASS !!! ======================================================= ======================================================= Testing Python Regression suite long ======================================================= Python Regression !!! SKIP !!! ======================================================= ******************************************************* ParrotBench SKIP Pystone SKIP IronPython PASS Python Regression SKIP ******************************************************* ALL TESTS PASS ******************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 24 11:35:49 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 02:35:49 -0700 Subject: [IronPython] fade-in window on ASPN Message-ID: Stumbled across this example, from last year: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303062 To make it work with the current version, add the following to the beginning of the file: import sys sys.LoadAssemblyByName('System.Windows.Forms') sys.LoadAssemblyByName('System.Drawing') ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 24 11:56:09 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 02:56:09 -0700 Subject: [IronPython] Math accuracy? Message-ID: I don't know why CPython returns in this case, but I wonder if it'd be possible to improve the accuracy for certain calculations? >>> a = 1j >>> a ** 2 (-1+1.22464679914735E-16j) >>> pow(a,2) (-1+1.22464679914735E-16j) ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 24 11:59:43 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 02:59:43 -0700 Subject: [IronPython] Math accuracy? Message-ID: That should be "what CPython returns". ----- Keith J. Farmer kfarmer at thuban.org ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Wednesday, 24 August 2005 02:56 I don't know why CPython returns in this case, -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 24 12:51:23 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 03:51:23 -0700 Subject: [IronPython] Math accuracy? Message-ID: Here's a *VERY* na?ve solution (ie, a 4am solution) for complex ^ positiveInt. It could be improved by generating the binomial expansion directly for n and avoiding a bunch of extra Complex64 instantiations. IronPython 0.9.1 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> a = 1j >>> a ** 2 (-1+0j) >>> a ** 1 1j >>> a ** 0 (1+0j) >>> a ** 3 -1j >>> a ** 4 (1+0j) ----- Keith J. Farmer kfarmer at thuban.org public Complex64 Power(Complex64 y) { double a = real; double b = imag; double c = y.real; double d = y.imag; if (Math.Truncate(c) == c && d == 0 && c >= 0) { switch ((int) c) { case 0: return new Complex64(1, 0); case 1: return this; case 2: { double newReal = a * a - b * b; double newImaginary = 2 * a * b; return new Complex64(newReal, newImaginary); } default: { double newReal = a * a - b * b; double newImaginary = 2 * a * b; return (new Complex64(newReal, newImaginary)) * this.Power(new Complex64(c-2, 0)); } } } double powers = a * a + b * b; double arg = Math.Atan2(b, a); double mul = Math.Pow(powers, c / 2) * Math.Pow(Math.E, -d * arg); double common = c * arg + .5 * d * Math.Log(powers, Math.E); return new Complex64(mul * Math.Cos(common), mul * Math.Sin(common)); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 24 13:01:58 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 04:01:58 -0700 Subject: [IronPython] Math accuracy? Message-ID: Or just: if (Math.Truncate(c) == c && d == 0 && c >= 0) { return this.pow((int)c); } Where you uncomment some better code already provided, and adjust: internal Complex64 pow(int power) { if (power == 0) return new Complex64(1, 0); if (power < 0) throw new ArgumentOutOfRangeException("power", power, "power must be >= 0"); Complex64 factor = this; Complex64 result = new Complex64(1, 0); //!!! want a mutable here for efficiency while (power != 0) { if ((power & 1) != 0) result = result * factor; factor = factor * factor; power >>= 1; } return result; } ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From vargaz at gmail.com Wed Aug 24 13:44:31 2005 From: vargaz at gmail.com (Zoltan Varga) Date: Wed, 24 Aug 2005 13:44:31 +0200 Subject: [IronPython] TestAll.py & Mono 0.8.3 In-Reply-To: References: Message-ID: <295e750a05082404446d7cba51@mail.gmail.com> Hi, Try 1.1.9 when its released. Zoltan On 8/24/05, Keith J. Farmer wrote: > > > > Got bored, decided to run TestAll.py under IronPython (0.9 and 0.9.1), under > Mono (0.8.3), under Monad, under x64? > > In contrast, TestAll.py passes when run under MS CLR. > > Could the could-not-load errors be a matter of strong-name bindings going on > in IronPython? > > ----- > > Keith J. Farmer > > kfarmer at thuban.org > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [20] # > mono 'C:\Program Files > `(x86`)\IronPython-0.9\bin\IronPythonConsole.exe' TestAll.py > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: bblock split failed in ModuleDef::Generate > > > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: TypeRef ResolutionScope not yet handled (138) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: The class Enumerator could not be loaded, used in C:\Program > Files (x86)\IronPython-0.9\bin\IronPython.dll (token 0x010000c0) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: The class System.StringSplitOptions could not be loaded, used in > C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll (token 0x010000a3) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: Missing method Split in assembly C:\Program Files > (x86)\IronPython-0.9\bin\IronPython.dll, type String > > > > Unhandled Exception: System.NullReferenceException: Object reference not set > toan instance of an object > > in <0x00000> > > in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile > (IronPython.Hosting.PythonEngine engine, System.String filename) > > in <0x00131> IronPythonConsole.PythonCommandLine:Main > (System.String[] rawArgs) > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [21] # > mono 'C:\Program Files > `(x86`)\IronPython-0.9.1\bin\IronPythonConsole.exe' > TestAll.py > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: bblock split failed in ModuleDef::Generate > > > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: TypeRef ResolutionScope not yet handled (164) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: The class Enumerator could not be loaded, used in C:\Program > Files (x86)\IronPython-0.9.1\bin\IronPython.dll (token 0x010000ac) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: The class System.StringSplitOptions could not be loaded, used in > C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll (token > 0x01000088) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: Missing method Split in assembly C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPython.dll, type String > > > > Unhandled Exception: System.NullReferenceException: Object reference not set > toan instance of an object > > in <0x00000> > > in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile > (IronPython.Hosting.PythonEngine engine, System.String filename) > > in <0x00131> IronPythonConsole.PythonCommandLine:Main > (System.String[] rawArgs) > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [22] # > fepy TestAll.py > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... PASS > > Running BigInt ... PASS > > Running BindingTest ... PASS > > Running Builtin ... PASS > > Running calls ... PASS > > Running Classes ... PASS > > Running conversions ... PASS > > Running Dictionary ... PASS > > Running doc ... PASS > > Running DocTest ... PASS > > Running Dynamic ... PASS > > Running errors ... PASS > > Running Exceptions ... PASS > > Running execfile ... PASS > > Running Formatting ... PASS > > Running Functions ... PASS > > Running Generators ... PASS > > Running Hosting ... PASS > > Running Import ... PASS > > Running ImportAs ... PASS > > Running Index ... PASS > > Running IndiceTest ... PASS > > Running Inheritance ... PASS > > Running Integers ... PASS > > Running InTest ... PASS > > Running Iterator ... PASS > > Running Lists ... PASS > > Running Loader ... PASS > > Running Math ... PASS > > Running Methods ... PASS > > Running Operators ... PASS > > Running ParserTest ... PASS > > Running properties ... PASS > > Running RangeTest ... PASS > > Running Slice ... PASS > > Running SuperDelegates ... PASS > > Running Thread ... PASS > > Running toimport ... PASS > > Running Types ... PASS > > Running Imp ... PASS > > ---------------------------------------- > > Test summary: !!! SUCCESS !!! > > ---------------------------------------- > > Tests ran: 42 > > Success: 42 > > Failure: 0 > > ---------------------------------------- > > ======================================================= > > IronPython !!! PASS !!! > > ======================================================= > > ======================================================= > > Testing Python Regression suite long > > ======================================================= > > Python Regression !!! SKIP !!! > > ======================================================= > > ******************************************************* > > ParrotBench SKIP > > Pystone SKIP > > IronPython PASS > > Python Regression SKIP > > ******************************************************* > > ALL TESTS PASS > > ******************************************************* > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From kfarmer at thuban.org Wed Aug 24 18:30:51 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 24 Aug 2005 09:30:51 -0700 Subject: [IronPython] TestAll.py & Mono 0.8.3 Message-ID: And when is that? ;) ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Zoltan Varga Try 1.1.9 when its released. From martmaly at exchange.microsoft.com Wed Aug 24 18:43:47 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 24 Aug 2005 09:43:47 -0700 Subject: [IronPython] IronPython 0.9.1 released In-Reply-To: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE6CF85F@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Keith, I believe that the colors were originally designed to run on the white background (better for demos). To change them, I am convinced that code change is needed at this point. Running the generated exes ... the error you are getting, I believe, means that the referenced dlls cannot be found. Solution for now is to have ironpython dlls in the same directory. We need to add the correct references into the generated exes to get this working. It will be part of our 'static compilation' project in the future. x.txt is a by-product of the test-suite. I'll fix the suite to delete the temporary files. Snippets ... yes, release build doesn't generate snippets. Thanks Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Tuesday, August 23, 2005 8:15 PM To: Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9.1 released I'm running on the x64 Framework. Re ColorfulConsole: the colors are dark, and difficult to view against black. Is there a way to set them? Re Stand-alone .exe: I see that .exe files are generated, but when I try to execute them from explorer, it gives an error with the following information sent to MS (for gui_winforms.py): AppName: gui_winforms.exe AppVer: 0.0.0.0 AppStamp:430be24e ModName: kernel32.dll ModVer: 5.2.3790.1830 ModStamp:42438b79 fDebug: 0 Offset: 000000000000dd30 Re TestAll.py: It cannot find the IronPythonTest.dll when I run from the command line. If I run a second time, after compiling the solution, all tests pass. If I try to run TestAll.exe, I get the same stand-alone .exe error noted above. Also, I see an x.txt document containing "Hello"? snippets.dll is back -- do I need to build using Release to hide it again? ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Tuesday, 23 August 2005 16:13 * calling .Net methods with "ref" parameters is fixed * del with parentheses is fixed: "del(x)" * map called on array of strings now works * static methods now display better __doc__ strings * conversions from enums to integer types are implemented * The EXEs we generate for simple winforms scripts now run standalone * parrotrun.py is now included with the release to make running our full test suite easier. * Jim also changed the way we print exception traces and added the "-X:ColorfulConsole" command line parameter _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From miguel at ximian.com Wed Aug 24 18:52:36 2005 From: miguel at ximian.com (Miguel de Icaza) Date: Wed, 24 Aug 2005 12:52:36 -0400 Subject: [IronPython] TestAll.py & Mono 0.8.3 In-Reply-To: References: Message-ID: <1124902356.8256.716.camel@linux.site> Hello, > And when is that? ;) Late August, early September. Before the PDC for sure. Miguel From imm at iain-mackay.org Wed Aug 24 19:37:39 2005 From: imm at iain-mackay.org (Iain Mackay) Date: Wed, 24 Aug 2005 18:37:39 +0100 Subject: [IronPython] RE: users-ironpython.com Digest, Vol 13, Issue 31 In-Reply-To: <20050824164736.7E7841BB14@che.dreamhost.com> Message-ID: <001001c5a8d2$865086b0$0202a8c0@Ness> Thanks Geoff Iain -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of users-ironpython.com-request at lists.ironpython.com Sent: 24 August 2005 16:48 To: users-ironpython.com at lists.ironpython.com Subject: users-ironpython.com Digest, Vol 13, Issue 31 Send users-ironpython.com mailing list submissions to users-ironpython.com at lists.ironpython.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.ironpython.com/listinfo.cgi/users-ironpython.com or, via email, send a message with subject or body 'help' to users-ironpython.com-request at lists.ironpython.com You can reach the person managing the list at users-ironpython.com-owner at lists.ironpython.com When replying, please edit your Subject line so it is more specific than "Re: Contents of users-ironpython.com digest..." Today's Topics: 1. RE: Math accuracy? (Keith J. Farmer) 2. Re: TestAll.py & Mono 0.8.3 (Zoltan Varga) 3. RE: TestAll.py & Mono 0.8.3 (Keith J. Farmer) 4. RE: IronPython 0.9.1 released (Martin Maly) ---------------------------------------------------------------------- Message: 1 Date: Wed, 24 Aug 2005 04:01:58 -0700 From: "Keith J. Farmer" Subject: RE: [IronPython] Math accuracy? To: "Discussion of IronPython" Message-ID: Content-Type: text/plain; charset="us-ascii" Or just: if (Math.Truncate(c) == c && d == 0 && c >= 0) { return this.pow((int)c); } Where you uncomment some better code already provided, and adjust: internal Complex64 pow(int power) { if (power == 0) return new Complex64(1, 0); if (power < 0) throw new ArgumentOutOfRangeException("power", power, "power must be >= 0"); Complex64 factor = this; Complex64 result = new Complex64(1, 0); //!!! want a mutable here for efficiency while (power != 0) { if ((power & 1) != 0) result = result * factor; factor = factor * factor; power >>= 1; } return result; } ----- Keith J. Farmer kfarmer at thuban.org -------------- next part -------------- An HTML attachment was scrubbed... URL: /pipermail/users-ironpython.com/attachments/20050824/3763038e/attachment-000 1.html ------------------------------ Message: 2 Date: Wed, 24 Aug 2005 13:44:31 +0200 From: Zoltan Varga Subject: Re: [IronPython] TestAll.py & Mono 0.8.3 To: Discussion of IronPython Message-ID: <295e750a05082404446d7cba51 at mail.gmail.com> Content-Type: text/plain; charset=WINDOWS-1252 Hi, Try 1.1.9 when its released. Zoltan On 8/24/05, Keith J. Farmer wrote: > > > > Got bored, decided to run TestAll.py under IronPython (0.9 and 0.9.1), > under Mono (0.8.3), under Monad, under x64. > > In contrast, TestAll.py passes when run under MS CLR. > > Could the could-not-load errors be a matter of strong-name bindings > going on in IronPython? > > ----- > > Keith J. Farmer > > kfarmer at thuban.org > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [20] # > mono 'C:\Program Files > `(x86`)\IronPython-0.9\bin\IronPythonConsole.exe' TestAll.py > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: bblock split failed in ModuleDef::Generate > > > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: TypeRef ResolutionScope not yet handled (138) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: The class Enumerator could not be loaded, used in > C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll (token > 0x010000c0) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: The class System.StringSplitOptions could not be loaded, > used in C:\Program Files (x86)\IronPython-0.9\bin\IronPython.dll > (token 0x010000a3) > > > > ** (C:\Program Files > (x86)\IronPython-0.9\bin\IronPythonConsole.exe:1316): > WARNING **: Missing method Split in assembly C:\Program Files > (x86)\IronPython-0.9\bin\IronPython.dll, type String > > > > Unhandled Exception: System.NullReferenceException: Object reference > not set toan instance of an object > > in <0x00000> > > in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile > (IronPython.Hosting.PythonEngine engine, System.String filename) > > in <0x00131> IronPythonConsole.PythonCommandLine:Main > (System.String[] rawArgs) > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [21] # > mono 'C:\Program Files > `(x86`)\IronPython-0.9.1\bin\IronPythonConsole.exe' > TestAll.py > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: bblock split failed in ModuleDef::Generate > > > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: TypeRef ResolutionScope not yet handled (164) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: The class Enumerator could not be loaded, used in > C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll (token > 0x010000ac) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: The class System.StringSplitOptions could not be loaded, > used in C:\Program Files (x86)\IronPython-0.9.1\bin\IronPython.dll > (token > 0x01000088) > > > > ** (C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPythonConsole.exe:1904): > WARNING **: Missing method Split in assembly C:\Program Files > (x86)\IronPython-0.9.1\bin\IronPython.dll, type String > > > > Unhandled Exception: System.NullReferenceException: Object reference > not set toan instance of an object > > in <0x00000> > > in <0x000c2> IronPythonConsole.PythonCommandLine:RunFile > (IronPython.Hosting.PythonEngine engine, System.String filename) > > in <0x00131> IronPythonConsole.PythonCommandLine:Main > (System.String[] rawArgs) > > > > [kfarmer at dreamer] C:\Program Files (x86)\IronPython-0.9.1\Scripts > > [22] # > fepy TestAll.py > > ======================================================= > > Testing ParrotBench suite long > > ======================================================= > > ParrotBench !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing Pystone suite long > > ======================================================= > > Pystone !!! SKIP !!! > > ======================================================= > > ======================================================= > > Testing IronPython suite long > > Running Arithmetics ... PASS > > Running Assert ... PASS > > Running Attrs ... PASS > > Running BigInt ... PASS > > Running BindingTest ... PASS > > Running Builtin ... PASS > > Running calls ... PASS > > Running Classes ... PASS > > Running conversions ... PASS > > Running Dictionary ... PASS > > Running doc ... PASS > > Running DocTest ... PASS > > Running Dynamic ... PASS > > Running errors ... PASS > > Running Exceptions ... PASS > > Running execfile ... PASS > > Running Formatting ... PASS > > Running Functions ... PASS > > Running Generators ... PASS > > Running Hosting ... PASS > > Running Import ... PASS > > Running ImportAs ... PASS > > Running Index ... PASS > > Running IndiceTest ... PASS > > Running Inheritance ... PASS > > Running Integers ... PASS > > Running InTest ... PASS > > Running Iterator ... PASS > > Running Lists ... PASS > > Running Loader ... PASS > > Running Math ... PASS > > Running Methods ... PASS > > Running Operators ... PASS > > Running ParserTest ... PASS > > Running properties ... PASS > > Running RangeTest ... PASS > > Running Slice ... PASS > > Running SuperDelegates ... PASS > > Running Thread ... PASS > > Running toimport ... PASS > > Running Types ... PASS > > Running Imp ... PASS > > ---------------------------------------- > > Test summary: !!! SUCCESS !!! > > ---------------------------------------- > > Tests ran: 42 > > Success: 42 > > Failure: 0 > > ---------------------------------------- > > ======================================================= > > IronPython !!! PASS !!! > > ======================================================= > > ======================================================= > > Testing Python Regression suite long > > ======================================================= > > Python Regression !!! SKIP !!! > > ======================================================= > > ******************************************************* > > ParrotBench SKIP > > Pystone SKIP > > IronPython PASS > > Python Regression SKIP > > ******************************************************* > > ALL TESTS PASS > > ******************************************************* > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------ Message: 3 Date: Wed, 24 Aug 2005 09:30:51 -0700 From: "Keith J. Farmer" Subject: RE: [IronPython] TestAll.py & Mono 0.8.3 To: "Discussion of IronPython" Message-ID: Content-Type: text/plain; charset="US-ASCII" And when is that? ;) ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Zoltan Varga Try 1.1.9 when its released. ------------------------------ Message: 4 Date: Wed, 24 Aug 2005 09:43:47 -0700 From: Martin Maly Subject: RE: [IronPython] IronPython 0.9.1 released To: "Discussion of IronPython" Message-ID: <1DFB396200705E46B5338CA4B2E25BDE6CF85F at DF-BANDIT-MSG.exchange.corp.microsof t.com> Content-Type: text/plain; charset="us-ascii" Hi Keith, I believe that the colors were originally designed to run on the white background (better for demos). To change them, I am convinced that code change is needed at this point. Running the generated exes ... the error you are getting, I believe, means that the referenced dlls cannot be found. Solution for now is to have ironpython dlls in the same directory. We need to add the correct references into the generated exes to get this working. It will be part of our 'static compilation' project in the future. x.txt is a by-product of the test-suite. I'll fix the suite to delete the temporary files. Snippets ... yes, release build doesn't generate snippets. Thanks Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Tuesday, August 23, 2005 8:15 PM To: Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9.1 released I'm running on the x64 Framework. Re ColorfulConsole: the colors are dark, and difficult to view against black. Is there a way to set them? Re Stand-alone .exe: I see that .exe files are generated, but when I try to execute them from explorer, it gives an error with the following information sent to MS (for gui_winforms.py): AppName: gui_winforms.exe AppVer: 0.0.0.0 AppStamp:430be24e ModName: kernel32.dll ModVer: 5.2.3790.1830 ModStamp:42438b79 fDebug: 0 Offset: 000000000000dd30 Re TestAll.py: It cannot find the IronPythonTest.dll when I run from the command line. If I run a second time, after compiling the solution, all tests pass. If I try to run TestAll.exe, I get the same stand-alone .exe error noted above. Also, I see an x.txt document containing "Hello"? snippets.dll is back -- do I need to build using Release to hide it again? ----- Keith J. Farmer kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Tuesday, 23 August 2005 16:13 * calling .Net methods with "ref" parameters is fixed * del with parentheses is fixed: "del(x)" * map called on array of strings now works * static methods now display better __doc__ strings * conversions from enums to integer types are implemented * The EXEs we generate for simple winforms scripts now run standalone * parrotrun.py is now included with the release to make running our full test suite easier. * Jim also changed the way we print exception traces and added the "-X:ColorfulConsole" command line parameter _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ------------------------------ _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com End of users-ironpython.com Digest, Vol 13, Issue 31 **************************************************** From ironpython at mmm-experts.com Thu Aug 25 05:24:20 2005 From: ironpython at mmm-experts.com (Morgan Martinet) Date: Wed, 24 Aug 2005 23:24:20 -0400 Subject: [IronPython] Console In-Reply-To: <001001c5a8d2$865086b0$0202a8c0@Ness> Message-ID: <200508250324.j7P3OYrA005633@aeimail.aei.ca> Hi, A little detail: why does the console display an empty tuple when you simply press enter? IronPython 0.9.1 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> () >>> () >>> This does not happen with CPython... Also, why don't you enable the tab completion feature by default, as I had to find the special switch and create a shortcut to IronPython to enable it... I'm pretty sure that nobody wants to type everything ;-) Otherwise, I want to congratulate for the job. I've started porting a module that was relying on IDispatch to use ADO and I could successfully replace the code with ADO.Net objects. Morgan From martmaly at exchange.microsoft.com Thu Aug 25 05:49:05 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Wed, 24 Aug 2005 20:49:05 -0700 Subject: [IronPython] Console In-Reply-To: <200508250324.j7P3OYrA005633@aeimail.aei.ca> Message-ID: <1DFB396200705E46B5338CA4B2E25BDE6CFB14@DF-BANDIT-MSG.exchange.corp.microsoft.com> Hi Morgan, Good question. I believe it is actually a bug that we print the "()" on enter. We didn't turn the console on by default because it is just the first draft of the console, but it is not yet good enough to turn on by default, I think. As time permits I hope to improve it and eventually turn it on by default. Thanks for your email, Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Morgan Martinet Sent: Wednesday, August 24, 2005 8:24 PM To: 'Discussion of IronPython' Subject: [IronPython] Console Hi, A little detail: why does the console display an empty tuple when you simply press enter? IronPython 0.9.1 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> () >>> () >>> This does not happen with CPython... Also, why don't you enable the tab completion feature by default, as I had to find the special switch and create a shortcut to IronPython to enable it... I'm pretty sure that nobody wants to type everything ;-) Otherwise, I want to congratulate for the job. I've started porting a module that was relying on IDispatch to use ADO and I could successfully replace the code with ADO.Net objects. Morgan _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From vawjr at rudbek.com Thu Aug 25 06:15:54 2005 From: vawjr at rudbek.com (Victor A. Wagner Jr.) Date: Wed, 24 Aug 2005 22:15:54 -0600 Subject: [IronPython] using ironpython write a code editor In-Reply-To: <20050822192049.B39F31BAC2@che.dreamhost.com> References: <20050822192049.B39F31BAC2@che.dreamhost.com> Message-ID: <6.2.3.4.2.20050824221119.0502e350@mail.rudbek.com> At 13:20 2005-08-22, you wrote: >:) > >And yet another minor correction: > >".. which is incorrect, but I believe Queen Elizabeth would forgive you.." > >I think you meant to use an ellipse (" ... "), defined as 3 dots separated >by spaces, which denotes something left out or a voice trailing off. err, ellipsis Main Entry: el?lip?sis Pronunciation: i-'lip-s&s, e- Function: noun Inflected Form(s): plural el?lip?ses /-"sEz/ Etymology: Latin, from Greek elleipsis ellipsis, ellipse, from elleipein to leave out, fall short, from en in + leipein to leave -- more at IN, LOAN 1 a : the omission of one or more words that are obviously understood but that must be supplied to make a construction grammatically complete b : a sudden leap from one topic to another 2 : marks or a mark (as ... or ? or --) indicating an omission (as of words) or a pause definition 2 is what you're looking for, I believe. (hmmm, I thought 1b was a segue... maybe Webster.com is wrong afterall) Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law" From kfarmer at thuban.org Thu Aug 25 09:29:39 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 25 Aug 2005 00:29:39 -0700 Subject: [IronPython] IronPython 0.9.1 released Message-ID: ILMerge, or GAC? I think I'd prefer the latter, though that goes against the idea of no having to know anything about what language something was written in. Your diagnosis was correct -- copying the dlls worked. Out of curiosity, is there going to be the equivalent of pyw, or some switch to tell IronPython to generate a GUI app, rather than a console app? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Martin Maly Running the generated exes ... the error you are getting, I believe, means that the referenced dlls cannot be found. Solution for now is to have ironpython dlls in the same directory. We need to add the correct references into the generated exes to get this working. It will be part of our 'static compilation' project in the future. From GHenderson at ansell.com Thu Aug 25 09:32:47 2005 From: GHenderson at ansell.com (Greg Henderson) Date: Thu, 25 Aug 2005 02:32:47 -0500 Subject: [IronPython] Greg Henderson/AM/ANSELL is out of the office. Message-ID: I will be out of the office starting 08/25/2005 and will not return until 08/29/2005. I will respond to your message when I return. ___________________________________________________________________________ This e-mail (including any attachments) is intended only for the exclusive use of the individual to whom it is addressed. The information contained hereinafter may be proprietary, confidential, privileged and exempt from disclosure under applicable law. If the reader of this e-mail is not the intended recipient or agent responsible for delivering the message to the intended recipient, the reader is hereby put on notice that any use, dissemination, distribution or copying of this communication is strictly prohibited. If the reader has received this communication in error, please immediately notify the sender by telephone or e-mail and delete all copies of this e-mail and any attachments. Thank you. From kfarmer at thuban.org Thu Aug 25 10:43:14 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 25 Aug 2005 01:43:14 -0700 Subject: [IronPython] Environment.Platform? and a bug Message-ID: Just found suggestion FDBK28390: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedback id=befed442-718d-45db-bb52-47b8f21357f1 I'd be interested in something like: Environment.Platform = ".NET", "Mono", etc I imagine I could try sniffing aspects of the System assembly (such as its public key), but that's always playing catch-up with each build when it could simply be exposed by the current runtime. Miguel: If there isn't, think Mono/Novell would be able to convince MS of its value? There are going to be differences between the distributions, and it'd be worthwhile being able to easily detect which we're running under, to load compatibility layers, for instance. BUG: If you wrap the cursor off the edge of the line and onto the next, expect the following: at System.Console.SetCursorPosition(Int32 left, Int32 top) System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. Parameter name: top Actual value was 300. ----- Keith J. Farmer // kfarmer at thuban.org From lovlalwani at yahoo.co.in Fri Aug 26 10:29:56 2005 From: lovlalwani at yahoo.co.in (lov lalwani) Date: Fri, 26 Aug 2005 09:29:56 +0100 (BST) Subject: [IronPython] unsubscibe Message-ID: <20050826082956.64438.qmail@web8306.mail.in.yahoo.com> I can be contacted at lov at bom2.vsnl.net.in lovlalwani at yahoo.co.in is a second alternative. ____________________________________________________ Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to http://in.promos.yahoo.com/rakhi/index.html From martmaly at exchange.microsoft.com Fri Aug 26 20:11:43 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Fri, 26 Aug 2005 11:11:43 -0700 Subject: [IronPython] Environment.Platform? and a bug In-Reply-To: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE73B91D@DF-BANDIT-MSG.exchange.corp.microsoft.com> Keith, As for the System.Environment.Platform ... I asked around and got response that the feature won't be added for the Visual Studio 2005 release. The APIs are already locked down at this point. The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. ... and, I am also going to improve the Math precision for the obvious cases, thanks for reporting that! Martin -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, August 25, 2005 1:43 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Environment.Platform? and a bug Just found suggestion FDBK28390: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedback id=befed442-718d-45db-bb52-47b8f21357f1 I'd be interested in something like: Environment.Platform = ".NET", "Mono", etc I imagine I could try sniffing aspects of the System assembly (such as its public key), but that's always playing catch-up with each build when it could simply be exposed by the current runtime. Miguel: If there isn't, think Mono/Novell would be able to convince MS of its value? There are going to be differences between the distributions, and it'd be worthwhile being able to easily detect which we're running under, to load compatibility layers, for instance. BUG: If you wrap the cursor off the edge of the line and onto the next, expect the following: at System.Console.SetCursorPosition(Int32 left, Int32 top) System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. Parameter name: top Actual value was 300. ----- Keith J. Farmer // kfarmer at thuban.org _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Fri Aug 26 20:23:29 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 26 Aug 2005 11:23:29 -0700 Subject: [IronPython] Environment.Platform? and a bug Message-ID: While I encountered the bug initially using tab completion, I think I found it also just typing beyond the edge of the console. Environment.Platform: yeah, I asked BradA, and he forwarded on to others. I figure it'll be needed before Orcas comes out, and by then it'll be really annoying. Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3969 bytes Desc: not available URL: From martmaly at exchange.microsoft.com Fri Aug 26 20:46:33 2005 From: martmaly at exchange.microsoft.com (Martin Maly) Date: Fri, 26 Aug 2005 11:46:33 -0700 Subject: [IronPython] Environment.Platform? and a bug In-Reply-To: Message-ID: <1DFB396200705E46B5338CA4B2E25BDE73B95B@DF-BANDIT-MSG.exchange.corp.microsoft.com> Oh, I see. The bug actually does not occur when you wrap the line. It only occurs when you wrap the _last_ line in the screen buffer. Great catch! (my screen buffer is so big that I never hit this problem :-) Fix will be in 0.9.2 I don't know what the scope of porting numpy would be Martin ________________________________ From: Keith J. Farmer [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Friday, August 26, 2005 11:23 AM To: Discussion of IronPython Subject: RE: [IronPython] Environment.Platform? and a bug While I encountered the bug initially using tab completion, I think I found it also just typing beyond the edge of the console. Environment.Platform: yeah, I asked BradA, and he forwarded on to others. I figure it'll be needed before Orcas comes out, and by then it'll be really annoying. Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ironpython at mmm-experts.com Sat Aug 27 05:35:23 2005 From: ironpython at mmm-experts.com (Morgan Martinet) Date: Fri, 26 Aug 2005 23:35:23 -0400 Subject: [IronPython] Dynamic compilation In-Reply-To: <1DFB396200705E46B5338CA4B2E25BDE73B95B@DF-BANDIT-MSG.exchange.corp.microsoft.com> Message-ID: <200508270335.j7R3Ziek006634@aeimail.aei.ca> Hi, Today, I wanted to upgrade my current release of IronPython and I went into my folder containing my scripts. Then I realized that there was a lot of files like: MyModule.py MyModule.exe MyModule__1.exe MyModule__2.exe MyModule__3.exe MyModule__4.exe ... Then I remembered that when I was trying IronPython, I had a Python editor open to input the script that I executed in the IronPython console. But in order to avoid relaunching the console, I was relying on the reload(MyModule) Python function. So, I assume that when you import a script it is compiled into an exe that is loaded into the process and locked, preventing another compilation of the same source. I don't think this is acceptable and I guess that you could either use shadow copy or load the exe into memory before trying to run it? Bye, Morgan From thane at magna-capital.com Sun Aug 28 00:23:49 2005 From: thane at magna-capital.com (Thane) Date: Sat, 27 Aug 2005 18:23:49 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: Message-ID: <20050827222358.BE9011BB20@che.dreamhost.com> There are two approaches: 1) wrap the unmanaged API in managed C++, or, 2) rewrite the library in managed code (IronPython?). Also, I think the Numeric library would be preferable to Numpy, although I'd bet Numpy has a larger user base. Option 1 could be done fairly quickly, but option 2 is the best long-term solution. Several years ago I wrote a COM wrapper for many of the Numpy functions without too much pain. Wait, it was MFC. There must have been a lot of pain; I've just forgotten about it :-) Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. _____ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 4674 bytes Desc: not available URL: From kfarmer at thuban.org Sun Aug 28 00:42:07 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 27 Aug 2005 15:42:07 -0700 Subject: [IronPython] RE: Numpy port Message-ID: It's been ages; all I remember is Numpy. ----- Keith J. Farmer kfarmer at thuban.org ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Thane Sent: Saturday, 27 August 2005 15:24 There are two approaches: 1) wrap the unmanaged API in managed C++, or, 2) rewrite the library in managed code (IronPython?). Also, I think the Numeric library would be preferable to Numpy, although I'd bet Numpy has a larger user base. Option 1 could be done fairly quickly, but option 2 is the best long-term solution. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thane at magna-capital.com Sun Aug 28 04:23:22 2005 From: thane at magna-capital.com (Thane) Date: Sat, 27 Aug 2005 22:23:22 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <20050827222358.BE9011BB20@che.dreamhost.com> Message-ID: <20050828022325.171E61BB20@che.dreamhost.com> Correction: the library I was thinking of is called "Numarray". See http://www.stsci.edu/resources/software_hardware/numarray I think that "numpy" is the import name for the "Numerical" library originally created by Paul Dubois. _____ Also, I think the Numeric library would be preferable to Numpy, although I'd bet Numpy has a larger user base. Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. _____ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 4938 bytes Desc: not available URL: From pebarrett at gmail.com Sun Aug 28 05:48:30 2005 From: pebarrett at gmail.com (Paul Barrett) Date: Sat, 27 Aug 2005 23:48:30 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <20050827222358.BE9011BB20@che.dreamhost.com> References: <20050827222358.BE9011BB20@che.dreamhost.com> Message-ID: <40e64fa20508272048208b24d0@mail.gmail.com> Option 1 is the way to go if you want a quick and dirty multidimensional array module that currently has a lot of community support. Numarray/Numeric 3 was designed with the C programming language in mind and is therefore constrained by C's lack of object-oriented features. The Numarray code can be quite dense and complex, making it difficult for someone new to the code to add new features. Option 2 is the preferred long term solution, since you will be able to use the object-oriented features of C++ or C# to simpify the design and implementation. The module is also likely to be faster for small arrays and more efficient, particularly for operations that involved Python sequences and multidimensional arrays. IronPython provides an excellent opportunity to design and implement a multidimensional array module that uses OO language features for fast and efficient code. Let me know if you would like me to elaborate on this some more. -- Paul Barrett From kfarmer at thuban.org Sun Aug 28 07:04:52 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 27 Aug 2005 22:04:52 -0700 Subject: [IronPython] RE: Numpy port Message-ID: I think it'd be a good project. Used properly, the CLR's already been shown to have decent speed for numeric calculations (and C# has access to pointers). I was considering getting the OO Numerical Methods in Java & Smalltalk book at some point, and porting the Java source to J#. Python's got a fairly good following in the sciences. I think having a good port of a familiar numerics library would help bring in some devotees. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Paul Barrett Sent: Saturday, 27 August 2005 20:49 IronPython provides an excellent opportunity to design and implement a multidimensional array module that uses OO language features for fast and efficient code. Let me know if you would like me to elaborate on this some more. From drew at astro.pas.rochester.edu Sun Aug 28 14:34:50 2005 From: drew at astro.pas.rochester.edu (Drew Moore) Date: Sun, 28 Aug 2005 08:34:50 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <40e64fa20508272048208b24d0@mail.gmail.com> References: <20050827222358.BE9011BB20@che.dreamhost.com> <40e64fa20508272048208b24d0@mail.gmail.com> Message-ID: <4311AF6A.9000603@astro.pas.rochester.edu> Paul Barrett wrote: >IronPython provides an excellent opportunity to design and implement a >multidimensional array module that uses OO language features for fast >and efficient code. Let me know if you would like me to elaborate on >this some more. > > I know I'd be interested. I love numarray. Paul, I'm sure you know this, but others.. Check out complexobject.c from CPython. The author of this module also had a bit to do with other aspects of numerical Python such as Numeric and numarray... you might want to look him up. I hear he is into C# nowadays. ;-) cheers Drew From s.kobalczyk at softwaremind.pl Tue Aug 30 21:32:27 2005 From: s.kobalczyk at softwaremind.pl (Szymon Kobalczyk) Date: Tue, 30 Aug 2005 21:32:27 +0200 Subject: [IronPython] Memory leak in PythonEngine.Evaluate ? Message-ID: <4314B44B.3010804@softwaremind.pl> First, big thanks to all of you for supporting this excellent product. I was playing a bit with IP to see I it would work as embedded expression evaluator. The biggest requirement for such engine is to have stable memory consumption so I was trying to check how it looks with IP. I started with samples provided with the 9.1 release. First I iterated the Embed1 sample 10 000 times. Unfortunately this resulted in big increase in memory allocation (from 10K to >100K confirmed both in Task Manager and with perfmon). I started looking at PythonEngine implementation and it looks that although I can create its instance all calls are redirected to a static global object. This doesn't "smells" nice. Then I tried to see if I it make difference if I can precompile the expression and only evaluate it with different arguments/variables. SoI took and simplified some code from __builtin__ eval method. Parser p = Parser.fromString(script); Expr e = p.parseTest(); Dictionary globals = new Dictionary(); PythonModule mod = new PythonModule("", globals); object result = e.Evaluate(new NameEnv(mod, globals)); I checked this by also iterating 10 000 times and this time not only the memory allocation almost didnt change but also the code run much faster. So I wonder what happens in the PythonEngine that makes this huge memory loss? Another question is, why Expr.Evaluate() is marked as "experimental" and if it is safe to use it? Regards, Szymon Kobalczyk. From jeffrey at extremeoptimization.com Wed Aug 31 09:14:41 2005 From: jeffrey at extremeoptimization.com (Jeffrey Sax) Date: Wed, 31 Aug 2005 03:14:41 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <20050827222358.BE9011BB20@che.dreamhost.com> Message-ID: <20050831071501.7F7821BB71@che.dreamhost.com> I had a look at this a few months ago. Both numarray and Numeric use an amorphous char array for storage. A simple wrapper would mean a lot of unmanaged memory moving around... not a desirable situation. It seems to me that a rewrite using generics is most appropriate. The CLR generics should take a lot of the hard work out of the code, since the current C code spends a lot of time bookkeeping and converting to and from the element type. There are some special cases currently handled by numarray, like misaligned data and byte-swapped data. IMO these should be handled at I/O time, if possible. The biggest part of numpy is the large library of legacy code (mostly in FORTRAN) for which numpy provides interfaces. I don't know enough about Python's interop mechanisms to know the best way to port these. Jeffrey Sax Extreme Optimization http://www.extremeoptimization.com _____ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Thane Sent: August 27, 2005 6:24 PM To: 'Discussion of IronPython' Subject: [IronPython] RE: Numpy port There are two approaches: 1) wrap the unmanaged API in managed C++, or, 2) rewrite the library in managed code (IronPython?). Also, I think the Numeric library would be preferable to Numpy, although I'd bet Numpy has a larger user base. Option 1 could be done fairly quickly, but option 2 is the best long-term solution. Several years ago I wrote a COM wrapper for many of the Numpy functions without too much pain. Wait, it was MFC. There must have been a lot of pain; I've just forgotten about it :-) Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. _____ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6514 bytes Desc: not available URL: From pebarrett at gmail.com Wed Aug 31 14:59:45 2005 From: pebarrett at gmail.com (Paul Barrett) Date: Wed, 31 Aug 2005 08:59:45 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <20050831071501.7F7821BB71@che.dreamhost.com> References: <20050827222358.BE9011BB20@che.dreamhost.com> <20050831071501.7F7821BB71@che.dreamhost.com> Message-ID: <40e64fa2050831055917abd012@mail.gmail.com> On 8/31/05, Jeffrey Sax wrote: > > I had a look at this a few months ago. Both numarray and Numeric use an > amorphous char array for storage. A simple wrapper would mean a lot of > unmanaged memory moving around... not a desirable situation. True. It seems to me that a rewrite using generics is most appropriate. The CLR > generics should take a lot of the hard work out of the code, since the > current C code spends a lot of time bookkeeping and converting to and from > the element type. There are some special cases currently handled by > numarray, like misaligned data and byte-swapped data. IMO these should be > handled at I/O time, if possible. No. The conversion of misaligned data and byte-swapping should be done as in numarray, i.e. just before and/or after the operation in a pipelined sequence. Otherwise, the array module would not be useful with memory-mapping, where the data may be stored as misaligned and/or byte-swapped data. The requirement for numarray is to handle large (>2GB) arrays or images, which is often best handled using memory-mapped files and are becoming more common in the physical sciences. The primary reason for developing Numarray was that its precursor, Numeric, did not handle this case. Much of astronomical data is stored as a one dimensional array of records or structures; hence, the misaligned data. These files are also used between little and big endian machines; hence, the byte-swapping. In fact, doing these operations at I/O time decreases performance and efficiency, since two separation operations are being done instead of one pipelined operation and a large temporary array must be allocated. During the design phase of numarray, we ran some tests and found that the best performance for large arrays occurs when the input and output buffers can both reside in the L2 memory cache. So for a 256kB L2 cache, the best performance is when the input and output buffers are 128kB. This implies that it is faster to divide a 1 MB array into eight 128 kB chunks than to try processing it all at once. This is just a result of the memory system not keeping up with the processor. When not being used, these optional operations decrease performance on slightly. However, they provide large performance gains. Trust me on this one. ;-) The biggest part of numpy is the large library of legacy code (mostly in > FORTRAN) for which numpy provides interfaces. I don't know enough about > Python's interop mechanisms to know the best way to port these. True. So, a solution needs to be found to interface the C and C# code. Given the interest in this topic, it appears that I should post a high level design document for a multidimensional array module. I'll see what I can do over the next week or so. My current schedule is really full, so if it doesn't happen you'll know why. -- Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From gogins at pipeline.com Wed Aug 31 15:20:09 2005 From: gogins at pipeline.com (Michael Gogins) Date: Wed, 31 Aug 2005 09:20:09 -0400 (GMT-04:00) Subject: [IronPython] RE: Numpy port Message-ID: <4370121.1125494409985.JavaMail.root@mswamui-swiss.atl.sa.earthlink.net> I wouldn't call the FORTRAN "legacy code". People are still using BLAS and such because the FORTRAN code performs better. These routines have been rewritten many times in C, C++, and Java and people still use the FORTRAN simply because it does a better job. Numerical solutions are what FORTRAN was originally designed for. In other words, better to find some way to wrap BLAS for IronPython or CLR rather than rewrite the routines yet again. Regards, Mike Gogins -----Original Message----- From: Jeffrey Sax Sent: Aug 31, 2005 3:14 AM To: thane at magna-capital.com, 'Discussion of IronPython' Subject: RE: [IronPython] RE: Numpy port I had a look at this a few months ago. Both numarray and Numeric use an amorphous char array for storage. A simple wrapper would mean a lot of unmanaged memory moving around... not a desirable situation. It seems to me that a rewrite using generics is most appropriate. The CLR generics should take a lot of the hard work out of the code, since the current C code spends a lot of time bookkeeping and converting to and from the element type. There are some special cases currently handled by numarray, like misaligned data and byte-swapped data. IMO these should be handled at I/O time, if possible. The biggest part of numpy is the large library of legacy code (mostly in FORTRAN) for which numpy provides interfaces. I don't know enough about Python's interop mechanisms to know the best way to port these. Jeffrey Sax Extreme Optimization http://www.extremeoptimization.com _____ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Thane Sent: August 27, 2005 6:24 PM To: 'Discussion of IronPython' Subject: [IronPython] RE: Numpy port There are two approaches: 1) wrap the unmanaged API in managed C++, or, 2) rewrite the library in managed code (IronPython?). Also, I think the Numeric library would be preferable to Numpy, although I'd bet Numpy has a larger user base. Option 1 could be done fairly quickly, but option 2 is the best long-term solution. Several years ago I wrote a COM wrapper for many of the Numpy functions without too much pain. Wait, it was MFC. There must have been a lot of pain; I've just forgotten about it :-) Math: Do you (does anyone?) have an idea of what it would take to port Numpy, etc, to .NET? I'm not much of a C programmer (I can do it, but I can't really do big, UNIX-y projects), and have never studied the problems of porting it to MC++ or C++/CLI. _____ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Fri 8/26/2005 11:11 AM The bug ... I assume it is in the "-X:TabCompletion" console, correct? I am going to look into it. From ironpython at mmm-experts.com Wed Aug 31 15:56:42 2005 From: ironpython at mmm-experts.com (Morgan Martinet) Date: Wed, 31 Aug 2005 09:56:42 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <4370121.1125494409985.JavaMail.root@mswamui-swiss.atl.sa.earthlink.net> Message-ID: <200508311356.j7VDuqRl018689@aeimail.aei.ca> > I wouldn't call the FORTRAN "legacy code". People are still using BLAS > and such because the FORTRAN code performs better. These routines have > been rewritten many times in C, C++, and Java and people still use the > FORTRAN simply because it does a better job. Numerical solutions are > what FORTRAN was originally designed for. > > In other words, better to find some way to wrap BLAS for IronPython or > CLR rather than rewrite the routines yet again. I think there are 2 possibilities: - map the fortran DLL using interop, but this will add a cost for each API call - use the fact that .Net was primarily designed for cross languages and try to use an existing Fortran for .Net compiler. I googled a little and found http://www.lahey.com/lf71/lf71.htm http://www.codeproject.com/dotnet/intro_fortran.asp http://www.silverfrost.com/11/ftn95/overview.asp The problem is that they're not free and I don't know if we can distribute their runtime assemblies as part of IronPython... Morgan From ken.manheimer at gmail.com Wed Aug 31 18:32:58 2005 From: ken.manheimer at gmail.com (Ken Manheimer) Date: Wed, 31 Aug 2005 12:32:58 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: <20050828022325.171E61BB20@che.dreamhost.com> References: <20050827222358.BE9011BB20@che.dreamhost.com> <20050828022325.171E61BB20@che.dreamhost.com> Message-ID: <2cd46e7f05083109327f601efc@mail.gmail.com> just incidentally: On 8/27/05, Thane wrote: > [...] > I think that "numpy" is the import name for the "Numerical" library > originally created by Paul Dubois. it's worth noting that it was our jim hugunin who originated numerical python. from http://www.pfdubois.com/numpy/html2/numpy-2.html - -=- -=- -=- Acknowledgments Numerical Python is the outgrowth of a long collaborative design process carried out by the Matrix SIG of the Python Software Activity (PSA). Jim Hugunin, while a graduate student at MIT, wrote most of the code and initial documentation. When Jim joined CNRI and began working on JPython, he didn't have the time to maintain Numerical Python so Paul Dubois at LLNL agreed to become the maintainer of Numerical Python. David Ascher, working as a consultant to LLNL, wrote most of this document, incorporating contributions from Konrad Hinsen and Travis Oliphant, both of whom are major contributors to Numerical Python. Since the source was moved to SourceForge, the Numeric user community has become a significant part of the process. Numerical Python illustrates the power of the open source software concept. -=- -=- -=- jim's made real some of the most important practical python inroads - numpy, jpython/jython, and now IronPython (i like "FePy", btw:). ken.manheimer at gmail.com From mailinglist.account at gmail.com Wed Aug 31 20:02:11 2005 From: mailinglist.account at gmail.com (Anthony Tarlano) Date: Wed, 31 Aug 2005 20:02:11 +0200 Subject: [IronPython] RE: Numpy port In-Reply-To: <2cd46e7f05083109327f601efc@mail.gmail.com> References: <20050827222358.BE9011BB20@che.dreamhost.com> <20050828022325.171E61BB20@che.dreamhost.com> <2cd46e7f05083109327f601efc@mail.gmail.com> Message-ID: I was thinking about the name thing again and I really like: pythonet ;-) (sorry if this brings an onslaught of new naming messages) On 8/31/05, Ken Manheimer wrote: > > just incidentally: > > On 8/27/05, Thane wrote: > > > [...] > > I think that "numpy" is the import name for the "Numerical" library > > originally created by Paul Dubois. > > it's worth noting that it was our jim hugunin who originated numerical > python. from http://www.pfdubois.com/numpy/html2/numpy-2.html - > > -=- -=- -=- > Acknowledgments > > Numerical Python is the outgrowth of a long collaborative design > process carried out by the Matrix SIG of the Python Software Activity > (PSA). Jim Hugunin, while a graduate student at MIT, wrote most of the > code and initial documentation. When Jim joined CNRI and began working > on JPython, he didn't have the time to maintain Numerical Python so > Paul Dubois at LLNL agreed to become the maintainer of Numerical > Python. David Ascher, working as a consultant to LLNL, wrote most of > this document, incorporating contributions from Konrad Hinsen and > Travis Oliphant, both of whom are major contributors to Numerical > Python. > > Since the source was moved to SourceForge, the Numeric user community > has become a significant part of the process. Numerical Python > illustrates the power of the open source software concept. > > -=- -=- -=- > > jim's made real some of the most important practical python inroads - > numpy, jpython/jython, and now IronPython (i like "FePy", btw:). > > ken.manheimer at gmail.com > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Aug 31 21:46:14 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 31 Aug 2005 12:46:14 -0700 Subject: [IronPython] RE: Numpy port Message-ID: "Pynet".. then instead of "Pythonistas", we could call ourselves "goobers". (that's okay..) ________________________________ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Anthony Tarlano Sent: Wed 8/31/2005 11:02 AM To: Discussion of IronPython Subject: Re: [IronPython] RE: Numpy port I was thinking about the name thing again and I really like: pythonet ;-) (sorry if this brings an onslaught of new naming messages) -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3496 bytes Desc: not available URL: From thane at magna-capital.com Wed Aug 31 23:00:01 2005 From: thane at magna-capital.com (Thane) Date: Wed, 31 Aug 2005 17:00:01 -0400 Subject: [IronPython] RE: Numpy port In-Reply-To: Message-ID: <20050831210006.647AA1BB74@che.dreamhost.com> essential_parts = "py,pyth,python".split(',') other_parts = "net,i,ir,iron,fe,ferrous,-anything-but-sharp-".split(',') for part1 in essential_parts: for part2 in other_parts: print part1+part2 print part2+part1 (Doesn't include "Pyronic" which I kinda like.) _____ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Wednesday, August 31, 2005 3:46 PM To: Discussion of IronPython Subject: RE: [IronPython] RE: Numpy port "Pynet".. then instead of "Pythonistas", we could call ourselves "goobers". (that's okay..) _____ From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Anthony Tarlano Sent: Wed 8/31/2005 11:02 AM To: Discussion of IronPython Subject: Re: [IronPython] RE: Numpy port I was thinking about the name thing again and I really like: pythonet ;-) (sorry if this brings an onslaught of new naming messages) -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6706 bytes Desc: not available URL: