From jomes at microsoft.com Fri Jun 1 01:59:40 2007 From: jomes at microsoft.com (John Messerly) Date: Thu, 31 May 2007 16:59:40 -0700 Subject: [IronPython] Patent concerns In-Reply-To: <5b0248170705301809l67915348hdc1346d61634f794@mail.gmail.com> References: <5b0248170705301809l67915348hdc1346d61634f794@mail.gmail.com> Message-ID: <918705E903F4714CB713D89AB5F1857D6E6115D339@NA-EXMSG-C116.redmond.corp.microsoft.com> Hi, I am definitely not a lawyer, but I think this question is addressed in the Microsoft Permissive License (http://www.microsoft.com/resources/sharedsource/licensingbasics/permissivelicense.mspx). See section 2.b, "Patent Grant". Cheers, John -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Wednesday, May 30, 2007 6:10 PM To: Discussion of IronPython Subject: [IronPython] Patent concerns Hi, Recently on jvm-languages list, which is an interest group surrounding language implementation for the JVM, Frank Wierzbicki from Jython project expressed the concern that Microsoft may hold a lot of patents related to IronPython, so he is reluctant to look at the source code even if it is open-sourced. http://groups.google.com/group/jvm-languages/msg/0d16a82b53233a72 Apparently, this seems to be a widespread concern. I think this is a pity, since in my opinion IronPython has a lot of good ideas that would benefit language implementations on JVM. So, please answer if possible. What patents Microsoft hold, related to IronPython? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From xmlhacker at gmail.com Fri Jun 1 03:33:31 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Thu, 31 May 2007 19:33:31 -0600 Subject: [IronPython] Patent concerns In-Reply-To: <918705E903F4714CB713D89AB5F1857D6E6115D339@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <5b0248170705301809l67915348hdc1346d61634f794@mail.gmail.com> <918705E903F4714CB713D89AB5F1857D6E6115D339@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: I am not a lawyer, but I can read, (B) Patent Grant- Subject to the terms of this license, including the > license conditions and limitations in section 3, each contributor grants you > a non-exclusive, worldwide, royalty-free license under its licensed patents > to make, have made, use, sell, offer for sale, import, and/or otherwise > dispose of its contribution in the software or derivative works of the > contribution in the software. In section 3, (B) If you bring a patent claim against any contributor over patents that > you claim are infringed by the software, your patent license from such > contributor to the software ends automatically. In summary: We won't sue you, if you don't sue us. If you do, then the gloves are off. And let me reiterate: I am not a lawyer. On 5/31/07, John Messerly wrote: > > Hi, > > I am definitely not a lawyer, but I think this question is addressed in > the Microsoft Permissive License ( > http://www.microsoft.com/resources/sharedsource/licensingbasics/permissivelicense.mspx). > See section 2.b, "Patent Grant". > > Cheers, > > John > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo > Sent: Wednesday, May 30, 2007 6:10 PM > To: Discussion of IronPython > Subject: [IronPython] Patent concerns > > Hi, > > Recently on jvm-languages list, which is an interest group surrounding > language implementation for the JVM, Frank Wierzbicki from Jython > project expressed the concern that Microsoft may hold a lot of patents > related to IronPython, so he is reluctant to look at the source code > even if it is open-sourced. > > http://groups.google.com/group/jvm-languages/msg/0d16a82b53233a72 > > Apparently, this seems to be a widespread concern. I think this is a > pity, since in my opinion IronPython has a lot of good ideas that > would benefit language implementations on JVM. > > So, please answer if possible. What patents Microsoft hold, related to > IronPython? > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Fri Jun 1 03:47:27 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Thu, 31 May 2007 19:47:27 -0600 Subject: [IronPython] IronPython Wiki Cookbook In-Reply-To: References: Message-ID: This *ROCKS*! Hopefully this > http://www.oreillynet.com/windows/blog/2007/05/fuzzymanironpython_ironpython.html< will help generate some more traffic :) On 5/30/07, fuzzyman at voidspace.org.uk wrote: > > IronPython Wiki Cookbook > > [image: emoticon:nightmare] One of the things I've been working on in my > 'spare time': > > - The IronPython Cookbook Wiki > > This is a wiki with information about IronPython and code examples of how > to achieve common tasks using IronPython and the .NET framework. There are > links to my IronPython Articles(of course). > > New code examples include: > > - Getting Started > - Sending Udp Packets > - Receiving Udp Packets > - Download a Webpage > - Databases with Odbc > - Accessing the Registry > - Speech Synthesis - Making IronPython Talk > > There is a lot more to be done, but I hope this will be a useful resource > for the IronPython community. Registration is required to create and edit > pages, but if you have some useful examples of IronPython then *please*add them. > > If there is anything you *want to know how to do* with IronPython, then > the IronPython Mailing Listis a great place to ask. Useful code that turns up there will hopefully end > up on the Wiki too. [image: Smile] > > - Ironpython.info - Contents > - Ironpython.info - Useful Links > > Posted by *Fuzzyman* on 2007-05-30 16:34:59. > Categories: Python, > IronPython, > Writing > Visit the Voidspace Techie Blogto read this entry and more. > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jun 1 11:54:18 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 1 Jun 2007 10:54:18 +0100 Subject: [IronPython] IronPython Wiki Cookbook In-Reply-To: References: Message-ID: <6f4025010706010254x7012efc5tf9ec50384ae255b1@mail.gmail.com> Thanks guys - and thanks for the plug. Don't forget to post useful stuff! There is already some new user content (good stuff too), which is encouraging. Fuzzyman On 01/06/07, M. David Peterson wrote: > > This *ROCKS*! Hopefully this > > http://www.oreillynet.com/windows/blog/2007/05/fuzzymanironpython_ironpython.html< will help generate some more traffic :) > > On 5/30/07, fuzzyman at voidspace.org.uk wrote: > > > IronPython Wiki Cookbook > > > > [image: emoticon:nightmare] One of the things I've been working on in my > > 'spare time': > > > > - The IronPython Cookbook Wiki > > > > This is a wiki with information about IronPython and code examples of > > how to achieve common tasks using IronPython and the .NET framework. There > > are links to my IronPython Articles(of course). > > > > New code examples include: > > > > - Getting Started > > - Sending Udp Packets > > - Receiving Udp Packets > > - Download a Webpage > > - Databases with Odbc > > - Accessing the Registry > > - Speech Synthesis - Making IronPython Talk > > > > There is a lot more to be done, but I hope this will be a useful > > resource for the IronPython community. Registration is required to create > > and edit pages, but if you have some useful examples of IronPython then > > *please * add them. > > > > If there is anything you *want to know how to do* with IronPython, then > > the IronPython Mailing Listis a great place to ask. Useful code that turns up there will hopefully end > > up on the Wiki too. [image: Smile] > > > > - Ironpython.info - Contents > > - Ironpython.info - Useful Links > > > > Posted by *Fuzzyman* on 2007-05-30 16:34:59. > > Categories: Python, > > IronPython, > > Writing > > Visit the Voidspace Techie Blogto read this entry and more. > > > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more. --- http://www.Voidspace.org.uk/python/index.shtml Python utilities, modules and apps. Including Nanagram, Dirwatcher and more. --- http://www.fuchsiashockz.co.uk --- Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera -------------- next part -------------- An HTML attachment was scrubbed... URL: From enicholson at gmail.com Fri Jun 1 15:41:19 2007 From: enicholson at gmail.com (Eric Nicholson) Date: Fri, 1 Jun 2007 09:41:19 -0400 Subject: [IronPython] Patent concerns In-Reply-To: References: <5b0248170705301809l67915348hdc1346d61634f794@mail.gmail.com> <918705E903F4714CB713D89AB5F1857D6E6115D339@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: I'm also not a lawyer, but... I previously would have agreed about the protections in the license, but until the whole claim of 135 Patent violations in Linux clears up, I'm not sure. MS Legal needs to prove that they can be trusted. -Eric On 5/31/07, M. David Peterson wrote: > > I am not a lawyer, but I can read, > > (B) Patent Grant- Subject to the terms of this license, including the > > license conditions and limitations in section 3, each contributor grants you > > a non-exclusive, worldwide, royalty-free license under its licensed patents > > to make, have made, use, sell, offer for sale, import, and/or otherwise > > dispose of its contribution in the software or derivative works of the > > contribution in the software. > > > In section 3, > > (B) If you bring a patent claim against any contributor over patents that > > you claim are infringed by the software, your patent license from such > > contributor to the software ends automatically. > > > > In summary: We won't sue you, if you don't sue us. If you do, then the > gloves are off. > > And let me reiterate: I am not a lawyer. > > On 5/31/07, John Messerly wrote: > > > > Hi, > > > > I am definitely not a lawyer, but I think this question is addressed in > > the Microsoft Permissive License (http://www.microsoft.com/resources/sharedsource/licensingbasics/permissivelicense.mspx > > ). See section 2.b, "Patent Grant". > > > > Cheers, > > > > John > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] > > On Behalf Of Sanghyeon Seo > > Sent: Wednesday, May 30, 2007 6:10 PM > > To: Discussion of IronPython > > Subject: [IronPython] Patent concerns > > > > Hi, > > > > Recently on jvm-languages list, which is an interest group surrounding > > language implementation for the JVM, Frank Wierzbicki from Jython > > project expressed the concern that Microsoft may hold a lot of patents > > related to IronPython, so he is reluctant to look at the source code > > even if it is open-sourced. > > > > http://groups.google.com/group/jvm-languages/msg/0d16a82b53233a72 > > > > Apparently, this seems to be a widespread concern. I think this is a > > pity, since in my opinion IronPython has a lot of good ideas that > > would benefit language implementations on JVM. > > > > So, please answer if possible. What patents Microsoft hold, related to > > IronPython? > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Fri Jun 1 16:10:03 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 1 Jun 2007 08:10:03 -0600 Subject: [IronPython] Patent concerns In-Reply-To: References: <5b0248170705301809l67915348hdc1346d61634f794@mail.gmail.com> <918705E903F4714CB713D89AB5F1857D6E6115D339@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: On 6/1/07, Eric Nicholson wrote: > > I'm also not a lawyer, but... > > I previously would have agreed about the protections in the license, but > until the whole claim of 135 Patent violations in Linux clears up, I'm not > sure. MS Legal needs to prove that they can be trusted. You mean like 30+ litigation free years** worth of trust? ** via http://dondodge.typepad.com/the_next_big_thing/2006/12/patent_lunacy_d.html#comment-26885657 "Microsoft has lots of patents covering just about every aspect of software. > How many times in the past 30 years has Microsoft sued any company for > patent infringement? I can't think of any. Microsoft, IBM, and all the big > guys use their patents as a defense, much more than as an offensive revenue > generator." a bit further down @ http://dondodge.typepad.com/the_next_big_thing/2006/12/patent_lunacy_d.html#comment-26918802 > A quick search reveals that in November, Alcatel filed lawsuits against > Microsoft for several alleged patent infringements related to IPTV. The IPTV > patents stem from the work of Oracle engineers who had developed > fast-forward and rewind features for its video server technology. The > patents were sold to a company Alcatel later acquired. > > So, in defense, Microsoft sued Alcatel for infringing on 10 of its patents > in the same area. > > See, this is a current example of how patent defenses work. Patents are > often overlapping. That is fine, and most of the time companies find ways to > do business without lawsuits. > DISCLAIMER: I am not a lawyer, just a hacker who would rather worry about writing code than about whether or not MSFT is going to sue me if I write code against ANY thing they might produce. It's kind of how they got to be the size they are e.g. develop an API > get people to write code against that API > Sue them for all they're worth for building code against patented technologies and then laugh at them while they suffer... err wait, sorry, scratch that last part, and instead append, "Become a behemoth profit making machine by tapping into the ISV, VAR, etc... channels who write code against their API's and as a result they sell more software for their software to run on (recursion at it's finest hour) " just after "... that API >". Thanks! :D -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.foord at resolversystems.com Fri Jun 1 16:12:54 2007 From: michael.foord at resolversystems.com (Michael Foord) Date: Fri, 01 Jun 2007 15:12:54 +0100 Subject: [IronPython] A pseudobug in standard library usage Message-ID: <46602966.8020202@resolversystems.com> Hello all, More fun with None, this time with the standard library - specifically with 'os.path.abspath': CPython: >>> import os >>> os.path.abspath(None) 'C:\\Program Files\\Python24' >>> IronPython: >>> import os >>> os.path.abspath(None) Traceback (most recent call last): File , line 0, in ##89 File C:\Program Files\Python24\Lib\ntpath.py, line 491, in abspath File C:\Program Files\Python24\Lib\ntpath.py, line 53, in isabs File C:\Program Files\Python24\Lib\ntpath.py, line 119, in splitdrive AttributeError: 'NoneType' object has no attribute '__getitem__' >>> Thanks Michael -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 From michael.foord at resolversystems.com Fri Jun 1 17:05:40 2007 From: michael.foord at resolversystems.com (Michael Foord) Date: Fri, 01 Jun 2007 16:05:40 +0100 Subject: [IronPython] Lambdas, properties and namespace leakage Message-ID: <466035C4.3030201@resolversystems.com> Hello all, Another fun one. If you use 'property' to wrap a lambda in a class namespace then an extra name leaks into the class namespace (which confused our documentation system). CPython: >>> class X(object): ... p2 = property(lambda self: 34) ... >>> dir(X) ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash_ _', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr_ _', '__setattr__', '__str__', '__weakref__', 'p2'] Amongst all the detritus you can see 'p2' nestled there at the end. IronPython: >>> class X(object): ... p2 = property(lambda self: 34) ... >>> dir(X) ['', '__class__', '__dict__', '__doc__', '__init__', '__module__', '__ new__', '__reduce__', '__reduce_ex__', '__repr__', '__weakref__', 'p2'] See the weird first entry! Shouldn't be there... Thanks Michael -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 From Martin.Maly at microsoft.com Fri Jun 1 17:27:30 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 1 Jun 2007 08:27:30 -0700 Subject: [IronPython] Lambdas, properties and namespace leakage In-Reply-To: <466035C4.3030201@resolversystems.com> References: <466035C4.3030201@resolversystems.com> Message-ID: Thanks for a fun bug, Michael, just to clarify, this is using the IronPython 1.1 release, correct? If it is of any consolation, this is the output from the IronPython 2.0 alpha where this no longer happens: IronPython console: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class X(object): ... p2 = property(lambda self: 3) ... >>> dir(X) ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'p2'] Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, June 01, 2007 8:06 AM To: Discussion of IronPython Subject: [IronPython] Lambdas, properties and namespace leakage Hello all, Another fun one. If you use 'property' to wrap a lambda in a class namespace then an extra name leaks into the class namespace (which confused our documentation system). CPython: >>> class X(object): ... p2 = property(lambda self: 34) ... >>> dir(X) ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash_ _', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr_ _', '__setattr__', '__str__', '__weakref__', 'p2'] Amongst all the detritus you can see 'p2' nestled there at the end. IronPython: >>> class X(object): ... p2 = property(lambda self: 34) ... >>> dir(X) ['', '__class__', '__dict__', '__doc__', '__init__', '__module__', '__ new__', '__reduce__', '__reduce_ex__', '__repr__', '__weakref__', 'p2'] See the weird first entry! Shouldn't be there... Thanks Michael -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From luistrigueiros at gmail.com Fri Jun 1 17:35:42 2007 From: luistrigueiros at gmail.com (Luis Trigueiros) Date: Fri, 1 Jun 2007 16:35:42 +0100 Subject: [IronPython] IronPython Wiki Cookbook In-Reply-To: References: Message-ID: <5cb7a1d0706010835j198dc3b5tca4387d035db3e20@mail.gmail.com> Hi, Great stuff very good. I would like to do Excel-Addin using IronPython. Does anyone done this, this would be a good recipe for the Cookbook. Thanks, Luis On 5/30/07, fuzzyman at voidspace.org.uk wrote: > > IronPython Wiki Cookbook > > [image: emoticon:nightmare] One of the things I've been working on in my > 'spare time': > > - The IronPython Cookbook Wiki > > This is a wiki with information about IronPython and code examples of how > to achieve common tasks using IronPython and the .NET framework. There are > links to my IronPython Articles(of course). > > New code examples include: > > - Getting Started > - Sending Udp Packets > - Receiving Udp Packets > - Download a Webpage > - Databases with Odbc > - Accessing the Registry > - Speech Synthesis - Making IronPython Talk > > There is a lot more to be done, but I hope this will be a useful resource > for the IronPython community. Registration is required to create and edit > pages, but if you have some useful examples of IronPython then *please*add them. > > If there is anything you *want to know how to do* with IronPython, then > the IronPython Mailing Listis a great place to ask. Useful code that turns up there will hopefully end > up on the Wiki too. [image: Smile] > > - Ironpython.info - Contents > - Ironpython.info - Useful Links > > Posted by *Fuzzyman* on 2007-05-30 16:34:59. > Categories: Python, > IronPython, > Writing > Visit the Voidspace Techie Blogto read this entry and more. > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jun 1 17:34:58 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 01 Jun 2007 16:34:58 +0100 Subject: [IronPython] IronPython Wiki Cookbook In-Reply-To: <5cb7a1d0706010835j198dc3b5tca4387d035db3e20@mail.gmail.com> References: <5cb7a1d0706010835j198dc3b5tca4387d035db3e20@mail.gmail.com> Message-ID: <46603CA2.6010100@voidspace.org.uk> Luis Trigueiros wrote: > Hi, > Great stuff very good. > I would like to do Excel-Addin using IronPython. > Does anyone done this, this would be a good recipe for the Cookbook. It would certainly be useful - but you have competition! http://www.ironpython.info/index.php/Interacting_with_Excel Thanks Michael > Thanks, Luis > > On 5/30/07, * fuzzyman at voidspace.org.uk > * > wrote: > > > IronPython Wiki Cookbook > > emoticon:nightmare One of the things I've been working on in my > 'spare time': > > * The IronPython Cookbook Wiki > > This is a wiki with information about IronPython and code examples > of how to achieve common tasks using IronPython and the .NET > framework. There are links to my IronPython Articles > (of course). > > New code examples include: > > * Getting Started > > * Sending Udp Packets > > * Receiving Udp Packets > > * Download a Webpage > > * Databases with Odbc > > * Accessing the Registry > > * Speech Synthesis - Making IronPython Talk > > > There is a lot more to be done, but I hope this will be a useful > resource for the IronPython community. Registration is required to > create and edit pages, but if you have some useful examples of > IronPython then /please / add them. > > If there is anything you /want to know how to do/ with IronPython, > then the IronPython Mailing List > is > a great place to ask. Useful code that turns up there will > hopefully end up on the Wiki too. Smile > > * Ironpython.info - Contents > > * Ironpython.info - Useful Links > > > Posted by *Fuzzyman* on 2007-05-30 16:34:59. > Categories: Python > , > IronPython > , > Writing > > Visit the Voidspace Techie Blog > to read > this entry and more. > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dfugate at microsoft.com Fri Jun 1 18:38:58 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Fri, 1 Jun 2007 09:38:58 -0700 Subject: [IronPython] A pseudobug in standard library usage In-Reply-To: <46602966.8020202@resolversystems.com> References: <46602966.8020202@resolversystems.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DB971C4F@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks Michael! This has been filed as CodePlex Work Item #10710 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10710). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, June 01, 2007 7:13 AM To: Discussion of IronPython Subject: [IronPython] A pseudobug in standard library usage Hello all, More fun with None, this time with the standard library - specifically with 'os.path.abspath': CPython: >>> import os >>> os.path.abspath(None) 'C:\\Program Files\\Python24' >>> IronPython: >>> import os >>> os.path.abspath(None) Traceback (most recent call last): File , line 0, in ##89 File C:\Program Files\Python24\Lib\ntpath.py, line 491, in abspath File C:\Program Files\Python24\Lib\ntpath.py, line 53, in isabs File C:\Program Files\Python24\Lib\ntpath.py, line 119, in splitdrive AttributeError: 'NoneType' object has no attribute '__getitem__' >>> Thanks Michael -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Fri Jun 1 19:04:38 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 01 Jun 2007 18:04:38 +0100 Subject: [IronPython] Lambdas, properties and namespace leakage In-Reply-To: References: <466035C4.3030201@resolversystems.com> Message-ID: <466051A6.5080607@voidspace.org.uk> Martin Maly wrote: > Thanks for a fun bug, Michael, just to clarify, this is using the IronPython 1.1 release, correct? > Yes. Given the performance degradation (on XP) and the lack of multiple engine support we can't switch to 2.0 yet... Are bugfixes still being ported to the 1.X branch? Thanks Michael http://www.voidspace.org.uk/ironpython/index.shtml > If it is of any consolation, this is the output from the IronPython 2.0 alpha where this no longer happens: > > IronPython console: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.42 > Copyright (c) Microsoft Corporation. All rights reserved. > >>>> class X(object): >>>> > ... p2 = property(lambda self: 3) > ... > >>>> dir(X) >>>> > ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'p2'] > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Friday, June 01, 2007 8:06 AM > To: Discussion of IronPython > Subject: [IronPython] Lambdas, properties and namespace leakage > > Hello all, > > Another fun one. If you use 'property' to wrap a lambda in a class > namespace then an extra name leaks into the class namespace (which > confused our documentation system). > > CPython: > >>> class X(object): > ... p2 = property(lambda self: 34) > ... > >>> dir(X) > ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', > '__hash_ > _', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', > '__repr_ > _', '__setattr__', '__str__', '__weakref__', 'p2'] > > Amongst all the detritus you can see 'p2' nestled there at the end. > > IronPython: > >>> class X(object): > ... p2 = property(lambda self: 34) > ... > >>> dir(X) > ['', '__class__', '__dict__', '__doc__', '__init__', > '__module__', '__ > new__', '__reduce__', '__reduce_ex__', '__repr__', '__weakref__', 'p2'] > > See the weird first entry! Shouldn't be there... > > Thanks > > Michael > > > > -- > Michael Foord > Resolver Systems > michael.foord at resolversystems.com > > Office address: 17a Clerkenwell Road, London EC1M 5RD, UK > Registered address: 843 Finchley Road, London NW11 8NA, UK > > Resolver Systems Limited is registered in England and Wales as company number 5467329. > VAT No. GB 893 5643 79 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From fuzzyman at voidspace.org.uk Fri Jun 1 19:15:37 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 1 Jun 2007 18:15:37 +0100 Subject: [IronPython] IronPython Wiki Cookbook In-Reply-To: <5cb7a1d0706010835j198dc3b5tca4387d035db3e20@mail.gmail.com> References: <5cb7a1d0706010835j198dc3b5tca4387d035db3e20@mail.gmail.com> Message-ID: <6f4025010706011015u2cc38b56tdd80b57f0f4a574d@mail.gmail.com> On 01/06/07, Luis Trigueiros wrote: > > Hi, > Great stuff very good. > I would like to do Excel-Addin using IronPython. Although, IIUC an Excel-Addin is different from the Excel automation recipe already there - so anything you can add would be *most* welcome. Thanks Michael http://www.voidspace.org.uk/ironpython/index.shtml Does anyone done this, this would be a good recipe for the Cookbook. > Thanks, Luis > > On 5/30/07, fuzzyman at voidspace.org.uk wrote: > > > > IronPython Wiki Cookbook > > > > [image: emoticon:nightmare] One of the things I've been working on in my > > 'spare time': > > > > - The IronPython Cookbook Wiki > > > > This is a wiki with information about IronPython and code examples of > > how to achieve common tasks using IronPython and the .NET framework. There > > are links to my IronPython Articles(of course). > > > > New code examples include: > > > > - Getting Started > > - Sending Udp Packets > > - Receiving Udp Packets > > - Download a Webpage > > - Databases with Odbc > > - Accessing the Registry > > - Speech Synthesis - Making IronPython Talk > > > > There is a lot more to be done, but I hope this will be a useful > > resource for the IronPython community. Registration is required to create > > and edit pages, but if you have some useful examples of IronPython then > > *please * add them. > > > > If there is anything you *want to know how to do* with IronPython, then > > the IronPython Mailing Listis a great place to ask. Useful code that turns up there will hopefully end > > up on the Wiki too. [image: Smile] > > > > - Ironpython.info - Contents > > - Ironpython.info - Useful Links > > > > Posted by *Fuzzyman* on 2007-05-30 16:34:59. > > Categories: Python, > > IronPython, > > Writing > > Visit the Voidspace Techie Blogto read this entry and more. > > > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more. --- http://www.Voidspace.org.uk/python/index.shtml Python utilities, modules and apps. Including Nanagram, Dirwatcher and more. --- http://www.fuchsiashockz.co.uk --- Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Fri Jun 1 19:25:04 2007 From: timr at probo.com (Tim Roberts) Date: Fri, 01 Jun 2007 10:25:04 -0700 Subject: [IronPython] Patent concerns In-Reply-To: References: Message-ID: <46605670.3050100@probo.com> On Fri, 1 Jun 2007 09:41:19 -0400, "Eric Nicholson" wrote: > I'm also not a lawyer, but... > > I previously would have agreed about the protections in the license, but > until the whole claim of 135 Patent violations in Linux clears up, I'm not > sure. MS Legal needs to prove that they can be trusted. In all fairness, please remember that (a) the 235 patent violation claim was made in the media, not in the courts -- it was for PR purposes, not for litigation purposes; (b) they haven't actually sued anyone yet, nor even said they will do so; and (c) the people they would sue were not covered by any license at all. Also remember that it is the JOB of Microsoft's legal department to defend their patent portfolio. They don't have to have to earn anyone's trust. The license associated with IronPython is quite specific about patent rights. Microsoft treats its licenses very seriously. In my opinion, there's nothing to worry about here. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From xmlhacker at gmail.com Fri Jun 1 19:30:44 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 1 Jun 2007 11:30:44 -0600 Subject: [IronPython] Patent concerns In-Reply-To: <46605670.3050100@probo.com> References: <46605670.3050100@probo.com> Message-ID: *VERY* well stated, Tim! On 6/1/07, Tim Roberts wrote: > > On Fri, 1 Jun 2007 09:41:19 -0400, "Eric Nicholson" > wrote: > > I'm also not a lawyer, but... > > > > I previously would have agreed about the protections in the license, but > > until the whole claim of 135 Patent violations in Linux clears up, I'm > not > > sure. MS Legal needs to prove that they can be trusted. > > In all fairness, please remember that (a) the 235 patent violation claim > was made in the media, not in the courts -- it was for PR purposes, not > for litigation purposes; (b) they haven't actually sued anyone yet, nor > even said they will do so; and (c) the people they would sue were not > covered by any license at all. Also remember that it is the JOB of > Microsoft's legal department to defend their patent portfolio. They > don't have to have to earn anyone's trust. > > The license associated with IronPython is quite specific about patent > rights. Microsoft treats its licenses very seriously. In my opinion, > there's nothing to worry about here. > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Fri Jun 1 19:32:30 2007 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 1 Jun 2007 10:32:30 -0700 Subject: [IronPython] Patent concerns In-Reply-To: <46605670.3050100@probo.com> References: <46605670.3050100@probo.com> Message-ID: On 6/1/07, Tim Roberts wrote: > > The license associated with IronPython is quite specific about patent > rights. Microsoft treats its licenses very seriously. In my opinion, > there's nothing to worry about here. People who are simply *using* IronPython are covered by the license. The originally-expressed concern was that looking at the IronPython source code might "contaminate" a developer such that, if the same developer later worked on a different project with similar architecture, it might open that project up to claims of violating a Microsoft patent. I am not a lawyer, but this seems highly unlikely. "Independent rediscovery" does not protect you from claims of patent infringement, only from copyright infringement. -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Fri Jun 1 19:41:54 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 1 Jun 2007 11:41:54 -0600 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: On 6/1/07, Curt Hagenlocher wrote: > > People who are simply *using* IronPython are covered by the license. > Well them, and those who want "to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software." I could be mistaken, but I'm pretty sure that "I once looked at the source code, and it could have influenced this idea in particular" is covered by at least one if not more of the above rights. The originally-expressed concern was that looking at the IronPython source > code might "contaminate" a developer such that, if the same developer later > worked on a different project with similar architecture, it might open that > project up to claims of violating a Microsoft patent. > Right, which as you point out, I am not a lawyer, but this seems highly unlikely. > I agree, though am confused by your following sentence, "Independent rediscovery" does not protect you from claims of patent > infringement, only from copyright infringement. > Unless I am misreading, it seems you are suggesting that the protection comes in the form of copyright, not patent, and therefore could present a problem. Have I misinterpreted? -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Fri Jun 1 19:56:10 2007 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 1 Jun 2007 10:56:10 -0700 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: On 6/1/07, M. David Peterson wrote: > > On 6/1/07, Curt Hagenlocher wrote: > > > "Independent rediscovery" does not protect you from claims of patent > > infringement, only from copyright infringement. > > > > Unless I am misreading, it seems you are suggesting that the protection > comes in the form of copyright, not patent, and therefore could present a > problem. Have I misinterpreted? > Let's say, for the sake of argument, that I want to contribute source code to the "ZincPython" project. There are two ways that my work could cause legal problems: it might infringe on someone's patent, or it might be copied wholesale from someone else's work. For patent infringement, it doesn't really matter where the code came from -- I wrote it, I copied it, I channeled it from a 12,000-year-old programmer named Klaatu -- if it infringes, it infringes. In order for copyright violation to have happened, on the other hand, I have to actually have had access to the code being copied. Some projects apparently try to protect themselves from *claims* of copyright violation by asking that their donors refrain from looking at similar or related (and usually competing) source code. Now that I think about it, though, reading someone else's source code might expose me to a clever idea that (unbeknownst to me) is patented -- thereby increasing the risk that I inadvertently infringe on a patent when I independently reimplement similar functionality. I guess I'm just biased against that idea because brilliant technique so rarely seems important to me. -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Fri Jun 1 23:41:38 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 1 Jun 2007 15:41:38 -0600 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: So then why not read the source code, get some ideas, possibly use some of the code if it makes sense as such, and include a copy of the license and copyright notice with your redistribution to cover your legal requirements. Of course if the project was GPL'd, which is incompatible (as far as I know) with the MSPL (as well as pretty much every BSD-like license), then the clause in the license stating that the the subsequent license MUST be compatible with the MSPL would obviously present a problem. So I guess I can now see where you are going with this. Interesting dilemma. On 6/1/07, Curt Hagenlocher wrote: > > On 6/1/07, M. David Peterson wrote: > > > > On 6/1/07, Curt Hagenlocher < curt at hagenlocher.org> wrote: > > > > > "Independent rediscovery" does not protect you from claims of patent > > > infringement, only from copyright infringement. > > > > > > > Unless I am misreading, it seems you are suggesting that the protection > > comes in the form of copyright, not patent, and therefore could present a > > problem. Have I misinterpreted? > > > > Let's say, for the sake of argument, that I want to contribute source code > to the "ZincPython" project. There are two ways that my work could cause > legal problems: it might infringe on someone's patent, or it might be copied > wholesale from someone else's work. For patent infringement, it doesn't > really matter where the code came from -- I wrote it, I copied it, I > channeled it from a 12,000-year-old programmer named Klaatu -- if it > infringes, it infringes. In order for copyright violation to have happened, > on the other hand, I have to actually have had access to the code being > copied. > > Some projects apparently try to protect themselves from *claims* of > copyright violation by asking that their donors refrain from looking at > similar or related (and usually competing) source code. > > Now that I think about it, though, reading someone else's source code > might expose me to a clever idea that (unbeknownst to me) is patented -- > thereby increasing the risk that I inadvertently infringe on a patent when I > independently reimplement similar functionality. I guess I'm just biased > against that idea because brilliant technique so rarely seems important to > me. > > -- > Curt Hagenlocher > curt at hagenlocher.org > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabrielverta at gmail.com Sat Jun 2 23:10:14 2007 From: gabrielverta at gmail.com (Gabriel) Date: Sat, 2 Jun 2007 18:10:14 -0300 Subject: [IronPython] Asp.net + IronPython question Message-ID: <2254669b0706021410h6460e35dk3f9088cd094292c4@mail.gmail.com> Hi I'm beginnig to programming with IronPython + Asp.net, and I would like to know if it's possible to run IronPython in a project that already runs C# + Asp.net. I've tried it, but I'm having problems with Web.Config. Will I have to use Instant Python to convert everything into IronPython? Thanks -- Gabriel Verta http://stiod.com.br From redmoon17 at gmail.com Sun Jun 3 03:40:32 2007 From: redmoon17 at gmail.com (Kevin Chu) Date: Sun, 3 Jun 2007 09:40:32 +0800 Subject: [IronPython] Asp.net + IronPython question In-Reply-To: <2254669b0706021410h6460e35dk3f9088cd094292c4@mail.gmail.com> References: <2254669b0706021410h6460e35dk3f9088cd094292c4@mail.gmail.com> Message-ID: <41d7f4a90706021840v2e371901jc74c2a778045eb95@mail.gmail.com> answer is yes. please brower this url: http://www.cnblogs.com/RChen/archive/2006/12/02/cs_ipy_aspnet.html this is my friend's blog , and writed by Chinese, you can translate it by Google Language Tool. this solution is base of IronPython for ASP.NET CTP 1. On 6/3/07, Gabriel wrote: > > Hi > > I'm beginnig to programming with IronPython + Asp.net, and I would > like to know if it's possible to run IronPython in a project that > already runs C# + Asp.net. > > I've tried it, but I'm having problems with Web.Config. > > Will I have to use Instant Python to convert everything into IronPython? > > > Thanks > > > -- > Gabriel Verta > http://stiod.com.br > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Once in a Redmoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Jun 3 11:56:43 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 3 Jun 2007 18:56:43 +0900 Subject: [IronPython] IronPython now runs faster on Mono Message-ID: <5b0248170706030256y1d83b713j5898ad380848c580@mail.gmail.com> Thanks to optimization works on delegate invocation, IronPython now runs faster on Mono. Conservatively, you can expect 5% speedup for 1.1, and 10% speedup for 2.0a1. Look forward to Mono 1.2.5! * * * Here are some pystone results. All results are best of 3. Mono stable = Debian packaged Mono 1.2.4-3 Mono SVN = Default build of Mono SVN revision 78485 Workstation = Intel Pentium 4 CPU 2.66GHz Laptop = Intel Pentium 4 Mobile CPU 1.70GHz 1.1 = IronPython Community Edition r6 2.0a1 = IronPython 2.0 Alpha 1 with patches (see below) stable/workstation/1.1: 44134 svn/workstation/1.1: 46736 (+6%) stable/laptop/1.1: 28624 svn/laptop/1.1: 31187 (+9%) Mono stable can't run IronPython 2.0a1. I only have results for Mono as of May 17, from chat logs. That's why numbers are approximate. I will refer to this version as "may". may/workstation/2.0a1: "32800" svn/workstation/2.0a1: 36362 (+11%) may/laptop/2.0a1: "21K" svn/laptop/2.0a1: 23354 (+11%) * * * patches to 2.0a1 are here: https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/2.0a1/ Only following patches were applied: patch-makefile patch-initialize-builtins patch-console patch-flags-argcount * * * Thanks to Mono team for a nice work. Thanks to IronPython team for a hint and encouraging the competition. :-) http://lists.ironpython.com/pipermail/users-ironpython.com/2007-May/004921.html * * * For the curious, here are some details: Statically dispatch virtual calls to sealed classes or methods. (Rodrigo Kumpera) http://lists.ximian.com/pipermail/mono-patches/2007-May/093027.html mini-trampolines.c: Complete rewrite. On first call, try to create optimized invoke code and use that for further invocations. (Zoltan Varga) http://lists.ximian.com/pipermail/mono-patches/2007-May/093214.html -- Seo Sanghyeon From jjl at pobox.com Sun Jun 3 14:18:33 2007 From: jjl at pobox.com (John J Lee) Date: Sun, 3 Jun 2007 13:18:33 +0100 (BST) Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: On Fri, 1 Jun 2007, Curt Hagenlocher wrote: [...] > The originally-expressed concern was that looking at the IronPython source > code might "contaminate" a developer such that, if the same developer later > worked on a different project with similar architecture, it might open that > project up to claims of violating a Microsoft patent. > > I am not a lawyer, but this seems highly unlikely. "Independent > rediscovery" does not protect you from claims of patent infringement, only > from copyright infringement. [...] Right. However, I hear that intentional patent infringement is considered more serious than inadvertent patent infringement, and that Microsoft employees have interpreted the large number of alleged patent infringements in free and open source software as evidence of at least some of them being intentional: http://money.cnn.com/magazines/fortune/fortune_archive/2007/05/28/100033867/index.htm > "This is not a case of some accidental, unknowing infringement," > Gutierrez asserts. "There is an overwhelming number of patents being > infringed." I'm unsure whether having deliberately avoided source code that you believe to contain patented methods might be interpreted as evidence of deliberate infringement or as evidence of the lack of it. But it would seem plausible that one's actions and statements about reading source code *can* have some effect on the seriousness of patent infringements, even if they never make the difference between an infringement having occurred or not. John From m_tayseer82 at yahoo.com Sun Jun 3 16:25:34 2007 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Sun, 3 Jun 2007 07:25:34 -0700 (PDT) Subject: [IronPython] A pseudobug in standard library usage In-Reply-To: <7346A825E148B049A9AD1D3ED46A2D9113DB971C4F@NA-EXMSG-C106.redmond.corp.microsoft.com> Message-ID: <131088.68247.qm@web31110.mail.mud.yahoo.com> The builtin module "nt" has no method called "_getfullpathname", which the stdlib uses to detect if the OS is Windows (that's what the comment says). I don't know why the library writer didn't check for sys.platform. I think that running CPython on Linux will result in an exception There are two issues here: IronPython work item & CPython stdlib bug Dave Fugate wrote: Thanks Michael! This has been filed as CodePlex Work Item #10710 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10710). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, June 01, 2007 7:13 AM To: Discussion of IronPython Subject: [IronPython] A pseudobug in standard library usage Hello all, More fun with None, this time with the standard library - specifically with 'os.path.abspath': CPython: >>> import os >>> os.path.abspath(None) 'C:\\Program Files\\Python24' >>> IronPython: >>> import os >>> os.path.abspath(None) Traceback (most recent call last): File , line 0, in ##89 File C:\Program Files\Python24\Lib\ntpath.py, line 491, in abspath File C:\Program Files\Python24\Lib\ntpath.py, line 53, in isabs File C:\Program Files\Python24\Lib\ntpath.py, line 119, in splitdrive AttributeError: 'NoneType' object has no attribute '__getitem__' >>> Thanks Michael -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com Mohammad Tayseer http://spellcoder.com/blogs/tayseer --------------------------------- 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut. -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Sun Jun 3 16:42:52 2007 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 3 Jun 2007 07:42:52 -0700 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: On 6/3/07, John J Lee wrote: > > > > "This is not a case of some accidental, unknowing infringement," > > Gutierrez asserts. "There is an overwhelming number of patents being > > infringed." This is a public statement made purely for PR purposes and probably shouldn't be used to imply anything about real-world law. -- Curt Hagenlocher curt at hagenlocher.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Sun Jun 3 17:19:06 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 03 Jun 2007 16:19:06 +0100 Subject: [IronPython] A pseudobug in standard library usage In-Reply-To: <131088.68247.qm@web31110.mail.mud.yahoo.com> References: <131088.68247.qm@web31110.mail.mud.yahoo.com> Message-ID: <4662DBEA.1050200@voidspace.org.uk> Mohammad Tayseer wrote: > The builtin module "nt" has no method called "_getfullpathname", which > the stdlib uses to detect if the OS is Windows (that's what the > comment says). I don't know why the library writer didn't check for > sys.platform. Because it uses the '_getfullpathname' if it is available. Inside the 'abspath' function (which uses '_getfullpathname') is an explicit check, which returns the current directory for an empty path: if path: # Empty path must return current working directory. try: path = _getfullpathname(path) except WindowsError: pass # Bad path - return unchanged. else: path = os.getcwd() I think this is *designed* to work for an empty string - but *happens* to work for None as well. Either way, it could be fixed if the built-in nt module supplied '_getfullpathname'. Thanks Michael http://www.voidspace.org.uk/ironpython/index.shtml > I think that running CPython on Linux will result in an exception > > There are two issues here: IronPython work item & CPython stdlib bug > > */Dave Fugate /* wrote: > > Thanks Michael! This has been filed as CodePlex Work Item #10710 > (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10710). > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Friday, June 01, 2007 7:13 AM > To: Discussion of IronPython > Subject: [IronPython] A pseudobug in standard library usage > > Hello all, > > More fun with None, this time with the standard library - specifically > with 'os.path.abspath': > > CPython: > > >>> import os > >>> os.path.abspath(None) > 'C:\\Program Files\\Python24' > >>> > > IronPython: > >>> import os > >>> os.path.abspath(None) > Traceback (most recent call last): > File , line 0, in ##89 > File C:\Program Files\Python24\Lib\ntpath.py, line 491, in abspath > File C:\Program Files\Python24\Lib\ntpath.py, line 53, in isabs > File C:\Program Files\Python24\Lib\ntpath.py, line 119, in splitdrive > AttributeError: 'NoneType' object has no attribute '__getitem__' > >>> > > Thanks > > Michael > > -- > Michael Foord > Resolver Systems > michael.foord at resolversystems.com > > Office address: 17a Clerkenwell Road, London EC1M 5RD, UK > Registered address: 843 Finchley Road, London NW11 8NA, UK > > Resolver Systems Limited is registered in England and Wales as > company number 5467329. > VAT No. GB 893 5643 79 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > Mohammad Tayseer > http://spellcoder.com/blogs/tayseer > > ------------------------------------------------------------------------ > 8:00? 8:25? 8:40? Find a flick > in no time > with theYahoo! Search movie showtime shortcut. > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jon at jcosby.com Sun Jun 3 23:06:03 2007 From: jon at jcosby.com (Jon Cosby) Date: Sun, 3 Jun 2007 14:06:03 -0700 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: <20070603140603.0v1gi0vd6os00csw@jcosby.com> Quoting Curt Hagenlocher : > On 6/3/07, John J Lee wrote: >> >> >>> "This is not a case of some accidental, unknowing infringement," >>> Gutierrez asserts. "There is an overwhelming number of patents being >>> infringed." > > > This is a public statement made purely for PR purposes and probably > shouldn't be used to imply anything about real-world law. > > -- > Curt Hagenlocher > curt at hagenlocher.org Interesting that MS refuses to specify the infringements they refer to. Could this be saber-rattling aimed to scare customers away from Linux? http://www.theregister.co.uk/2007/05/24/microsoft_novell_patents/ Jon Cosby From gabrielverta at gmail.com Mon Jun 4 13:54:01 2007 From: gabrielverta at gmail.com (Gabriel) Date: Mon, 4 Jun 2007 08:54:01 -0300 Subject: [IronPython] Asp.net + IronPython question In-Reply-To: <41d7f4a90706021840v2e371901jc74c2a778045eb95@mail.gmail.com> References: <2254669b0706021410h6460e35dk3f9088cd094292c4@mail.gmail.com> <41d7f4a90706021840v2e371901jc74c2a778045eb95@mail.gmail.com> Message-ID: <2254669b0706040454u452234b6le870acda5f208848@mail.gmail.com> Thanks Kevin Chu! It was very usefull! On 6/2/07, Kevin Chu wrote: > answer is yes. > please brower this > url:http://www.cnblogs.com/RChen/archive/2006/12/02/cs_ipy_aspnet.html > this is my friend's blog , and writed by Chinese, you can translate it by > Google Language Tool. > this solution is base of IronPython for ASP.NET CTP 1. > > > On 6/3/07, Gabriel < gabrielverta at gmail.com> wrote: > > > > Hi > > > > I'm beginnig to programming with IronPython + Asp.net, and I would > > like to know if it's possible to run IronPython in a project that > > already runs C# + Asp.net. > > > > I've tried it, but I'm having problems with Web.Config. > > > > Will I have to use Instant Python to convert everything into IronPython? > > > > > > Thanks > > > > > > -- > > Gabriel Verta > > http://stiod.com.br > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > Once in a Redmoon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From michael.foord at resolversystems.com Mon Jun 4 17:45:32 2007 From: michael.foord at resolversystems.com (Michael Foord) Date: Mon, 04 Jun 2007 16:45:32 +0100 Subject: [IronPython] __doc__ on None Message-ID: <4664339C.9040000@resolversystems.com> Hello all, More fun with None: CPython 2.4.4: >>> print None.__doc__ None IP 1.1: >>> print None.__doc__ T.__new__(S, ...) -> a new object with type S, a subtype of T This is again confusing our auto-documentation tool. :-) By the way - can any of 'the team' answer the question as to whether the 1.1 branch is still being developed? (Bugfixes being backported?) Thanks Michael Foord -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 From ken.manheimer at gmail.com Mon Jun 4 18:03:32 2007 From: ken.manheimer at gmail.com (Ken Manheimer) Date: Mon, 4 Jun 2007 12:03:32 -0400 Subject: [IronPython] Patent concerns In-Reply-To: References: <46605670.3050100@probo.com> Message-ID: <2cd46e7f0706040903x1bb5504dw7240cfce61bdafed@mail.gmail.com> On 6/3/07, Curt Hagenlocher wrote: > On 6/3/07, John J Lee wrote: > > > > > "This is not a case of some accidental, unknowing infringement," > > > Gutierrez asserts. "There is an overwhelming number of patents being > > > infringed." > > > This is a public statement made purely for PR purposes and probably > shouldn't be used to imply anything about real-world law. i'm a great fan of iron python, and am thrilled that microsoft happens to be using python as the front-line example (trial case?) for select application of open-ish software development. that said, it seems downright blithe to dismiss blatant threats as mere PR. such threats are analogous to the leaders of one country making claims to a neighboring country's territory - sabre rattling, indeed. (the overlap of the "property" theme, physical vs. intellectual, is no accident.) whether or not such threats are intended to be followed by action, they have serious consequences. i also wouldn't rely on wisdom to prevent misguided follow-through on such threats - history has plenty of counter-examples, where everybody loses. i'd be nervous about such posturing, even when i wasn't part of the culture in the crosshairs. all *that* said, i wouldn't see any of this as reasons to feel exposed to a patent litigation risk when it comes to iron python. from a purely power-politics perspective, fepy seems to be as indemnified as you can get, with the weight of the 800 lb gorilla behind it. i gather that microsoft has sometimes been unkind to their third party developers, but there seems to be some safe ground to stick with, here, there's alignment of motives. if i understand their model, it's in MS's interest to grow and sustain a public community of developers using languages built on the DLR. it sure is interesting to see this all unfold. (thanks, jim and co.!) -- ken manheimer http://myriadicity.net From lupus at ximian.com Mon Jun 4 17:47:45 2007 From: lupus at ximian.com (Paolo Molaro) Date: Mon, 4 Jun 2007 17:47:45 +0200 Subject: [IronPython] IronPython now runs faster on Mono In-Reply-To: <5b0248170706030256y1d83b713j5898ad380848c580@mail.gmail.com> References: <5b0248170706030256y1d83b713j5898ad380848c580@mail.gmail.com> Message-ID: <20070604154744.GL4081@debian.org> On 06/03/07 Sanghyeon Seo wrote: > Thanks to optimization works on delegate invocation, IronPython now > runs faster on Mono. Conservatively, you can expect 5% speedup for > 1.1, and 10% speedup for 2.0a1. Current svn mono should be a few percent faster as well (optimized string.CompareOrdinal). I got a few more insights into the performace issues with version 2.0 as well: if you try to run pystone with more passes (200, 300, 500 K) you'll notice the reported performance is significantly higher. This is because we JIT many more methods in 2.0 and the JIT time is accounted in the results. Adding a warmup call to pystone.py will get the 1.1 and 2.0 results much closer than they appear to be with a default run (58k vs 46k in the default and 59k vs 55k with the warmup on my pentium M 1.6). The good news is that most of the additional methods compiled are just because we haven't implemented in mono code sharing for generic methods with reference generic arguments. The bad news is that we haven't scheduled the time yet to implement code sharing. I guess these data points will help us to prioritize it. lupus -- ----------------------------------------------------------------- lupus at debian.org debian/rules lupus at ximian.com Monkeys do it better From Shri.Borde at microsoft.com Mon Jun 4 18:56:49 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 4 Jun 2007 09:56:49 -0700 Subject: [IronPython] Backporting of bugs to 1.1 In-Reply-To: <4664339C.9040000@resolversystems.com> References: <4664339C.9040000@resolversystems.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> We are focusing most of our efforts on the 2.0 branch and the DLR. We are not automatically backporting bug fixes to 1.1. We will consider doing that for specific bugs based on priority and how much it affects customers. However, given our limited resources and wanting to keep 1.1 as stable as possible, our preference is to minimize development in the 1.1 branch and focus on the 2.0 branch. Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, June 04, 2007 8:46 AM To: Discussion of IronPython Subject: [IronPython] __doc__ on None Hello all, More fun with None: CPython 2.4.4: >>> print None.__doc__ None IP 1.1: >>> print None.__doc__ T.__new__(S, ...) -> a new object with type S, a subtype of T This is again confusing our auto-documentation tool. :-) By the way - can any of 'the team' answer the question as to whether the 1.1 branch is still being developed? (Bugfixes being backported?) Thanks Michael Foord -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Shri.Borde at microsoft.com Mon Jun 4 18:58:59 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 4 Jun 2007 09:58:59 -0700 Subject: [IronPython] Dino is OOF for a couple of weeks In-Reply-To: <7AD436E4270DD54A94238001769C222791BCBF6627@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222791BCBF6627@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E8011622CA9@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Until June 15th. The rest of the team will to answer as many questions as possible, but FYI, in case you wonder why there are no responses from Dino. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Mon Jun 4 19:04:51 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 04 Jun 2007 18:04:51 +0100 Subject: [IronPython] Backporting of bugs to 1.1 In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <4664339C.9040000@resolversystems.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46644633.6030209@voidspace.org.uk> Shri Borde wrote: > We are focusing most of our efforts on the 2.0 branch and the DLR. We are not automatically backporting bug fixes to 1.1. We will consider doing that for specific bugs based on priority and how much it affects customers. However, given our limited resources and wanting to keep 1.1 as stable as possible, our preference is to minimize development in the 1.1 branch and focus on the 2.0 branch. > > Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. > We need to divert standard output to capture output from user code. If user code uses threads (which it can do) - then the thread-local idea won't work. Also on systems with .NET 3, there is a reported speed degradation moving from 1 to 2, which we can't afford (and we aren't willing to depend on .NET 3 yet I'm afraid). All the best, Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, June 04, 2007 8:46 AM > To: Discussion of IronPython > Subject: [IronPython] __doc__ on None > > Hello all, > > More fun with None: > > CPython 2.4.4: > >>> print None.__doc__ > None > > IP 1.1: > >>> print None.__doc__ > T.__new__(S, ...) -> a new object with type S, a subtype of T > > This is again confusing our auto-documentation tool. :-) > > By the way - can any of 'the team' answer the question as to whether the > 1.1 branch is still being developed? (Bugfixes being backported?) > > Thanks > > Michael Foord > > -- > Michael Foord > Resolver Systems > michael.foord at resolversystems.com > > Office address: 17a Clerkenwell Road, London EC1M 5RD, UK > Registered address: 843 Finchley Road, London NW11 8NA, UK > > Resolver Systems Limited is registered in England and Wales as company number 5467329. > VAT No. GB 893 5643 79 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From Shri.Borde at microsoft.com Mon Jun 4 19:25:12 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 4 Jun 2007 10:25:12 -0700 Subject: [IronPython] Backporting of bugs to 1.1 In-Reply-To: <46644633.6030209@voidspace.org.uk> References: <4664339C.9040000@resolversystems.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46644633.6030209@voidspace.org.uk> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E8011622CDD@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Could you check if the thread-local static was null (uninitialized), infer that that this was a new user-created thread, and then initialize the static to the output stream you wanted for that thread? We can investigate the perf degrade of IPy 2.0 on .NET 3. I can't say if we can fix it completely until we do some investigations, but this is something that we would like to invest in anyway. Btw, did you say you are not willing to depend on .NET 3 or did you mean you are not willing to depend on IPy 2.0? When are you planning on releasing your product? (You could reply just to me if you want). We can use this as input to our decision on our servicing plans for 1.1. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, June 04, 2007 10:05 AM To: Discussion of IronPython Subject: Re: [IronPython] Backporting of bugs to 1.1 Shri Borde wrote: > We are focusing most of our efforts on the 2.0 branch and the DLR. We are not automatically backporting bug fixes to 1.1. We will consider doing that for specific bugs based on priority and how much it affects customers. However, given our limited resources and wanting to keep 1.1 as stable as possible, our preference is to minimize development in the 1.1 branch and focus on the 2.0 branch. > > Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. > We need to divert standard output to capture output from user code. If user code uses threads (which it can do) - then the thread-local idea won't work. Also on systems with .NET 3, there is a reported speed degradation moving from 1 to 2, which we can't afford (and we aren't willing to depend on .NET 3 yet I'm afraid). All the best, Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, June 04, 2007 8:46 AM > To: Discussion of IronPython > Subject: [IronPython] __doc__ on None > > Hello all, > > More fun with None: > > CPython 2.4.4: > >>> print None.__doc__ > None > > IP 1.1: > >>> print None.__doc__ > T.__new__(S, ...) -> a new object with type S, a subtype of T > > This is again confusing our auto-documentation tool. :-) > > By the way - can any of 'the team' answer the question as to whether the > 1.1 branch is still being developed? (Bugfixes being backported?) > > Thanks > > Michael Foord > > -- > Michael Foord > Resolver Systems > michael.foord at resolversystems.com > > Office address: 17a Clerkenwell Road, London EC1M 5RD, UK > Registered address: 843 Finchley Road, London NW11 8NA, UK > > Resolver Systems Limited is registered in England and Wales as company number 5467329. > VAT No. GB 893 5643 79 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Shri.Borde at microsoft.com Tue Jun 5 01:36:24 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 4 Jun 2007 16:36:24 -0700 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Michael, how does multiple engines help you when several pieces of user-code are running concurrently? It seems that if you are willing to live with some restrictions (like every thread having a single output stream), you should be able to live without multiple engines. We could make this easier by formalizing this design pattern, but you may be able to achieve your required semantics of only redirecting stdout without that. We have not finalized on the single engine story yet, but we are leaning towards it at the moment. Shri Borde said: > Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. Michael Foord said: > That is the problem: if we have several pieces of user-code running concurrently then we wouldn't know which output stream it belonged to. (If we only had one stream at a time we could override sys.stdout from the Python side.) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, May 02, 2007 1:48 PM To: Discussion of IronPython Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) Both you and Tony bring up a very good point. I believe that we can solve the thread problem by using .NET's ExecutionContext. I've never actually tried that, I just know it exists, so I'll need to look into that. That will cause the context to be flown to thread pool threads, newly created threads, and other various async points within the CLR. One reason for its existence today is for security so the CLR is pretty good at making sure this always gets flowed (there are various ways to do operations which don't flow it, but they all have "Unsafe" in their name). Based upon Tony's description of I'm starting to believe the swappable SystemStates rather than multiple PythonEngines are the right solution - especially given that CPython is using a similar technique and even more so if ExecutionContext solves the async/threading problem. Thanks for all your feedback and let me know if you have any more. I'll take it all to our discussion about the hosting APIs next week. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, May 02, 2007 12:19 PM To: Discussion of IronPython Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) Dino Viehland wrote: > I didn't even realize posting at the top was considered a no-no on mailing list etiquette... But indeed, I am using Outlook. I wonder if there's an option to change that somewhere... > I was a bit tongue in cheek - but top-posting suffers from the same readability issues on mailing lists as it does in usenet posts. > Thanks for your feedback Michael. This thread has diverged a little bit so let me know if you have any thoughts on the rest of it. > It occurs to me that your suggestion won't work for us if the user spawns any threads of their own (which is highly likely) - unless we can tell what thread it was spawned from... Meanwhile I'll try and digest the rest of *this* thread... Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Wednesday, May 02, 2007 9:06 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > > My guess is that you have to use outlook. It does seem to encourage > top-posting. ;-) > > Dino Viehland wrote: > >> The scripts are running on multiple threads? >> > Usually - although sometimes code is executed on the GUI thread, but in > this case we always know where to send the output. > > >> The easy way to do this in v2.0 is to set console output (we no longer maintain our own output streams) to be a stream which looks at a thread static variable which is the real stream to output to. Would that solve the entire isolation problem for you? >> > > > Our current code is nice and elegant, whilst yours sounds hacky. :-p > > Actually its just a solution we didn't think of, although it isn't quite > as nice as running them in separate engines which we do now, and does > give us *some* measure of isolation. (It is slightly less likely that a > badly written user script will now kill the whole application, although > obviously still very easy.) > > > >> The only problem w/ this is if user code sets sys.stdout they'll hijack all the other scripts. >> >> > > Which is a problem - but we can always say "don't do that then"... > > I think we still like our current use of multiple engines, and would > prefer to see that supported in IronPython 2.0, even with a shared > SystemState. > > At least you have given us an alternative without *having* to use > AppDomains if this isn't possible. > > Thanks > > Michael Foord > http://www.voidspace.org.uk/ironpython/index.shtml > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >> Sent: Wednesday, May 02, 2007 5:58 AM >> To: Discussion of IronPython >> Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >> >> Michael Foord wrote: >> >> >>> Dino Viehland wrote: >>> >>> >>> >>>> I'm not actually the one working on the engine APIs so that's the reason I've tended to be vague. I'll talk to the people doing it and let you know what I hear. >>>> >>>> But the more info you can give us the better decision we'll be able to make. For example what do you actually need to be isolated? Do you need multiple system states so they get their own modules, console, etc... do you need everything in sys isolated? Do you need to guarantee the isolation even if .NET code is called (e.g. they could smuggled data via a static field). If they do need some rather high level of isolation are app domains good enough? Do you need to marshal a lot of data in/out? Or is the effort to spin up and use app domains correctly? >>>> >>>> >>>> >>>> >>> At Resolver we are currently using multiple IronPython engines. Moving >>> to AppDomains is a long term goal for us, but is actually quite a lot of >>> work (we would have *lots* of cross-domain calls and so to avoid that we >>> have to find an efficient way of pumping lots of data in and then out of >>> the app domain). >>> >>> Switching to app domains is not a high priority task for us, and in the >>> meantime we *can't* upgrade to IronPython 2 if it doesn't support >>> multiple engines. >>> >>> Isolation of engines is only a minor benefit (it is a positive side >>> effect - but not the reason we started using them) for us at the moment, >>> and an isolated system state (although nice) is not vital. >>> >>> >>> >>> >> In fact, the reason we started using multiple engines was to divert the >> standard output of simultaneously running user scripts to different >> output windows... >> >> Michael >> >> >> >> >>> All the best, >>> >>> Michael Foord >>> http://www.voidspace.org.uk/ironpython/index.shtml >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >>> >>> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue Jun 5 02:47:54 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 5 Jun 2007 09:47:54 +0900 Subject: [IronPython] Backporting of bugs to 1.1 In-Reply-To: <46644633.6030209@voidspace.org.uk> References: <4664339C.9040000@resolversystems.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46644633.6030209@voidspace.org.uk> Message-ID: <5b0248170706041747g2c5025e1j7c35fa40460c96e8@mail.gmail.com> 2007/6/5, Michael Foord : > Also on systems with .NET 3, there is a reported speed degradation > moving from 1 to 2, which we can't afford (and we aren't willing to > depend on .NET 3 yet I'm afraid). I think you meant "systems *without* .NET 3". -- Seo Sanghyeon From fuzzyman at voidspace.org.uk Tue Jun 5 10:23:46 2007 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 05 Jun 2007 09:23:46 +0100 Subject: [IronPython] Backporting of bugs to 1.1 In-Reply-To: <5b0248170706041747g2c5025e1j7c35fa40460c96e8@mail.gmail.com> References: <4664339C.9040000@resolversystems.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622CA6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46644633.6030209@voidspace.org.uk> <5b0248170706041747g2c5025e1j7c35fa40460c96e8@mail.gmail.com> Message-ID: <46651D92.4030305@voidspace.org.uk> Sanghyeon Seo wrote: >2007/6/5, Michael Foord : > > >>Also on systems with .NET 3, there is a reported speed degradation >>moving from 1 to 2, which we can't afford (and we aren't willing to >>depend on .NET 3 yet I'm afraid). >> >> > >I think you meant "systems *without* .NET 3". > > > I did. :-) Thanks Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml From fuzzyman at voidspace.org.uk Tue Jun 5 10:30:00 2007 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 05 Jun 2007 09:30:00 +0100 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46651F08.3060109@voidspace.org.uk> Shri Borde wrote: >Michael, how does multiple engines help you when several pieces of user-code are running concurrently? It seems that if you are willing to live with some restrictions (like every thread having a single output stream), you should be able to live without multiple engines. We could make this easier by formalizing this design pattern, but you may be able to achieve your required semantics of only redirecting stdout without that. > > The users may have several user interface windows open at one time, each relating to a different data-set. Although only one window is 'active', several can be processing data at the same time - and executing user code as a result. Each window has an IronPython engine associated with it, in which the data-sets are processed. This way output from each data-set goes to its window. User code *can* spin off new threads if they want, but because they are executing 'inside' their engines - output goes to the right place. If you can suggest a way we can achieve this without multiple engines, then we are interested. All the best, Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml >We have not finalized on the single engine story yet, but we are leaning towards it at the moment. > >Shri Borde said: > > >>Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >> >> > >Michael Foord said: > > >>That is the problem: if we have several pieces of user-code running concurrently then we wouldn't know which output stream it belonged to. >> >> >(If we only had one stream at a time we could override sys.stdout from the Python side.) > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland >Sent: Wednesday, May 02, 2007 1:48 PM >To: Discussion of IronPython >Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > >Both you and Tony bring up a very good point. I believe that we can solve the thread problem by using .NET's ExecutionContext. I've never actually tried that, I just know it exists, so I'll need to look into that. That will cause the context to be flown to thread pool threads, newly created threads, and other various async points within the CLR. One reason for its existence today is for security so the CLR is pretty good at making sure this always gets flowed (there are various ways to do operations which don't flow it, but they all have "Unsafe" in their name). > >Based upon Tony's description of I'm starting to believe the swappable SystemStates rather than multiple PythonEngines are the right solution - especially given that CPython is using a similar technique and even more so if ExecutionContext solves the async/threading problem. > >Thanks for all your feedback and let me know if you have any more. I'll take it all to our discussion about the hosting APIs next week. > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >Sent: Wednesday, May 02, 2007 12:19 PM >To: Discussion of IronPython >Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > >Dino Viehland wrote: > > >>I didn't even realize posting at the top was considered a no-no on mailing list etiquette... But indeed, I am using Outlook. I wonder if there's an option to change that somewhere... >> >> >> > >I was a bit tongue in cheek - but top-posting suffers from the same >readability issues on mailing lists as it does in usenet posts. > > > >>Thanks for your feedback Michael. This thread has diverged a little bit so let me know if you have any thoughts on the rest of it. >> >> >> >It occurs to me that your suggestion won't work for us if the user >spawns any threads of their own (which is highly likely) - unless we can >tell what thread it was spawned from... > >Meanwhile I'll try and digest the rest of *this* thread... > >Michael > > > > >>-----Original Message----- >>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>Sent: Wednesday, May 02, 2007 9:06 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >> >>My guess is that you have to use outlook. It does seem to encourage >>top-posting. ;-) >> >>Dino Viehland wrote: >> >> >> >>>The scripts are running on multiple threads? >>> >>> >>> >>Usually - although sometimes code is executed on the GUI thread, but in >>this case we always know where to send the output. >> >> >> >> >>>The easy way to do this in v2.0 is to set console output (we no longer maintain our own output streams) to be a stream which looks at a thread static variable which is the real stream to output to. Would that solve the entire isolation problem for you? >>> >>> >>> >>Our current code is nice and elegant, whilst yours sounds hacky. :-p >> >>Actually its just a solution we didn't think of, although it isn't quite >>as nice as running them in separate engines which we do now, and does >>give us *some* measure of isolation. (It is slightly less likely that a >>badly written user script will now kill the whole application, although >>obviously still very easy.) >> >> >> >> >> >>>The only problem w/ this is if user code sets sys.stdout they'll hijack all the other scripts. >>> >>> >>> >>> >>Which is a problem - but we can always say "don't do that then"... >> >>I think we still like our current use of multiple engines, and would >>prefer to see that supported in IronPython 2.0, even with a shared >>SystemState. >> >>At least you have given us an alternative without *having* to use >>AppDomains if this isn't possible. >> >>Thanks >> >>Michael Foord >>http://www.voidspace.org.uk/ironpython/index.shtml >> >> >> >> >>>-----Original Message----- >>>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>>Sent: Wednesday, May 02, 2007 5:58 AM >>>To: Discussion of IronPython >>>Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >>> >>>Michael Foord wrote: >>> >>> >>> >>> >>>>Dino Viehland wrote: >>>> >>>> >>>> >>>> >>>> >>>>>I'm not actually the one working on the engine APIs so that's the reason I've tended to be vague. I'll talk to the people doing it and let you know what I hear. >>>>> >>>>>But the more info you can give us the better decision we'll be able to make. For example what do you actually need to be isolated? Do you need multiple system states so they get their own modules, console, etc... do you need everything in sys isolated? Do you need to guarantee the isolation even if .NET code is called (e.g. they could smuggled data via a static field). If they do need some rather high level of isolation are app domains good enough? Do you need to marshal a lot of data in/out? Or is the effort to spin up and use app domains correctly? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>At Resolver we are currently using multiple IronPython engines. Moving >>>>to AppDomains is a long term goal for us, but is actually quite a lot of >>>>work (we would have *lots* of cross-domain calls and so to avoid that we >>>>have to find an efficient way of pumping lots of data in and then out of >>>>the app domain). >>>> >>>>Switching to app domains is not a high priority task for us, and in the >>>>meantime we *can't* upgrade to IronPython 2 if it doesn't support >>>>multiple engines. >>>> >>>>Isolation of engines is only a minor benefit (it is a positive side >>>>effect - but not the reason we started using them) for us at the moment, >>>>and an isolated system state (although nice) is not vital. >>>> >>>> >>>> >>>> >>>> >>>> >>>In fact, the reason we started using multiple engines was to divert the >>>standard output of simultaneously running user scripts to different >>>output windows... >>> >>>Michael >>> >>> >>> >>> >>> >>> >>>>All the best, >>>> >>>>Michael Foord >>>>http://www.voidspace.org.uk/ironpython/index.shtml >>>> >>>>_______________________________________________ >>>>users mailing list >>>>users at lists.ironpython.com >>>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>users mailing list >>>users at lists.ironpython.com >>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>_______________________________________________ >>>users mailing list >>>users at lists.ironpython.com >>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >>> >>> >>> >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From krapfenbauer at ict.tuwien.ac.at Tue Jun 5 10:50:46 2007 From: krapfenbauer at ict.tuwien.ac.at (Harald Krapfenbauer) Date: Tue, 5 Jun 2007 10:50:46 +0200 Subject: [IronPython] Debugging IronPython - Question Message-ID: Hello! I have a question regarding debugging of IronPython. I use version 1.1 and debugged a modified version of the "first.py" file from the Tutorial directory: ---------------------------------------------- def add(a, b): "add(a, b) -> returns a + b" temp1 = a*2 temp2 = b*2 temp3 = temp1+temp2 return temp3 / 2 def factorial(n): "factorial(n) -> returns factorial of n" if n <= 1: return 1 return n * factorial(n-1) print "Hello from IronPython!" number = 5 result = factorial (number) print "Factorial(",number,") is ",result result2 = add(5,7) print "5 + 7 =",result2 ---------------------------------------------------- First, I debugged this program with Visual C# 2005 Express, i.e. MS CLR debugger. I set a breakpoint on last line of add() function and got the correct values of locals and parameters: a 5 object{int} b 7 object{int} tbstatus false bool temp1 10 object{int} temp2 14 object{int} temp3 24 object{int} $line 21 int retval null object Then I tried to debug this program with the Mono debugger (MDB) under Linux. If I compile the Python file before with -X:SaveAssemblies, I can set a breakpoint on the same line. The "show locals" and "show params" commands give me the variable names, but incorrect or missing values: (mdb) show locals tbstatus = (System.Boolean) true temp2 = (object) object (0x0738a000) temp3 = (object) &(System.Int32) 14 temp1 = (object) &(System.Int32) 24 $line = (System.Int32) 473472 retval = (object) object (0x00000015) (mdb) show params a = (System.Object) { } b = (System.Object) { } I suspect the Mono Debugger does something wrong, but I'm not sure. Is it possible that Mono does something different with IronPython as .NET under Windows? What's this tbstatus variable for? Does anyone have experience with debugging IronPython under Linux? Best greetings + thanks, Harald Krapfenbauer From fuzzyman at voidspace.org.uk Tue Jun 5 11:29:30 2007 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 05 Jun 2007 10:29:30 +0100 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46652CFA.1050005@voidspace.org.uk> Shri Borde said: >>Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >> >> None of the 1.1 bugs are blocking us, we have just discovered them as we develop. If we encounter a blocking bug we will shout loudly. :-) Given that we are so close to release, and that switching to 2.0 will mean non-trivial changes (which wasn't true of 1.0 - 1.1 - thank you), we will stick to 1.1 for the moment. Eventually we will have to move to 2.0 of course (and would like to). As 2.0 is still in alpha, we would like to think that the 1.X branch hasn't been abandoned by 'the team'. In the very long run we will move to executing user code inside appdomains, but currently that would result in a lot of cross domain calls that would hurt our performance in a big way. As resolving this would be a lot of work it isn't yet a high priority for us - and won't be for quite a long time. All the best, Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml From fuzzyman at voidspace.org.uk Tue Jun 5 12:11:14 2007 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 05 Jun 2007 11:11:14 +0100 Subject: [IronPython] Sockets and Standard Library Modules in IronPython Message-ID: <466536C2.2040506@voidspace.org.uk> Hello all, A plea to 'the team'. urllib and urllib2 are Python standard libraries modules that provide a high level interface to accessing internet resources. They are widely used. These modules are broken for the official IronPython distribution, but they work with FePy thanks to patches that Seo has applied. Seo says that the IronPython support for Python sockets has improved greatly in IronPython 1.1 - but unfortunately not to the point where these modules functions. This is a request for these issues to be addressed as soon as possible. :-) Many Thanks Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml From sanxiyn at gmail.com Tue Jun 5 13:40:43 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 5 Jun 2007 20:40:43 +0900 Subject: [IronPython] -S option has an additional side effect Message-ID: <5b0248170706050440k3300ff9dha50b78156d1da711@mail.gmail.com> -S option disables the import of the module "site". But in IronPython, it has an additional (probably unintended) side effect of not including "Lib" directory in sys.path. This is different from CPython. -- Seo Sanghyeon From sanxiyn at gmail.com Tue Jun 5 14:49:30 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 5 Jun 2007 21:49:30 +0900 Subject: [IronPython] IronPython now runs faster on Mono In-Reply-To: <20070604154744.GL4081@debian.org> References: <5b0248170706030256y1d83b713j5898ad380848c580@mail.gmail.com> <20070604154744.GL4081@debian.org> Message-ID: <5b0248170706050549u7994c52ej3326bbb0373376a9@mail.gmail.com> 2007/6/5, Paolo Molaro : > I got a few more insights into the performace issues with version 2.0 as > well: if you try to run pystone with more passes (200, 300, 500 K) > you'll notice the reported performance is significantly higher. > > This is because we JIT many more methods in 2.0 and the JIT time is > accounted in the results. Adding a warmup call to pystone.py will > get the 1.1 and 2.0 results much closer than they appear to be > with a default run (58k vs 46k in the default and 59k vs 55k with > the warmup on my pentium M 1.6). How do I add a warmup call to pystone.py? -- Seo Sanghyeon From lupus at ximian.com Tue Jun 5 15:02:26 2007 From: lupus at ximian.com (Paolo Molaro) Date: Tue, 5 Jun 2007 15:02:26 +0200 Subject: [IronPython] IronPython now runs faster on Mono In-Reply-To: <5b0248170706050549u7994c52ej3326bbb0373376a9@mail.gmail.com> References: <5b0248170706030256y1d83b713j5898ad380848c580@mail.gmail.com> <20070604154744.GL4081@debian.org> <5b0248170706050549u7994c52ej3326bbb0373376a9@mail.gmail.com> Message-ID: <20070605130226.GN4081@debian.org> On 06/05/07 Sanghyeon Seo wrote: > > This is because we JIT many more methods in 2.0 and the JIT time is > > accounted in the results. Adding a warmup call to pystone.py will > > get the 1.1 and 2.0 results much closer than they appear to be > > with a default run (58k vs 46k in the default and 59k vs 55k with > > the warmup on my pentium M 1.6). > > How do I add a warmup call to pystone.py? Add: pystones(10000) at the end of the file just before main(loops). It should be 1 instead of 10000, but the code is buggy and will result in a division by zero error (and 10000 may not be enough on a fast box, so if you get an error you'll need to increase it...). lupus -- ----------------------------------------------------------------- lupus at debian.org debian/rules lupus at ximian.com Monkeys do it better From ionrock at gmail.com Tue Jun 5 18:17:01 2007 From: ionrock at gmail.com (Eric Larson) Date: Tue, 5 Jun 2007 11:17:01 -0500 Subject: [IronPython] Sockets and Standard Library Modules in IronPython In-Reply-To: <466536C2.2040506@voidspace.org.uk> References: <466536C2.2040506@voidspace.org.uk> Message-ID: <6e46dd1e0706050917o411aecberfce34f28a6bd6843@mail.gmail.com> I would suppose getting these libs to work would also make httplib2 work as well. httplib2 is a *great* library that does an excellent job with caching, etags and authentication, all of which are huge regarding RESTful services (ie Atom Publishing Protocol). I only mention it in hopes of fueling the fire to get these things working :) Thanks! Eric Larson On 6/5/07, Fuzzyman wrote: > Hello all, > > A plea to 'the team'. urllib and urllib2 are Python standard libraries > modules that provide a high level interface to accessing internet > resources. They are widely used. > > These modules are broken for the official IronPython distribution, but > they work with FePy thanks to patches that Seo has applied. > > Seo says that the IronPython support for Python sockets has improved > greatly in IronPython 1.1 - but unfortunately not to the point where > these modules functions. > > This is a request for these issues to be addressed as soon as possible. :-) > > > Many Thanks > > > Michael Foord > http://www.voidspace.org.uk/ironpython/index.shtml > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dfugate at microsoft.com Tue Jun 5 18:27:00 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 5 Jun 2007 09:27:00 -0700 Subject: [IronPython] -S option has an additional side effect In-Reply-To: <5b0248170706050440k3300ff9dha50b78156d1da711@mail.gmail.com> References: <5b0248170706050440k3300ff9dha50b78156d1da711@mail.gmail.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBA2078F@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks! Filed as CodePlex Work Item #10778 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10778). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Tuesday, June 05, 2007 4:41 AM To: Discussion of IronPython Subject: [IronPython] -S option has an additional side effect -S option disables the import of the module "site". But in IronPython, it has an additional (probably unintended) side effect of not including "Lib" directory in sys.path. This is different from CPython. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dfugate at microsoft.com Tue Jun 5 18:34:05 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 5 Jun 2007 09:34:05 -0700 Subject: [IronPython] Sockets and Standard Library Modules in IronPython In-Reply-To: <466536C2.2040506@voidspace.org.uk> References: <466536C2.2040506@voidspace.org.uk> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBA20797@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks for reporting this Michael. Are there any open work items on CodePlex WRT socket that are blocking urllib/urllib2 from being used? If not, please let me know and I'll investigate this. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman Sent: Tuesday, June 05, 2007 3:11 AM To: Discussion of IronPython Subject: [IronPython] Sockets and Standard Library Modules in IronPython Hello all, A plea to 'the team'. urllib and urllib2 are Python standard libraries modules that provide a high level interface to accessing internet resources. They are widely used. These modules are broken for the official IronPython distribution, but they work with FePy thanks to patches that Seo has applied. Seo says that the IronPython support for Python sockets has improved greatly in IronPython 1.1 - but unfortunately not to the point where these modules functions. This is a request for these issues to be addressed as soon as possible. :-) Many Thanks Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue Jun 5 18:36:01 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 6 Jun 2007 01:36:01 +0900 Subject: [IronPython] Sockets and Standard Library Modules in IronPython In-Reply-To: <6e46dd1e0706050917o411aecberfce34f28a6bd6843@mail.gmail.com> References: <466536C2.2040506@voidspace.org.uk> <6e46dd1e0706050917o411aecberfce34f28a6bd6843@mail.gmail.com> Message-ID: <5b0248170706050936h525b4663t7cae7f4dc253df14@mail.gmail.com> 2007/6/6, Eric Larson : > I would suppose getting these libs to work would also make httplib2 > work as well. httplib2 is a *great* library that does an excellent job > with caching, etags and authentication, all of which are huge > regarding RESTful services (ie Atom Publishing Protocol). > > I only mention it in hopes of fueling the fire to get these things working :) I must mention that httplib2 already works with IPCE. Actually I submitted a patch for that in December 2006! See http://sourceforge.net/mailarchive/forum.php?thread_name=5b0248170612180038x2eb2d8c9t3a655e0d5eff1060%40mail.gmail.com&forum_name=httplib2-discuss -- Seo Sanghyeon From ionrock at gmail.com Tue Jun 5 18:57:04 2007 From: ionrock at gmail.com (Eric Larson) Date: Tue, 5 Jun 2007 11:57:04 -0500 Subject: [IronPython] Sockets and Standard Library Modules in IronPython In-Reply-To: <5b0248170706050936h525b4663t7cae7f4dc253df14@mail.gmail.com> References: <466536C2.2040506@voidspace.org.uk> <6e46dd1e0706050917o411aecberfce34f28a6bd6843@mail.gmail.com> <5b0248170706050936h525b4663t7cae7f4dc253df14@mail.gmail.com> Message-ID: <6e46dd1e0706050957r3537936bya04690347e6ba84b@mail.gmail.com> On 6/5/07, Sanghyeon Seo wrote: > 2007/6/6, Eric Larson : > > I would suppose getting these libs to work would also make httplib2 > > work as well. httplib2 is a *great* library that does an excellent job > > with caching, etags and authentication, all of which are huge > > regarding RESTful services (ie Atom Publishing Protocol). > > > > I only mention it in hopes of fueling the fire to get these things working :) > > I must mention that httplib2 already works with IPCE. Actually I > submitted a patch for that in December 2006! > > See > http://sourceforge.net/mailarchive/forum.php?thread_name=5b0248170612180038x2eb2d8c9t3a655e0d5eff1060%40mail.gmail.com&forum_name=httplib2-discuss > Of course they work with IPCE! It would just be nice if they could work out of the box :) Eric **FWIW, I do use IPCE and it rocks! From Shri.Borde at microsoft.com Wed Jun 6 07:26:47 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 5 Jun 2007 22:26:47 -0700 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <46651F08.3060109@voidspace.org.uk> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46651F08.3060109@voidspace.org.uk> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E801162347E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I have attached a sample at the bottom of http://msdn2.microsoft.com/en-us/library/system.threading.executioncontext.aspx showing how state can be automatically propagated across thread boundaries. You should be able to set the desired output stream for each thread processing your data. Even if user code spawns new thread, the output stream information can automatically be propagated to the children thread. Would this work for you? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman Sent: Tuesday, June 05, 2007 1:30 AM To: Discussion of IronPython Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) Shri Borde wrote: >Michael, how does multiple engines help you when several pieces of user-code are running concurrently? It seems that if you are willing to live with some restrictions (like every thread having a single output stream), you should be able to live without multiple engines. We could make this easier by formalizing this design pattern, but you may be able to achieve your required semantics of only redirecting stdout without that. > > The users may have several user interface windows open at one time, each relating to a different data-set. Although only one window is 'active', several can be processing data at the same time - and executing user code as a result. Each window has an IronPython engine associated with it, in which the data-sets are processed. This way output from each data-set goes to its window. User code *can* spin off new threads if they want, but because they are executing 'inside' their engines - output goes to the right place. If you can suggest a way we can achieve this without multiple engines, then we are interested. All the best, Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml >We have not finalized on the single engine story yet, but we are leaning towards it at the moment. > >Shri Borde said: > > >>Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >> >> > >Michael Foord said: > > >>That is the problem: if we have several pieces of user-code running concurrently then we wouldn't know which output stream it belonged to. >> >> >(If we only had one stream at a time we could override sys.stdout from the Python side.) > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland >Sent: Wednesday, May 02, 2007 1:48 PM >To: Discussion of IronPython >Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > >Both you and Tony bring up a very good point. I believe that we can solve the thread problem by using .NET's ExecutionContext. I've never actually tried that, I just know it exists, so I'll need to look into that. That will cause the context to be flown to thread pool threads, newly created threads, and other various async points within the CLR. One reason for its existence today is for security so the CLR is pretty good at making sure this always gets flowed (there are various ways to do operations which don't flow it, but they all have "Unsafe" in their name). > >Based upon Tony's description of I'm starting to believe the swappable SystemStates rather than multiple PythonEngines are the right solution - especially given that CPython is using a similar technique and even more so if ExecutionContext solves the async/threading problem. > >Thanks for all your feedback and let me know if you have any more. I'll take it all to our discussion about the hosting APIs next week. > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >Sent: Wednesday, May 02, 2007 12:19 PM >To: Discussion of IronPython >Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > >Dino Viehland wrote: > > >>I didn't even realize posting at the top was considered a no-no on mailing list etiquette... But indeed, I am using Outlook. I wonder if there's an option to change that somewhere... >> >> >> > >I was a bit tongue in cheek - but top-posting suffers from the same >readability issues on mailing lists as it does in usenet posts. > > > >>Thanks for your feedback Michael. This thread has diverged a little bit so let me know if you have any thoughts on the rest of it. >> >> >> >It occurs to me that your suggestion won't work for us if the user >spawns any threads of their own (which is highly likely) - unless we can >tell what thread it was spawned from... > >Meanwhile I'll try and digest the rest of *this* thread... > >Michael > > > > >>-----Original Message----- >>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>Sent: Wednesday, May 02, 2007 9:06 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >> >>My guess is that you have to use outlook. It does seem to encourage >>top-posting. ;-) >> >>Dino Viehland wrote: >> >> >> >>>The scripts are running on multiple threads? >>> >>> >>> >>Usually - although sometimes code is executed on the GUI thread, but in >>this case we always know where to send the output. >> >> >> >> >>>The easy way to do this in v2.0 is to set console output (we no longer maintain our own output streams) to be a stream which looks at a thread static variable which is the real stream to output to. Would that solve the entire isolation problem for you? >>> >>> >>> >>Our current code is nice and elegant, whilst yours sounds hacky. :-p >> >>Actually its just a solution we didn't think of, although it isn't quite >>as nice as running them in separate engines which we do now, and does >>give us *some* measure of isolation. (It is slightly less likely that a >>badly written user script will now kill the whole application, although >>obviously still very easy.) >> >> >> >> >> >>>The only problem w/ this is if user code sets sys.stdout they'll hijack all the other scripts. >>> >>> >>> >>> >>Which is a problem - but we can always say "don't do that then"... >> >>I think we still like our current use of multiple engines, and would >>prefer to see that supported in IronPython 2.0, even with a shared >>SystemState. >> >>At least you have given us an alternative without *having* to use >>AppDomains if this isn't possible. >> >>Thanks >> >>Michael Foord >>http://www.voidspace.org.uk/ironpython/index.shtml >> >> >> >> >>>-----Original Message----- >>>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>>Sent: Wednesday, May 02, 2007 5:58 AM >>>To: Discussion of IronPython >>>Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >>> >>>Michael Foord wrote: >>> >>> >>> >>> >>>>Dino Viehland wrote: >>>> >>>> >>>> >>>> >>>> >>>>>I'm not actually the one working on the engine APIs so that's the reason I've tended to be vague. I'll talk to the people doing it and let you know what I hear. >>>>> >>>>>But the more info you can give us the better decision we'll be able to make. For example what do you actually need to be isolated? Do you need multiple system states so they get their own modules, console, etc... do you need everything in sys isolated? Do you need to guarantee the isolation even if .NET code is called (e.g. they could smuggled data via a static field). If they do need some rather high level of isolation are app domains good enough? Do you need to marshal a lot of data in/out? Or is the effort to spin up and use app domains correctly? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>At Resolver we are currently using multiple IronPython engines. Moving >>>>to AppDomains is a long term goal for us, but is actually quite a lot of >>>>work (we would have *lots* of cross-domain calls and so to avoid that we >>>>have to find an efficient way of pumping lots of data in and then out of >>>>the app domain). >>>> >>>>Switching to app domains is not a high priority task for us, and in the >>>>meantime we *can't* upgrade to IronPython 2 if it doesn't support >>>>multiple engines. >>>> >>>>Isolation of engines is only a minor benefit (it is a positive side >>>>effect - but not the reason we started using them) for us at the moment, >>>>and an isolated system state (although nice) is not vital. >>>> >>>> >>>> >>>> >>>> >>>> >>>In fact, the reason we started using multiple engines was to divert the >>>standard output of simultaneously running user scripts to different >>>output windows... >>> >>>Michael >>> >>> >>> >>> >>> >>> >>>>All the best, >>>> >>>>Michael Foord >>>>http://www.voidspace.org.uk/ironpython/index.shtml >>>> >>>>_______________________________________________ >>>>users mailing list >>>>users at lists.ironpython.com >>>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>users mailing list >>>users at lists.ironpython.com >>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>_______________________________________________ >>>users mailing list >>>users at lists.ironpython.com >>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >>> >>> >>> >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Shri.Borde at microsoft.com Wed Jun 6 07:31:18 2007 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 5 Jun 2007 22:31:18 -0700 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <46652CFA.1050005@voidspace.org.uk> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46652CFA.1050005@voidspace.org.uk> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E801162347F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I agree that you should stick with 1.1 if you are close to release. We will fix critical blocking bugs in 1.1 as needed. However, to keep that branch stable, the bar will be high. Do shout if you run into blocking issues. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman Sent: Tuesday, June 05, 2007 2:30 AM To: Discussion of IronPython Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) Shri Borde said: >>Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >> >> None of the 1.1 bugs are blocking us, we have just discovered them as we develop. If we encounter a blocking bug we will shout loudly. :-) Given that we are so close to release, and that switching to 2.0 will mean non-trivial changes (which wasn't true of 1.0 - 1.1 - thank you), we will stick to 1.1 for the moment. Eventually we will have to move to 2.0 of course (and would like to). As 2.0 is still in alpha, we would like to think that the 1.X branch hasn't been abandoned by 'the team'. In the very long run we will move to executing user code inside appdomains, but currently that would result in a lot of cross domain calls that would hurt our performance in a big way. As resolving this would be a lot of work it isn't yet a high priority for us - and won't be for quite a long time. All the best, Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Wed Jun 6 12:23:32 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 06 Jun 2007 11:23:32 +0100 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E801162347E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46651F08.3060109@voidspace.org.uk> <50B69702CA6E6D4E849D30CD4989AB8E801162347E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46668B24.9000103@voidspace.org.uk> Shri Borde wrote: > I have attached a sample at the bottom of http://msdn2.microsoft.com/en-us/library/system.threading.executioncontext.aspx showing how state can be automatically propagated across thread boundaries. > > You should be able to set the desired output stream for each thread processing your data. Even if user code spawns new thread, the output stream information can automatically be propagated to the children thread. > > Would this work for you? > This could be exactly what we want - thanks. There is still the issue that apparently 2.0 alpha performs worse on .NET 2.0. Hopefully this can be addressed in future releases. All the best, Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman > Sent: Tuesday, June 05, 2007 1:30 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > > Shri Borde wrote: > > >> Michael, how does multiple engines help you when several pieces of user-code are running concurrently? It seems that if you are willing to live with some restrictions (like every thread having a single output stream), you should be able to live without multiple engines. We could make this easier by formalizing this design pattern, but you may be able to achieve your required semantics of only redirecting stdout without that. >> >> >> > > The users may have several user interface windows open at one time, each > relating to a different data-set. > > Although only one window is 'active', several can be processing data at > the same time - and executing user code as a result. > > Each window has an IronPython engine associated with it, in which the > data-sets are processed. This way output from each data-set goes to its > window. > > User code *can* spin off new threads if they want, but because they are > executing 'inside' their engines - output goes to the right place. > > If you can suggest a way we can achieve this without multiple engines, > then we are interested. > > All the best, > > > Michael Foord > http://www.voidspace.org.uk/ironpython/index.shtml > > >> We have not finalized on the single engine story yet, but we are leaning towards it at the moment. >> >> Shri Borde said: >> >> >> >>> Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >>> >>> >>> >> Michael Foord said: >> >> >> >>> That is the problem: if we have several pieces of user-code running concurrently then we wouldn't know which output stream it belonged to. >>> >>> >>> >> (If we only had one stream at a time we could override sys.stdout from the Python side.) >> >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland >> Sent: Wednesday, May 02, 2007 1:48 PM >> To: Discussion of IronPython >> Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >> >> Both you and Tony bring up a very good point. I believe that we can solve the thread problem by using .NET's ExecutionContext. I've never actually tried that, I just know it exists, so I'll need to look into that. That will cause the context to be flown to thread pool threads, newly created threads, and other various async points within the CLR. One reason for its existence today is for security so the CLR is pretty good at making sure this always gets flowed (there are various ways to do operations which don't flow it, but they all have "Unsafe" in their name). >> >> Based upon Tony's description of I'm starting to believe the swappable SystemStates rather than multiple PythonEngines are the right solution - especially given that CPython is using a similar technique and even more so if ExecutionContext solves the async/threading problem. >> >> Thanks for all your feedback and let me know if you have any more. I'll take it all to our discussion about the hosting APIs next week. >> >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >> Sent: Wednesday, May 02, 2007 12:19 PM >> To: Discussion of IronPython >> Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >> >> Dino Viehland wrote: >> >> >> >>> I didn't even realize posting at the top was considered a no-no on mailing list etiquette... But indeed, I am using Outlook. I wonder if there's an option to change that somewhere... >>> >>> >>> >>> >> I was a bit tongue in cheek - but top-posting suffers from the same >> readability issues on mailing lists as it does in usenet posts. >> >> >> >> >>> Thanks for your feedback Michael. This thread has diverged a little bit so let me know if you have any thoughts on the rest of it. >>> >>> >>> >>> >> It occurs to me that your suggestion won't work for us if the user >> spawns any threads of their own (which is highly likely) - unless we can >> tell what thread it was spawned from... >> >> Meanwhile I'll try and digest the rest of *this* thread... >> >> Michael >> >> >> >> >> >>> -----Original Message----- >>> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>> Sent: Wednesday, May 02, 2007 9:06 AM >>> To: Discussion of IronPython >>> Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >>> >>> My guess is that you have to use outlook. It does seem to encourage >>> top-posting. ;-) >>> >>> Dino Viehland wrote: >>> >>> >>> >>> >>>> The scripts are running on multiple threads? >>>> >>>> >>>> >>>> >>> Usually - although sometimes code is executed on the GUI thread, but in >>> this case we always know where to send the output. >>> >>> >>> >>> >>> >>>> The easy way to do this in v2.0 is to set console output (we no longer maintain our own output streams) to be a stream which looks at a thread static variable which is the real stream to output to. Would that solve the entire isolation problem for you? >>>> >>>> >>>> >>>> >>> Our current code is nice and elegant, whilst yours sounds hacky. :-p >>> >>> Actually its just a solution we didn't think of, although it isn't quite >>> as nice as running them in separate engines which we do now, and does >>> give us *some* measure of isolation. (It is slightly less likely that a >>> badly written user script will now kill the whole application, although >>> obviously still very easy.) >>> >>> >>> >>> >>> >>> >>>> The only problem w/ this is if user code sets sys.stdout they'll hijack all the other scripts. >>>> >>>> >>>> >>>> >>>> >>> Which is a problem - but we can always say "don't do that then"... >>> >>> I think we still like our current use of multiple engines, and would >>> prefer to see that supported in IronPython 2.0, even with a shared >>> SystemState. >>> >>> At least you have given us an alternative without *having* to use >>> AppDomains if this isn't possible. >>> >>> Thanks >>> >>> Michael Foord >>> http://www.voidspace.org.uk/ironpython/index.shtml >>> >>> >>> >>> >>> >>>> -----Original Message----- >>>> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >>>> Sent: Wednesday, May 02, 2007 5:58 AM >>>> To: Discussion of IronPython >>>> Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) >>>> >>>> Michael Foord wrote: >>>> >>>> >>>> >>>> >>>> >>>>> Dino Viehland wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> I'm not actually the one working on the engine APIs so that's the reason I've tended to be vague. I'll talk to the people doing it and let you know what I hear. >>>>>> >>>>>> But the more info you can give us the better decision we'll be able to make. For example what do you actually need to be isolated? Do you need multiple system states so they get their own modules, console, etc... do you need everything in sys isolated? Do you need to guarantee the isolation even if .NET code is called (e.g. they could smuggled data via a static field). If they do need some rather high level of isolation are app domains good enough? Do you need to marshal a lot of data in/out? Or is the effort to spin up and use app domains correctly? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> At Resolver we are currently using multiple IronPython engines. Moving >>>>> to AppDomains is a long term goal for us, but is actually quite a lot of >>>>> work (we would have *lots* of cross-domain calls and so to avoid that we >>>>> have to find an efficient way of pumping lots of data in and then out of >>>>> the app domain). >>>>> >>>>> Switching to app domains is not a high priority task for us, and in the >>>>> meantime we *can't* upgrade to IronPython 2 if it doesn't support >>>>> multiple engines. >>>>> >>>>> Isolation of engines is only a minor benefit (it is a positive side >>>>> effect - but not the reason we started using them) for us at the moment, >>>>> and an isolated system state (although nice) is not vital. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> In fact, the reason we started using multiple engines was to divert the >>>> standard output of simultaneously running user scripts to different >>>> output windows... >>>> >>>> Michael >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>> All the best, >>>>> >>>>> Michael Foord >>>>> http://www.voidspace.org.uk/ironpython/index.shtml >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.ironpython.com >>>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.ironpython.com >>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.ironpython.com >>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> >>>> >>>> >>>> >>>> >>>> >>> _______________________________________________ >>> users mailing list >>> users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> _______________________________________________ >>> users mailing list >>> users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >>> >>> >>> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From fuzzyman at voidspace.org.uk Wed Jun 6 12:24:39 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 06 Jun 2007 11:24:39 +0100 Subject: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E801162347F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C222790ACCE250E@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <463682AA.60806@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACF7A47B@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <4637B508.4070001@v-sim.com> <7AD436E4270DD54A94238001769C222790ACF7A47E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638892E.3060300@voidspace.org.uk> <46388AC2.7080301@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2CA0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638B6E7.6000803@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2D49@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <4638E41D.8030607@voidspace.org.uk> <7AD436E4270DD54A94238001769C222790ACCE2E33@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <50B69702CA6E6D4E849D30CD4989AB8E8011622F85@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46652CFA.1050005@voidspace.org.uk> <50B69702CA6E6D4E849D30CD4989AB8E801162347F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46668B67.8060308@voidspace.org.uk> Shri Borde wrote: > I agree that you should stick with 1.1 if you are close to release. > > We will fix critical blocking bugs in 1.1 as needed. However, to keep that branch stable, the bar will be high. Do shout if you run into blocking issues. > Yes, this is our plan. Thanks for your support. At the moment there are no blocking bugs. Rest assured that we will let you know if we encounter any. :-) Thanks Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman > Sent: Tuesday, June 05, 2007 2:30 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Multiple engine instances in IP 2.0 and beyond (was IronPython 2.0 Alpha 1 Released) > > Shri Borde said: > > >>> Have you looked at moving to 2.0? Dino had mentioned a workaround (of maintaining a thread-local static) which would enable you to selectively redirect console output. Given that you are running into a number of issues and that you might have a stream of such issues going forward, it will be hard for us to continually port all those fixes to 1.1. >>> >>> >>> > > None of the 1.1 bugs are blocking us, we have just discovered them as we > develop. If we encounter a blocking bug we will shout loudly. :-) > > Given that we are so close to release, and that switching to 2.0 will > mean non-trivial changes (which wasn't true of 1.0 - 1.1 - thank you), > we will stick to 1.1 for the moment. Eventually we will have to move to > 2.0 of course (and would like to). > > As 2.0 is still in alpha, we would like to think that the 1.X branch > hasn't been abandoned by 'the team'. > > In the very long run we will move to executing user code inside > appdomains, but currently that would result in a lot of cross domain > calls that would hurt our performance in a big way. As resolving this > would be a lot of work it isn't yet a high priority for us - and won't > be for quite a long time. > > All the best, > > > Michael Foord > http://www.voidspace.org.uk/ironpython/index.shtml > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From gabrielverta at gmail.com Wed Jun 6 15:21:27 2007 From: gabrielverta at gmail.com (Gabriel) Date: Wed, 6 Jun 2007 10:21:27 -0300 Subject: [IronPython] Ironpython + NHibernate? Message-ID: <2254669b0706060621v602ff0ax2aa086dc0e3f5bde@mail.gmail.com> Hi There is a ORM for IronPython? Can I use NHibernate with IronPython? Thanks -- Gabriel Verta http://stiod.com.br From gh.xiao at gmail.com Wed Jun 6 16:27:20 2007 From: gh.xiao at gmail.com (Guohui Xiao) Date: Wed, 6 Jun 2007 22:27:20 +0800 Subject: [IronPython] Ironpython + NHibernate? In-Reply-To: <2254669b0706060621v602ff0ax2aa086dc0e3f5bde@mail.gmail.com> References: <2254669b0706060621v602ff0ax2aa086dc0e3f5bde@mail.gmail.com> Message-ID: <236b92bd0706060727y4e4a7fb4n44f5a473d5ec655c@mail.gmail.com> Interesting stroy. But I think it's difficult for now. 2007/6/6, Gabriel : > > Hi > > There is a ORM for IronPython? > Can I use NHibernate with IronPython? > > Thanks > > -- > Gabriel Verta > http://stiod.com.br > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Xiao Guohui Department of Information Science Peking University Beijing, 100871 CHINA -------------- next part -------------- An HTML attachment was scrubbed... URL: From m_tayseer82 at yahoo.com Wed Jun 6 16:43:22 2007 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Wed, 6 Jun 2007 07:43:22 -0700 (PDT) Subject: [IronPython] Ironpython + NHibernate? In-Reply-To: <236b92bd0706060727y4e4a7fb4n44f5a473d5ec655c@mail.gmail.com> Message-ID: <709145.12963.qm@web31114.mail.mud.yahoo.com> See Jasper http://www.microsoft.com/downloads/details.aspx?FamilyId=471BB3AC-B31A-49CD-A567-F2E286715C8F&displaylang=en and it's screencast http://channel9.msdn.com/ShowPost.aspx?PostID=306427 http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV18&disc=&id=1527&year=2007&search=DEV18 It's available only for Orcas :( Guohui Xiao wrote: Interesting stroy. But I think it's difficult for now. 2007/6/6, Gabriel : Hi There is a ORM for IronPython? Can I use NHibernate with IronPython? Thanks -- Gabriel Verta http://stiod.com.br _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- Xiao Guohui Department of Information Science Peking University Beijing, 100871 CHINA _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com Mohammad Tayseer http://spellcoder.com/blogs/tayseer --------------------------------- Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabrielverta at gmail.com Wed Jun 6 16:51:51 2007 From: gabrielverta at gmail.com (Gabriel) Date: Wed, 6 Jun 2007 11:51:51 -0300 Subject: [IronPython] Ironpython + NHibernate? In-Reply-To: <709145.12963.qm@web31114.mail.mud.yahoo.com> References: <236b92bd0706060727y4e4a7fb4n44f5a473d5ec655c@mail.gmail.com> <709145.12963.qm@web31114.mail.mud.yahoo.com> Message-ID: <2254669b0706060751o35103462j943b09ff08681e27@mail.gmail.com> Hi.. The NHibernate I can implement in C# and use with IronPython. :) Thanks. On 6/6/07, Mohammad Tayseer wrote: > See Jasper > http://www.microsoft.com/downloads/details.aspx?FamilyId=471BB3AC-B31A-49CD-A567-F2E286715C8F&displaylang=en > > and it's screencast > http://channel9.msdn.com/ShowPost.aspx?PostID=306427 > http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV18&disc=&id=1527&year=2007&search=DEV18 > > It's available only for Orcas :( > > > Guohui Xiao wrote: > Interesting stroy. But I think it's difficult for now. > > > 2007/6/6, Gabriel : > > Hi > > > > There is a ORM for IronPython? > > Can I use NHibernate with IronPython? > > > > Thanks > > > > -- > > Gabriel Verta > > http://stiod.com.br > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > Xiao Guohui > Department of Information Science > Peking University > Beijing, 100871 > CHINA _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > Mohammad Tayseer > http://spellcoder.com/blogs/tayseer > > > ________________________________ > Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From xmlhacker at gmail.com Wed Jun 6 20:53:07 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 6 Jun 2007 12:53:07 -0600 Subject: [IronPython] IronPython and Visual Studio Shell Message-ID: FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx Visual Studio Shell (integrated mode) > > Optimized for Programming Languages > > Applications built on the integrated Shell will automatically merge with > any other editions of Visual Studio installed on the same machine. > > This is the Visual Studio Shell (integrated mode) running Iron Python. > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eng.meligy at gmail.com Wed Jun 6 22:05:02 2007 From: eng.meligy at gmail.com (Mohamed A. Meligy) Date: Wed, 6 Jun 2007 23:05:02 +0300 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: References: Message-ID: <250b45080706061305s7cfc5221kd117091605aea5d4@mail.gmail.com> I knew earlier it's not possible to have the same thing with IronPython 2.0, for 1.1, that's already included as VS SDK sample. Any ideas ?? On 6/6/07, M. David Peterson wrote: > > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > Visual Studio Shell (integrated mode) > > > > Optimized for Programming Languages > > > > Applications built on the integrated Shell will automatically merge with > > any other editions of Visual Studio installed on the same machine. > > > > This is the Visual Studio Shell (integrated mode) running Iron Python. > > > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- Regards, Mohamed Ahmed Meligy Senior Software Engineer Silver Key (www.SilverKey.us) - Egypt Branch E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) Weblog: http://GeeksWithBlogs.NET/Mohamed Mobile: +20 10 603 3013 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Wed Jun 6 23:18:59 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 6 Jun 2007 14:18:59 -0700 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <250b45080706061305s7cfc5221kd117091605aea5d4@mail.gmail.com> References: <250b45080706061305s7cfc5221kd117091605aea5d4@mail.gmail.com> Message-ID: The ASP.NET Futures includes the VS integration for IP based on IronPython 2.0 http://www.microsoft.com/downloads/details.aspx?FamilyId=9323777E-FE78-430C-AD92-D5BE5B5EAD98&displaylang=en Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mohamed A. Meligy Sent: Wednesday, June 06, 2007 1:05 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython and Visual Studio Shell I knew earlier it's not possible to have the same thing with IronPython 2.0, for 1.1, that's already included as VS SDK sample. Any ideas ?? On 6/6/07, M. David Peterson > wrote: FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx Visual Studio Shell (integrated mode) Optimized for Programming Languages Applications built on the integrated Shell will automatically merge with any other editions of Visual Studio installed on the same machine. This is the Visual Studio Shell (integrated mode) running Iron Python. http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- Regards, Mohamed Ahmed Meligy Senior Software Engineer Silver Key ( www.SilverKey.us) - Egypt Branch E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) Weblog: http://GeeksWithBlogs.NET/Mohamed Mobile: +20 10 603 3013 -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at r-e-d.co.nz Thu Jun 7 00:47:19 2007 From: info at r-e-d.co.nz (Guy Robinson) Date: Thu, 07 Jun 2007 10:47:19 +1200 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: References: Message-ID: <46673977.3060806@r-e-d.co.nz> So it looks like this won't be available for express editions. What IDE options are there for IronPython? Guy M. David Peterson wrote: > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > Visual Studio Shell (integrated mode) > > Optimized for Programming Languages > > Applications built on the integrated Shell will automatically merge > with any other editions of Visual Studio installed on the same machine. > > This is the Visual Studio Shell (integrated mode) running Iron Python. > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Thu Jun 7 03:20:39 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 7 Jun 2007 10:20:39 +0900 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <46673977.3060806@r-e-d.co.nz> References: <46673977.3060806@r-e-d.co.nz> Message-ID: <5b0248170706061820u70fa0b11n99e96478e43fdca@mail.gmail.com> 2007/6/7, Guy Robinson : > So it looks like this won't be available for express editions. What IDE options > are there for IronPython? I use Vim. :-) -- Seo Sanghyeon From eng.meligy at gmail.com Thu Jun 7 07:47:05 2007 From: eng.meligy at gmail.com (Mohamed A. Meligy) Date: Thu, 7 Jun 2007 08:47:05 +0300 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: References: <250b45080706061305s7cfc5221kd117091605aea5d4@mail.gmail.com> Message-ID: <250b45080706062247t33756480y9ac6e572f9f6fc8b@mail.gmail.com> So, the main (and only) IP support for VS during the pre-release versions should be expected to come only as part of the ASP.NET Futures versions ? On 6/7/07, Martin Maly wrote: > > The ASP.NET Futures includes the VS integration for IP > based on IronPython 2.0 > > > > > http://www.microsoft.com/downloads/details.aspx?FamilyId=9323777E-FE78-430C-AD92-D5BE5B5EAD98&displaylang=en > > > > Martin > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Mohamed A. Meligy > *Sent:* Wednesday, June 06, 2007 1:05 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython and Visual Studio Shell > > > > I knew earlier it's not possible to have the same thing with IronPython > 2.0, for 1.1, that's already included as VS SDK sample. > > Any ideas ?? > > > > On 6/6/07, *M. David Peterson* wrote: > > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > Visual Studio Shell (integrated mode) > > Optimized for Programming Languages > > Applications built on the integrated Shell will automatically merge with > any other editions of Visual Studio installed on the same machine. > > This is the Visual Studio Shell (integrated mode) running Iron Python. > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > Regards, > > Mohamed Ahmed Meligy > Senior Software Engineer > Silver Key ( www.SilverKey.us ) - Egypt Branch > > E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) > Weblog: http://GeeksWithBlogs.NET/Mohamed > Mobile: +20 10 603 3013 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- Regards, Mohamed Ahmed Meligy Senior Software Engineer Silver Key (www.SilverKey.us) - Egypt Branch E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) Weblog: http://GeeksWithBlogs.NET/Mohamed Mobile: +20 10 603 3013 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Thu Jun 7 08:35:39 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 6 Jun 2007 23:35:39 -0700 Subject: [IronPython] __doc__ on None In-Reply-To: <4664339C.9040000@resolversystems.com> References: <4664339C.9040000@resolversystems.com> Message-ID: Thanks for yet another bug report, we now have it on codeplex as: http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10823 As Shri already said earlier, we are focusing most of our energy on the 2.0 development, but will address important blocking issues that are found in IronPython 1.1. We have moved all issues tracked on CodePlex over to target the 2.0 release, however if we did accidentally moved a serious blocking issue, please let us know so that we can track the important bugs that need to be fixed in the 1.1 release. Thanks! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, June 04, 2007 8:46 AM To: Discussion of IronPython Subject: [IronPython] __doc__ on None Hello all, More fun with None: CPython 2.4.4: >>> print None.__doc__ None IP 1.1: >>> print None.__doc__ T.__new__(S, ...) -> a new object with type S, a subtype of T This is again confusing our auto-documentation tool. :-) By the way - can any of 'the team' answer the question as to whether the 1.1 branch is still being developed? (Bugfixes being backported?) Thanks Michael Foord -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Thu Jun 7 08:50:16 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 6 Jun 2007 23:50:16 -0700 Subject: [IronPython] Sockets and Standard Library Modules in IronPython In-Reply-To: <466536C2.2040506@voidspace.org.uk> References: <466536C2.2040506@voidspace.org.uk> Message-ID: We are tracking the plea on codeplex: http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10825 Thanks! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman Sent: Tuesday, June 05, 2007 3:11 AM To: Discussion of IronPython Subject: [IronPython] Sockets and Standard Library Modules in IronPython Hello all, A plea to 'the team'. urllib and urllib2 are Python standard libraries modules that provide a high level interface to accessing internet resources. They are widely used. These modules are broken for the official IronPython distribution, but they work with FePy thanks to patches that Seo has applied. Seo says that the IronPython support for Python sockets has improved greatly in IronPython 1.1 - but unfortunately not to the point where these modules functions. This is a request for these issues to be addressed as soon as possible. :-) Many Thanks Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sh at defuze.org Thu Jun 7 08:53:25 2007 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 07 Jun 2007 07:53:25 +0100 Subject: [IronPython] __doc__ on None In-Reply-To: References: <4664339C.9040000@resolversystems.com> Message-ID: <4667AB65.10200@defuze.org> Martin Maly a ?crit : > Thanks for yet another bug report, we now have it on codeplex as: > > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10823 > > As Shri already said earlier, we are focusing most of our energy on the 2.0 development, but will address important blocking issues that are found in IronPython 1.1. We have moved all issues tracked on CodePlex over to target the 2.0 release, however if we did accidentally moved a serious blocking issue, please let us know so that we can track the important bugs that need to be fixed in the 1.1 release. > > Good to hear. I prefer that you guys focus on 2.0 too and backport to 1.1 once 2.0 is out in the field. It looks like 2.0 will bring some nice modifications that will extend the capacity of IP both with .NET and Python packages so I'm waiting for it :) - Sylvain > Thanks! > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, June 04, 2007 8:46 AM > To: Discussion of IronPython > Subject: [IronPython] __doc__ on None > > Hello all, > > More fun with None: > > CPython 2.4.4: > >>> print None.__doc__ > None > > IP 1.1: > >>> print None.__doc__ > T.__new__(S, ...) -> a new object with type S, a subtype of T > > This is again confusing our auto-documentation tool. :-) > > By the way - can any of 'the team' answer the question as to whether the > 1.1 branch is still being developed? (Bugfixes being backported?) > > Thanks > > Michael Foord > > -- > Michael Foord > Resolver Systems > michael.foord at resolversystems.com > > Office address: 17a Clerkenwell Road, London EC1M 5RD, UK > Registered address: 843 Finchley Road, London NW11 8NA, UK > > Resolver Systems Limited is registered in England and Wales as company number 5467329. > VAT No. GB 893 5643 79 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From fuzzyman at voidspace.org.uk Thu Jun 7 11:12:45 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 07 Jun 2007 10:12:45 +0100 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <5b0248170706061820u70fa0b11n99e96478e43fdca@mail.gmail.com> References: <46673977.3060806@r-e-d.co.nz> <5b0248170706061820u70fa0b11n99e96478e43fdca@mail.gmail.com> Message-ID: <4667CC0D.5050304@voidspace.org.uk> An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jun 8 00:31:19 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 07 Jun 2007 23:31:19 +0100 Subject: [IronPython] Multiple Engines and IronRuby Message-ID: <46688737.1080901@voidspace.org.uk> An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Fri Jun 8 09:52:41 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 8 Jun 2007 16:52:41 +0900 Subject: [IronPython] -m option is not implemented Message-ID: <5b0248170706080052mad1a17btc246aef2ab20f2cd@mail.gmail.com> $ python -h (...) -m mod : run library module as a script (terminates option list) This option is present since Python 2.4, and occasionally useful. One common usage is "python -m timeit". -- Seo Sanghyeon From xmlhacker at gmail.com Fri Jun 8 19:08:50 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 8 Jun 2007 11:08:50 -0600 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <5b0248170706061820u70fa0b11n99e96478e43fdca@mail.gmail.com> References: <46673977.3060806@r-e-d.co.nz> <5b0248170706061820u70fa0b11n99e96478e43fdca@mail.gmail.com> Message-ID: On 6/6/07, Sanghyeon Seo wrote: > > 2007/6/7, Guy Robinson : > > So it looks like this won't be available for express editions. What IDE > options > > are there for IronPython? > > I use Vim. :-) s/Vim/Emacs -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dfugate at microsoft.com Fri Jun 8 19:12:08 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Fri, 8 Jun 2007 10:12:08 -0700 Subject: [IronPython] -m option is not implemented In-Reply-To: <5b0248170706080052mad1a17btc246aef2ab20f2cd@mail.gmail.com> References: <5b0248170706080052mad1a17btc246aef2ab20f2cd@mail.gmail.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBABD53B@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks! Filed as CodePlex Work Item #10925 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10925). Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Friday, June 08, 2007 12:53 AM To: Discussion of IronPython Subject: [IronPython] -m option is not implemented $ python -h (...) -m mod : run library module as a script (terminates option list) This option is present since Python 2.4, and occasionally useful. One common usage is "python -m timeit". -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From xmlhacker at gmail.com Fri Jun 8 19:17:27 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 8 Jun 2007 11:17:27 -0600 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: References: <250b45080706061305s7cfc5221kd117091605aea5d4@mail.gmail.com> Message-ID: very nice! On 6/6/07, Martin Maly wrote: > > The ASP.NET Futures includes the VS integration for IP based on > IronPython 2.0 > > > > > http://www.microsoft.com/downloads/details.aspx?FamilyId=9323777E-FE78-430C-AD92-D5BE5B5EAD98&displaylang=en > > > > Martin > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Mohamed A. Meligy > *Sent:* Wednesday, June 06, 2007 1:05 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython and Visual Studio Shell > > > > I knew earlier it's not possible to have the same thing with IronPython > 2.0, for 1.1, that's already included as VS SDK sample. > > Any ideas ?? > > > > On 6/6/07, *M. David Peterson* wrote: > > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > Visual Studio Shell (integrated mode) > > Optimized for Programming Languages > > Applications built on the integrated Shell will automatically merge with > any other editions of Visual Studio installed on the same machine. > > This is the Visual Studio Shell (integrated mode) running Iron Python. > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > Regards, > > Mohamed Ahmed Meligy > Senior Software Engineer > Silver Key ( www.SilverKey.us) - Egypt Branch > > E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) > Weblog: http://GeeksWithBlogs.NET/Mohamed > Mobile: +20 10 603 3013 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Fri Jun 8 19:28:52 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Fri, 8 Jun 2007 11:28:52 -0600 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <46673977.3060806@r-e-d.co.nz> References: <46673977.3060806@r-e-d.co.nz> Message-ID: Is there a particular reason why it would _need_ to be available for the express editions? This is a free product that ships standalone from VS.NET, so there wouldn't be any need to have VS.NET installed. Given that there is a sample that showcases IronPython running inside of the VSShell, I would assume that someone, somewhere will take the ball and run with it, developing a complete stand-alone IronPython devtool. Of course, they may not, but in an of itself, the present capabilities of the IronPython VS Integration would still present a nice, free version of an IP dev tool. On 6/6/07, Guy Robinson wrote: > > So it looks like this won't be available for express editions. What IDE > options > are there for IronPython? > > Guy > > M. David Peterson wrote: > > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > > > Visual Studio Shell (integrated mode) > > > > Optimized for Programming Languages > > > > Applications built on the integrated Shell will automatically merge > > with any other editions of Visual Studio installed on the same > machine. > > > > This is the Visual Studio Shell (integrated mode) running Iron > Python. > > > > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > < > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > > > > > -- > > /M:D > > > > M. David Peterson > > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > > http://dev.aol.com/blog/3155 > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at r-e-d.co.nz Sat Jun 9 03:15:05 2007 From: info at r-e-d.co.nz (Guy Robinson) Date: Sat, 09 Jun 2007 13:15:05 +1200 Subject: [IronPython] IronPython and Visual Studio Shell Message-ID: <4669FF19.10105@r-e-d.co.nz> Hi David, For me this is why it would be useful. My target audience are not programmers by profession. Hence why Python in the first place, and no recommendation of VIM :-). As such an IDE particularly for the GUI construction is almost essential if they're going to use IP in my application. Given IP was a 'free' product as are the express versions of VS I thought they might move to integrate IP into VS Express with the next release. However if that isn't going to happen then sharpdevelop would seem to be the best bet. I have looked at what it would take to make an IronPython addin for Sharpdevelop but in all honesty I don't have the resources or the time to learn the sharpdevelop addin system at the moment. If it's definitely not going to be in VS express then maybe I'll just need to make some time soon ;-) VSShell might be an option in my case if there is another alternative for building the GUI (XAML?). Cheers, Guy M. David Peterson wrote: > Is there a particular reason why it would _need_ to be available for the > express editions? This is a free product that ships standalone from > VS.NET , so there wouldn't be any need to have VS.NET > installed. Given that there is a sample that showcases > IronPython running inside of the VSShell, I would assume that someone, > somewhere will take the ball and run with it, developing a complete > stand-alone IronPython devtool. Of course, they may not, but in an of > itself, the present capabilities of the IronPython VS Integration would > still present a nice, free version of an IP dev tool. > > On 6/6/07, *Guy Robinson* > > wrote: > > So it looks like this won't be available for express editions. What > IDE options > are there for IronPython? > > Guy > > M. David Peterson wrote: > > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx > > > > Visual Studio Shell (integrated mode) > > > > Optimized for Programming Languages > > > > Applications built on the integrated Shell will automatically > merge > > with any other editions of Visual Studio installed on the > same machine. > > > > This is the Visual Studio Shell (integrated mode) running > Iron Python. > > > > > http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg > > > > > > > > > > -- > > /M:D > > > > M. David Peterson > > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 > | > > http://dev.aol.com/blog/3155 > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 From fuzzyman at voidspace.org.uk Sat Jun 9 09:35:22 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 09 Jun 2007 08:35:22 +0100 Subject: [IronPython] IronPython and Visual Studio Shell In-Reply-To: <4669FF19.10105@r-e-d.co.nz> References: <4669FF19.10105@r-e-d.co.nz> Message-ID: <466A583A.1010905@voidspace.org.uk> Guy Robinson wrote: > [snip..] > > I have looked at what it would take to make an IronPython addin for > Sharpdevelop but in all honesty I don't have the resources or the time to learn > the sharpdevelop addin system at the moment. If it's definitely not going to be > in VS express then maybe I'll just need to make some time soon ;-) > > There is a SharpDevelop plugin called Python Binding. See http://ironpython-urls.blogspot.com/2007/06/python-binding-sharpdevelop-addin.html Unfortunately it only works for version 2 of SharpDevelop, not 2.1 - but 'updating' it is undoubtedly going to be a lot less work than starting from scratch. Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > VSShell might be an option in my case if there is another alternative for > building the GUI (XAML?). > > Cheers, > > Guy > > M. David Peterson wrote: > >> Is there a particular reason why it would _need_ to be available for the >> express editions? This is a free product that ships standalone from >> VS.NET , so there wouldn't be any need to have VS.NET >> installed. Given that there is a sample that showcases >> IronPython running inside of the VSShell, I would assume that someone, >> somewhere will take the ball and run with it, developing a complete >> stand-alone IronPython devtool. Of course, they may not, but in an of >> itself, the present capabilities of the IronPython VS Integration would >> still present a nice, free version of an IP dev tool. >> >> On 6/6/07, *Guy Robinson* > >> wrote: >> >> So it looks like this won't be available for express editions. What >> IDE options >> are there for IronPython? >> >> Guy >> >> M. David Peterson wrote: >> > FYI > via http://msdn2.microsoft.com/en-us/vstudio/bb510103.aspx >> > >> > Visual Studio Shell (integrated mode) >> > >> > Optimized for Programming Languages >> > >> > Applications built on the integrated Shell will automatically >> merge >> > with any other editions of Visual Studio installed on the >> same machine. >> > >> > This is the Visual Studio Shell (integrated mode) running >> Iron Python. >> > >> > >> http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg >> > >> > > >> > >> > >> > -- >> > /M:D >> > >> > M. David Peterson >> > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 >> | >> > http://dev.aol.com/blog/3155 >> > >> > >> > >> ------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > users mailing list >> > users at lists.ironpython.com >> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> >> -- >> /M:D >> >> M. David Peterson >> http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | >> http://dev.aol.com/blog/3155 >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From hao.yu at yeah.net Sun Jun 10 04:25:35 2007 From: hao.yu at yeah.net (hao.yu) Date: Sun, 10 Jun 2007 10:25:35 +0800 Subject: [IronPython] Floating-point number don't compare correctly Message-ID: <200706101025120624873@yeah.net> Test the following lines under IronPython 1.1: import System intVar = System.Int32.Parsse("400") floatVar = System.Single.Parse("400") doubleVar = System.Double.Parse("400") intVar>500, floatVar>500, doubleVar>500 => (False, True, False) It seemed that float number type compare incorrectly with int numbers. If I change the expression to floatVar>500.0 the result is False (as expected). Why this behaviour? From sanxiyn at gmail.com Sun Jun 10 04:32:39 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 10 Jun 2007 11:32:39 +0900 Subject: [IronPython] Floating-point number don't compare correctly In-Reply-To: <200706101025120624873@yeah.net> References: <200706101025120624873@yeah.net> Message-ID: <5b0248170706091932s7bb331easdbc57379bb110333@mail.gmail.com> 2007/6/10, hao.yu : > It seemed that float number type compare incorrectly with int numbers. > Why this behaviour? This is an IronPython bug. This bug is tracked as issue #5682. http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=5682 It has been reported last November and is still not fixed. You can vote for a bug to encourage IronPython team to fix it. -- Seo Sanghyeon From textdirected at gmail.com Sun Jun 10 13:40:28 2007 From: textdirected at gmail.com (HEMMI, Shigeru) Date: Sun, 10 Jun 2007 20:40:28 +0900 Subject: [IronPython] Implicit line joining error of PythonEngine Message-ID: Hello all, I am using IronPython 1.1 I encounterd an error in implicit line joining of PythonEngine. The source is lines = ['x = [1,2,3,', '4]'] from IronPython.Hosting import PythonEngine engine = PythonEngine() for line in lines: engine.Execute(line) Thanks. From Martin.Maly at microsoft.com Sun Jun 10 20:53:48 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sun, 10 Jun 2007 11:53:48 -0700 Subject: [IronPython] Implicit line joining error of PythonEngine In-Reply-To: References: Message-ID: The implicit line joining doesn't work across calls to Execute. The Execute expects a complete statement. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of HEMMI, Shigeru Sent: Sunday, June 10, 2007 4:40 AM To: Discussion of IronPython Subject: [IronPython] Implicit line joining error of PythonEngine Hello all, I am using IronPython 1.1 I encounterd an error in implicit line joining of PythonEngine. The source is lines = ['x = [1,2,3,', '4]'] from IronPython.Hosting import PythonEngine engine = PythonEngine() for line in lines: engine.Execute(line) Thanks. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From digitig at gmail.com Mon Jun 11 15:12:54 2007 From: digitig at gmail.com (Tim Rowe) Date: Mon, 11 Jun 2007 14:12:54 +0100 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition Message-ID: I can open IronPython.sln ok, but when I try to build it VS crashes ("Microsoft Visual Studio has encountered a problem and needs to close"). The error signature is: AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699 ModName: msenv.dll ModVer: 8.0.50727.42 ModStamp:4333e919 fDebug: 0 Offset: 001bb493 Now I'm stuck -- how do I get past that? -- Tim Rowe From dfugate at microsoft.com Mon Jun 11 18:13:48 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 11 Jun 2007 09:13:48 -0700 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition In-Reply-To: References: Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBABDA17@NA-EXMSG-C106.redmond.corp.microsoft.com> Does it still fail if you run "msbuild IronPython.sln" from a VS2005 or .NET SDK command prompt? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Rowe Sent: Monday, June 11, 2007 6:13 AM To: users at lists.ironpython.com Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition I can open IronPython.sln ok, but when I try to build it VS crashes ("Microsoft Visual Studio has encountered a problem and needs to close"). The error signature is: AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699 ModName: msenv.dll ModVer: 8.0.50727.42 ModStamp:4333e919 fDebug: 0 Offset: 001bb493 Now I'm stuck -- how do I get past that? -- Tim Rowe _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue Jun 12 01:04:29 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 12 Jun 2007 00:04:29 +0100 Subject: [IronPython] Reading Text files with open Message-ID: <466DD4FD.3060800@voidspace.org.uk> Hello all, If I create a file with the following code: open(r'c:\temp\test.txt', 'w').write('\xa33') And then read it in using the Python 'open', I get different results with Python and IronPython: CPython 2.4.4: >>> data = open(r'c:\temp\test.txt').read() >>> data '\xa33' >>> ord(data[0]) 163 IronPython 1.1: >>> data = open(r'c:\temp\test.txt').read() >>> data '?3' >>> ord(data[0]) 63 If I use the 'rb' flag with IronPython then the right thing happens, but this isn't binary data... Is there any way round this - I guess it is a consequence of .NET strings. Michael From jomes at microsoft.com Tue Jun 12 02:06:40 2007 From: jomes at microsoft.com (John Messerly) Date: Mon, 11 Jun 2007 17:06:40 -0700 Subject: [IronPython] Reading Text files with open In-Reply-To: <466DD4FD.3060800@voidspace.org.uk> References: <466DD4FD.3060800@voidspace.org.uk> Message-ID: <918705E903F4714CB713D89AB5F1857D6E615BAB38@NA-EXMSG-C116.redmond.corp.microsoft.com> Actually, it's a result of System.Text.ASCIIEncoding, which replaces bytes greater than 0x7f with a question mark. I filed this as CodePlex work item #10983 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10983). Thanks, John -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, June 11, 2007 4:04 PM To: Discussion of IronPython Subject: [IronPython] Reading Text files with open Hello all, If I create a file with the following code: open(r'c:\temp\test.txt', 'w').write('\xa33') And then read it in using the Python 'open', I get different results with Python and IronPython: CPython 2.4.4: >>> data = open(r'c:\temp\test.txt').read() >>> data '\xa33' >>> ord(data[0]) 163 IronPython 1.1: >>> data = open(r'c:\temp\test.txt').read() >>> data '?3' >>> ord(data[0]) 63 If I use the 'rb' flag with IronPython then the right thing happens, but this isn't binary data... Is there any way round this - I guess it is a consequence of .NET strings. Michael From gh.xiao at gmail.com Tue Jun 12 04:20:40 2007 From: gh.xiao at gmail.com (Guohui Xiao) Date: Tue, 12 Jun 2007 10:20:40 +0800 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition In-Reply-To: References: Message-ID: <236b92bd0706111920m7ed41597q738de12c447de9b3@mail.gmail.com> Try to reinstall VS 2005 2007/6/11, Tim Rowe : > > I can open IronPython.sln ok, but when I try to build it VS crashes > ("Microsoft Visual Studio has encountered a problem and needs to > close"). The error signature is: > AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699 > ModName: msenv.dll ModVer: 8.0.50727.42 ModStamp:4333e919 > fDebug: 0 Offset: 001bb493 > > Now I'm stuck -- how do I get past that? > -- > Tim Rowe > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Xiao Guohui Department of Information Science Peking University Beijing, 100871 CHINA -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue Jun 12 10:13:39 2007 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 12 Jun 2007 09:13:39 +0100 Subject: [IronPython] Reading Text files with open In-Reply-To: <918705E903F4714CB713D89AB5F1857D6E615BAB38@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <466DD4FD.3060800@voidspace.org.uk> <918705E903F4714CB713D89AB5F1857D6E615BAB38@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <466E55B3.5090507@voidspace.org.uk> John Messerly wrote: >Actually, it's a result of System.Text.ASCIIEncoding, which replaces bytes greater than 0x7f with a question mark. I filed this as CodePlex work item #10983 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10983). > > > Thanks. With CPython, the only difference between reading with 'r' and 'rb' is the handling of newlines. Michael http://www.voidspace.org.uk/ironpython/index.shtml >Thanks, > >John > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord >Sent: Monday, June 11, 2007 4:04 PM >To: Discussion of IronPython >Subject: [IronPython] Reading Text files with open > >Hello all, > >If I create a file with the following code: > >open(r'c:\temp\test.txt', 'w').write('\xa33') > >And then read it in using the Python 'open', I get different results >with Python and IronPython: > >CPython 2.4.4: > > >>> data = open(r'c:\temp\test.txt').read() > >>> data >'\xa33' > >>> ord(data[0]) >163 > >IronPython 1.1: > > >>> data = open(r'c:\temp\test.txt').read() > >>> data >'?3' > >>> ord(data[0]) >63 > >If I use the 'rb' flag with IronPython then the right thing happens, but >this isn't binary data... > >Is there any way round this - I guess it is a consequence of .NET strings. > >Michael >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From digitig at gmail.com Tue Jun 12 11:17:18 2007 From: digitig at gmail.com (Tim Rowe) Date: Tue, 12 Jun 2007 10:17:18 +0100 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition Message-ID: On 12/06/07, Dave Fugate wrote: > Does it still fail if you run "msbuild IronPython.sln" from a VS2005 or .NET SDK command prompt? Yes, it gives me the same VS error from the .NET SDK command prompt. The console gives me: Target SettingUpDevenv: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com /rt "Software\Microsoft\VisualStudio\8.0Exp" /setup C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets(228,5): error MSB6006: "devenv.com" exited with code 2. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Rowe > Sent: Monday, June 11, 2007 6:13 AM > To: users at lists.ironpython.com > Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition > > I can open IronPython.sln ok, but when I try to build it VS crashes > ("Microsoft Visual Studio has encountered a problem and needs to > close"). The error signature is: > AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699 > ModName: msenv.dll ModVer: 8.0.50727.42 ModStamp:4333e919 > fDebug: 0 Offset: 001bb493 > > Now I'm stuck -- how do I get past that? > -- > Tim Rowe -- Tim Rowe From thane at tkpcorp.com Tue Jun 12 16:42:37 2007 From: thane at tkpcorp.com (Thane Plummer) Date: Tue, 12 Jun 2007 10:42:37 -0400 Subject: [IronPython] -X:MTA fails in IP 2.0 Message-ID: <000f01c7acff$ed3a3000$6503a8c0@Dell9150> -------------------------------------- C:\Python\IronPython-2.0A1>ipy -X:MTA File -X:MTA does not exist. C:\Python\IronPython-2.0A1> -------------------------------------- This is unique to IPY 2.0, and is not seen in IPY 1.1 Also, -X:TabCompletion doesn't work in IPY 2.0 Thane Plummer TKP Corp. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007 6:39 AM -------------- next part -------------- An HTML attachment was scrubbed... URL: From thane at tkpcorp.com Tue Jun 12 16:43:53 2007 From: thane at tkpcorp.com (Thane Plummer) Date: Tue, 12 Jun 2007 10:43:53 -0400 Subject: [IronPython] Newline oddities Message-ID: <001401c7ad00$1963e1d0$6503a8c0@Dell9150> IPY.exe 1.1 and 2.0 both emit the newline sequence as: "\r\r\n" (hex 0x000D 0x000D 0x000A) Instead of the more standard sequence of: "\r\n" (hex 0x000D 0x000A) This behavior is not seen in -X:TabCompletion mode in IPY 1.1. I know that there are a lot of irregularities in representing the newline sequence, but this is a new one for me. Is this behavior intended? --Thane P.S. I've "fixed" the behavior so my IDE works nicely, otherwise it doesn't recognize the newline. Thane Plummer TKP Corp. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007 6:39 AM -------------- next part -------------- An HTML attachment was scrubbed... URL: From dfugate at microsoft.com Tue Jun 12 19:41:33 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 12 Jun 2007 10:41:33 -0700 Subject: [IronPython] -X:MTA fails in IP 2.0 In-Reply-To: <000f01c7acff$ed3a3000$6503a8c0@Dell9150> References: <000f01c7acff$ed3a3000$6503a8c0@Dell9150> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBABE01E@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks! Filed as CodePlex Work Item #11014 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11014). As for -X:TabCompletion, did you mean that it does not work for simple variable expansion (see http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=10928) or something else entirely? 11014 11014 From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Thane Plummer Sent: Tuesday, June 12, 2007 7:43 AM To: users at lists.ironpython.com Subject: [IronPython] -X:MTA fails in IP 2.0 -------------------------------------- C:\Python\IronPython-2.0A1>ipy -X:MTA File -X:MTA does not exist. C:\Python\IronPython-2.0A1> -------------------------------------- This is unique to IPY 2.0, and is not seen in IPY 1.1 Also, -X:TabCompletion doesn't work in IPY 2.0 Thane Plummer TKP Corp. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007 6:39 AM -------------- next part -------------- An HTML attachment was scrubbed... URL: From dfugate at microsoft.com Tue Jun 12 20:04:53 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 12 Jun 2007 11:04:53 -0700 Subject: [IronPython] Newline oddities In-Reply-To: <001401c7ad00$1963e1d0$6503a8c0@Dell9150> References: <001401c7ad00$1963e1d0$6503a8c0@Dell9150> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBABE04C@NA-EXMSG-C106.redmond.corp.microsoft.com> I think the correct behavior would be to use os.linesep which is "\r\n" as you state: IronPython console: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1366 Copyright (c) Microsoft Corporation. All rights reserved. >>> import os >>> os.linesep '\r\n' Filed as CodePlex Work Item #11016 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11016). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Thane Plummer Sent: Tuesday, June 12, 2007 7:44 AM To: users at lists.ironpython.com Subject: [IronPython] Newline oddities IPY.exe 1.1 and 2.0 both emit the newline sequence as: "\r\r\n" (hex 0x000D 0x000D 0x000A) Instead of the more standard sequence of: "\r\n" (hex 0x000D 0x000A) This behavior is not seen in -X:TabCompletion mode in IPY 1.1. I know that there are a lot of irregularities in representing the newline sequence, but this is a new one for me. Is this behavior intended? --Thane P.S. I've "fixed" the behavior so my IDE works nicely, otherwise it doesn't recognize the newline. Thane Plummer TKP Corp. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007 6:39 AM -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.arty at gmail.com Tue Jun 12 21:44:32 2007 From: mike.arty at gmail.com (mike arty) Date: Tue, 12 Jun 2007 15:44:32 -0400 Subject: [IronPython] WPF objects not available? Message-ID: <6d8b2ddf0706121244u7168ece3uaf24a64b480b9b24@mail.gmail.com> This question may be off-topic. I'm using IronPython to work w/Net. I recently installed the .Net 3.0 framework and the C# SDK, but the only object I have available in System.Windows is Forms. I'm not seeing any of the new WPF modules, .Media, etc... Any ideas? WPF is included w/the .Net 3.0 install from the MSDN web site right? Input greatly appreciated! -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.dahlbacka at gmail.com Tue Jun 12 22:01:45 2007 From: simon.dahlbacka at gmail.com (Simon Dahlbacka) Date: Tue, 12 Jun 2007 23:01:45 +0300 Subject: [IronPython] WPF objects not available? In-Reply-To: <6d8b2ddf0706121244u7168ece3uaf24a64b480b9b24@mail.gmail.com> References: <6d8b2ddf0706121244u7168ece3uaf24a64b480b9b24@mail.gmail.com> Message-ID: <57124720706121301ta01b15bwfe83445f38ff5da6@mail.gmail.com> If this is visual studio you're talking about, you'll probably need either Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP( http://www.microsoft.com/downloads/details.aspx?familyid=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en ) or beta 1 of Visual Studio 2008 ( http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx), the previous being a "slightly lighter" download, and will probably work good enough for your purposes. The reason for this being necessary is AFAIK that the .NET 3.0 runtime installer GAC:s the necessary assemblies, but doesn't put them anywhere else for referencing.. /S On 6/12/07, mike arty wrote: > > This question may be off-topic. I'm using IronPython to work w/Net. I > recently installed the .Net 3.0 framework and the C# SDK, but the only > object I have available in System.Windows is Forms. I'm not seeing any of > the new WPF modules, .Media, etc... > > Any ideas? WPF is included w/the .Net 3.0 install from the MSDN web site > right? > > Input greatly appreciated! > > -mike > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dfugate at microsoft.com Tue Jun 12 22:01:58 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 12 Jun 2007 13:01:58 -0700 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition In-Reply-To: References: Message-ID: <7346A825E148B049A9AD1D3ED46A2D9113DBABE144@NA-EXMSG-C106.redmond.corp.microsoft.com> Sounds like this might be related to http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1055922&SiteID=1 ... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Rowe Sent: Tuesday, June 12, 2007 2:17 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition On 12/06/07, Dave Fugate wrote: > Does it still fail if you run "msbuild IronPython.sln" from a VS2005 or .NET SDK command prompt? Yes, it gives me the same VS error from the .NET SDK command prompt. The console gives me: Target SettingUpDevenv: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com /rt "Software\Microsoft\VisualStudio\8.0Exp" /setup C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets(228,5): error MSB6006: "devenv.com" exited with code 2. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Rowe > Sent: Monday, June 11, 2007 6:13 AM > To: users at lists.ironpython.com > Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition > > I can open IronPython.sln ok, but when I try to build it VS crashes > ("Microsoft Visual Studio has encountered a problem and needs to > close"). The error signature is: > AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699 > ModName: msenv.dll ModVer: 8.0.50727.42 ModStamp:4333e919 > fDebug: 0 Offset: 001bb493 > > Now I'm stuck -- how do I get past that? > -- > Tim Rowe -- Tim Rowe _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Tue Jun 12 22:03:48 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 12 Jun 2007 13:03:48 -0700 Subject: [IronPython] WPF objects not available? In-Reply-To: <6d8b2ddf0706121244u7168ece3uaf24a64b480b9b24@mail.gmail.com> References: <6d8b2ddf0706121244u7168ece3uaf24a64b480b9b24@mail.gmail.com> Message-ID: You need to add references to the WPF assemblies from IronPython. There's a section on how to use WPF from IronPython in the tutorial which is part of the distribution. The code you need is roughly (emphasizing roughly, because "from module import *" is best avoided for possible name clashes) import clr clr.AddReferenceByPartialName("PresentationCore") clr.AddReferenceByPartialName("PresentationFramework") clr.AddReferenceByPartialName("WindowsBase") clr.AddReferenceByPartialName("IronPython") clr.AddReferenceByPartialName("Microsoft.Scripting") from math import * from System import * from System.Windows import * from System.Windows.Media import * from System.Windows.Media.Animation import * from System.Windows.Controls import * from System.Windows.Shapes import * Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of mike arty Sent: Tuesday, June 12, 2007 12:45 PM To: users at lists.ironpython.com Subject: [IronPython] WPF objects not available? This question may be off-topic. I'm using IronPython to work w/Net. I recently installed the .Net 3.0 framework and the C# SDK, but the only object I have available in System.Windows is Forms. I'm not seeing any of the new WPF modules, .Media, etc... Any ideas? WPF is included w/the .Net 3.0 install from the MSDN web site right? Input greatly appreciated! -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From iain at onesquared.net Wed Jun 13 06:17:43 2007 From: iain at onesquared.net (Iain) Date: Wed, 13 Jun 2007 16:17:43 +1200 Subject: [IronPython] Command line Message-ID: <466F6FE7.7010607@onesquared.net> If I associate ipy.exe with *.py files then run the IronPython files directory I am not seeing any command line argument that I try to pass in to the script. I have a file called cmdline_test.py with the following two lines, import System print System.Environment.CommandLine If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I will get "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test If I run cmdline_test.py test I then get "C:\Program Files\IronPython\ipy.exe" "C:\Scripts\cmdline_test.py" Is this the expected behavior? Thanks Iain. From iain at onesquared.net Wed Jun 13 06:57:09 2007 From: iain at onesquared.net (Iain) Date: Wed, 13 Jun 2007 16:57:09 +1200 Subject: [IronPython] Command line In-Reply-To: <466F6FE7.7010607@onesquared.net> References: <466F6FE7.7010607@onesquared.net> Message-ID: <466F7925.2010306@onesquared.net> Looks like I've worked it out for myself. It looks like that is the behavior you will get if you use the 'Always open with this applications' option when you use 'Open With..' I fixed it by undoing that change and changing what was run for all Python.File types. Iain. Iain wrote: > If I associate ipy.exe with *.py files then run the IronPython files > directory I am not seeing any command line argument that I try to pass > in to the script. > > I have a file called cmdline_test.py with the following two lines, > import System > print System.Environment.CommandLine > > If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I > will get > "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test > > If I run cmdline_test.py test I then get > "C:\Program Files\IronPython\ipy.exe" "C:\Scripts\cmdline_test.py" > > Is this the expected behavior? > > Thanks > > Iain. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Martin.Maly at microsoft.com Wed Jun 13 06:58:01 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 12 Jun 2007 21:58:01 -0700 Subject: [IronPython] Command line In-Reply-To: <466F6FE7.7010607@onesquared.net> References: <466F6FE7.7010607@onesquared.net> Message-ID: That seems correct. If I read your message correctly, when you run the .py file directly and rely on the file association, the python file name will get passed to the ipy.exe as full path. It is consistent with what I am seeing with simple test using notepad: If, from command line I start "x.txt", notepad will launch with the command line: "C:\WINDOWS\system32\NOTEPAD.EXE" D:\Dev\Gen\bin\Debug\x.txt Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain Sent: Tuesday, June 12, 2007 9:18 PM To: Discussion of IronPython Subject: [IronPython] Command line If I associate ipy.exe with *.py files then run the IronPython files directory I am not seeing any command line argument that I try to pass in to the script. I have a file called cmdline_test.py with the following two lines, import System print System.Environment.CommandLine If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I will get "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test If I run cmdline_test.py test I then get "C:\Program Files\IronPython\ipy.exe" "C:\Scripts\cmdline_test.py" Is this the expected behavior? Thanks Iain. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From iain at onesquared.net Wed Jun 13 07:18:17 2007 From: iain at onesquared.net (Iain) Date: Wed, 13 Jun 2007 17:18:17 +1200 Subject: [IronPython] Command line In-Reply-To: References: <466F6FE7.7010607@onesquared.net> Message-ID: <466F7E19.2020805@onesquared.net> What I didn't make clear was that the extra option (in this case the word test) was missing when using the file association. Iain. Martin Maly wrote: > That seems correct. If I read your message correctly, when you run the .py file directly and rely on the file association, the python file name will get passed to the ipy.exe as full path. It is consistent with what I am seeing with simple test using notepad: > > If, from command line I start "x.txt", notepad will launch with the command line: > > "C:\WINDOWS\system32\NOTEPAD.EXE" D:\Dev\Gen\bin\Debug\x.txt > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain > Sent: Tuesday, June 12, 2007 9:18 PM > To: Discussion of IronPython > Subject: [IronPython] Command line > > If I associate ipy.exe with *.py files then run the IronPython files > directory I am not seeing any command line argument that I try to pass > in to the script. > > I have a file called cmdline_test.py with the following two lines, > import System > print System.Environment.CommandLine > > If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I > will get > "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test > > If I run cmdline_test.py test I then get > "C:\Program Files\IronPython\ipy.exe" "C:\Scripts\cmdline_test.py" > > Is this the expected behavior? > > Thanks > > Iain. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jomes at microsoft.com Wed Jun 13 07:21:10 2007 From: jomes at microsoft.com (John Messerly) Date: Tue, 12 Jun 2007 22:21:10 -0700 Subject: [IronPython] Command line In-Reply-To: <466F7E19.2020805@onesquared.net> References: <466F6FE7.7010607@onesquared.net> <466F7E19.2020805@onesquared.net> Message-ID: <918705E903F4714CB713D89AB5F1857D6E615BB087@NA-EXMSG-C116.redmond.corp.microsoft.com> The reason arguments aren't getting passed is because file associations by default only pass the file name, not any additional arguments. You can see the registry entry for the file association by running the following IPy code: # Reads the registry key containing the command to run for .py files from Microsoft.Win32 import Registry openkey = Registry.ClassesRoot.OpenSubKey regkey = openkey(openkey('.py').GetValue('') + r'\shell\open\command') print regkey.GetValue('') which will print something like: "C:\path\to\ipy.exe" "%1" To pass more arguments, you'd have to add "%*" to that registry entry. In Windows XP I think you can do it from Windows Explorer, Tools | Options | File Associations, find .py association and edit it. In Windows Vista I don't know how to fix it besides manually modifying the registry entry, e.g.: # Warning: modifies the registry, don't run unless you know what you're doing from Microsoft.Win32 import Registry openkey = Registry.ClassesRoot.OpenSubKey regkey = openkey(openkey('.py').GetValue('') + r'\shell\open\command', True) regkey.SetValue('', regkey.GetValue('') + ' %*') John -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain Sent: Tuesday, June 12, 2007 10:18 PM To: Discussion of IronPython Subject: Re: [IronPython] Command line What I didn't make clear was that the extra option (in this case the word test) was missing when using the file association. Iain. Martin Maly wrote: > That seems correct. If I read your message correctly, when you run the .py file directly and rely on the file association, the python file name will get passed to the ipy.exe as full path. It is consistent with what I am seeing with simple test using notepad: > > If, from command line I start "x.txt", notepad will launch with the command line: > > "C:\WINDOWS\system32\NOTEPAD.EXE" D:\Dev\Gen\bin\Debug\x.txt > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain > Sent: Tuesday, June 12, 2007 9:18 PM > To: Discussion of IronPython > Subject: [IronPython] Command line > > If I associate ipy.exe with *.py files then run the IronPython files > directory I am not seeing any command line argument that I try to pass > in to the script. > > I have a file called cmdline_test.py with the following two lines, > import System > print System.Environment.CommandLine > > If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I > will get > "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test > > If I run cmdline_test.py test I then get > "C:\Program Files\IronPython\ipy.exe" "C:\Scripts\cmdline_test.py" > > Is this the expected behavior? > > Thanks > > Iain. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From graham.bloice at trihedral.com Wed Jun 13 09:45:10 2007 From: graham.bloice at trihedral.com (Graham Bloice) Date: Wed, 13 Jun 2007 08:45:10 +0100 Subject: [IronPython] Command line In-Reply-To: <918705E903F4714CB713D89AB5F1857D6E615BB087@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <466F6FE7.7010607@onesquared.net> <466F7E19.2020805@onesquared.net> <918705E903F4714CB713D89AB5F1857D6E615BB087@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <466FA086.5050301@trihedral.com> John Messerly wrote: > The reason arguments aren't getting passed is because file associations by default only pass the file name, not any additional arguments. You can see the registry entry for the file association by running the following IPy code: > > # Reads the registry key containing the command to run for .py files > from Microsoft.Win32 import Registry > openkey = Registry.ClassesRoot.OpenSubKey > regkey = openkey(openkey('.py').GetValue('') + r'\shell\open\command') > print regkey.GetValue('') > > which will print something like: "C:\path\to\ipy.exe" "%1" > > To pass more arguments, you'd have to add "%*" to that registry entry. In Windows XP I think you can do it from Windows Explorer, Tools | Options | File Associations, find .py association and edit it. In Windows Vista I don't know how to fix it besides manually modifying the registry entry, e.g.: > > # Warning: modifies the registry, don't run unless you know what you're doing > from Microsoft.Win32 import Registry > openkey = Registry.ClassesRoot.OpenSubKey > regkey = openkey(openkey('.py').GetValue('') + r'\shell\open\command', True) > regkey.SetValue('', regkey.GetValue('') + ' %*') > you can also use "assoc" and "ftype" from a command prompt. "assoc .py" will tell you what filetype is associated with the .py extension, and "filetype yourfiletype" will show you the open command for that file type. As John states above to get extra parms the file type should end with "%*" -- Regards, Graham Bloice From ariel at lagash.com Wed Jun 13 20:48:57 2007 From: ariel at lagash.com (Ariel M. Neisen) Date: Wed, 13 Jun 2007 15:48:57 -0300 Subject: [IronPython] Using IronPython in Silverlight Message-ID: <34BE1C449D5DA345B522E7F044F929EC580713@turing.LagashSystems.local> Hi, I'm stating to program in Silverlight and I wanted to test the IronPhyton programmability feature. Nevertheless, I cannot find any good documentation/examples on that. Does anyone know where I can find it? Thanks in advance, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rdawson at exchange.microsoft.com Wed Jun 13 20:52:14 2007 From: rdawson at exchange.microsoft.com (Ryan Dawson) Date: Wed, 13 Jun 2007 11:52:14 -0700 Subject: [IronPython] Using IronPython in Silverlight In-Reply-To: <34BE1C449D5DA345B522E7F044F929EC580713@turing.LagashSystems.local> References: <34BE1C449D5DA345B522E7F044F929EC580713@turing.LagashSystems.local> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E80137CB41D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> There are several samples posted here: http://www.codeplex.com/dynamicsilverlight Both in IronPython and managed JS. Hope that helps... -Ryan From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ariel M. Neisen Sent: Wednesday, June 13, 2007 11:49 AM To: users at lists.ironpython.com Subject: [IronPython] Using IronPython in Silverlight Hi, I'm stating to program in Silverlight and I wanted to test the IronPhyton programmability feature. Nevertheless, I cannot find any good documentation/examples on that. Does anyone know where I can find it? Thanks in advance, Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fireonyoursleeve at hotmail.com Wed Jun 13 22:38:44 2007 From: fireonyoursleeve at hotmail.com (Aaron Leiby) Date: Wed, 13 Jun 2007 13:38:44 -0700 Subject: [IronPython] Using IronPython in Silverlight References: <34BE1C449D5DA345B522E7F044F929EC580713@turing.LagashSystems.local> <50B69702CA6E6D4E849D30CD4989AB8E80137CB41D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: I posted a simple example a while back here: http://aleiby.blogspot.com/2007/05/silverlight.html I never wrote up any documentation, but the example is pretty self explanatory. There are links to the python and xaml there. The html is here: http://seattle.servegame.org/BouncingBall.html Still haven't found a great development environment yet, though. It still seems easier to mock stuff up in C#, then port it to IP (which seems pretty backwards and defeats the point). Aaron ----- Original Message ----- From: Ryan Dawson To: Discussion of IronPython Sent: Wednesday, June 13, 2007 11:52 AM Subject: Re: [IronPython] Using IronPython in Silverlight There are several samples posted here: http://www.codeplex.com/dynamicsilverlight Both in IronPython and managed JS. Hope that helps. -Ryan From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ariel M. Neisen Sent: Wednesday, June 13, 2007 11:49 AM To: users at lists.ironpython.com Subject: [IronPython] Using IronPython in Silverlight Hi, I'm stating to program in Silverlight and I wanted to test the IronPhyton programmability feature. Nevertheless, I cannot find any good documentation/examples on that. Does anyone know where I can find it? Thanks in advance, Ariel ------------------------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From digitig at gmail.com Thu Jun 14 00:08:14 2007 From: digitig at gmail.com (Tim Rowe) Date: Wed, 13 Jun 2007 23:08:14 +0100 Subject: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition Message-ID: Dave Fugate said: > Sounds like this might be related to http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1055922&SiteID=1 ... Yes, it does. Unfortunately I can't see an answer there and in my case the bit that fails /is/ important because I end up without IronPython integrated. But it looks as if it's a VS problem, not an IronPython problem (SP1 standard edition no longer extensible?) so I need to find somewhere else to ask about it. Thanks, and [sigh]. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Rowe > Sent: Tuesday, June 12, 2007 2:17 AM > To: users at lists.ironpython.com > Subject: Re: [IronPython] Unable to integrate IronPython 1.1 with VS2005 standard edition > > On 12/06/07, Dave Fugate > wrote: > > > Does it still fail if you run "msbuild IronPython.sln" from a VS2005 or .NET SDK command prompt? > > Yes, it gives me the same VS error from the .NET SDK command prompt. > The console gives me: > Target SettingUpDevenv: > C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com > /rt "Software\Microsoft\VisualStudio\8.0Exp" /setup > C:\Program Files\Visual Studio 2005 > SDK\2007.02\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets(228,5): > error MSB6006: "devenv.com" exited with code 2. -- Tim Rowe From iain at onesquared.net Thu Jun 14 12:35:11 2007 From: iain at onesquared.net (Iain) Date: Thu, 14 Jun 2007 22:35:11 +1200 Subject: [IronPython] Adding user to local group Message-ID: <467119DF.2060000@onesquared.net> I am wanting to add a local user to a local group and I have been unable to find any examples of this. There is no shortage of examples for Active Directory but nothing relating to local groups. From what I can work out the code should be something like group = System.DirectoryServices.DirectoryEntry("WinNT://" + System.Environment.MachineName + "/testgroup") group.Properties["member"].Add("testuser") This fails with "EnvironmentError: The directory property cannot be found in the cache." the first time then "EnvironmentError: Exception from HRESULT: 0x8000500F" For AD groups the code is, group = System.DirectoryServices.DirectoryEntry("WinNT://" + System.Environment.MachineName + "/testgroup") user = System.DirectoryServices.DirectoryEntry("WinNT://" + System.Environment.MachineName + "/testuser") group.Properties["member"].Add(user.Properties["distinguishedName"].Value) But with local users there is no distinguishedName property. Any ideas? Iain. From Eric.Wyler at bentley.com Thu Jun 14 18:09:41 2007 From: Eric.Wyler at bentley.com (Eric.Wyler at bentley.com) Date: Thu, 14 Jun 2007 12:09:41 -0400 Subject: [IronPython] Valid regex under CPython won't compile under IronPython Message-ID: #test.py import re # The below line fails under IronPython 1.1 (but works under Cpython) regex = re.compile( r"^(?PNMAKE[A-Za-z0-9]*)'\"?(?P[\\A-Za-z0-9/:_\.\+]+)" ) if regex.search( r"NMAKE0119'adirectory\afile.txt" ): print 'good' else: print 'bad' ---------------------------------------------------------------------- The following error is emitted: re.error: parsing "^(?NMAKE[A-Za-z0-9 \t:]*)'\"?(?[\A-Za-z0-9/:_\.\+]+)" - Unrecognized escape sequence \A. There was a previous bug report about this at http://lists.ironpython.com/pipermail/users-ironpython.com/2006-Septembe r/003382.html which was fixed, but it doesn't seem to work in this more complicated case. If the double slashes are moved to the end of the character class, it works. Interestingly, it also works if you remove the \"?. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From dennis at multiprobe.com Fri Jun 15 00:00:23 2007 From: dennis at multiprobe.com (Dennis Drew) Date: Thu, 14 Jun 2007 15:00:23 -0700 Subject: [IronPython] Hello world? Message-ID: <00d601c7aecf$681d4340$3857c9c0$@com> We have been using IP 1.1 and just tried 2.x. We ran into a bunch of changes and are kindof clueless about were to find a guide to fix things. Like: using IronPython.Runtime.Exceptions; using IronPython.Runtime.Operations; doesn't work and we have no idea how to fix. Is there ad step by step list of the changes and reasons and what to do kind of thing anywhere? Thanks, Dennis A. Drew 805.560.0404 Ext. 105 dennis at multiprobe.com Director of Software Engineering Multiprobe Corporation 819 Reddick Street Santa Barbara, CA 93103 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Fri Jun 15 00:05:58 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 14 Jun 2007 15:05:58 -0700 Subject: [IronPython] Hello world? In-Reply-To: <00d601c7aecf$681d4340$3857c9c0$@com> References: <00d601c7aecf$681d4340$3857c9c0$@com> Message-ID: I think the best available resource is in the documentation which is part of the 2.0 Alpha release. Right off the root of the documentation there is a big Hosting article which provides very good overview and may answer most of your questions. http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=438 Hope this helps Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dennis Drew Sent: Thursday, June 14, 2007 3:00 PM To: users at lists.ironpython.com Cc: 'Kurt Kiefer' Subject: [IronPython] Hello world? We have been using IP 1.1 and just tried 2.x. We ran into a bunch of changes and are kindof clueless about were to find a guide to fix things. Like: using IronPython.Runtime.Exceptions; using IronPython.Runtime.Operations; doesn't work and we have no idea how to fix. Is there ad step by step list of the changes and reasons and what to do kind of thing anywhere? Thanks, Dennis A. Drew 805.560.0404 Ext. 105 dennis at multiprobe.com Director of Software Engineering Multiprobe Corporation 819 Reddick Street Santa Barbara, CA 93103 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Fri Jun 15 05:57:32 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 15 Jun 2007 12:57:32 +0900 Subject: [IronPython] No recent check-ins? Message-ID: <5b0248170706142057y1bd2b57am4facb56febf80642@mail.gmail.com> It has been a six week since the release of IronPython 2.0 Alpha 1, and there have been exactly zero new check-ins available on CodePlex. Sorry to say this, but WTF? -- Seo Sanghyeon From jeferslineage at gmail.com Fri Jun 15 08:17:55 2007 From: jeferslineage at gmail.com (jeferslineage at gmail.com) Date: Fri, 15 Jun 2007 06:17:55 -0000 Subject: [IronPython] about auto type cast Message-ID: <1181888275.065684.92660@e9g2000prf.googlegroups.com> In my project,i use DataObject.Net(one ORM Library) to access database. My operater steps: 1.Deploy a .net remoting server 2.At frontend,i use ipy connect to server,just create a Domain object. 3.Create a DataObject Session Object 4.run command:obj=session[19],type(obj) return DataObjects.Net.DataObject, session[19] return a Category Class(a subclass of DataObject),in C#,i can use Category obj=(Category)session[19],but there kinda be no way in IP. 5.run command:Category.Name.GetValue(obj) ,type(obj) return DePetShop.Model.Category Why the type changed after 5 step? From ariel at lagash.com Fri Jun 15 14:22:15 2007 From: ariel at lagash.com (Ariel M. Neisen) Date: Fri, 15 Jun 2007 09:22:15 -0300 Subject: [IronPython] Execution error using IronPython in Silverlight Message-ID: <34BE1C449D5DA345B522E7F044F929EC5807BF@turing.LagashSystems.local> Hi, I'm trying to run the example shown in http://silverlight.net/QuickStarts/Other/ProgramDlr.aspx, and I'm getting the following execution error: Silverlight error message ErrorCode: 2267 ErrorType: ParserError Message: AG_E_PARSER_INVALID_XCODE_TAG File: Page.xaml Line: 10 Position: 56 The line 10 contains: Does anyone know how I can fix it? Thanks Ariel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rdawson at exchange.microsoft.com Fri Jun 15 17:42:44 2007 From: rdawson at exchange.microsoft.com (Ryan Dawson) Date: Fri, 15 Jun 2007 08:42:44 -0700 Subject: [IronPython] No recent check-ins? In-Reply-To: <5b0248170706142057y1bd2b57am4facb56febf80642@mail.gmail.com> References: <5b0248170706142057y1bd2b57am4facb56febf80642@mail.gmail.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E838EB73F79@DF-GRTDANE-MSG.exchange.corp.microsoft.com> My apologies Seo. As you probably are already aware, internally we use a different repository for development. And we had been pushing source changes automatically to codeplex via a script I wrote. When we moved to 2.0 and the DLR, a number of internal mappings radically changed and broke those scripts. I haven't had time to repair them. I'll push the current source later today and try to fix the automation in the next day or two. -Ryan ________________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo [sanxiyn at gmail.com] Sent: Thursday, June 14, 2007 8:57 PM To: Discussion of IronPython Subject: [IronPython] No recent check-ins? It has been a six week since the release of IronPython 2.0 Alpha 1, and there have been exactly zero new check-ins available on CodePlex. Sorry to say this, but WTF? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Fri Jun 15 17:58:44 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 15 Jun 2007 08:58:44 -0700 Subject: [IronPython] Valid regex under CPython won't compile under IronPython In-Reply-To: References: Message-ID: Thanks for the bug report, Eric, I've filed another bug on CodePlex to track this more complicated issue. http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11136 Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Eric.Wyler at bentley.com Sent: Thursday, June 14, 2007 9:10 AM To: users at lists.ironpython.com Subject: [IronPython] Valid regex under CPython won't compile under IronPython #test.py import re # The below line fails under IronPython 1.1 (but works under Cpython) regex = re.compile( r"^(?PNMAKE[A-Za-z0-9]*)'\"?(?P[\\A-Za-z0-9/:_\.\+]+)" ) if regex.search( r"NMAKE0119'adirectory\afile.txt" ): print 'good' else: print 'bad' ---------------------------------------------------------------------- The following error is emitted: re.error: parsing "^(?NMAKE[A-Za-z0-9 \t:]*)'\"?(?[\A-Za-z0-9/:_\.\+]+)" - Unrecognized escape sequence \A. There was a previous bug report about this at http://lists.ironpython.com/pipermail/users-ironpython.com/2006-September/003382.html which was fixed, but it doesn't seem to work in this more complicated case. If the double slashes are moved to the end of the character class, it works. Interestingly, it also works if you remove the \"?. Thanks, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Jun 17 17:50:27 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 18 Jun 2007 00:50:27 +0900 Subject: [IronPython] NAnt build file for IronPython Message-ID: <5b0248170706170850v1e498495mb9c846d456d011f7@mail.gmail.com> As some of you may know, IronPython team has an internal repository for development, and this repository is pushed to CodePlex with help of the script. When DLR-based IronPython 2.0 Alpha 1 came out, this script stopped working and no new changes appeared on CodePlex. Thanks to Ryan Dawson, this problem seems to be fixed now. (Kudos for prompt action!) One of the big change is the removal of Microsoft.Scripting.Vestigial.dll, as expected. This is a good thing, but it also means I need to modify my Makefile. Makefile for IronPython 2.0 is already annoying because of hacks I had to put there to handle resource files compilation. So I decided to investigate the alternative. NAnt is a free build tool for .NET which works with Microsoft .NET Framework as weel as with Mono. I'm not a big fan of XML, but it does handle resource files compilation out of the box. I also think NAnt is ridiculously overpowered for the task at hand, but so is GNU Make... I started reading User Manual and it turned out to be pretty simple. Here you see NAnt build file for IronPython 2.0 Alpha 1: http://fepy.svn.sourceforge.net/viewvc/fepy?view=rev&revision=493 And here is NAnt build file for the latest source from CodePlex. Note the text changed, which clearly shows what was removed. It isn't too clear with Makefile. http://fepy.svn.sourceforge.net/viewvc/fepy?view=rev&revision=495 I want to stop maintaining Makefile and switch to NAnt. If you don't want that please speak up. To IronPython team: would it be possible to have NAnt build support in the release from Microsoft? Persumably this would help projects already using NAnt and considering using IronPython. -- Seo Sanghyeon From Mahesh.Prakriya at microsoft.com Mon Jun 18 07:39:15 2007 From: Mahesh.Prakriya at microsoft.com (Mahesh Prakriya) Date: Sun, 17 Jun 2007 22:39:15 -0700 Subject: [IronPython] Pointers for some of the TechEd demos In-Reply-To: <7857D979C1E90441822DDD13520B06220791D311C4@NA-EXMSG-C112.redmond.corp.microsoft.com> References: <7857D979C1E90441822DDD13520B06220791D311C4@NA-EXMSG-C112.redmond.corp.microsoft.com> Message-ID: <8DD6D7B47848B24F972C23F274C6E568091F972878@NA-EXMSG-C112.redmond.corp.microsoft.com> At TechEd, I said we'll make the demos from our talks available on our blog. Here they are: http://blogs.msdn.com/ironpython/archive/2007/06/17/pointers-for-some-of-the-teched-demos.aspx The videos are also supposed to be available in few more weeks and I'll post em then. Thanks, Mahesh From: Mahesh Prakriya Sent: Friday, May 25, 2007 5:00 PM To: users at lists.ironpython.com Subject: Our talks at Teched 2007 (June 4-8th) in Orlando Are posted at: http://blogs.msdn.com/ironpython/archive/2007/05/25/our-talks-at-teched-2007-june-4-8th-in-orlando.aspx Check them out. Hope you can join us there! Mahesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.hoersten at gmail.com Mon Jun 18 22:14:58 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Mon, 18 Jun 2007 15:14:58 -0500 Subject: [IronPython] WMI in .NET? Message-ID: <812fec5a0706181314o538c1414xd8bf197878b2d3ff@mail.gmail.com> I'm trying to get WMI information in an IronPython script (specifically the computer model name) but I haven't been able to figure out how to do this. I've tried using pywin32 with no luck (with complaints that the win32api module in win32com does not exist). Is there a better .NET way to go about getting WMI information? Thanks, -- Luke Hoersten http://lukehoersten.com/ http://openradix.org/ From simon.dahlbacka at gmail.com Mon Jun 18 22:20:51 2007 From: simon.dahlbacka at gmail.com (Simon Dahlbacka) Date: Mon, 18 Jun 2007 23:20:51 +0300 Subject: [IronPython] WMI in .NET? In-Reply-To: <812fec5a0706181314o538c1414xd8bf197878b2d3ff@mail.gmail.com> References: <812fec5a0706181314o538c1414xd8bf197878b2d3ff@mail.gmail.com> Message-ID: <57124720706181320i333de497n6882652bfda5859a@mail.gmail.com> > I've tried using pywin32 with no luck (with complaints that the > win32api module in win32com does not exist). that would be expected as pywin et al consists of native code that IronPython doesn't support. Is there a better .NET way to go about getting WMI information? yes, look at the System.Management namespace and/or use mgmtclassgen.exe to generate strongly typed (c#) proxies for the wmi classes you need. ( Mgmtclassgen.exe resides in the .NET SDK) Google knows the fine details. regards, Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.hoersten at gmail.com Mon Jun 18 22:24:43 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Mon, 18 Jun 2007 15:24:43 -0500 Subject: [IronPython] WMI in .NET? In-Reply-To: <57124720706181320i333de497n6882652bfda5859a@mail.gmail.com> References: <812fec5a0706181314o538c1414xd8bf197878b2d3ff@mail.gmail.com> <57124720706181320i333de497n6882652bfda5859a@mail.gmail.com> Message-ID: <812fec5a0706181324k4136bb39jaeba8b7dfb2fbf5f@mail.gmail.com> Excellent, thanks! I figured pywin wouldn't work for the reason you mentioned but I tried including it anyway for lack of knowing about strongly typed proxies. I don't know anything about that but this is a whole new search term/new leaf overturned for me. Thanks for your help! -Luke On 6/18/07, Simon Dahlbacka wrote: > > > > I've tried using pywin32 with no luck (with complaints that the > > win32api module in win32com does not exist). > > that would be expected as pywin et al consists of native code that > IronPython doesn't support. > > > Is there a better .NET way to go about getting WMI information? > > yes, look at the System.Management namespace and/or use mgmtclassgen.exe to > generate strongly typed (c#) proxies for the wmi classes you need. > (Mgmtclassgen.exe resides in the .NET SDK) > Google knows the fine details. > > regards, > > Simon > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- Luke Hoersten http://lukehoersten.com/ http://openradix.org/ From Mahesh.Prakriya at microsoft.com Tue Jun 19 01:11:45 2007 From: Mahesh.Prakriya at microsoft.com (Mahesh Prakriya) Date: Mon, 18 Jun 2007 16:11:45 -0700 Subject: [IronPython] Videos of the talks/demos from Teched2007 in Orlando In-Reply-To: <7857D979C1E90441822DDD13520B062203631E549C@NA-EXMSG-C112.redmond.corp.microsoft.com> References: <7857D979C1E90441822DDD13520B06220791D311C4@NA-EXMSG-C112.redmond.corp.microsoft.com> <7857D979C1E90441822DDD13520B062203631E549C@NA-EXMSG-C112.redmond.corp.microsoft.com> Message-ID: <8DD6D7B47848B24F972C23F274C6E568091F9FFC9C@NA-EXMSG-C112.redmond.corp.microsoft.com> Here they are: 1. Dev315 - IronPython and Dynamic Languages on .NET a. mms://techedmsftwm.fplive.net/techedmsft/2007/DEV315.wmv 2. Web324 - Dynamic Languages on the Web a. mms://techedmsftwm.fplive.net/techedmsft/2007/WEB324.wmv thanks, Mahesh From: Mahesh Prakriya Sent: Sunday, June 17, 2007 10:39 PM To: 'users at lists.ironpython.com' Subject: Pointers for some of the TechEd demos At TechEd, I said we'll make the demos from our talks available on our blog. Here they are: http://blogs.msdn.com/ironpython/archive/2007/06/17/pointers-for-some-of-the-teched-demos.aspx The videos are also supposed to be available in few more weeks and I'll post em then. Thanks, Mahesh From: Mahesh Prakriya Sent: Friday, May 25, 2007 5:00 PM To: users at lists.ironpython.com Subject: Our talks at Teched 2007 (June 4-8th) in Orlando Are posted at: http://blogs.msdn.com/ironpython/archive/2007/05/25/our-talks-at-teched-2007-june-4-8th-in-orlando.aspx Check them out. Hope you can join us there! Mahesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at vanillainteractive.com Tue Jun 19 08:33:47 2007 From: mark at vanillainteractive.com (mark at vanillainteractive.com) Date: Tue, 19 Jun 2007 16:33:47 +1000 Subject: [IronPython] directshow and vmr9 Message-ID: Ive done some work with python but .Net is completely new to me. IronPython looks to be capable of using most directX functions. Am I correct there? Im trying to use the vmr9 in DirectShow to alpha blend 2 videos, can anyone point me in the right direction. I apologise if this list is for far more advanced users. Thanks From xmlhacker at gmail.com Tue Jun 19 08:44:58 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Tue, 19 Jun 2007 00:44:58 -0600 Subject: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? Message-ID: @ http://www.codeplex.com/IronPython/SourceControl/PatchList.aspx "Anyone can upload a patch. Patches are evaluated by project team members and either Applied or Declined." -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sh at defuze.org Tue Jun 19 09:06:23 2007 From: sh at defuze.org (Sylvain Hellegouarch) Date: Tue, 19 Jun 2007 08:06:23 +0100 Subject: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? In-Reply-To: References: Message-ID: <4677806F.3000306@defuze.org> Nice. Question though: What kind of patch format should be expected by the teams? - Sylvain M. David Peterson a ?crit : > @ http://www.codeplex.com/IronPython/SourceControl/PatchList.aspx > > " Anyone can upload a patch. Patches are evaluated by project team > members and either Applied or Declined." > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From mike.arty at gmail.com Tue Jun 19 15:24:33 2007 From: mike.arty at gmail.com (mike arty) Date: Tue, 19 Jun 2007 09:24:33 -0400 Subject: [IronPython] Compiling from IronPython? Message-ID: <6d8b2ddf0706190624h24f79dfcse405e26f425d312d@mail.gmail.com> First, is there a way to compile applications straight from IronPython or is it necessary to first translate your code to C#? Second, if there is a way to compile straight from IronPython, how does this effect performance of the compiled program(i.e. compiling a program from c# vs ironpython - any difference)? I'm looking to build 3D DirectX applications that make use of various pathfinding/searching algorithms and I'm most concerned about performance. Input greatly appreciated! -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue Jun 19 15:31:54 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 14:31:54 +0100 Subject: [IronPython] Compiling from IronPython? In-Reply-To: <6d8b2ddf0706190624h24f79dfcse405e26f425d312d@mail.gmail.com> References: <6d8b2ddf0706190624h24f79dfcse405e26f425d312d@mail.gmail.com> Message-ID: <4677DACA.2040507@voidspace.org.uk> mike arty wrote: > First, is there a way to compile applications straight from IronPython > or is it necessary to first translate your code to C#? Second, if > there is a way to compile straight from IronPython, how does this > effect performance of the compiled program( i.e. compiling a program > from c# vs ironpython - any difference)? I'm looking to build 3D > DirectX applications that make use of various pathfinding/searching > algorithms and I'm most concerned about performance. > > Input greatly appreciated! What do you mean by 'compiling'. IronPython applications don't *need* compiling, and compiling C# from IronPython is possible - but only useful in certain situations. You can compile IronPython source code into exes, but there is no speed benefit(well you save the parse / compile phase - but this is minimal) - just the perceived advantage of a non-source distribution. There is an IronPython sample called Pyc which demonstrates this. You can create a C# project that embeds the IronPython engine and creates a custom executable - is this what you want? The TabbedImages project has an example of this: http://code.google.com/p/tabbedimages/ Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > > -mike > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dinov at exchange.microsoft.com Tue Jun 19 16:21:29 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 19 Jun 2007 07:21:29 -0700 Subject: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? In-Reply-To: <4677806F.3000306@defuze.org> References: <4677806F.3000306@defuze.org> Message-ID: <7AD436E4270DD54A94238001769C22279D67B91D9E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Unfortunately we're still not accepting patches. It looks like this is just a new CodePlex feature but there doesn't appear to be anyway to turn it off. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sylvain Hellegouarch Sent: Tuesday, June 19, 2007 12:06 AM To: Discussion of IronPython Subject: Re: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? Nice. Question though: What kind of patch format should be expected by the teams? - Sylvain M. David Peterson a ?crit : > @ http://www.codeplex.com/IronPython/SourceControl/PatchList.aspx > > " Anyone can upload a patch. Patches are evaluated by project team > members and either Applied or Declined." > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > http://dev.aol.com/blog/3155 > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue Jun 19 16:23:21 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 15:23:21 +0100 Subject: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? In-Reply-To: <7AD436E4270DD54A94238001769C22279D67B91D9E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <4677806F.3000306@defuze.org> <7AD436E4270DD54A94238001769C22279D67B91D9E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <4677E6D9.1090500@voidspace.org.uk> Dino Viehland wrote: > Unfortunately we're still not accepting patches. It looks like this is just a new CodePlex feature but there doesn't appear to be anyway to turn it off. > Hey, welcome back. I hope you had a good break. Michael http://www.voidspace.org.uk/ironpython/index.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sylvain Hellegouarch > Sent: Tuesday, June 19, 2007 12:06 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? > > Nice. > > Question though: What kind of patch format should be expected by the teams? > > - Sylvain > > M. David Peterson a ?crit : > >> @ http://www.codeplex.com/IronPython/SourceControl/PatchList.aspx >> >> " Anyone can upload a patch. Patches are evaluated by project team >> members and either Applied or Declined." >> >> -- >> /M:D >> >> M. David Peterson >> http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | >> http://dev.aol.com/blog/3155 >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From dfugate at microsoft.com Tue Jun 19 19:02:39 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 19 Jun 2007 10:02:39 -0700 Subject: [IronPython] directshow and vmr9 In-Reply-To: References: Message-ID: <7346A825E148B049A9AD1D3ED46A2D9114A60F793C@NA-EXMSG-C106.redmond.corp.microsoft.com> A good starting point would be to look over the IronPython Direct3D sample found at http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=47 which shows how to use managed DirectX wrappers. That being said, I don't think DirectShow is in the managed API and you should be able to confirm this on http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_m_Apr_2005/directx/directx9m.asp. This (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1371067&SiteID=1) sounds related to what you're looking for. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of mark at vanillainteractive.com Sent: Monday, June 18, 2007 11:34 PM To: users at lists.ironpython.com Subject: [IronPython] directshow and vmr9 Ive done some work with python but .Net is completely new to me. IronPython looks to be capable of using most directX functions. Am I correct there? Im trying to use the vmr9 in DirectShow to alpha blend 2 videos, can anyone point me in the right direction. I apologise if this list is for far more advanced users. Thanks _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jbarham at gmail.com Tue Jun 19 19:10:17 2007 From: jbarham at gmail.com (John Barham) Date: Tue, 19 Jun 2007 10:10:17 -0700 Subject: [IronPython] Passing a reference to a string Message-ID: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> I'm trying to call a C# method from IP that takes a reference to a string as one of its parameters. I'm passing it a System.String() object, but the string is not changed after I call the method. I know that CPython (and presumably IP) strings are immutable so how do I get C# to change the string object that I pass in? Thanks, John From Martin.Maly at microsoft.com Tue Jun 19 19:18:30 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 19 Jun 2007 10:18:30 -0700 Subject: [IronPython] Passing a reference to a string In-Reply-To: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> References: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> Message-ID: The output value of the ref parameter will be returned in the return value: r.cs: public class C{ public static string M(ref string s) { string old = s; s = "new string"; return old; } } D:\Merlin1\Main\Bin\Debug>csc /t:library r.cs Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727 Copyright (C) Microsoft Corporation 2001-2005. All rights reserved. D:\Merlin1\Main\Bin\Debug>ipy.exe IronPython console: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.832 Copyright (c) Microsoft Corporation. All rights reserved. >>> import clr >>> clr.AddReference("r.dll") >>> import C >>> C.M("old string") ('old string', 'new string') >>> -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of John Barham Sent: Tuesday, June 19, 2007 10:10 AM To: users at lists.ironpython.com Subject: [IronPython] Passing a reference to a string I'm trying to call a C# method from IP that takes a reference to a string as one of its parameters. I'm passing it a System.String() object, but the string is not changed after I call the method. I know that CPython (and presumably IP) strings are immutable so how do I get C# to change the string object that I pass in? Thanks, John _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue Jun 19 19:20:56 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 18:20:56 +0100 Subject: [IronPython] Passing a reference to a string In-Reply-To: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> References: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> Message-ID: <46781078.7010200@voidspace.org.uk> John Barham wrote: > I'm trying to call a C# method from IP that takes a reference to a > string as one of its parameters. I'm passing it a System.String() > object, but the string is not changed after I call the method. I know > that CPython (and presumably IP) strings are immutable so how do I get > C# to change the string object that I pass in? > Is it an out argument or a ref argument? out arguments are returned as an extra return value from the call with IronPython. refs need to be constructed using a 'ref' constructor somewhere in the IronPython API... Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > Thanks, > > John > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From jbarham at gmail.com Tue Jun 19 19:23:47 2007 From: jbarham at gmail.com (John Barham) Date: Tue, 19 Jun 2007 10:23:47 -0700 Subject: [IronPython] Passing a reference to a string In-Reply-To: References: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> Message-ID: <4f34febc0706191023h26988d05lfa740189db348de7@mail.gmail.com> > The output value of the ref parameter will be returned in the return value: So it is. Thanks! From jbarham at gmail.com Tue Jun 19 19:38:03 2007 From: jbarham at gmail.com (John Barham) Date: Tue, 19 Jun 2007 10:38:03 -0700 Subject: [IronPython] Passing a reference to a string In-Reply-To: <46781078.7010200@voidspace.org.uk> References: <4f34febc0706191010s4de79c19y8ad7166759655c5a@mail.gmail.com> <46781078.7010200@voidspace.org.uk> Message-ID: <4f34febc0706191038y643c31c1gae953f8caf3fc006@mail.gmail.com> > Is it an out argument or a ref argument? According to .NET Reflector the signature of the method I'm calling is: public void _GetXml(..., ref string o_xml) so I presume the o_xml parameter is a "ref argument". Nonetheless its (changed) value is being returned as Martin said, despite the void return value in the signature, so I presume that IP is automagically transforming in ref arguments to the returned value from the function. John From debackerl at gmail.com Tue Jun 19 20:45:27 2007 From: debackerl at gmail.com (Laurent Debacker) Date: Tue, 19 Jun 2007 20:45:27 +0200 Subject: [IronPython] .NET Exception to Python Exception conversion Message-ID: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> Hello, I'm catching exceptions raised in my winforms thread using def exceptionHandler(sender, event): print event.Exception Application.ThreadException += ThreadExceptionEventHandler(exceptionHandler) Application.SetUnhandledExceptionMode( UnhandledExceptionMode.CatchException) However the exception I get, contains the long, unintuitive stack trace. How can I convert it to a nice Python exception ? Regards, Laurent Debacker. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Tue Jun 19 21:28:03 2007 From: xmlhacker at gmail.com (M. David Peterson) Date: Tue, 19 Jun 2007 13:28:03 -0600 Subject: [IronPython] Is IronPython Project on CodePlex Now Accepting Patches? In-Reply-To: <7AD436E4270DD54A94238001769C22279D67B91D9E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <4677806F.3000306@defuze.org> <7AD436E4270DD54A94238001769C22279D67B91D9E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: Thanks for the clarification, Dino. Kind of sucks that you can't turn it off! On 6/19/07, Dino Viehland wrote: > > Unfortunately we're still not accepting patches. It looks like this is > just a new CodePlex feature but there doesn't appear to be anyway to turn it > off. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Sylvain Hellegouarch > Sent: Tuesday, June 19, 2007 12:06 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Is IronPython Project on CodePlex Now Accepting > Patches? > > Nice. > > Question though: What kind of patch format should be expected by the > teams? > > - Sylvain > > M. David Peterson a ?crit : > > @ http://www.codeplex.com/IronPython/SourceControl/PatchList.aspx > > > > " Anyone can upload a patch. Patches are evaluated by project team > > members and either Applied or Declined." > > > > -- > > /M:D > > > > M. David Peterson > > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | > > http://dev.aol.com/blog/3155 > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bewest at gmail.com Tue Jun 19 22:58:41 2007 From: bewest at gmail.com (Benjamin West) Date: Tue, 19 Jun 2007 13:58:41 -0700 Subject: [IronPython] stack overflow issue Message-ID: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6014 Anyone have guidelines on avoiding this kind of thing, or if there is a fix that will make this a non-issue? -Ben codeplex butchers the white space: import clr clr.AddReference("System.Windows.Forms") from System.Windows.Forms import * class DefaultForm(Form): def __init__(self, *args, **kwds): super(type(self), self).__init__(*args, **kwds) self.test = "Default Stuff" class AppForm(DefaultForm): def __init__(self, *args, **kwds): super(type(self), self).__init__(*args, **kwds) self.test = "real Stuff" if __name__ == '__main__': # does not cause stack overflow #f = DefaultForm() # causes stack overflow. f = AppForm() Application.Run(f) From fuzzyman at voidspace.org.uk Tue Jun 19 23:09:32 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 22:09:32 +0100 Subject: [IronPython] stack overflow issue In-Reply-To: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> References: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> Message-ID: <4678460C.7070202@voidspace.org.uk> Benjamin West wrote: > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6014 > > Anyone have guidelines on avoiding this kind of thing, or if there is > a fix that will make this a non-issue? > Hmm... well the super call isn't necessary with Form and __init__. Does that help? Michael http://www.voidspace.org.uk/ironpython/index.shtml > -Ben > > codeplex butchers the white space: > > import clr > clr.AddReference("System.Windows.Forms") > from System.Windows.Forms import * > > class DefaultForm(Form): > def __init__(self, *args, **kwds): > super(type(self), self).__init__(*args, **kwds) > self.test = "Default Stuff" > > class AppForm(DefaultForm): > def __init__(self, *args, **kwds): > super(type(self), self).__init__(*args, **kwds) > self.test = "real Stuff" > > if __name__ == '__main__': > # does not cause stack overflow > #f = DefaultForm() > > # causes stack overflow. > f = AppForm() > Application.Run(f) > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From bewest at gmail.com Tue Jun 19 23:15:13 2007 From: bewest at gmail.com (Benjamin West) Date: Tue, 19 Jun 2007 14:15:13 -0700 Subject: [IronPython] stack overflow issue In-Reply-To: <4678460C.7070202@voidspace.org.uk> References: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> <4678460C.7070202@voidspace.org.uk> Message-ID: <8ad71be30706191415r2687984auca46c389fa9fd12c@mail.gmail.com> On 6/19/07, Michael Foord wrote: > Benjamin West wrote: > > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6014 > > > > Anyone have guidelines on avoiding this kind of thing, or if there is > > a fix that will make this a non-issue? > > > > Hmm... well the super call isn't necessary with Form and __init__. Does > that help? > Why not? This is just a test case. In my application, __init__ does other things that are required. I also like the way ironpython treats keyword arguments for controls. -Ben From fuzzyman at voidspace.org.uk Tue Jun 19 23:21:17 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 22:21:17 +0100 Subject: [IronPython] stack overflow issue In-Reply-To: <8ad71be30706191415r2687984auca46c389fa9fd12c@mail.gmail.com> References: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> <4678460C.7070202@voidspace.org.uk> <8ad71be30706191415r2687984auca46c389fa9fd12c@mail.gmail.com> Message-ID: <467848CD.8060207@voidspace.org.uk> Benjamin West wrote: > On 6/19/07, Michael Foord wrote: > >> Benjamin West wrote: >> >>> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6014 >>> >>> Anyone have guidelines on avoiding this kind of thing, or if there is >>> a fix that will make this a non-issue? >>> >>> >> Hmm... well the super call isn't necessary with Form and __init__. Does >> that help? >> >> > > Why not? This is just a test case. In my application, __init__ does > other things that are required. I also like the way ironpython treats > keyword arguments for controls. > The call from AppForm to DefaultForm is needed, but the Form __init__ is effectively a no-op (construction is done in __new__). So the call from DefualtForm to Form is unnecessary. In your case the args and keywargs are actually applied in __new__ - which you haven't overridden... OTOH - I can see that there may be cases where this is a genuine problem. Michael Foord > -Ben > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From bewest at gmail.com Tue Jun 19 23:30:05 2007 From: bewest at gmail.com (Benjamin West) Date: Tue, 19 Jun 2007 14:30:05 -0700 Subject: [IronPython] stack overflow issue In-Reply-To: <467848CD.8060207@voidspace.org.uk> References: <8ad71be30706191358s2962424fh812ac6ef6feeca5d@mail.gmail.com> <4678460C.7070202@voidspace.org.uk> <8ad71be30706191415r2687984auca46c389fa9fd12c@mail.gmail.com> <467848CD.8060207@voidspace.org.uk> Message-ID: <8ad71be30706191430x53479dbev60ffabca98332d33@mail.gmail.com> > >>> > >> Hmm... well the super call isn't necessary with Form and __init__. Does > >> that help? > > > > Why not? This is just a test case. In my application, __init__ does > > other things that are required. I also like the way ironpython treats > > keyword arguments for controls. > > > The call from AppForm to DefaultForm is needed, but the Form __init__ is > effectively a no-op (construction is done in __new__). So the call from > DefualtForm to Form is unnecessary. > > In your case the args and keywargs are actually applied in __new__ - > which you haven't overridden... > > OTOH - I can see that there may be cases where this is a genuine problem. > > Michael Foord > Michael, ah. That's quite informative. Thanks! FWIW, your web pages have been quite helpful as well. Thanks, -Ben From dinov at exchange.microsoft.com Wed Jun 20 00:24:41 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 19 Jun 2007 15:24:41 -0700 Subject: [IronPython] .NET Exception to Python Exception conversion In-Reply-To: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> References: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> If the exception was raised in Python then you should be able to do: print event.Exception.Data['PythonExceptionInfo'] which will contain the Python exception object, not that I'm sure you can format that one much better. What you probably want to do is call PythonEngine.FormatException(event.Exception), for example: from IronPython.Hosting import PythonEngine x = PythonEngine() print x.FormatException(event.Exception) If you're hosting IronPython then you can use your previously instantiated PythonEngine instead of newing one up just to format an exception. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Laurent Debacker Sent: Tuesday, June 19, 2007 11:45 AM To: users at lists.ironpython.com Subject: [IronPython] .NET Exception to Python Exception conversion Hello, I'm catching exceptions raised in my winforms thread using def exceptionHandler(sender, event): print event.Exception Application.ThreadException += ThreadExceptionEventHandler(exceptionHandler) Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) However the exception I get, contains the long, unintuitive stack trace. How can I convert it to a nice Python exception ? Regards, Laurent Debacker. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed Jun 20 00:45:05 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 23:45:05 +0100 Subject: [IronPython] .NET Exception to Python Exception conversion In-Reply-To: <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46785C71.8040007@voidspace.org.uk> Dino Viehland wrote: > > If the exception was raised in Python then you should be able to do: > > print event.Exception.Data[?PythonExceptionInfo?] > > which will contain the Python exception object, not that I?m sure you > can format that one much better. > > What you probably want to do is call > PythonEngine.FormatException(event.Exception), for example: > > from IronPython.Hosting import PythonEngine > > x = PythonEngine() > > print x.FormatException(event.Exception) > That works! Can you do it with IronPython 2 ? ;-) Michael Foord > If you?re hosting IronPython then you can use your previously > instantiated PythonEngine instead of newing one up just to format an > exception. > > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Laurent > Debacker > *Sent:* Tuesday, June 19, 2007 11:45 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] .NET Exception to Python Exception conversion > > Hello, > > I'm catching exceptions raised in my winforms thread using > > def exceptionHandler(sender, event): > print event.Exception > > Application.ThreadException += > ThreadExceptionEventHandler(exceptionHandler) > Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) > > However the exception I get, contains the long, unintuitive stack > trace. How can I convert it to a nice Python exception ? > > Regards, > Laurent Debacker. > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dinov at exchange.microsoft.com Wed Jun 20 00:50:13 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 19 Jun 2007 15:50:13 -0700 Subject: [IronPython] .NET Exception to Python Exception conversion In-Reply-To: <46785C71.8040007@voidspace.org.uk> References: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46785C71.8040007@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C22279D67B91F5D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> It's a little bit different, and you don't need to create the PythonEngine (or at least until we close on that issue :) ), but it's: import clr clr.AddReference('IronPython') from IronPython.Hosting import PythonEngine PythonEngine.CurrentEngine.FormatException(someException) We no longer automatically add references to IronPython's dlls which is why you need the AddReference step as well. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Tuesday, June 19, 2007 3:45 PM To: Discussion of IronPython Subject: Re: [IronPython] .NET Exception to Python Exception conversion Dino Viehland wrote: > > If the exception was raised in Python then you should be able to do: > > print event.Exception.Data['PythonExceptionInfo'] > > which will contain the Python exception object, not that I'm sure you > can format that one much better. > > What you probably want to do is call > PythonEngine.FormatException(event.Exception), for example: > > from IronPython.Hosting import PythonEngine > > x = PythonEngine() > > print x.FormatException(event.Exception) > That works! Can you do it with IronPython 2 ? ;-) Michael Foord > If you're hosting IronPython then you can use your previously > instantiated PythonEngine instead of newing one up just to format an > exception. > > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Laurent > Debacker > *Sent:* Tuesday, June 19, 2007 11:45 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] .NET Exception to Python Exception conversion > > Hello, > > I'm catching exceptions raised in my winforms thread using > > def exceptionHandler(sender, event): > print event.Exception > > Application.ThreadException += > ThreadExceptionEventHandler(exceptionHandler) > Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) > > However the exception I get, contains the long, unintuitive stack > trace. How can I convert it to a nice Python exception ? > > Regards, > Laurent Debacker. > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Wed Jun 20 00:52:26 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 Jun 2007 23:52:26 +0100 Subject: [IronPython] .NET Exception to Python Exception conversion In-Reply-To: <7AD436E4270DD54A94238001769C22279D67B91F5D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46785C71.8040007@voidspace.org.uk> <7AD436E4270DD54A94238001769C22279D67B91F5D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46785E2A.10906@voidspace.org.uk> Cool - thanks. :-) Michael Dino Viehland wrote: > It's a little bit different, and you don't need to create the PythonEngine (or at least until we close on that issue :) ), but it's: > > import clr > clr.AddReference('IronPython') > from IronPython.Hosting import PythonEngine > PythonEngine.CurrentEngine.FormatException(someException) > > > We no longer automatically add references to IronPython's dlls which is why you need the AddReference step as well. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Tuesday, June 19, 2007 3:45 PM > To: Discussion of IronPython > Subject: Re: [IronPython] .NET Exception to Python Exception conversion > > Dino Viehland wrote: > >> If the exception was raised in Python then you should be able to do: >> >> print event.Exception.Data['PythonExceptionInfo'] >> >> which will contain the Python exception object, not that I'm sure you >> can format that one much better. >> >> What you probably want to do is call >> PythonEngine.FormatException(event.Exception), for example: >> >> from IronPython.Hosting import PythonEngine >> >> x = PythonEngine() >> >> print x.FormatException(event.Exception) >> >> > > That works! Can you do it with IronPython 2 ? ;-) > > Michael Foord > > > >> If you're hosting IronPython then you can use your previously >> instantiated PythonEngine instead of newing one up just to format an >> exception. >> >> *From:* users-bounces at lists.ironpython.com >> [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Laurent >> Debacker >> *Sent:* Tuesday, June 19, 2007 11:45 AM >> *To:* users at lists.ironpython.com >> *Subject:* [IronPython] .NET Exception to Python Exception conversion >> >> Hello, >> >> I'm catching exceptions raised in my winforms thread using >> >> def exceptionHandler(sender, event): >> print event.Exception >> >> Application.ThreadException += >> ThreadExceptionEventHandler(exceptionHandler) >> Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) >> >> However the exception I get, contains the long, unintuitive stack >> trace. How can I convert it to a nice Python exception ? >> >> Regards, >> Laurent Debacker. >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From fuzzyman at voidspace.org.uk Wed Jun 20 01:00:07 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 20 Jun 2007 00:00:07 +0100 Subject: [IronPython] .NET Exception to Python Exception conversion In-Reply-To: <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <75751ca80706191145off049bu7a7f48fbce39425f@mail.gmail.com> <7AD436E4270DD54A94238001769C22279D67B91F31@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46785FF7.4080308@voidspace.org.uk> I think this is a useful example. I've posted it to the cookbook: http://www.ironpython.info/index.php/Handling_Unhandled_Exceptions Michael Foord Dino Viehland wrote: > > If the exception was raised in Python then you should be able to do: > > print event.Exception.Data[?PythonExceptionInfo?] > > which will contain the Python exception object, not that I?m sure you > can format that one much better. > > What you probably want to do is call > PythonEngine.FormatException(event.Exception), for example: > > from IronPython.Hosting import PythonEngine > > x = PythonEngine() > > print x.FormatException(event.Exception) > > If you?re hosting IronPython then you can use your previously > instantiated PythonEngine instead of newing one up just to format an > exception. > > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Laurent > Debacker > *Sent:* Tuesday, June 19, 2007 11:45 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] .NET Exception to Python Exception conversion > > Hello, > > I'm catching exceptions raised in my winforms thread using > > def exceptionHandler(sender, event): > print event.Exception > > Application.ThreadException += > ThreadExceptionEventHandler(exceptionHandler) > Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) > > However the exception I get, contains the long, unintuitive stack > trace. How can I convert it to a nice Python exception ? > > Regards, > Laurent Debacker. > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Curtis at DAYCOS.com Wed Jun 20 01:05:03 2007 From: Curtis at DAYCOS.com (Curtis Scheer) Date: Tue, 19 Jun 2007 18:05:03 -0500 Subject: [IronPython] Threading and SQLAlchemy Message-ID: <031936836C46D611BB1B00508BE7345D0531E75D@gatekeeper.daycos.com> I am trying to import the SQLAlchemy module into IronPython to see if I can do some testing of existing Python code we have. Has anyone had success using this module in IronPython? It appears to be failing when trying to import the python threading module like so: try: import thread, threading except ImportError: import dummy_thread as thread import dummy_threading as threading more specifically: import threading Is this a bug or what is the appropriate work around for this? Thanks, Curtis From fuzzyman at voidspace.org.uk Wed Jun 20 01:11:11 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 20 Jun 2007 00:11:11 +0100 Subject: [IronPython] Threading and SQLAlchemy In-Reply-To: <031936836C46D611BB1B00508BE7345D0531E75D@gatekeeper.daycos.com> References: <031936836C46D611BB1B00508BE7345D0531E75D@gatekeeper.daycos.com> Message-ID: <4678628F.4090403@voidspace.org.uk> Curtis Scheer wrote: > I am trying to import the SQLAlchemy module into IronPython to see if I can > do some testing of existing Python code we have. Has anyone had success > using this module in IronPython? > > > It appears to be failing when trying to import the python threading module > like so: > > try: > import thread, threading > except ImportError: > import dummy_thread as thread > import dummy_threading as threading > > > Those imports work fine for me. Are you sure you have the Python standard library on your path? (thread is built in, but threading is a standard library module.) Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > more specifically: > > import threading > > Is this a bug or what is the appropriate work around for this? > > Thanks, > Curtis > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From Curtis at DAYCOS.com Wed Jun 20 01:59:34 2007 From: Curtis at DAYCOS.com (Curtis Scheer) Date: Tue, 19 Jun 2007 18:59:34 -0500 Subject: [IronPython] Threading and SQLAlchemy Message-ID: <031936836C46D611BB1B00508BE7345D0531E75E@gatekeeper.daycos.com> Thanks, Michael that was it. Now however the python help will not work now that I added that to the path. I see you had a post on that earlier, did you ever come up with a solution on that? -----Original Message----- From: Michael Foord [mailto:fuzzyman at voidspace.org.uk] Sent: Tuesday, June 19, 2007 6:11 PM To: Discussion of IronPython Subject: Re: [IronPython] Threading and SQLAlchemy Curtis Scheer wrote: > I am trying to import the SQLAlchemy module into IronPython to see if I can > do some testing of existing Python code we have. Has anyone had success > using this module in IronPython? > > > It appears to be failing when trying to import the python threading module > like so: > > try: > import thread, threading > except ImportError: > import dummy_thread as thread > import dummy_threading as threading > > > Those imports work fine for me. Are you sure you have the Python standard library on your path? (thread is built in, but threading is a standard library module.) Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > more specifically: > > import threading > > Is this a bug or what is the appropriate work around for this? > > Thanks, > Curtis > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Wed Jun 20 02:01:05 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 20 Jun 2007 01:01:05 +0100 Subject: [IronPython] Threading and SQLAlchemy In-Reply-To: <031936836C46D611BB1B00508BE7345D0531E75E@gatekeeper.daycos.com> References: <031936836C46D611BB1B00508BE7345D0531E75E@gatekeeper.daycos.com> Message-ID: <46786E41.5010504@voidspace.org.uk> Curtis Scheer wrote: > Thanks, Michael that was it. Now however the python help will not work now > that I added that to the path. I see you had a post on that earlier, did you > ever come up with a solution on that? > The standard library 'site.py' overrides the built-in help with one that won't work with IronPython. If you're maintaining a separate copy of the standard library for IronPython then you can just delete site.py Otherwise an empty one in the same directory as your IronPython executable should do the trick. Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml > -----Original Message----- > From: Michael Foord [mailto:fuzzyman at voidspace.org.uk] > Sent: Tuesday, June 19, 2007 6:11 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Threading and SQLAlchemy > > Curtis Scheer wrote: > >> I am trying to import the SQLAlchemy module into IronPython to see if I >> > can > >> do some testing of existing Python code we have. Has anyone had success >> using this module in IronPython? >> >> >> It appears to be failing when trying to import the python threading module >> like so: >> >> try: >> import thread, threading >> except ImportError: >> import dummy_thread as thread >> import dummy_threading as threading >> >> >> >> > > Those imports work fine for me. Are you sure you have the Python > standard library on your path? (thread is built in, but threading is a > standard library module.) > > Michael Foord > http://www.voidspace.org.uk/ironpython/index.shtml > > > >> more specifically: >> >> import threading >> >> Is this a bug or what is the appropriate work around for this? >> >> Thanks, >> Curtis >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From sanxiyn at gmail.com Wed Jun 20 04:46:37 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 20 Jun 2007 11:46:37 +0900 Subject: [IronPython] Console history Message-ID: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> This is my pet peeve. This applies to both 1.1 and 2.0a1. 1. Run ipy.exe with -X:TabCompletion. 2. Execute a line. (Let's say "a = 1".) 3. Press up arrow. (The last line appears.) 4. Press down arrow. (The line stays.) What I want: 4. The line disappears. Otherwise, you're forced to delete the entire line, when you thought you'd edit one of the line in history, and changed your mind. The idea is that down arrow should reverse the any effect up arrow had. This is the case for any readline-based systems like Linux bash shell and CPython installs on Unix. This is not the case for Windows cmd.exe and CPython installs on Windows though. -- Seo Sanghyeon From eng.meligy at gmail.com Wed Jun 20 08:55:23 2007 From: eng.meligy at gmail.com (Mohamed A. Meligy) Date: Wed, 20 Jun 2007 09:55:23 +0300 Subject: [IronPython] [Language Question] Building a function pointer/delegate like Message-ID: <250b45080706192355v7962f610l8a7e3aafdf3b87f7@mail.gmail.com> Hey all, I'm trying to build a filter web user control using IP 2.0 (included in ASP.NET 2.0 Futures May 2007 CTP). In it, I need other pages/controls using this filtering control to be able to assign a property in the filter control to a method in that pages/control using the filter, so, inside the filter control itself, on certain action, I can call the page/control method from inside the filter control. I've tried something like: _FilterFunction = None def GetFilterFunction(): return _FilterFunction def SetFilterFunction(value): _FilterFunction = value def Filter_Change(sender, e): global _FilterFunction # I added that line later as a try to fix _FilterFunction() Inside my page, I've tried something like: def Page_Load(sender, e): ucFilter.SetFilterFunction(FilterFunc) pass def FilterFunc() #Actual use of the filter values comes here pass What I get then is a runtime exception saying that _FilterFunction is not callable. Is there any other certain way to do that ?? -- Regards, Mohamed Ahmed Meligy Senior Software Engineer Silver Key (www.SilverKeyTech.com) - Egypt Branch E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) Weblog: http://GeeksWithBlogs.NET/Mohamed Mobile: +20 10 603 3013 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Wed Jun 20 09:05:40 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 20 Jun 2007 16:05:40 +0900 Subject: [IronPython] [Language Question] Building a function pointer/delegate like In-Reply-To: <250b45080706192355v7962f610l8a7e3aafdf3b87f7@mail.gmail.com> References: <250b45080706192355v7962f610l8a7e3aafdf3b87f7@mail.gmail.com> Message-ID: <5b0248170706200005q47bbc59aqdd093d7e8d26edcc@mail.gmail.com> 2007/6/20, Mohamed A. Meligy : > (snip) > What I get then is a runtime exception saying that _FilterFunction is not > callable. Use global statement in SetFilterFunction (i.e. where you *assign* global variable), not Filter_Change. -- Seo Sanghyeon From eng.meligy at gmail.com Wed Jun 20 09:22:09 2007 From: eng.meligy at gmail.com (Mohamed A. Meligy) Date: Wed, 20 Jun 2007 10:22:09 +0300 Subject: [IronPython] [Language Question] Building a function pointer/delegate like In-Reply-To: <5b0248170706200005q47bbc59aqdd093d7e8d26edcc@mail.gmail.com> References: <250b45080706192355v7962f610l8a7e3aafdf3b87f7@mail.gmail.com> <5b0248170706200005q47bbc59aqdd093d7e8d26edcc@mail.gmail.com> Message-ID: <250b45080706200022l3736d7aep44e5e0076717ee1f@mail.gmail.com> This did the trick for me :) Thanks a lot for the extreme quick response! On 6/20/07, Sanghyeon Seo wrote: > > 2007/6/20, Mohamed A. Meligy : > > (snip) > > What I get then is a runtime exception saying that _FilterFunction is > not > > callable. > > Use global statement in SetFilterFunction (i.e. where you *assign* > global variable), not Filter_Change. > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Regards, Mohamed Ahmed Meligy Senior Software Engineer Silver Key (www.SilverKeyTech.com) - Egypt Branch E-mail: Eng.Meligy (AT) Gmail.com (NO SPAM PLEASE) Weblog: http://GeeksWithBlogs.NET/Mohamed Mobile: +20 10 603 3013 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed Jun 20 10:42:54 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 20 Jun 2007 09:42:54 +0100 Subject: [IronPython] Console history In-Reply-To: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> References: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> Message-ID: <4678E88E.2020402@voidspace.org.uk> Sanghyeon Seo wrote: > This is my pet peeve. This applies to both 1.1 and 2.0a1. > > 1. Run ipy.exe with -X:TabCompletion. > 2. Execute a line. (Let's say "a = 1".) > 3. Press up arrow. (The last line appears.) > 4. Press down arrow. (The line stays.) > > How about: 1. Run ipy.exe with -X:TabCompletion. 2. Execute a line. (Let's say "a = 1".) 3. Press up arrow. (The last line appears.) 4. Press escape. The line disappears. Any good ? Michael > What I want: > > 4. The line disappears. > > Otherwise, you're forced to delete the entire line, when you thought > you'd edit one of the line in history, and changed your mind. The idea > is that down arrow should reverse the any effect up arrow had. > > This is the case for any readline-based systems like Linux bash shell > and CPython installs on Unix. This is not the case for Windows cmd.exe > and CPython installs on Windows though. > > From sanxiyn at gmail.com Wed Jun 20 11:14:40 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 20 Jun 2007 18:14:40 +0900 Subject: [IronPython] Console history In-Reply-To: <4678E88E.2020402@voidspace.org.uk> References: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> <4678E88E.2020402@voidspace.org.uk> Message-ID: <5b0248170706200214nc3cb507kbb42faa3794a0fdd@mail.gmail.com> 2007/6/20, Michael Foord : > How about: > > 1. Run ipy.exe with -X:TabCompletion. > 2. Execute a line. (Let's say "a = 1".) > 3. Press up arrow. (The last line appears.) > 4. Press escape. The line disappears. > > Any good ? Oh, this is actually nice. Thanks. -- Seo Sanghyeon From Martin.Maly at microsoft.com Wed Jun 20 17:00:32 2007 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 20 Jun 2007 08:00:32 -0700 Subject: [IronPython] Console history In-Reply-To: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> References: <5b0248170706191946y3abbd8d6h5af306cddabcf532@mail.gmail.com> Message-ID: The behavior in your point 4. (the line stays) is modeled after the behavior of the Windows command line.. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Tuesday, June 19, 2007 7:47 PM To: Discussion of IronPython Subject: [IronPython] Console history This is my pet peeve. This applies to both 1.1 and 2.0a1. 1. Run ipy.exe with -X:TabCompletion. 2. Execute a line. (Let's say "a = 1".) 3. Press up arrow. (The last line appears.) 4. Press down arrow. (The line stays.) What I want: 4. The line disappears. Otherwise, you're forced to delete the entire line, when you thought you'd edit one of the line in history, and changed your mind. The idea is that down arrow should reverse the any effect up arrow had. This is the case for any readline-based systems like Linux bash shell and CPython installs on Unix. This is not the case for Windows cmd.exe and CPython installs on Windows though. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From m_tayseer82 at yahoo.com Wed Jun 20 23:58:13 2007 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Wed, 20 Jun 2007 14:58:13 -0700 (PDT) Subject: [IronPython] For Python programmers in Egypt Message-ID: <917152.24081.qm@web31103.mail.mud.yahoo.com> Dear Pythonistas My company, Silverkey, is going to hold a demo day on 07/07/2007. We are going to make a comparison between static languages and dynamic languages. I'm going to represent the dynamic languages side. If you are in Egypt, we will be happy to meet you. http://www.demoday.us/ Thanks Mohammad Tayseer http://spellcoder.com/blogs/tayseer --------------------------------- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.arty at gmail.com Thu Jun 21 15:34:29 2007 From: mike.arty at gmail.com (mike arty) Date: Thu, 21 Jun 2007 09:34:29 -0400 Subject: [IronPython] tab-complete? Message-ID: <6d8b2ddf0706210634y6aa76de8u364f0bb4c6649198@mail.gmail.com> Yet another IronPython newbie question- In Jim Hugunin's demo video it appears as though he is using some kind of tab complete in the interactive interpreter when referencing .Net objects. If I'm right, could someone tell me how this is done? It would be really handy. http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20051110PythonJH/manifest.xml Thanks -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Thu Jun 21 15:49:27 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 21 Jun 2007 06:49:27 -0700 Subject: [IronPython] tab-complete? In-Reply-To: <6d8b2ddf0706210634y6aa76de8u364f0bb4c6649198@mail.gmail.com> References: <6d8b2ddf0706210634y6aa76de8u364f0bb4c6649198@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22279D67B9228D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> You need to pass the -X:TabCompletion command-line option and it should work. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of mike arty Sent: Thursday, June 21, 2007 6:34 AM To: users at lists.ironpython.com Subject: [IronPython] tab-complete? Yet another IronPython newbie question- In Jim Hugunin's demo video it appears as though he is using some kind of tab complete in the interactive interpreter when referencing .Net objects. If I'm right, could someone tell me how this is done? It would be really handy. http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20051110PythonJH/manifest.xml Thanks -mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jun 22 00:47:46 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 21 Jun 2007 23:47:46 +0100 Subject: [IronPython] Implicit Cast to Float Message-ID: <467B0012.8070507@voidspace.org.uk> Hello all, I am trying to use a data type that must be 'cast to a float' - the ZedGraph.XDate. It has what it calls an 'Implicit' operator: http://zedgraph.sourceforge.net/documentation/html/M_ZedGraph_XDate_op_Implicit_4.htm How can I get at this from IronPython? The obvious way doesn't seem to work: >>> from ZedGraph import XDate >>> d = XDate(2007, 1, 1) >>> float(d) Traceback (most recent call last): File , line 0, in ##25 File , line 0, in Make##27 AttributeError: 'XDate' object has no attribute '__float__' I need to add this to a collection and it needs to be as a float. The C# syntax to do this is: x = (double) new XDate( 1995, 5, i+11 ); Any help appreciated! Thanks Michael Foord http://www.ironpython.info From fuzzyman at voidspace.org.uk Fri Jun 22 01:41:22 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 22 Jun 2007 00:41:22 +0100 Subject: [IronPython] Implicit Cast to Float In-Reply-To: <467B0012.8070507@voidspace.org.uk> References: <467B0012.8070507@voidspace.org.uk> Message-ID: <467B0CA2.1010007@voidspace.org.uk> For the record - it *doesn't* implement IConvertible, so I can't use that. I've searched the list and can find a very old discussion of possible syntax - but no answer. :-( Michael Michael Foord wrote: > Hello all, > > I am trying to use a data type that must be 'cast to a float' - the > ZedGraph.XDate. > > It has what it calls an 'Implicit' operator: > > http://zedgraph.sourceforge.net/documentation/html/M_ZedGraph_XDate_op_Implicit_4.htm > > How can I get at this from IronPython? The obvious way doesn't seem to work: > > >>> from ZedGraph import XDate > >>> d = XDate(2007, 1, 1) > >>> float(d) > Traceback (most recent call last): > File , line 0, in ##25 > File , line 0, in Make##27 > AttributeError: 'XDate' object has no attribute '__float__' > > I need to add this to a collection and it needs to be as a float. > > The C# syntax to do this is: > > x = (double) new XDate( 1995, 5, i+11 ); > > Any help appreciated! > > Thanks > > Michael Foord > http://www.ironpython.info > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From luistrigueiros at gmail.com Fri Jun 22 11:24:23 2007 From: luistrigueiros at gmail.com (Luis Trigueiros) Date: Fri, 22 Jun 2007 10:24:23 +0100 Subject: [IronPython] Inproc COM object Message-ID: <5cb7a1d0706220224g6438824ct1992fb5e9ad37526@mail.gmail.com> Hi, Can anyone point me in the direction of a code sample implementing a in process COM object in IronPython that is exposed in Excel. I know of samples interacting with excel, but what I would like to do is perform Excel spreadsheet validation in python instead of VBA. Thank you, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Jun 22 16:17:11 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 07:17:11 -0700 Subject: [IronPython] Implicit Cast to Float In-Reply-To: <467B0CA2.1010007@voidspace.org.uk> References: <467B0012.8070507@voidspace.org.uk> <467B0CA2.1010007@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D083@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Is there only one implicit conversion? If so I think you should be able to call the op_Implicit method directly on XDate, e.g: XDate.op_Implicit(d). If there's more than one I'm not sure how you'd select the one you want to call off the top of my head. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Thursday, June 21, 2007 4:41 PM To: Discussion of IronPython Subject: Re: [IronPython] Implicit Cast to Float For the record - it *doesn't* implement IConvertible, so I can't use that. I've searched the list and can find a very old discussion of possible syntax - but no answer. :-( Michael Michael Foord wrote: > Hello all, > > I am trying to use a data type that must be 'cast to a float' - the > ZedGraph.XDate. > > It has what it calls an 'Implicit' operator: > > http://zedgraph.sourceforge.net/documentation/html/M_ZedGraph_XDate_op_Implicit_4.htm > > How can I get at this from IronPython? The obvious way doesn't seem to work: > > >>> from ZedGraph import XDate > >>> d = XDate(2007, 1, 1) > >>> float(d) > Traceback (most recent call last): > File , line 0, in ##25 > File , line 0, in Make##27 > AttributeError: 'XDate' object has no attribute '__float__' > > I need to add this to a collection and it needs to be as a float. > > The C# syntax to do this is: > > x = (double) new XDate( 1995, 5, i+11 ); > > Any help appreciated! > > Thanks > > Michael Foord > http://www.ironpython.info > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Fri Jun 22 16:51:53 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 22 Jun 2007 15:51:53 +0100 Subject: [IronPython] Implicit Cast to Float In-Reply-To: <7AD436E4270DD54A94238001769C2227A150B2D083@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <467B0012.8070507@voidspace.org.uk> <467B0CA2.1010007@voidspace.org.uk> <7AD436E4270DD54A94238001769C2227A150B2D083@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <467BE209.9030101@voidspace.org.uk> Dino Viehland wrote: > Is there only one implicit conversion? If so I think you should be able to call the op_Implicit method directly on XDate, e.g: XDate.op_Implicit(d). > > If there's more than one I'm not sure how you'd select the one you want to call off the top of my head. > Unfortunately I've tried that already, and it appears not to exist: >>> import clr >>> clr.AddReference('ZedGraph') >>> from ZedGraph import XDate >>> d = XDate(1995, 1, 1) >>> XDate.op_Implicit(d) Traceback (most recent call last): AttributeError: type object 'XDate' has no attribute 'op_Implicit' >>> XDate.op_Implicit Traceback (most recent call last): AttributeError: type object 'XDate' has no attribute 'op_Implicit' Michael http://www.ironpython.info > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Thursday, June 21, 2007 4:41 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Implicit Cast to Float > > For the record - it *doesn't* implement IConvertible, so I can't use > that. I've searched the list and can find a very old discussion of > possible syntax - but no answer. :-( > > Michael > > Michael Foord wrote: > >> Hello all, >> >> I am trying to use a data type that must be 'cast to a float' - the >> ZedGraph.XDate. >> >> It has what it calls an 'Implicit' operator: >> >> http://zedgraph.sourceforge.net/documentation/html/M_ZedGraph_XDate_op_Implicit_4.htm >> >> How can I get at this from IronPython? The obvious way doesn't seem to work: >> >> >>> from ZedGraph import XDate >> >>> d = XDate(2007, 1, 1) >> >>> float(d) >> Traceback (most recent call last): >> File , line 0, in ##25 >> File , line 0, in Make##27 >> AttributeError: 'XDate' object has no attribute '__float__' >> >> I need to add this to a collection and it needs to be as a float. >> >> The C# syntax to do this is: >> >> x = (double) new XDate( 1995, 5, i+11 ); >> >> Any help appreciated! >> >> Thanks >> >> Michael Foord >> http://www.ironpython.info >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From luke.hoersten at gmail.com Fri Jun 22 17:07:21 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Fri, 22 Jun 2007 15:07:21 -0000 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument Message-ID: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> System.Diagnostics.Process.Start(app, args) should take a string of arguments delimited by spaces for the second argument of start which it will pass to app on stdin. I'm trying to run app = "regedit.exe" and args ="/s key.reg" but it's only recognizing the first argument (which is /s). If I remove /s, it runs the key but I want this to run silently. I've also tried ProcessStartInfo() but it suffers from the same problem. Does anyone have any more information on this or know how to work around this? Thanks, Luke From dinov at exchange.microsoft.com Fri Jun 22 17:14:37 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 08:14:37 -0700 Subject: [IronPython] Inproc COM object In-Reply-To: <5cb7a1d0706220224g6438824ct1992fb5e9ad37526@mail.gmail.com> References: <5cb7a1d0706220224g6438824ct1992fb5e9ad37526@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D08E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Do you want to call the Python code from Excel or manipulate Excel from Python? It sounds like the former but if you want to do the former it'd look like (this is pieced together from some internal automation we have): import clr clr.AddReferenceByName('Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c') from Microsoft.Office.Interop import Excel ex = Excel.ApplicationClass() ex.Visible = True ex.DisplayAlerts = False workbook = ex.Workbooks.Open('foo.xls') ws = workbook.Worksheets[1] print ws.Rows[1].Value2[0,0] from there you can explore the various worksheet objects that you get back. If you do want to call Python from Excel you'd need to create a Com Callable Wrapper (CCW) in C# and expose it out to COM via the normal .NET interop mechanisms. That CCW could then instantiate IronPython and call into it passing anything you got from Excel along the way. Searching around the web for .NET CCW should probably get you the info on how to do the CCW side of things. From there you just need to instantiate a PythonEngine and tell it what to run. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luis Trigueiros Sent: Friday, June 22, 2007 2:24 AM To: users at lists.ironpython.com Subject: [IronPython] Inproc COM object Hi, Can anyone point me in the direction of a code sample implementing a in process COM object in IronPython that is exposed in Excel. I know of samples interacting with excel, but what I would like to do is perform Excel spreadsheet validation in python instead of VBA. Thank you, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Jun 22 17:26:15 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 08:26:15 -0700 Subject: [IronPython] Implicit Cast to Float In-Reply-To: <467BE209.9030101@voidspace.org.uk> References: <467B0012.8070507@voidspace.org.uk> <467B0CA2.1010007@voidspace.org.uk> <7AD436E4270DD54A94238001769C2227A150B2D083@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <467BE209.9030101@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D091@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I'm guessing the collection you're adding it to isn't strongly typed? The reason I ask is we will go through our conversion code paths which should do the right thing if it's not strongly typed. One possible (horribly ugly) work around here is: >>> import clr >>> clr.AddReference('IronPythonTest') >>> from IronPythonTest import Derived, Base >>> from System.Collections.Generic import List >>> x = List[Base]() >>> y = Derived(7) >>> x.Add(y) >>> print x[0] >>> print x[0].value 7 given the types: public class Base { public int value; public Base(int value) { this.value = value; } } public class Derived { public Derived(int value) { this.value = value; } public int value; public static implicit operator Base(Derived d) { return new Base(d.value); } } So you could either use the generic list trick I used above or you could define a helper which takes in a double and returns a double (or a generic identity function which takes in a T and returns a T and then index into it with the type you want to use). This is less than ideal. In v2.0 we at least leave op_Implicit on the types so you can call it directly, but we probably want to enable calling the target type to do the conversion. I've opened bug #11278 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11278) to track that we need to do a better job here, maybe we could leverage coerce. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, June 22, 2007 7:52 AM To: Discussion of IronPython Subject: Re: [IronPython] Implicit Cast to Float Dino Viehland wrote: > Is there only one implicit conversion? If so I think you should be able to call the op_Implicit method directly on XDate, e.g: XDate.op_Implicit(d). > > If there's more than one I'm not sure how you'd select the one you want to call off the top of my head. > Unfortunately I've tried that already, and it appears not to exist: >>> import clr >>> clr.AddReference('ZedGraph') >>> from ZedGraph import XDate >>> d = XDate(1995, 1, 1) >>> XDate.op_Implicit(d) Traceback (most recent call last): AttributeError: type object 'XDate' has no attribute 'op_Implicit' >>> XDate.op_Implicit Traceback (most recent call last): AttributeError: type object 'XDate' has no attribute 'op_Implicit' Michael http://www.ironpython.info > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Thursday, June 21, 2007 4:41 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Implicit Cast to Float > > For the record - it *doesn't* implement IConvertible, so I can't use > that. I've searched the list and can find a very old discussion of > possible syntax - but no answer. :-( > > Michael > > Michael Foord wrote: > >> Hello all, >> >> I am trying to use a data type that must be 'cast to a float' - the >> ZedGraph.XDate. >> >> It has what it calls an 'Implicit' operator: >> >> http://zedgraph.sourceforge.net/documentation/html/M_ZedGraph_XDate_op_Implicit_4.htm >> >> How can I get at this from IronPython? The obvious way doesn't seem to work: >> >> >>> from ZedGraph import XDate >> >>> d = XDate(2007, 1, 1) >> >>> float(d) >> Traceback (most recent call last): >> File , line 0, in ##25 >> File , line 0, in Make##27 >> AttributeError: 'XDate' object has no attribute '__float__' >> >> I need to add this to a collection and it needs to be as a float. >> >> The C# syntax to do this is: >> >> x = (double) new XDate( 1995, 5, i+11 ); >> >> Any help appreciated! >> >> Thanks >> >> Michael Foord >> http://www.ironpython.info >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Fri Jun 22 17:32:44 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 08:32:44 -0700 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument In-Reply-To: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> References: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> How exactly are you passing this? I assume the quotes aren't being included? The 1st form below prompts me and the 2nd form doesn't prompt (ignoring the UAC prompt on Vista of course which is a whole other ball of wax), are you doing something different? >>> import System >>> System.Diagnostics.Process.Start('regedit.exe', '"/s foo.reg"') >>> System.Diagnostics.Process.Start('regedit.exe', '/s foo.reg') You could also check out the nt module where we have nt.popen (or os if you have the CPython std lib installed) which takes a single command line (exe + args) and we do the splitting for you - that'd also be compatible w/ CPython. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luke Hoersten Sent: Friday, June 22, 2007 8:07 AM To: users at lists.ironpython.com Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument System.Diagnostics.Process.Start(app, args) should take a string of arguments delimited by spaces for the second argument of start which it will pass to app on stdin. I'm trying to run app = "regedit.exe" and args ="/s key.reg" but it's only recognizing the first argument (which is /s). If I remove /s, it runs the key but I want this to run silently. I've also tried ProcessStartInfo() but it suffers from the same problem. Does anyone have any more information on this or know how to work around this? Thanks, Luke _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From luke.hoersten at gmail.com Fri Jun 22 17:47:29 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Fri, 22 Jun 2007 15:47:29 -0000 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument In-Reply-To: <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <1182527249.105911.7340@g4g2000hsf.googlegroups.com> I'm not including the quotes. Those are just the strings I'm using, similar to your example. I'm getting different results: Only the first argument being sent in that string is being processed. The other is being ignored. So either I get /s and no .reg file or I import the .reg file and it prompts me. I'm writing a script so obviously prompting is undesirable. Here's my code: name = "c:\\Windows\\regedit.exe" args = "/s example.reg" System.Diagnostics.Process.Start(name, args) I've even tried waiting on the process to exit with WaitForExit() but that still does not work. I've read on Google about a lot of people having this similar problem but people seem to give up before posting a solution. Any other ideas? On Jun 22, 10:32 am, Dino Viehland wrote: > How exactly are you passing this? I assume the quotes aren't being included? The 1st form below prompts me and the 2nd form doesn't prompt (ignoring the UAC prompt on Vista of course which is a whole other ball of wax), are you doing something different? > > >>> import System > >>> System.Diagnostics.Process.Start('regedit.exe', '"/s foo.reg"') > > >>> System.Diagnostics.Process.Start('regedit.exe', '/s foo.reg') > > > > You could also check out the nt module where we have nt.popen (or os if you have the CPython std lib installed) which takes a single command line (exe + args) and we do the splitting for you - that'd also be compatible w/ CPython. > > -----Original Message----- > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > Sent: Friday, June 22, 2007 8:07 AM > To: u... at lists.ironpython.com > Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument > > System.Diagnostics.Process.Start(app, args) should take a string of > arguments delimited by spaces for the second argument of start which > it will pass to app on stdin. I'm trying to run app = "regedit.exe" > and args ="/s key.reg" but it's only recognizing the first argument > (which is /s). If I remove /s, it runs the key but I want this to run > silently. > > I've also tried ProcessStartInfo() but it suffers from the same > problem. Does anyone have any more information on this or know how to > work around this? > > Thanks, > Luke > > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com From michael.foord at resolversystems.com Fri Jun 22 17:42:21 2007 From: michael.foord at resolversystems.com (Michael Foord) Date: Fri, 22 Jun 2007 16:42:21 +0100 Subject: [IronPython] Default lineno attribute on SyntaxError Message-ID: <467BEDDD.3030502@resolversystems.com> Hello all, CPython: >>> s = SyntaxError('s') >>> s.lineno >>> IP 1.1: >>> s = SyntaxError('hello') >>> s.lineno Traceback (most recent call last): AttributeError: 'instance' object has no attribute 'lineno' :-( Michael http://www.voidspace.org.uk/ironpython/index.shtml -- Michael Foord Resolver Systems michael.foord at resolversystems.com Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finchley Road, London NW11 8NA, UK Resolver Systems Limited is registered in England and Wales as company number 5467329. VAT No. GB 893 5643 79 From fuzzyman at voidspace.org.uk Fri Jun 22 17:55:20 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 22 Jun 2007 16:55:20 +0100 Subject: [IronPython] Default lineno attribute on SyntaxError In-Reply-To: <467BEDDD.3030502@resolversystems.com> References: <467BEDDD.3030502@resolversystems.com> Message-ID: <467BF0E8.1010105@voidspace.org.uk> Oh - and if this the fix for this could be backported to 1.1 that would be really helpful, this bug is really inconvenient for us. Thanks Michael Michael Foord wrote: > Hello all, > > CPython: > > >>> s = SyntaxError('s') > >>> s.lineno > >>> > > > IP 1.1: > > >>> s = SyntaxError('hello') > >>> s.lineno > Traceback (most recent call last): > AttributeError: 'instance' object has no attribute 'lineno' > > :-( > > Michael > http://www.voidspace.org.uk/ironpython/index.shtml > > > From dinov at exchange.microsoft.com Fri Jun 22 18:07:03 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 09:07:03 -0700 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument In-Reply-To: <1182527249.105911.7340@g4g2000hsf.googlegroups.com> References: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1182527249.105911.7340@g4g2000hsf.googlegroups.com> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D09E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Unfortunately I'm not sure what could be going wrong here. This works for me on v1.x - I'm on Vista so I have to run from an admin command prompt (otherwise regedit doesn't find the file) but otherwise it just works - even if I use the code as you have it below. Have you checked the ExitCode property of the process? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luke Hoersten Sent: Friday, June 22, 2007 8:47 AM To: users at lists.ironpython.com Subject: Re: [IronPython] System.Diagnostics.Process.Start only uses first argument I'm not including the quotes. Those are just the strings I'm using, similar to your example. I'm getting different results: Only the first argument being sent in that string is being processed. The other is being ignored. So either I get /s and no .reg file or I import the .reg file and it prompts me. I'm writing a script so obviously prompting is undesirable. Here's my code: name = "c:\\Windows\\regedit.exe" args = "/s example.reg" System.Diagnostics.Process.Start(name, args) I've even tried waiting on the process to exit with WaitForExit() but that still does not work. I've read on Google about a lot of people having this similar problem but people seem to give up before posting a solution. Any other ideas? On Jun 22, 10:32 am, Dino Viehland wrote: > How exactly are you passing this? I assume the quotes aren't being included? The 1st form below prompts me and the 2nd form doesn't prompt (ignoring the UAC prompt on Vista of course which is a whole other ball of wax), are you doing something different? > > >>> import System > >>> System.Diagnostics.Process.Start('regedit.exe', '"/s foo.reg"') > > >>> System.Diagnostics.Process.Start('regedit.exe', '/s foo.reg') > > > > You could also check out the nt module where we have nt.popen (or os if you have the CPython std lib installed) which takes a single command line (exe + args) and we do the splitting for you - that'd also be compatible w/ CPython. > > -----Original Message----- > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > Sent: Friday, June 22, 2007 8:07 AM > To: u... at lists.ironpython.com > Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument > > System.Diagnostics.Process.Start(app, args) should take a string of > arguments delimited by spaces for the second argument of start which > it will pass to app on stdin. I'm trying to run app = "regedit.exe" > and args ="/s key.reg" but it's only recognizing the first argument > (which is /s). If I remove /s, it runs the key but I want this to run > silently. > > I've also tried ProcessStartInfo() but it suffers from the same > problem. Does anyone have any more information on this or know how to > work around this? > > Thanks, > Luke > > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Fri Jun 22 18:13:36 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 22 Jun 2007 09:13:36 -0700 Subject: [IronPython] Default lineno attribute on SyntaxError In-Reply-To: <467BF0E8.1010105@voidspace.org.uk> References: <467BEDDD.3030502@resolversystems.com> <467BF0E8.1010105@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C2227A150B2D0A2@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks Michael, I've opened bug #11283 and assigned it to the v1.1.1 release. If you could take the time to vote on this bug that'd be great. If there are other bugs that you, or anyone else, would like to see in v1.1.1 release please let us know. I'll start tagging those appropriately and this will give us good info on what needs to be fixed and if and when we should put out the next release and what it should include. Thanks! -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, June 22, 2007 8:55 AM To: Discussion of IronPython Subject: Re: [IronPython] Default lineno attribute on SyntaxError Oh - and if this the fix for this could be backported to 1.1 that would be really helpful, this bug is really inconvenient for us. Thanks Michael Michael Foord wrote: > Hello all, > > CPython: > > >>> s = SyntaxError('s') > >>> s.lineno > >>> > > > IP 1.1: > > >>> s = SyntaxError('hello') > >>> s.lineno > Traceback (most recent call last): > AttributeError: 'instance' object has no attribute 'lineno' > > :-( > > Michael > http://www.voidspace.org.uk/ironpython/index.shtml > > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From luke.hoersten at gmail.com Fri Jun 22 18:22:48 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Fri, 22 Jun 2007 16:22:48 -0000 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument In-Reply-To: <7AD436E4270DD54A94238001769C2227A150B2D09E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1182527249.105911.7340@g4g2000hsf.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D09E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <1182529368.398551.245040@q75g2000hsh.googlegroups.com> The only other thing I can think of is I'm giving regedit a reg key that exists on my usb key. So actually the args = "f:\\some\\file\ \key.reg". The exit code returns 0 every time. If I run my command and args directly on the command line, it work fine as well. On Jun 22, 11:07 am, Dino Viehland wrote: > Unfortunately I'm not sure what could be going wrong here. This works for me on v1.x - I'm on Vista so I have to run from an admin command prompt (otherwise regedit doesn't find the file) but otherwise it just works - even if I use the code as you have it below. > > Have you checked the ExitCode property of the process? > > -----Original Message----- > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > Sent: Friday, June 22, 2007 8:47 AM > To: u... at lists.ironpython.com > Subject: Re: [IronPython] System.Diagnostics.Process.Start only uses first argument > > I'm not including the quotes. Those are just the strings I'm using, > similar to your example. I'm getting different results: Only the first > argument being sent in that string is being processed. The other is > being ignored. So either I get /s and no .reg file or I import > the .reg file and it prompts me. I'm writing a script so obviously > prompting is undesirable. > > Here's my code: > name = "c:\\Windows\\regedit.exe" > args = "/s example.reg" > System.Diagnostics.Process.Start(name, args) > > I've even tried waiting on the process to exit with WaitForExit() but > that still does not work. > > I've read on Google about a lot of people having this similar problem > but people seem to give up before posting a solution. Any other ideas? > > On Jun 22, 10:32 am, Dino Viehland > wrote: > > How exactly are you passing this? I assume the quotes aren't being included? The 1st form below prompts me and the 2nd form doesn't prompt (ignoring the UAC prompt on Vista of course which is a whole other ball of wax), are you doing something different? > > > >>> import System > > >>> System.Diagnostics.Process.Start('regedit.exe', '"/s foo.reg"') > > > >>> System.Diagnostics.Process.Start('regedit.exe', '/s foo.reg') > > > > > > You could also check out the nt module where we have nt.popen (or os if you have the CPython std lib installed) which takes a single command line (exe + args) and we do the splitting for you - that'd also be compatible w/ CPython. > > > -----Original Message----- > > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > > Sent: Friday, June 22, 2007 8:07 AM > > To: u... at lists.ironpython.com > > Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument > > > System.Diagnostics.Process.Start(app, args) should take a string of > > arguments delimited by spaces for the second argument of start which > > it will pass to app on stdin. I'm trying to run app = "regedit.exe" > > and args ="/s key.reg" but it's only recognizing the first argument > > (which is /s). If I remove /s, it runs the key but I want this to run > > silently. > > > I've also tried ProcessStartInfo() but it suffers from the same > > problem. Does anyone have any more information on this or know how to > > work around this? > > > Thanks, > > Luke > > > _______________________________________________ > > users mailing list > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > > users mailing list > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com From luke.hoersten at gmail.com Fri Jun 22 22:54:44 2007 From: luke.hoersten at gmail.com (Luke Hoersten) Date: Fri, 22 Jun 2007 20:54:44 -0000 Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument In-Reply-To: <1182529368.398551.245040@q75g2000hsh.googlegroups.com> References: <1182524841.620364.269000@p77g2000hsh.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D092@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1182527249.105911.7340@g4g2000hsf.googlegroups.com> <7AD436E4270DD54A94238001769C2227A150B2D09E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <1182529368.398551.245040@q75g2000hsh.googlegroups.com> Message-ID: <1182545684.400369.211900@g37g2000prf.googlegroups.com> I found that the problem is actually with regedit and not .NET. I also found that there is a .NET class for editing registry keys (Microsoft.Win32.RegistryKey) which is much cleaner than having external .reg files anyway. Thanks for your help Dino! -Luke Hoersten On Jun 22, 11:22 am, Luke Hoersten wrote: > The only other thing I can think of is I'm giving regedit a reg key > that exists on my usb key. So actually the args = "f:\\some\\file\ > \key.reg". > > The exit code returns 0 every time. If I run my command and args > directly on the command line, it work fine as well. > > On Jun 22, 11:07 am, Dino Viehland > wrote: > > > > > Unfortunately I'm not sure what could be going wrong here. This works for me on v1.x - I'm on Vista so I have to run from an admin command prompt (otherwise regedit doesn't find the file) but otherwise it just works - even if I use the code as you have it below. > > > Have you checked the ExitCode property of the process? > > > -----Original Message----- > > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > > Sent: Friday, June 22, 2007 8:47 AM > > To: u... at lists.ironpython.com > > Subject: Re: [IronPython] System.Diagnostics.Process.Start only uses first argument > > > I'm not including the quotes. Those are just the strings I'm using, > > similar to your example. I'm getting different results: Only the first > > argument being sent in that string is being processed. The other is > > being ignored. So either I get /s and no .reg file or I import > > the .reg file and it prompts me. I'm writing a script so obviously > > prompting is undesirable. > > > Here's my code: > > name = "c:\\Windows\\regedit.exe" > > args = "/s example.reg" > > System.Diagnostics.Process.Start(name, args) > > > I've even tried waiting on the process to exit with WaitForExit() but > > that still does not work. > > > I've read on Google about a lot of people having this similar problem > > but people seem to give up before posting a solution. Any other ideas? > > > On Jun 22, 10:32 am, Dino Viehland > > wrote: > > > How exactly are you passing this? I assume the quotes aren't being included? The 1st form below prompts me and the 2nd form doesn't prompt (ignoring the UAC prompt on Vista of course which is a whole other ball of wax), are you doing something different? > > > > >>> import System > > > >>> System.Diagnostics.Process.Start('regedit.exe', '"/s foo.reg"') > > > > >>> System.Diagnostics.Process.Start('regedit.exe', '/s foo.reg') > > > > > > > > You could also check out the nt module where we have nt.popen (or os if you have the CPython std lib installed) which takes a single command line (exe + args) and we do the splitting for you - that'd also be compatible w/ CPython. > > > > -----Original Message----- > > > From: users-boun... at lists.ironpython.com [mailto:users-boun... at lists.ironpython.com] On Behalf Of Luke Hoersten > > > Sent: Friday, June 22, 2007 8:07 AM > > > To: u... at lists.ironpython.com > > > Subject: [IronPython] System.Diagnostics.Process.Start only uses first argument > > > > System.Diagnostics.Process.Start(app, args) should take a string of > > > arguments delimited by spaces for the second argument of start which > > > it will pass to app on stdin. I'm trying to run app = "regedit.exe" > > > and args ="/s key.reg" but it's only recognizing the first argument > > > (which is /s). If I remove /s, it runs the key but I want this to run > > > silently. > > > > I've also tried ProcessStartInfo() but it suffers from the same > > > problem. Does anyone have any more information on this or know how to > > > work around this? > > > > Thanks, > > > Luke > > > > _______________________________________________ > > > users mailing list > > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > > > users mailing list > > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > > users mailing list > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > > users mailing list > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com From amm at selektro.dk Mon Jun 25 14:51:02 2007 From: amm at selektro.dk (Anders M. Mikkelsen) Date: Mon, 25 Jun 2007 14:51:02 +0200 Subject: [IronPython] Using iso-latin-1 character set Message-ID: <000e01c7b727$7c8ea840$1600a8c0@PC52> Hi I'm using IronPython in an environment where I have to use characters from the iso-latin-1 character set (??? and ???). The problem is that IronPython seems to be replacing my iso-latin-1 characters with ?-marks. print "?ble" yields "?ble" on the console. print u"?ble" yields "?ble" on the console. print u"\u00e6ble" yields "?ble" on the console (as it should) Now I cannot have my non-geek collegues write \u00e6 every time they have to put in an '?' in their scripts, so I have to come up with a better solution. Any ideas? I'm using emacs to edit my scripts and have tried saving using different character encodings (including iso-latin-1 and UTF8/16). If I save the file as UTF8, the iso-latin-1 characters are replaced by two question marks (??). Sadly emacs does not support unicode (out-of-the-box). Wonder if that would solve my problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Mon Jun 25 14:55:50 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 25 Jun 2007 21:55:50 +0900 Subject: [IronPython] Using iso-latin-1 character set In-Reply-To: <000e01c7b727$7c8ea840$1600a8c0@PC52> References: <000e01c7b727$7c8ea840$1600a8c0@PC52> Message-ID: <5b0248170706250555w73f71f02i77bd5a2a3e9f4f6a@mail.gmail.com> 2007/6/25, Anders M. Mikkelsen : > I'm using IronPython in an environment where I have to use > characters from the iso-latin-1 character set (??? and ???). > The problem is that IronPython seems to be replacing my > iso-latin-1 characters with ?-marks. > > Any ideas? Did you declare source code encoding? http://www.python.org/dev/peps/pep-0263/ Put this comment at the top of your file: # coding: utf-8 -- Seo Sanghyeon From sanxiyn at gmail.com Mon Jun 25 14:59:31 2007 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 25 Jun 2007 21:59:31 +0900 Subject: [IronPython] Using iso-latin-1 character set In-Reply-To: <5b0248170706250555w73f71f02i77bd5a2a3e9f4f6a@mail.gmail.com> References: <000e01c7b727$7c8ea840$1600a8c0@PC52> <5b0248170706250555w73f71f02i77bd5a2a3e9f4f6a@mail.gmail.com> Message-ID: <5b0248170706250559o5057332ft71de18543bbbd1cb@mail.gmail.com> 2007/6/25, Sanghyeon Seo : > 2007/6/25, Anders M. Mikkelsen : > > I'm using IronPython in an environment where I have to use > > characters from the iso-latin-1 character set (??? and ???). > > The problem is that IronPython seems to be replacing my > > iso-latin-1 characters with ?-marks. > > > > Any ideas? > > Did you declare source code encoding? > http://www.python.org/dev/peps/pep-0263/ > > Put this comment at the top of your file: > # coding: utf-8 By the way, it is an IronPython bug to silently replace characters with ?-marks. CPython produces this warning: sys:1: DeprecationWarning: Non-ASCII character '\xc3' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details -- Seo Sanghyeon From amm at selektro.dk Mon Jun 25 15:30:17 2007 From: amm at selektro.dk (Anders M. Mikkelsen) Date: Mon, 25 Jun 2007 15:30:17 +0200 Subject: [IronPython] Using iso-latin-1 character set References: <000e01c7b727$7c8ea840$1600a8c0@PC52> <5b0248170706250555w73f71f02i77bd5a2a3e9f4f6a@mail.gmail.com> Message-ID: <001c01c7b72c$f8144330$1600a8c0@PC52> That did the trick - thanks! /anders ----- Original Message ----- From: "Sanghyeon Seo" To: "Discussion of IronPython" Sent: Monday, June 25, 2007 2:55 PM Subject: Re: [IronPython] Using iso-latin-1 character set > 2007/6/25, Anders M. Mikkelsen : >> I'm using IronPython in an environment where I have to use >> characters from the iso-latin-1 character set (??? and ???). >> The problem is that IronPython seems to be replacing my >> iso-latin-1 characters with ?-marks. >> >> Any ideas? > > Did you declare source code encoding? > http://www.python.org/dev/peps/pep-0263/ > > Put this comment at the top of your file: > # coding: utf-8 > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dfugate at microsoft.com Mon Jun 25 20:24:35 2007 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 25 Jun 2007 11:24:35 -0700 Subject: [IronPython] Using iso-latin-1 character set In-Reply-To: <5b0248170706250559o5057332ft71de18543bbbd1cb@mail.gmail.com> References: <000e01c7b727$7c8ea840$1600a8c0@PC52> <5b0248170706250555w73f71f02i77bd5a2a3e9f4f6a@mail.gmail.com> <5b0248170706250559o5057332ft71de18543bbbd1cb@mail.gmail.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D9114A64B2F98@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks Seo! Filed as CodePlex Work Item #11334 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11334). Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, June 25, 2007 6:00 AM To: Discussion of IronPython Subject: Re: [IronPython] Using iso-latin-1 character set By the way, it is an IronPython bug to silently replace characters with ?-marks. CPython produces this warning: sys:1: DeprecationWarning: Non-ASCII character '\xc3' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Wed Jun 27 00:48:24 2007 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 26 Jun 2007 23:48:24 +0100 Subject: [IronPython] IronPython 2.0 Alpha 2 and 1.1.1 Message-ID: <468197B8.4030604@voidspace.org.uk> Hello all, Mysterious new pages have appeared on the codeplex site: http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5246 http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5141 Nothing to download yet... :-) Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml From dinov at exchange.microsoft.com Wed Jun 27 01:04:59 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 26 Jun 2007 16:04:59 -0700 Subject: [IronPython] IronPython 2.0 Alpha 2 and 1.1.1 In-Reply-To: <468197B8.4030604@voidspace.org.uk> References: <468197B8.4030604@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C2227A71E579886@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Alpha 2's coming sometime soon. 1.1.1's just so we can start assigning bugs against that release and have a good way to track the important issues there. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Tuesday, June 26, 2007 3:48 PM To: Discussion of IronPython Subject: [IronPython] IronPython 2.0 Alpha 2 and 1.1.1 Hello all, Mysterious new pages have appeared on the codeplex site: http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5246 http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5141 Nothing to download yet... :-) Michael Foord http://www.voidspace.org.uk/ironpython/index.shtml _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From bewest at gmail.com Thu Jun 28 02:22:18 2007 From: bewest at gmail.com (Benjamin West) Date: Wed, 27 Jun 2007 17:22:18 -0700 Subject: [IronPython] catching WebException from OpenReadAsync Message-ID: <8ad71be30706271722q6abc0920x6a08716cd6afad37@mail.gmail.com> Is this a bug or am I doing something wrong? $ cat webclient.py import clr import System from System import Uri from System.Net import WebClient, WebException class Foo: def __init__(self, uri): self.setup(uri) def setup(self, uri): self.uri = Uri(uri) self.wc = WebClient() self.wc.OpenReadCompleted += self.asyncReader try: self.wc.OpenReadAsync(self.uri) print "fetching.... please wait." except (Exception, WebException), e: print "got exception: %s" % e def asyncReader(self, sender, args): stream = args.Result try: print str(stream) print "Success." except (Exception, WebException), e: print "got exception: %s" % e $ ipy IronPython 1.1 (1.1) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from webclient import * >>> f = Foo('http://www.google.com/bad/url') fetching.... please wait. >>> Unhandled exception: Traceback (most recent call last): File System, line unknown, in OpenReadAsyncCallback File System, line unknown, in GetWebResponse File System, line unknown, in EndGetResponse File mscorlib, line unknown, in PerformWaitCallback File mscorlib, line unknown, in Run File mscorlib, line unknown, in WaitCallback_Context File System, line unknown, in OpenReadOperationCompleted File System, line unknown, in OnOpenReadCompleted File System, line unknown, in Invoke File , line 0, in System.Void(Object, OpenReadCompletedEventArgs)##73 File c:\Program Files\Internet Explorer\webclient.py, line 21, in asyncReader File , line 0, in get_Result##76 File System, line unknown, in get_Result File System, line unknown, in RaiseExceptionIfNecessary StandardError: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. Unhandled Exception: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result) --- End of inner exception stack trace --- at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at System.Net.OpenReadCompletedEventArgs.get_Result() at get_Result##76(Object ) at IronPython.Runtime.Calls.CallTarget1.Invoke(Object arg0) at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext context, Object arg0) at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext context, Object instance, Object[] args) at IronPython.Runtime.Types.ReflectedGetterSetter.CallGetter(Object instance, Object[] args) at IronPython.Runtime.Types.ReflectedProperty.GetAttribute(Object instance, Object context) at IronPython.Runtime.Operations.Ops.GetDescriptor(Object o, Object instance, Object context) at IronPython.Runtime.Types.DynamicType.UncheckedGetDescriptor(Object o, Object instance, Object context) at IronPython.Runtime.Types.DynamicType.TryBaseGetAttr(ICallerContext context, Object self, SymbolId name, Object& ret) at IronPython.Runtime.Types.ReflectedType.TryGetAttr(ICallerContext context, Object self, SymbolId name, Object& ret) at IronPython.Runtime.Types.DynamicType.GetAttr(ICallerContext context, Object self, SymbolId name) at IronPython.Runtime.Operations.Ops.GetAttr(ICallerContext context, Object o, SymbolId name) at webclient.asyncReader$f146(FunctionEnvironment8Dictionary $env, Object self, Object sender, Object args) in c:\Program Files\Internet Explorer\webclient.py:line 21 at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object arg0, Object arg1, Object arg2) at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object[] args) at IronPython.Runtime.Calls.PythonFunction.CallInstance(ICallerContext context, Object instance, Object[] args) at IronPython.Runtime.Calls.Method.Call(ICallerContext context, Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) at IronPython.Runtime.Types.ReflectedEvent.EventDispatcher.Call(Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object arg0, Object arg1) at System.Void(Object, OpenReadCompletedEventArgs)##73(Object , Object , OpenReadCompletedEventArgs ) at System.Net.OpenReadCompletedEventHandler.Invoke(Object sender, OpenReadCompletedEventArgs e) at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e) at System.Net.WebClient.OpenReadOperationCompleted(Object arg) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) From jomes at microsoft.com Thu Jun 28 03:08:00 2007 From: jomes at microsoft.com (John Messerly) Date: Wed, 27 Jun 2007 18:08:00 -0700 Subject: [IronPython] catching WebException from OpenReadAsync In-Reply-To: <8ad71be30706271722q6abc0920x6a08716cd6afad37@mail.gmail.com> References: <8ad71be30706271722q6abc0920x6a08716cd6afad37@mail.gmail.com> Message-ID: <918705E903F4714CB713D89AB5F1857D6E637B678B@NA-EXMSG-C116.redmond.corp.microsoft.com> The "stream = args.Result" line in asyncReader is the culprit. The Result property will throw if the read operation failed. You could move that line inside the try block, so the exception is caught. Or alternatively, use the args.Exception property to determine if there was an error in the read. - John -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Benjamin West Sent: Wednesday, June 27, 2007 5:22 PM To: Discussion of IronPython Subject: [IronPython] catching WebException from OpenReadAsync Is this a bug or am I doing something wrong? $ cat webclient.py import clr import System from System import Uri from System.Net import WebClient, WebException class Foo: def __init__(self, uri): self.setup(uri) def setup(self, uri): self.uri = Uri(uri) self.wc = WebClient() self.wc.OpenReadCompleted += self.asyncReader try: self.wc.OpenReadAsync(self.uri) print "fetching.... please wait." except (Exception, WebException), e: print "got exception: %s" % e def asyncReader(self, sender, args): stream = args.Result try: print str(stream) print "Success." except (Exception, WebException), e: print "got exception: %s" % e $ ipy IronPython 1.1 (1.1) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from webclient import * >>> f = Foo('http://www.google.com/bad/url') fetching.... please wait. >>> Unhandled exception: Traceback (most recent call last): File System, line unknown, in OpenReadAsyncCallback File System, line unknown, in GetWebResponse File System, line unknown, in EndGetResponse File mscorlib, line unknown, in PerformWaitCallback File mscorlib, line unknown, in Run File mscorlib, line unknown, in WaitCallback_Context File System, line unknown, in OpenReadOperationCompleted File System, line unknown, in OnOpenReadCompleted File System, line unknown, in Invoke File , line 0, in System.Void(Object, OpenReadCompletedEventArgs)##73 File c:\Program Files\Internet Explorer\webclient.py, line 21, in asyncReader File , line 0, in get_Result##76 File System, line unknown, in get_Result File System, line unknown, in RaiseExceptionIfNecessary StandardError: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. Unhandled Exception: System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result) --- End of inner exception stack trace --- at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at System.Net.OpenReadCompletedEventArgs.get_Result() at get_Result##76(Object ) at IronPython.Runtime.Calls.CallTarget1.Invoke(Object arg0) at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext context, Object arg0) at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext context, Object instance, Object[] args) at IronPython.Runtime.Types.ReflectedGetterSetter.CallGetter(Object instance, Object[] args) at IronPython.Runtime.Types.ReflectedProperty.GetAttribute(Object instance, Object context) at IronPython.Runtime.Operations.Ops.GetDescriptor(Object o, Object instance, Object context) at IronPython.Runtime.Types.DynamicType.UncheckedGetDescriptor(Object o, Object instance, Object context) at IronPython.Runtime.Types.DynamicType.TryBaseGetAttr(ICallerContext context, Object self, SymbolId name, Object& ret) at IronPython.Runtime.Types.ReflectedType.TryGetAttr(ICallerContext context, Object self, SymbolId name, Object& ret) at IronPython.Runtime.Types.DynamicType.GetAttr(ICallerContext context, Object self, SymbolId name) at IronPython.Runtime.Operations.Ops.GetAttr(ICallerContext context, Object o, SymbolId name) at webclient.asyncReader$f146(FunctionEnvironment8Dictionary $env, Object self, Object sender, Object args) in c:\Program Files\Internet Explorer\webclient.py:line 21 at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object arg0, Object arg1, Object arg2) at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, Object[] args) at IronPython.Runtime.Calls.PythonFunction.CallInstance(ICallerContext context, Object instance, Object[] args) at IronPython.Runtime.Calls.Method.Call(ICallerContext context, Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) at IronPython.Runtime.Types.ReflectedEvent.EventDispatcher.Call(Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) at IronPython.Runtime.Operations.Ops.Call(Object func, Object arg0, Object arg1) at System.Void(Object, OpenReadCompletedEventArgs)##73(Object , Object , OpenReadCompletedEventArgs ) at System.Net.OpenReadCompletedEventHandler.Invoke(Object sender, OpenReadCompletedEventArgs e) at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e) at System.Net.WebClient.OpenReadOperationCompleted(Object arg) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From bewest at gmail.com Thu Jun 28 03:59:27 2007 From: bewest at gmail.com (Benjamin West) Date: Wed, 27 Jun 2007 18:59:27 -0700 Subject: [IronPython] catching WebException from OpenReadAsync In-Reply-To: <918705E903F4714CB713D89AB5F1857D6E637B678B@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <8ad71be30706271722q6abc0920x6a08716cd6afad37@mail.gmail.com> <918705E903F4714CB713D89AB5F1857D6E637B678B@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <8ad71be30706271859x28e59043y2a41082be7b701f3@mail.gmail.com> Ha. Thanks. -Ben On 6/27/07, John Messerly wrote: > The "stream = args.Result" line in asyncReader is the culprit. The Result property will throw if the read operation failed. You could move that line inside the try block, so the exception is caught. Or alternatively, use the args.Exception property to determine if there was an error in the read. > > - John > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Benjamin West > Sent: Wednesday, June 27, 2007 5:22 PM > To: Discussion of IronPython > Subject: [IronPython] catching WebException from OpenReadAsync > > Is this a bug or am I doing something wrong? > > $ cat webclient.py > import clr > import System > from System import Uri > from System.Net import WebClient, WebException > > > class Foo: > def __init__(self, uri): > self.setup(uri) > > def setup(self, uri): > self.uri = Uri(uri) > self.wc = WebClient() > self.wc.OpenReadCompleted += self.asyncReader > try: > self.wc.OpenReadAsync(self.uri) > print "fetching.... please wait." > except (Exception, WebException), e: print "got > exception: %s" % e > > def asyncReader(self, sender, args): > stream = args.Result > try: > print str(stream) > print "Success." > except (Exception, WebException), e: print "got > exception: %s" % e > > > $ ipy > IronPython 1.1 (1.1) on .NET 2.0.50727.42 > Copyright (c) Microsoft Corporation. All rights reserved. > >>> from webclient import * > >>> f = Foo('http://www.google.com/bad/url') > fetching.... please wait. > >>> Unhandled exception: > Traceback (most recent call last): > File System, line unknown, in OpenReadAsyncCallback > File System, line unknown, in GetWebResponse > File System, line unknown, in EndGetResponse > File mscorlib, line unknown, in PerformWaitCallback > File mscorlib, line unknown, in Run > File mscorlib, line unknown, in WaitCallback_Context > File System, line unknown, in OpenReadOperationCompleted > File System, line unknown, in OnOpenReadCompleted > File System, line unknown, in Invoke > File , line 0, in System.Void(Object, OpenReadCompletedEventArgs)##73 > File c:\Program Files\Internet Explorer\webclient.py, line 21, in asyncReader > File , line 0, in get_Result##76 > File System, line unknown, in get_Result > File System, line unknown, in RaiseExceptionIfNecessary > StandardError: An exception occurred during the operation, making the > result invalid. Check InnerException for exception details. > > Unhandled Exception: System.Reflection.TargetInvocationException: An > exception occurred during the operation, making the result invalid. > Check InnerException for exception details. ---> > System.Net.WebException: The remote server returned an error: (404) > Not Found. > at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) > at System.Net.WebClient.GetWebResponse(WebRequest request, > IAsyncResult result) > at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result) > --- End of inner exception stack trace --- > at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() > at System.Net.OpenReadCompletedEventArgs.get_Result() > at get_Result##76(Object ) > at IronPython.Runtime.Calls.CallTarget1.Invoke(Object arg0) > at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext > context, Object arg0) > at IronPython.Runtime.Calls.FastCallable1.CallInstance(ICallerContext > context, Object instance, Object[] args) > at IronPython.Runtime.Types.ReflectedGetterSetter.CallGetter(Object > instance, Object[] args) > at IronPython.Runtime.Types.ReflectedProperty.GetAttribute(Object > instance, Object context) > at IronPython.Runtime.Operations.Ops.GetDescriptor(Object o, Object > instance, Object context) > at IronPython.Runtime.Types.DynamicType.UncheckedGetDescriptor(Object > o, Object instance, Object context) > at IronPython.Runtime.Types.DynamicType.TryBaseGetAttr(ICallerContext > context, Object self, SymbolId name, Object& ret) > at IronPython.Runtime.Types.ReflectedType.TryGetAttr(ICallerContext > context, Object self, SymbolId name, Object& ret) > at IronPython.Runtime.Types.DynamicType.GetAttr(ICallerContext > context, Object self, SymbolId name) > at IronPython.Runtime.Operations.Ops.GetAttr(ICallerContext > context, Object o, SymbolId name) > at webclient.asyncReader$f146(FunctionEnvironment8Dictionary $env, > Object self, Object sender, Object args) in c:\Program Files\Internet > Explorer\webclient.py:line 21 > at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, > Object arg0, Object arg1, Object arg2) > at IronPython.Runtime.Calls.Function3.Call(ICallerContext context, > Object[] args) > at IronPython.Runtime.Calls.PythonFunction.CallInstance(ICallerContext > context, Object instance, Object[] args) > at IronPython.Runtime.Calls.Method.Call(ICallerContext context, > Object[] args) > at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) > at IronPython.Runtime.Types.ReflectedEvent.EventDispatcher.Call(Object[] > args) > at IronPython.Runtime.Operations.Ops.Call(Object func, Object[] args) > at IronPython.Runtime.Operations.Ops.Call(Object func, Object arg0, > Object arg1) > at System.Void(Object, OpenReadCompletedEventArgs)##73(Object , > Object , OpenReadCompletedEventArgs ) > at System.Net.OpenReadCompletedEventHandler.Invoke(Object sender, > OpenReadCompletedEventArgs e) > at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e) > at System.Net.WebClient.OpenReadOperationCompleted(Object arg) > at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object > state) > at System.Threading.ExecutionContext.Run(ExecutionContext > executionContext, ContextCallback callback, Object state) > at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From realn2s at googlemail.com Thu Jun 28 22:41:08 2007 From: realn2s at googlemail.com (C L) Date: Thu, 28 Jun 2007 22:41:08 +0200 Subject: [IronPython] SystemError when inspecting an Assembly File through Assembly.ReflectionOnlyLoadFrom() Message-ID: <81bb01120706281341y2163e6bdw8718859e609f5eba@mail.gmail.com> Hello, I am just playing around with IronPython (1.0 and 1.1 on .NET 2.0.50727.42) and I tried to access the version and the assembly name of an assembly (DLL or EXE) through reflections. (I would like to get the referenced assemblies as well, but that is a second step) While the following works in C# code work (with eg it's own EXE as argument) ------ using System; using System.Reflection; class Program { static void Main(string[] args) { Assembly a = Assembly.ReflectionOnlyLoadFrom(args[0]); AssemblyName an = a.GetName(); Console.Write("{0} {1}", an.Name, an.Version); } } ------ With the (IMHO) equivalent IronPython code ------ import sys from System.Reflection import * a = Assembly.ReflectionOnlyLoadFrom(sys.argv[1]) an = a.GetName() print an.Name + " " + an.Version ------ I get following error (VersionInfo.exe is the compiled version of the above C# code) > ipy.exe AssemblyVersion.py bin\Debug\VersionInfo.exe Traceback (most recent call last): File AssemblyVersion.py, line 4, in Initialize SystemError: It is illegal to reflect on the custom attributes of a Type loaded via ReflectionOnlyGetType (see Assembly.ReflectionOnly) -- use CustomAttributeData instead. I tried to use CustomAttributeData as suggested by the error but didn't succeed (I simply don't understand how to use it). It seemed terrible complicated to access the version. It would be possible to parse str(a) but I can't believe this is the way to go. Are there any other ways to access this information or what am I missing? Or any hints? Regards, Claudius Btw: I tried to send this may before, but didn't get any reply nor could I find it in the archive. So please excuse if you get it a second time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jomes at microsoft.com Thu Jun 28 23:35:25 2007 From: jomes at microsoft.com (John Messerly) Date: Thu, 28 Jun 2007 14:35:25 -0700 Subject: [IronPython] SystemError when inspecting an Assembly File through Assembly.ReflectionOnlyLoadFrom() In-Reply-To: <81bb01120706281341y2163e6bdw8718859e609f5eba@mail.gmail.com> References: <81bb01120706281341y2163e6bdw8718859e609f5eba@mail.gmail.com> Message-ID: <918705E903F4714CB713D89AB5F1857D6E637B6ACB@NA-EXMSG-C116.redmond.corp.microsoft.com> I think what we're seeing here is an IronPython bug. When you try to call a method on "a", we reflect over the assembly looking for custom attributes, which fails because it was loaded with ReflectionOnlyLoadFrom. If it's any consolation, it is fixed in the 2.0 alpha tree: IronPython console: IronPython 2.0 (2.0.10625.05) on .NET 2.0.50727.1318 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> from System.Reflection import * >>> a = Assembly.ReflectionOnlyLoadFrom('Test.exe') >>> an = a.GetName() >>> print an.Name + " " + str(an.Version) Test 1.0.0.0 In 1.1, it looks like you can get the assembly version string by doing "str(a)". That doesn't get you the list of referenced assemblies though. The easiest workaround is probably to create a C# helper DLL to do the reflection piece, and then call that from IronPython. - John -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of C L Sent: Thursday, June 28, 2007 1:41 PM To: users at lists.ironpython.com Subject: [IronPython] SystemError when inspecting an Assembly File through Assembly.ReflectionOnlyLoadFrom() Hello, I am just playing around with IronPython (1.0 and 1.1 on .NET 2.0.50727.42) and I tried to access the version and the assembly name of an assembly (DLL or EXE) through reflections. (I would like to get the referenced assemblies as well, but that is a second step) While the following works in C# code work (with eg it's own EXE as argument) ------ using System; using System.Reflection; class Program { static void Main(string[] args) { Assembly a = Assembly.ReflectionOnlyLoadFrom(args[0]); AssemblyName an = a.GetName(); Console.Write("{0} {1}", an.Name, an.Version); } } ------ With the (IMHO) equivalent IronPython code ------ import sys from System.Reflection import * a = Assembly.ReflectionOnlyLoadFrom(sys.argv[1]) an = a.GetName() print an.Name + " " + an.Version ------ I get following error (VersionInfo.exe is the compiled version of the above C# code) > ipy.exe AssemblyVersion.py bin\Debug\VersionInfo.exe Traceback (most recent call last): File AssemblyVersion.py, line 4, in Initialize SystemError: It is illegal to reflect on the custom attributes of a Type loaded via ReflectionOnlyGetType (see Assembly.ReflectionOnly) -- use CustomAttributeData instead. I tried to use CustomAttributeData as suggested by the error but didn't succeed (I simply don't understand how to use it). It seemed terrible complicated to access the version. It would be possible to parse str(a) but I can't believe this is the way to go. Are there any other ways to access this information or what am I missing? Or any hints? Regards, Claudius Btw: I tried to send this may before, but didn't get any reply nor could I find it in the archive. So please excuse if you get it a second time. From realn2s at googlemail.com Thu Jun 28 23:56:07 2007 From: realn2s at googlemail.com (C L) Date: Thu, 28 Jun 2007 23:56:07 +0200 Subject: [IronPython] SystemError when inspecting an Assembly File through Assembly.ReflectionOnlyLoadFrom() In-Reply-To: <918705E903F4714CB713D89AB5F1857D6E637B6ACB@NA-EXMSG-C116.redmond.corp.microsoft.com> References: <81bb01120706281341y2163e6bdw8718859e609f5eba@mail.gmail.com> <918705E903F4714CB713D89AB5F1857D6E637B6ACB@NA-EXMSG-C116.redmond.corp.microsoft.com> Message-ID: <81bb01120706281456k5a081223l120c45e090b0a80c@mail.gmail.com> Thank you John, I will try 2.0 alpha, that is perfectly ok. I would like to avoid the C# helper DLL as I try to show that there are advantages useing IronPython instead of C# (in some situations). For example because of the Python library or the convenient syntax. So build a C# DLL to enable the use of Python wouldn't demonstrate the point ;-) If I am on it here are some of my ideas, any suggestions are welcome: The example I thought about were: 1. Searching for files (and listing them on stdout) by iterating though directories and comparing the names to a regular expression (pure Python) 2. Extending 1. to modify the files (eg. batch renaming) (pure Python) 3. Extending 1. to search for assemblies and print their versions (and the referenced assemblies and their version, similar to Linux ldd) (IronPython) 4. Accessing the registry and listing all installed programs (IronPython) More ideas or extensions are welcome. Regards, Claudius On 6/28/07, John Messerly wrote: > > I think what we're seeing here is an IronPython bug. When you try to call > a method on "a", we reflect over the assembly looking for custom attributes, > which fails because it was loaded with ReflectionOnlyLoadFrom. If it's any > consolation, it is fixed in the 2.0 alpha tree: > > IronPython console: IronPython 2.0 (2.0.10625.05) on .NET 2.0.50727.1318 > Copyright (c) Microsoft Corporation. All rights reserved. > >>> import sys > >>> from System.Reflection import * > >>> a = Assembly.ReflectionOnlyLoadFrom('Test.exe') > >>> an = a.GetName() > >>> print an.Name + " " + str(an.Version) > Test 1.0.0.0 > > In 1.1, it looks like you can get the assembly version string by doing > "str(a)". That doesn't get you the list of referenced assemblies though. The > easiest workaround is probably to create a C# helper DLL to do the > reflection piece, and then call that from IronPython. > > - John > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of C L > Sent: Thursday, June 28, 2007 1:41 PM > To: users at lists.ironpython.com > Subject: [IronPython] SystemError when inspecting an Assembly File through > Assembly.ReflectionOnlyLoadFrom() > > Hello, > > I am just playing around with IronPython (1.0 and 1.1 on .NET 2.0.50727.42 > ) > and I tried to access the version and the assembly name of an assembly > (DLL or EXE) > through reflections. (I would like to get the referenced assemblies as > well, but that is a second step) > > While the following works in C# code work (with eg it's own EXE as > argument) > ------ > using System; > using System.Reflection; > > class Program > { > static void Main(string[] args) > { > Assembly a = Assembly.ReflectionOnlyLoadFrom(args[0]); > AssemblyName an = a.GetName(); > Console.Write("{0} {1}", an.Name, an.Version); > } > } > ------ > > > With the (IMHO) equivalent IronPython code > ------ > import sys > from System.Reflection import * > a = Assembly.ReflectionOnlyLoadFrom(sys.argv[1]) > an = a.GetName() > print an.Name + " " + an.Version > ------ > > I get following error (VersionInfo.exe is the compiled version of the > above C# code) > > ipy.exe AssemblyVersion.py bin\Debug\VersionInfo.exe > Traceback (most recent call last): > File AssemblyVersion.py, line 4, in Initialize > SystemError: It is illegal to reflect on the custom attributes of a Type > loaded via ReflectionOnlyGetType (see Assembly.ReflectionOnly) -- use > CustomAttributeData instead. > > I tried to use CustomAttributeData as suggested by the error but didn't > succeed > (I simply don't understand how to use it). > It seemed terrible complicated to access the version. > > It would be possible to parse str(a) but I can't believe this is > the way to go. > > Are there any other ways to access this information or > what am I missing? Or any hints? > > Regards, > Claudius > > > Btw: I tried to send this may before, but didn't get any reply nor > could I find it in the archive. So please excuse if you get it a second > time. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From debackerl at gmail.com Fri Jun 29 20:39:48 2007 From: debackerl at gmail.com (Laurent Debacker) Date: Fri, 29 Jun 2007 20:39:48 +0200 Subject: [IronPython] Using iso-latin-1 character set In-Reply-To: <000e01c7b727$7c8ea840$1600a8c0@PC52> References: <000e01c7b727$7c8ea840$1600a8c0@PC52> Message-ID: <75751ca80706291139q4305e8edp65e3bcf257ad0e37@mail.gmail.com> Some text editors such as Notepad++ mark UTF-8 files by placing the following three bytes at the beginning of the file: EF BB BF. Using IronPython 2 and the .NET Framework, it works great too. On 6/25/07, Anders M. Mikkelsen wrote: > > Hi > > I'm using IronPython in an environment where I have to use > characters from the iso-latin-1 character set (??? and ???). > The problem is that IronPython seems to be replacing my > iso-latin-1 characters with ?-marks. > > print "?ble" yields "?ble" on the console. > print u"?ble" yields "?ble" on the console. > print u"\u00e6ble" yields "?ble" on the console (as it should) > > Now I cannot have my non-geek collegues write \u00e6 every > time they have to put in an '?' in their scripts, so I have to > come up with a better solution. > > Any ideas? > > I'm using emacs to edit my scripts and have tried saving using > different character encodings (including iso-latin-1 and UTF8/16). > If I save the file as UTF8, the iso-latin-1 characters are replaced > by two question marks (??). Sadly emacs does not support > unicode (out-of-the-box). Wonder if that would solve my problem? > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Jun 29 22:01:27 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 29 Jun 2007 13:01:27 -0700 Subject: [IronPython] IronPython v2.0 Alpha 2 Released! Message-ID: <7AD436E4270DD54A94238001769C2227A71E579E94@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Hello IronPython Community, We have just released IronPython 2.0 Alpha 2. This release is a snapshot of the on-going progress with IronPython 2.0 and the DLR. One of the most significant changes in this release is the removal of Microsoft.Scripting.Vestigial. Previously this DLL was a combination of both IronPython support code as well as portions of the DLR. With Alpha 2 Microsoft.Scripting.dll contains all portions of the DLR and IronPython.dll contains the IronPython implementation which builds upon the DLR. This should help consumers of the DLR to better understand the public surface area. Being early in the product cycle this surface area may still change significantly but there are now bright lines between what DLR code is and what IronPython code is. IronPython also continues to use the underlying concepts of the DLR more and more. In the Alpha 1 release there were numerous locations where IronPython would use DynamicSites but fallback to runtime lookups because the site couldn't perform optimally. In this release we've continued to flush out these corner cases and improve IronPython's support for generating proper rules when using DynamicSites. We've also improved the shared infrastructure the DLR provides for creating rules and moved IronPython to this shared infrastructure. Significant changes in the DLR include the removal of Microsoft.Scripting.Vestigial, continued refinement of the AST and dynamic site support, and replacement of the old IDynamicObject with the new IDynamicObject. IronPython has also been updated to use more of the DLR concepts. The DLR also continues to be expanded and improved. The DLR AST has been improved with support for more static constructs such as simple exception handling constructors and better variable support. The DLR AST factory methods have also been moved to a static Ast class to enable easier construction of ASTs. There have also been some additional convenience methods added to various nodes to make construction even easier still. Finally the DLR also has been improved to support an arbitrary number of arguments inside a DynamicSite which helps to enable calling all functions in an optimized manner. One of the most significant (although fairly small) improvements is the introduction of the IDynamicObject interface under its proper name. In the Alpha 1 release this interface was temporarily named IActionable because IronPython had previously shipped with an IDynamicObject interface. In this new release the old interface has been completely removed and the DLR now provides the correct IDynamicObject interface. This interface lives at the heart of the DLR so it's noteworthy that it's now found its final home. Note: Due to dependencies upon APIs that are not present in Silverlight 1.1 Alpha (released at MIX) you won't be able to re-build this release for use with Silverlight. As both products stabilize more we expect better compatibility between releases. You can download IronPython v2.0 at: http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5246 From tony at v-sim.com Fri Jun 29 23:52:13 2007 From: tony at v-sim.com (Tony Djordjevski) Date: Fri, 29 Jun 2007 17:52:13 -0400 Subject: [IronPython] IronPython v2.0 Alpha 2 Released! In-Reply-To: <7AD436E4270DD54A94238001769C2227A71E579E94@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227A71E579E94@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <46857F0D.7000601@v-sim.com> Hi Dino, Congrats on the new release! Can you give us an update on the status of the multiple engine debate and does this release change anything on that front? When Alpha 1 was released, we discussed swappable SystemStates as an alternative to multiple engine instances. Does this release include this functionality? Thanks, Tony Dino Viehland wrote: > Hello IronPython Community, > > We have just released IronPython 2.0 Alpha 2. This release is a snapshot of the on-going progress with IronPython 2.0 and the DLR. > One of the most significant changes in this release is the removal of Microsoft.Scripting.Vestigial. Previously this DLL was a combination of both IronPython support code as well as portions of the DLR. With Alpha 2 Microsoft.Scripting.dll contains all portions of the DLR and IronPython.dll contains the IronPython implementation which builds upon the DLR. This should help consumers of the DLR to better understand the public surface area. Being early in the product cycle this surface area may still change significantly but there are now bright lines between what DLR code is and what IronPython code is. > > IronPython also continues to use the underlying concepts of the DLR more and more. In the Alpha 1 release there were numerous locations where IronPython would use DynamicSites but fallback to runtime lookups because the site couldn't perform optimally. In this release we've continued to flush out these corner cases and improve IronPython's support for generating proper rules when using DynamicSites. We've also improved the shared infrastructure the DLR provides for creating rules and moved IronPython to this shared infrastructure. > > Significant changes in the DLR include the removal of Microsoft.Scripting.Vestigial, continued refinement of the AST and dynamic site support, and replacement of the old IDynamicObject with the new IDynamicObject. IronPython has also been updated to use more of the DLR concepts. > The DLR also continues to be expanded and improved. The DLR AST has been improved with support for more static constructs such as simple exception handling constructors and better variable support. The DLR AST factory methods have also been moved to a static Ast class to enable easier construction of ASTs. There have also been some additional convenience methods added to various nodes to make construction even easier still. Finally the DLR also has been improved to support an arbitrary number of arguments inside a DynamicSite which helps to enable calling all functions in an optimized manner. > > One of the most significant (although fairly small) improvements is the introduction of the IDynamicObject interface under its proper name. In the Alpha 1 release this interface was temporarily named IActionable because IronPython had previously shipped with an IDynamicObject interface. In this new release the old interface has been completely removed and the DLR now provides the correct IDynamicObject interface. This interface lives at the heart of the DLR so it's noteworthy that it's now found its final home. > > Note: Due to dependencies upon APIs that are not present in Silverlight 1.1 Alpha (released at MIX) you won't be able to re-build this release for use with Silverlight. As both products stabilize more we expect better compatibility between releases. > > You can download IronPython v2.0 at: http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5246 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dinov at exchange.microsoft.com Sat Jun 30 02:12:09 2007 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 29 Jun 2007 17:12:09 -0700 Subject: [IronPython] IronPython v2.0 Alpha 2 Released! In-Reply-To: <46857F0D.7000601@v-sim.com> References: <7AD436E4270DD54A94238001769C2227A71E579E94@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <46857F0D.7000601@v-sim.com> Message-ID: <7AD436E4270DD54A94238001769C2227A71E579F50@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Alpha 2 doesn't change anything about this. I believe we still have yet another take on the hosting APIs which we're still going to do and we'll probably resolve that issue then. I'll make a note to send out a mail once we've made that decision (and it'll probably be release note worthy as well). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tony Djordjevski Sent: Friday, June 29, 2007 2:52 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython v2.0 Alpha 2 Released! Hi Dino, Congrats on the new release! Can you give us an update on the status of the multiple engine debate and does this release change anything on that front? When Alpha 1 was released, we discussed swappable SystemStates as an alternative to multiple engine instances. Does this release include this functionality? Thanks, Tony Dino Viehland wrote: > Hello IronPython Community, > > We have just released IronPython 2.0 Alpha 2. This release is a snapshot of the on-going progress with IronPython 2.0 and the DLR. > One of the most significant changes in this release is the removal of Microsoft.Scripting.Vestigial. Previously this DLL was a combination of both IronPython support code as well as portions of the DLR. With Alpha 2 Microsoft.Scripting.dll contains all portions of the DLR and IronPython.dll contains the IronPython implementation which builds upon the DLR. This should help consumers of the DLR to better understand the public surface area. Being early in the product cycle this surface area may still change significantly but there are now bright lines between what DLR code is and what IronPython code is. > > IronPython also continues to use the underlying concepts of the DLR more and more. In the Alpha 1 release there were numerous locations where IronPython would use DynamicSites but fallback to runtime lookups because the site couldn't perform optimally. In this release we've continued to flush out these corner cases and improve IronPython's support for generating proper rules when using DynamicSites. We've also improved the shared infrastructure the DLR provides for creating rules and moved IronPython to this shared infrastructure. > > Significant changes in the DLR include the removal of Microsoft.Scripting.Vestigial, continued refinement of the AST and dynamic site support, and replacement of the old IDynamicObject with the new IDynamicObject. IronPython has also been updated to use more of the DLR concepts. > The DLR also continues to be expanded and improved. The DLR AST has been improved with support for more static constructs such as simple exception handling constructors and better variable support. The DLR AST factory methods have also been moved to a static Ast class to enable easier construction of ASTs. There have also been some additional convenience methods added to various nodes to make construction even easier still. Finally the DLR also has been improved to support an arbitrary number of arguments inside a DynamicSite which helps to enable calling all functions in an optimized manner. > > One of the most significant (although fairly small) improvements is the introduction of the IDynamicObject interface under its proper name. In the Alpha 1 release this interface was temporarily named IActionable because IronPython had previously shipped with an IDynamicObject interface. In this new release the old interface has been completely removed and the DLR now provides the correct IDynamicObject interface. This interface lives at the heart of the DLR so it's noteworthy that it's now found its final home. > > Note: Due to dependencies upon APIs that are not present in Silverlight 1.1 Alpha (released at MIX) you won't be able to re-build this release for use with Silverlight. As both products stabilize more we expect better compatibility between releases. > > You can download IronPython v2.0 at: http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=5246 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com