From dfugate at microsoft.com Mon Oct 2 18:50:12 2006 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 2 Oct 2006 09:50:12 -0700 Subject: [IronPython] Compilation difficulties In-Reply-To: <451D110D.1070301@resolversystems.com> References: <451D110D.1070301@resolversystems.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D910720EE3F17@NA-EXMSG-C106.redmond.corp.microsoft.com> I'm glad to see people are finding this sample useful! My first suggestion is to verify you have an __init__.py in Cheesemonger. I'm pretty sure the answer is yes but just to be certain... Second, using a command such as: E:\Temp>ipy F:\ipsd\IronPython\Samples\Pyc\pyc.py Cheesemonger\Counter.py Cheesemonger\Shopkeeper.py Cheesemonger\__init__.py /main:main.py /out:CM.dll should do what I *think* you're trying to do. This creates an (executable) CM.dll based on main.py which pretty much follows your series of files except that my main.py invokes a function from Cheesemonger.Counter. When I run CM.dll, the output verifies it is indeed using modules from Cheesemonger.* Last but definitely not least, please stay away from using tools like ildasm, reflector, etc to examine the contents of IronPython created DLLs. What you'll find there is almost certainly not what you'd expect as mentioned on the Codeplex Samples page. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Friday, September 29, 2006 5:27 AM To: Discussion of IronPython Subject: [IronPython] Compilation difficulties Hi all I've been playing with the (excellent) Pyc sample, and I've got stuck. I have a series of files a bit like the following: project/ | main.py + Cheesemonger/ | Shopkeeper.py | Counter.py ...in which main.py contains statements like: from Cheesemonger.Counter import Counter ...and Counter.py also contains statements like: from Cheesemonger.Shopkeeper import Shopkeeper --- This is all very well, but I can't work out how to compile a Cheesemonger.dll in which the above imports still function -- when I inspect it with ildasm, the dll contains "Counter" and "Shopkeeper" rather than "Cheesemonger.Counter" and "Cheesemonger.Shopkeeper". I can "fix" the issue by undisambiguating the imports: clr.AddReference("Cheesemonger") from Counter import Counter ...and: from Shopkeeper import Shopkeeper ...but we've been burned by ambiguous imports before and would prefer not to reintroduce them (life can get confusing when every directory contains its own "UnitTests" directory ;)). Is there any way of compiling a directory (and subdirectories) into a single dll, such that no import statements need to be changed? A quick look at the IP source left me none the wiser, I'm afraid. Cheers William _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From andrzej.krzywda at resolversystems.com Tue Oct 3 14:35:06 2006 From: andrzej.krzywda at resolversystems.com (Andrzej Krzywda) Date: Tue, 03 Oct 2006 13:35:06 +0100 Subject: [IronPython] Comparing clr objects in lists Message-ID: <452258FA.2070705@resolversystems.com> Hello all, We found an issue with comparing clr objects in lists. IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import clr >>> clr.AddReference('System.Drawing') >>> from System.Drawing import Color >>> >>> Color.Red == Color.Red True >>> (Color.Red) == (Color.Red) True >>> [Color.Red] == [Color.Red] False >>> [(Color.Red)] == [(Color.Red)] False The same kind of comparison will work with IronPython objects. Andrzej Krzywda From fuzzyman at voidspace.org.uk Tue Oct 3 14:38:24 2006 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 03 Oct 2006 13:38:24 +0100 Subject: [IronPython] Comparing clr objects in lists In-Reply-To: <452258FA.2070705@resolversystems.com> References: <452258FA.2070705@resolversystems.com> Message-ID: <452259C0.60407@voidspace.org.uk> Andrzej Krzywda wrote: >Hello all, > >We found an issue with comparing clr objects in lists. > >IronPython 1.0.60816 on .NET 2.0.50727.42 >Copyright (c) Microsoft Corporation. All rights reserved. > >>> import clr > >>> clr.AddReference('System.Drawing') > >>> from System.Drawing import Color > >>> > >>> Color.Red == Color.Red >True > >>> (Color.Red) == (Color.Red) >True > >>> [Color.Red] == [Color.Red] >False > >>> [(Color.Red)] == [(Color.Red)] >False > >The same kind of comparison will work with IronPython objects. > > > Unlucky. :-) By the way, the following are exactly equivalent : >>> Color.Red == Color.Red True >>> (Color.Red) == (Color.Red) True If you want to try in tuples, use : >>> (Color.Red,) == (Color.Red,) Michael http://www.voidspace.org.uk >Andrzej Krzywda >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From miguel at ximian.com Tue Oct 3 14:52:23 2006 From: miguel at ximian.com (Miguel de Icaza) Date: Tue, 03 Oct 2006 08:52:23 -0400 Subject: [IronPython] [ANN] IronPython Community Edition 1.0r2 In-Reply-To: <5b0248170609290452i7f86dfe7na49cebb55da85eba@mail.gmail.com> References: <5b0248170609290452i7f86dfe7na49cebb55da85eba@mail.gmail.com> Message-ID: <1159879943.5008.68.camel@erandi.dom> Hello, > And here's the license and the summary of applied patches: > http://fepy.sourceforge.net/license.html > http://fepy.sourceforge.net/patches.html Do the patches include the various extensions that are being shipped? Am wondering if you could distribute a IPCE that contains all the documentation and sources, because it might be good for us to switch to it from standard IronPython for our distribution purposes. From miguel at ximian.com Tue Oct 3 14:56:26 2006 From: miguel at ximian.com (Miguel de Icaza) Date: Tue, 03 Oct 2006 08:56:26 -0400 Subject: [IronPython] [ANN] IronPython Community Edition 1.0r2 In-Reply-To: <01be01c6e43e$ca5919a0$0400000a@spooge> References: <5b0248170609290452i7f86dfe7na49cebb55da85eba@mail.gmail.com> <01be01c6e43e$ca5919a0$0400000a@spooge> Message-ID: <1159880186.5008.71.camel@erandi.dom> Hello, > http://fepy.sourceforge.net/license.html > > You really need to remove the "Do What the F*ck You Want to Public License" This license might have legal issues as well (someone might have pointed this out), but usually a licenses includes a disclaimer where you are not responsible for the use or misuse of the software. This is why licenses (like the MIT X11) include paragraphs like this (and every other open source license does): THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. I strongly suggest you use the MIT X11 license for that, because it is just what you want. From dinov at exchange.microsoft.com Tue Oct 3 19:51:56 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 3 Oct 2006 10:51:56 -0700 Subject: [IronPython] Comparing clr objects in lists In-Reply-To: <452258FA.2070705@resolversystems.com> References: <452258FA.2070705@resolversystems.com> Message-ID: <7AD436E4270DD54A94238001769C2227438E6317F4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> This is definitely a bug - I've opened CodePlex issue 3982 to track this (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=3982). Thanks for reporting it. I suspect this is due to the fact that our enums don't implement compare, and we are doing a compare (and checking it's zero) instead of a simple equality check when comparing the lists. Some interesting other data points are: x = Color.Red [x] == [x] Prints True (because you're using the same boxed enum) and: {Color.Red:Color.Red} == {Color.Red:Color.Red} also works (we're doing an equality check instead of a comparison). Any input on how we should prioritize this? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrzej Krzywda Sent: Tuesday, October 03, 2006 5:35 AM To: Discussion of IronPython Subject: [IronPython] Comparing clr objects in lists Hello all, We found an issue with comparing clr objects in lists. IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import clr >>> clr.AddReference('System.Drawing') >>> from System.Drawing import Color >>> >>> Color.Red == Color.Red True >>> (Color.Red) == (Color.Red) True >>> [Color.Red] == [Color.Red] False >>> [(Color.Red)] == [(Color.Red)] False The same kind of comparison will work with IronPython objects. Andrzej Krzywda _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Josh.L at microsoft.com Tue Oct 3 20:13:50 2006 From: Josh.L at microsoft.com (Josh Cassell) Date: Tue, 3 Oct 2006 11:13:50 -0700 Subject: [IronPython] pyd files Message-ID: <519260D16FC91741B95E725517B734B8A52A466D@NA-EXMSG-C109.redmond.corp.microsoft.com> Is there ever going to be a way to import from a .pyd file in IronPython? If not, is it possible to interop to a .pyd file in C# in order to wrap it for use from IronPython? Btw, I'm new to Python, and it has been very enjoyable and exciting using IronPython. Thanks very much! Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Oct 3 22:37:42 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 3 Oct 2006 13:37:42 -0700 Subject: [IronPython] pyd files In-Reply-To: <519260D16FC91741B95E725517B734B8A52A466D@NA-EXMSG-C109.redmond.corp.microsoft.com> References: <519260D16FC91741B95E725517B734B8A52A466D@NA-EXMSG-C109.redmond.corp.microsoft.com> Message-ID: <7AD436E4270DD54A94238001769C2227438E6318FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> This isn't something we're likely to implement soon - there's lots of challenges in getting this to work. Unfortunately you'll probably not be able to get it working from C# either, but this might be a great use for C++/CLI instead. I believe we do have a bug filed against it, we just won't get to it anytime soon J. There's two big problems here: #1) Re-creating the unmanaged CPython interfaces - this will be no small chore #2) Dealing w/ direct access to the raw object layout. For example I don't believe bumping the ref count goes through an API, instead it just uses a macro which adjusts the raw memory. #1 is by and large just a matter of someone cranking through and creating the thunks that map into the IronPython runtime (I'd include the calls into the PYD's init and other functions as well here). But #2 is a large can of worms. What probably needs to happen is VirtualAlloc'ing a block of memory as read-only, setting up an exception handler, and fixing the memory up at runtime as it's accessed - then when changes happen directly to memory the C# objects can be updated. All in all it's a huge project... In the mean time you might be able to find a .NET library that does the same thing as the PYD and either wrap that in some Python code if programming against the same API is a must or just program directly against it if that's not one of your requirements. Glad you're having a good time with it! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Josh Cassell Sent: Tuesday, October 03, 2006 11:14 AM To: users at lists.ironpython.com Subject: [IronPython] pyd files Is there ever going to be a way to import from a .pyd file in IronPython? If not, is it possible to interop to a .pyd file in C# in order to wrap it for use from IronPython? Btw, I'm new to Python, and it has been very enjoyable and exciting using IronPython. Thanks very much! Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From jymengant at teaser.fr Wed Oct 4 16:42:19 2006 From: jymengant at teaser.fr (Jean-Yves MENGANT) Date: Wed, 4 Oct 2006 16:42:19 +0200 Subject: [IronPython] (no subject) Message-ID: <20061004144221.35EC8725C0@musique.teaser.net> I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .. And the only reminding platform to make debugging happen will be the Visual Studio environment .. Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation . This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.woodward at gmail.com Mon Oct 2 15:28:45 2006 From: martin.woodward at gmail.com (martin@teamprise.com) Date: Mon, 02 Oct 2006 13:28:45 -0000 Subject: [IronPython] Access to IronPython version control In-Reply-To: <45141CAF.7080900@sjsoft.com> References: <4513FCFB.9070300@sjsoft.com> <45141CAF.7080900@sjsoft.com> Message-ID: <1159795725.401404.233560@m73g2000cwd.googlegroups.com> David, You only get access to the source code repository if you are a developer or greater with the project. Anonymous access to source code of CodePlex project is from the source tab. If you are having trouble getting Teamprise to talk to your CodePlex project and you do have developer permissions then give me a shout (or email support at teamprise.com) and we'll try and help out. Cheers, Martin. David Fraser wrote: > Hi Martin > > Not unless I'm blind :-) > Maybe only for developers of the project? > In any case Seo helped me: > server should be https://tfs01.codeplex.com > username should be your username + _cp > password as normal > domain should be SND > > But not sure of the workspace name although this could just be a > permissions thing - tried IronPython and $\IronPython > > Cheers > David > > Martin Maly wrote: > > If you go to the IronPython CodePlex "Source" page, in the upper right corner you'll see the settings for server, user name, port ... > > > > http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=IronPython > > > > Martin > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser > > Sent: Friday, September 22, 2006 8:11 AM > > To: Discussion of IronPython > > Subject: [IronPython] Access to IronPython version control > > > > Hi > > > > I was trying today to access the IronPython source code repository - > > there doesn't seem to be much information online on CodePlex as to how > > to do this without using the Visual tool. > > Being more at home on the commandline and waiting for the 200MB+ > > download (doesn't seem to be possible to get the commandline client > > standalone) I stumbled upon Teamprise's Java client at > > http://www.teamprise.com/download/index.html > > Unfortunately I can't seem to access the IronPython workspace - what > > should the settings for server, workspace, etc be? (It seems that > > username needs a _cp appended). > > I am beginning to suspect that access is limited to the Microsoft team > > which would be a shame :-) > > > > David > > > > _______________________________________________ > > 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 jmengant at sefas.com Wed Oct 4 16:39:28 2006 From: jmengant at sefas.com (Jean-Yves MENGANT) Date: Wed, 4 Oct 2006 16:39:28 +0200 Subject: [IronPython] Standard Python Debugging not supported Message-ID: <20061004143932.907DA21C073@front00.pacwan.net> I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .. And the only reminding platform to make debugging happen will be the Visual Studio environment .. Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation . This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Wed Oct 4 19:04:02 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 4 Oct 2006 10:04:02 -0700 Subject: [IronPython] Access to IronPython version control In-Reply-To: <1159795725.401404.233560@m73g2000cwd.googlegroups.com> References: <4513FCFB.9070300@sjsoft.com> <45141CAF.7080900@sjsoft.com> <1159795725.401404.233560@m73g2000cwd.googlegroups.com> Message-ID: We are talking to CodePlex development team about possibly adding a group of users which could have access to the version control without the need to be Contributor or higher. Some kind of read only access for community members. This is going on as we speak so no final word yet, but we'll keep you posted as we hear more. Thanks for the patience Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of martin at teamprise.com Sent: Monday, October 02, 2006 6:29 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Access to IronPython version control David, You only get access to the source code repository if you are a developer or greater with the project. Anonymous access to source code of CodePlex project is from the source tab. If you are having trouble getting Teamprise to talk to your CodePlex project and you do have developer permissions then give me a shout (or email support at teamprise.com) and we'll try and help out. Cheers, Martin. David Fraser wrote: > Hi Martin > > Not unless I'm blind :-) > Maybe only for developers of the project? > In any case Seo helped me: > server should be https://tfs01.codeplex.com > username should be your username + _cp > password as normal > domain should be SND > > But not sure of the workspace name although this could just be a > permissions thing - tried IronPython and $\IronPython > > Cheers > David > > Martin Maly wrote: > > If you go to the IronPython CodePlex "Source" page, in the upper right corner you'll see the settings for server, user name, port ... > > > > http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=IronPython > > > > Martin > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser > > Sent: Friday, September 22, 2006 8:11 AM > > To: Discussion of IronPython > > Subject: [IronPython] Access to IronPython version control > > > > Hi > > > > I was trying today to access the IronPython source code repository - > > there doesn't seem to be much information online on CodePlex as to how > > to do this without using the Visual tool. > > Being more at home on the commandline and waiting for the 200MB+ > > download (doesn't seem to be possible to get the commandline client > > standalone) I stumbled upon Teamprise's Java client at > > http://www.teamprise.com/download/index.html > > Unfortunately I can't seem to access the IronPython workspace - what > > should the settings for server, workspace, etc be? (It seems that > > username needs a _cp appended). > > I am beginning to suspect that access is limited to the Microsoft team > > which would be a shame :-) > > > > David > > > > _______________________________________________ > > 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 Wed Oct 4 19:48:09 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 4 Oct 2006 10:48:09 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061004143932.907DA21C073@front00.pacwan.net> References: <20061004143932.907DA21C073@front00.pacwan.net> Message-ID: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .... And the only reminding platform to make debugging happen will be the Visual Studio environment .... Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation ... This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Wed Oct 4 19:48:09 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 4 Oct 2006 10:48:09 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061004143932.907DA21C073@front00.pacwan.net> References: <20061004143932.907DA21C073@front00.pacwan.net> Message-ID: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .... And the only reminding platform to make debugging happen will be the Visual Studio environment .... Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation ... This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffg at activestate.com Wed Oct 4 20:56:21 2006 From: jeffg at activestate.com (Jeff Griffiths) Date: Wed, 04 Oct 2006 11:56:21 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <20061004143932.907DA21C073@front00.pacwan.net> <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <452403D5.5090701@activestate.com> +1. The lack of sys.settrace is the main blocker to getting ipy debugging support in Komodo, ie getting it to look and feel to Komodo like any other Python. -- Jeff Griffiths Technical Support Lead http://activestate.com Dino Viehland wrote: > We have a couple of bugs opened on this on CodePlex for this issue: > > 563: Support for Code Quality Tools in IronPython missing > 1042: Implement various sys module methods that currently throw a NotImplementedException > > We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! > > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT > Sent: Wednesday, October 04, 2006 7:39 AM > To: users-ironpython.com at lists.ironpython.com > Subject: [IronPython] Standard Python Debugging not supported > > I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. > > One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. > > The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .... And the only reminding platform to make debugging happen will be the Visual Studio environment .... Even the standard pdb.py which inherits bdb.py would not be usable on short term then. > > Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. > > Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : > > localDebuggee= None > JPyDbg connecting localhost on port 29111 > JPyDbgI0001 : connected to localhost > ['Traceback (most recent call last): > ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run > sys.settrace(self.trace_dispatch) > ', 'NotImplementedError: sys.settrace is not yet supported by IronPython > '] > '+++ JPy/sessionended/ > deamon ended > > The not yet supported by IronPython is not really an expected serious implementation ... This makes > VisualStudio as the only python Debugger able to support IronPython in future : > > Question is this a strategy or just a short term limitation that will be covered soon ? > > Thanks for your support to Python language > Jean-Yves > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dblank at brynmawr.edu Wed Oct 4 21:44:36 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed, 04 Oct 2006 15:44:36 -0400 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <20061004143932.907DA21C073@front00.pacwan.net> <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <45240F24.2050002@brynmawr.edu> Just thought that I would mention that we are awaiting implementation of sys.excepthook so that we can override the standard unhandled exception handing to provide students with more information on their errors. It isn't a big rush, as we may use CPython in the Spring, but if this were addressed sometime in the next 6 months, we'd be happy. (FYI: we'll be using IronPython to control robots for intro computer science courses. The project, called Myro, is planned to be able to control most popular robots, and will take advantage of Microsoft Research's Robotics Studio as well. See http://www.roboteducation.org for more info.) Thanks, -Doug Dino Viehland wrote: > We have a couple of bugs opened on this on CodePlex for this issue: > > 563: Support for Code Quality Tools in IronPython missing > > > 1042: Implement various sys module methods that currently throw a > NotImplementedException > > > We believe we know how to implement sys.settrace (we?d hook it at the > same place we hook our recursion checks today) but we haven?t had time > to get to it yet. Currently this is scheduled in our bug database as > 1.1 feature (although that may be subject to change) but it?s good to > note that we are seeing additional demand for these APIs. This will > help us prioritize our 1.1 work better. Hopefully we?ll be able to get > this in for 1.1 so it?ll be just a short term limitation. Thanks for > the input! From dinov at exchange.microsoft.com Wed Oct 4 23:02:31 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 4 Oct 2006 14:02:31 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <45240F24.2050002@brynmawr.edu> References: <20061004143932.907DA21C073@front00.pacwan.net> <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <45240F24.2050002@brynmawr.edu> Message-ID: <7AD436E4270DD54A94238001769C2227438E631D9F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the feedback - I've added a comment to bug 1042 that we should look at excepthook. Maybe this will be another one we can fit into 1.1. Unfortunately, this one is a little more interesting. While the functionality of calling the except hook function is easy enough, mutating sys is more difficult. We might be able to work around mutating sys though, but we'll need to look into. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Douglas S. Blank Sent: Wednesday, October 04, 2006 12:45 PM To: Discussion of IronPython Subject: Re: [IronPython] Standard Python Debugging not supported Just thought that I would mention that we are awaiting implementation of sys.excepthook so that we can override the standard unhandled exception handing to provide students with more information on their errors. It isn't a big rush, as we may use CPython in the Spring, but if this were addressed sometime in the next 6 months, we'd be happy. (FYI: we'll be using IronPython to control robots for intro computer science courses. The project, called Myro, is planned to be able to control most popular robots, and will take advantage of Microsoft Research's Robotics Studio as well. See http://www.roboteducation.org for more info.) Thanks, -Doug Dino Viehland wrote: > We have a couple of bugs opened on this on CodePlex for this issue: > > 563: Support for Code Quality Tools in IronPython missing > kItemId=563> > > 1042: Implement various sys module methods that currently throw a > NotImplementedException > kItemId=1042> > > We believe we know how to implement sys.settrace (we'd hook it at the > same place we hook our recursion checks today) but we haven't had time > to get to it yet. Currently this is scheduled in our bug database as > 1.1 feature (although that may be subject to change) but it's good to > note that we are seeing additional demand for these APIs. This will > help us prioritize our 1.1 work better. Hopefully we'll be able to > get this in for 1.1 so it'll be just a short term limitation. Thanks > for the input! _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jymengant at teaser.fr Thu Oct 5 10:44:26 2006 From: jymengant at teaser.fr (Jean-Yves MENGANT) Date: Thu, 5 Oct 2006 10:44:26 +0200 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <20061005084426.829206CA16@math.teaser.net> Complementary : Looking at the 1042 , I saw another unclear topic around the the sys_getframe entry which is marked as not supported already throwing a ValueError exception + 'The sys._getframe() function is not supported by IronPython' is also written in the 'differences between IronPython and CPython' ; I hope that this is only on short term limitation as welll since this api is also fundamental for Python debugger's implementation's Stack frame analysis and is referenced inside bdb.py standard python module Thanks for your answer below Jean-Yves _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, October 04, 2006 7:48 PM To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Standard Python Debugging not supported We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .. And the only reminding platform to make debugging happen will be the Visual Studio environment .. Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation . This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From sh at defuze.org Thu Oct 5 12:32:43 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 05 Oct 2006 11:32:43 +0100 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061005084426.829206CA16@math.teaser.net> References: <20061005084426.829206CA16@math.teaser.net> Message-ID: <4524DF4B.105@defuze.org> Jean-Yves MENGANT wrote: > Complementary : Looking at the 1042 , I saw another unclear topic around the > the sys_getframe entry which is marked as not supported already throwing a > ValueError exception + 'The sys._getframe() function is not supported by > IronPython' is also written in the 'differences between IronPython and > CPython' ; I hope that this is only on short term limitation as welll since > this api is also fundamental for Python debugger's implementation's Stack > frame analysis and is referenced inside bdb.py standard python module > > Much agreed as it also used in other projects such CherryPy. - Sylvain From andrzej.krzywda at resolversystems.com Thu Oct 5 13:11:05 2006 From: andrzej.krzywda at resolversystems.com (Andrzej Krzywda) Date: Thu, 05 Oct 2006 12:11:05 +0100 Subject: [IronPython] Comparing clr objects in lists In-Reply-To: <7AD436E4270DD54A94238001769C2227438E6317F4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <452258FA.2070705@resolversystems.com> <7AD436E4270DD54A94238001769C2227438E6317F4@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <4524E849.9000200@resolversystems.com> Dino Viehland wrote: > This is definitely a bug - I've opened CodePlex issue 3982 to track this > Any input on how we should prioritize this? > It doesn't block us, no urgency from our side. We worked around this problem by comparing all elements in lists instead of comparing lists. Andrzej Krzywda From jvm_cop at spamcop.net Thu Oct 5 15:29:43 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Thu, 05 Oct 2006 09:29:43 -0400 Subject: [IronPython] What PythonEngine called my C# code? (was: custom ConfigurationSection in IronPython) In-Reply-To: <01FDD3BC-90C9-43DC-ACC5-7124E9CF2B45@jacquette.com> References: <312F42C3-581F-4849-AD5F-20BC8DE0A033@jacquette.com> <7AD436E4270DD54A94238001769C22273831257879@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <2CF7B255-CACB-43BA-A98C-4263B95B7FB9@jacquette.com> <7.0.1.0.2.20060918111331.022a4060@wheresmymailserver.com> <7AD436E4270DD54A94238001769C222740EBAB0572@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <01FDD3BC-90C9-43DC-ACC5-7124E9CF2B45@jacquette.com> Message-ID: <7.0.1.0.2.20061005092128.0756cfd8@wheresmymailserver.com> Can you use the .Net stack trace mechanisms to "look back up the call stack"? I would think that you could, but I don't know how you'd necessarily get the value of the PythonEngine that you find. Could you have a "static constructor" in your C# assemblies that does the right thing? Such code is called "at most once" which sounds like what you need. At 12:44 PM 9/20/2006, Jason Ferrara wrote >In my case I'm looking to write assemblies in C# that makes use of >modules defined in IronPython that others can use without having to >know or care that they use IronPython (except for having to have the >IronPython dlls around). Things are complicated by the fact that some >of the modules used need to have a single global environment. If C# >assemblies A and B both use IronPython assembly C, A and B need to >use the same PythonEngine or things won't work right. And if A and B >are being used from IronPython, then they need to use the >PythonEngine of the caller. > >So I guess I need some sort of magic that when a call is made into >the assembly it looks back up the call stack to see if there is a >PythonEngine, and if so uses that one. If not create its own and then >keep that one around for the next time the assembly is entered >without a PythonEngine in the call stack. > > >On Sep 18, 2006, at 12:11 PM, Dino Viehland wrote: > >> Probably the lack of an answer is due to the fact that there isn't >> a really great way to do this. Here's two possible ways to pull >> this off: >> >> For #1 you presumably kicked off the Python code via the hosting >> APIs, and therefore you know the engine that kicked it off. If you >> have multiple Python engines this might be tricky (if you have only >> one running on each thread at a time you could store it in a >> [ThreadStatic]). If you start getting into more complicated >> scenarios obviously this is going to break down quickly... >> >> For #2 you're looking at using ICallerContext. This is a bit of >> internal machinery that IronPython uses to flow state around for >> things that might need state (e.g. hiding CLR methods, locals(), >> exec, etc...). Off of ICallerContext there is both a SystemState >> and a PythonModule property. Unfortunately there's nothing that >> leads you directly to a PythonEngine. Instead you'd need to >> maintain a table of either modules->engines or SystemState (sys >> module) -> engines. >> >> #2 will work reliably if you control the creation of all engines in >> the process - the instance you go out of that it'll break down. >> The alternate plan here might be that having access to a >> SystemState and PythonModule you could already do some interesting >> things even though you don't have the full blown PythonEngine. >> It'd be interesting to hear if those are sufficient or if you >> really do need the engine in this case (and how horrible you think >> the 2 solutions are :) ). J. Merrill / Analytical Software Corp From jvm_cop at spamcop.net Thu Oct 5 15:36:25 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Thu, 05 Oct 2006 09:36:25 -0400 Subject: [IronPython] socket for IronPython update Message-ID: <7.0.1.0.2.20061005093350.0757ae08@wheresmymailserver.com> I recall the discussions (thanks for the links, which jogged the memory). But how is a socket (or any other) module part of "the IronPython core"? I would have thought that the core would be the execution engine, parser, code generator, etc -- not an arbitrary module that in many cases could be written in Python. At 11:30 AM 9/18/2006, Martin Maly wrote >Actually, there were some related discussions after the release of IronPython 0.7. It is archived in the list archives, starting in March 2005. Hopefully, it will answer some of your questions. Second link is Jason Matusow's blog which has some related comments too. > >http://lists.ironpython.com/pipermail/users-ironpython.com/2005-March/date.html >http://blogs.msdn.com/jasonmatusow/archive/2005/03.aspx > >Martin > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser >Sent: Friday, September 15, 2006 10:11 AM >To: Discussion of IronPython >Subject: Re: [IronPython] socket for IronPython update > >Dino Viehland wrote: >> Unfortunately we cannot currently accept changes back into the IronPython core right now. :( >> >Not at all? What are the issues? > >David J. Merrill / Analytical Software Corp From dinov at exchange.microsoft.com Thu Oct 5 18:10:14 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 5 Oct 2006 09:10:14 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061005084426.829206CA16@math.teaser.net> References: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <20061005084426.829206CA16@math.teaser.net> Message-ID: <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Sys._getframe() is likely significantly harder to implement. I'd be a little bit surprised if we get this into 1.1 but it'd be nice to get at some point in the future. The hard part of this probably isn't supporting sys._getframe() but actually supporting sys._getframe(depth). Do you know if the parameterless version will unblock you, or do you need the full blown functionality? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Thursday, October 05, 2006 1:44 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] Standard Python Debugging not supported Complementary : Looking at the 1042 , I saw another unclear topic around the the sys_getframe entry which is marked as not supported already throwing a ValueError exception + 'The sys._getframe() function is not supported by IronPython' is also written in the 'differences between IronPython and CPython' ; I hope that this is only on short term limitation as welll since this api is also fundamental for Python debugger's implementation's Stack frame analysis and is referenced inside bdb.py standard python module Thanks for your answer below Jean-Yves ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, October 04, 2006 7:48 PM To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Standard Python Debugging not supported We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .... And the only reminding platform to make debugging happen will be the Visual Studio environment .... Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation ... This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbk.lists at gmail.com Thu Oct 5 18:30:21 2006 From: mbk.lists at gmail.com (Mike Krell) Date: Thu, 5 Oct 2006 09:30:21 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <20061005084426.829206CA16@math.teaser.net> <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: On 10/5/06, Dino Viehland wrote: >The hard part of this probably isn't supporting > sys._getframe() but actually supporting sys._getframe(depth). > Do you know if the parameterless version will unblock you, or do you need > the full blown functionality? One thing I'm dying to see is IronPython running under the IPython shell. It uses both forms of sys._getframe. Mike From dinov at exchange.microsoft.com Thu Oct 5 18:39:30 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 5 Oct 2006 09:39:30 -0700 Subject: [IronPython] socket for IronPython update In-Reply-To: <7.0.1.0.2.20061005093350.0757ae08@wheresmymailserver.com> References: <7.0.1.0.2.20061005093350.0757ae08@wheresmymailserver.com> Message-ID: <7AD436E4270DD54A94238001769C2227448E9332EF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> The core of IronPython is currently simply defined as IronPython.dll, therefore socket is currently part of it (as all of our modules are). You could actually make an argument against socket being there as in CPython it's actually an external .pyd that gets loaded at runtime if you import _socket. In IronPython 1.0 we don't have a good mechanism for loading external DLLs as built-in modules. Other modules (e.g. re) you could make the argument should be in the core as they're in the core of CPython as well, but again, if we had a mechanism to load these on demand it wouldn't matter much where we put them. When we ship 1.0.1 in a couple of days we're going to have some limited support for loading .NET DLLs as standard Python modules via site.py. Eventually we'll probably come up with a better mechanism for doing this to support on-demand loading of modules. And at some point in the future we'll probably pull nearly all of the modules out of IronPython.dll and move them into their own DLL so they're completely outside of the core. There's still interesting questions about us accepting back changes but this should give anyone who wants it more flexibility to plug-in the pieces that they want (even if they don't come from MS). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. Merrill Sent: Thursday, October 05, 2006 6:36 AM To: Discussion of IronPython Subject: Re: [IronPython] socket for IronPython update I recall the discussions (thanks for the links, which jogged the memory). But how is a socket (or any other) module part of "the IronPython core"? I would have thought that the core would be the execution engine, parser, code generator, etc -- not an arbitrary module that in many cases could be written in Python. At 11:30 AM 9/18/2006, Martin Maly wrote >Actually, there were some related discussions after the release of IronPython 0.7. It is archived in the list archives, starting in March 2005. Hopefully, it will answer some of your questions. Second link is Jason Matusow's blog which has some related comments too. > >http://lists.ironpython.com/pipermail/users-ironpython.com/2005-March/d >ate.html http://blogs.msdn.com/jasonmatusow/archive/2005/03.aspx > >Martin > >-----Original Message----- >From: users-bounces at lists.ironpython.com >[mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser >Sent: Friday, September 15, 2006 10:11 AM >To: Discussion of IronPython >Subject: Re: [IronPython] socket for IronPython update > >Dino Viehland wrote: >> Unfortunately we cannot currently accept changes back into the >> IronPython core right now. :( >> >Not at all? What are the issues? > >David J. Merrill / Analytical Software Corp _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jeffg at activestate.com Thu Oct 5 19:34:19 2006 From: jeffg at activestate.com (Jeff Griffiths) Date: Thu, 05 Oct 2006 10:34:19 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227438E631C2B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <20061005084426.829206CA16@math.teaser.net> <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <4525421B.6070005@activestate.com> Dino Viehland wrote: > Sys._getframe() is likely significantly harder to implement. I'd be > a little bit surprised if we get this into 1.1 but it'd be nice to > get at some point in the future. The hard part of this probably > isn't supporting sys._getframe() but actually supporting > sys._getframe(depth). > Do you know if the parameterless version will unblock you, or do you > need the full blown functionality? Komodo's debugger only makes calls like: sys._getframe().f_back We don't seem to pass arguments in, so I expect sys._getframe() without parameters might work. JeffG ps for the curious, the debugger implementation we use is FOSS, and available here: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging The DBGP protocol it is based on is doc'd here: http://www.xdebug.org/docs-dbgp.php From Martin.Maly at microsoft.com Fri Oct 6 00:49:46 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 5 Oct 2006 15:49:46 -0700 Subject: [IronPython] Access to IronPython version control Message-ID: Unfortunately, it turns out that at this point it is not possible to get access to the version control without being Contributor or higher. I hope that this will change sometimes in the future, but for the moment, the only way to get access to the contents of the IronPython source control is via the zip download... Sorry for the bad news. Martin -----Original Message----- Wed Oct 4 10:04:02 PDT 2006 Martin Maly Martin.Maly at microsoft.com Wrote: We are talking to CodePlex development team about possibly adding a group of users which could have access to the version control without the need to be Contributor or higher. Some kind of read only access for community members. This is going on as we speak so no final word yet, but we'll keep you posted as we hear more. Thanks for the patience Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of martin at teamprise.com Sent: Monday, October 02, 2006 6:29 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Access to IronPython version control David, You only get access to the source code repository if you are a developer or greater with the project. Anonymous access to source code of CodePlex project is from the source tab. If you are having trouble getting Teamprise to talk to your CodePlex project and you do have developer permissions then give me a shout (or email support at teamprise.com) and we'll try and help out. Cheers, Martin. David Fraser wrote: > Hi Martin > > Not unless I'm blind :-) > Maybe only for developers of the project? > In any case Seo helped me: > server should be https://tfs01.codeplex.com > username should be your username + _cp > password as normal > domain should be SND > > But not sure of the workspace name although this could just be a > permissions thing - tried IronPython and $\IronPython > > Cheers > David > > Martin Maly wrote: > > If you go to the IronPython CodePlex "Source" page, in the upper right corner you'll see the settings for server, user name, port ... > > > > http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=IronPython > > > > Martin > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser > > Sent: Friday, September 22, 2006 8:11 AM > > To: Discussion of IronPython > > Subject: [IronPython] Access to IronPython version control > > > > Hi > > > > I was trying today to access the IronPython source code repository - > > there doesn't seem to be much information online on CodePlex as to how > > to do this without using the Visual tool. > > Being more at home on the commandline and waiting for the 200MB+ > > download (doesn't seem to be possible to get the commandline client > > standalone) I stumbled upon Teamprise's Java client at > > http://www.teamprise.com/download/index.html > > Unfortunately I can't seem to access the IronPython workspace - what > > should the settings for server, workspace, etc be? (It seems that > > username needs a _cp appended). > > I am beginning to suspect that access is limited to the Microsoft team > > which would be a shame :-) > > > > David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ernsnat at iit.edu Fri Oct 6 02:24:26 2006 From: ernsnat at iit.edu (Nathan R. Ernst) Date: Thu, 5 Oct 2006 19:24:26 -0500 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <4525421B.6070005@activestate.com> Message-ID: <20061006001914.44B411BBF6@che.dreamhost.com> I don't mean to flame, but Python protocol dictates that methods/members preceded by "_" are generally not supposed to be referred to. I guess you could kind of consider them 'protected', whilst members preceded by a double-underscore are considered 'private' (despite being accessible if you de-mangle the names manually). Perhaps the modules relying upon behavior supplied by these modules should have defects assigned against them for using these methods, as well? If its generally accepted that a Python implementation should provide methods prefixed by "_" on built-ins, maybe they ought to be moved towards more prominent, public names? Just some random thoughts on the topic... -Nathan -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Griffiths Sent: Thursday, October 05, 2006 12:34 PM To: Discussion of IronPython Subject: Re: [IronPython] Standard Python Debugging not supported Dino Viehland wrote: > Sys._getframe() is likely significantly harder to implement. I'd be > a little bit surprised if we get this into 1.1 but it'd be nice to > get at some point in the future. The hard part of this probably > isn't supporting sys._getframe() but actually supporting > sys._getframe(depth). > Do you know if the parameterless version will unblock you, or do you > need the full blown functionality? Komodo's debugger only makes calls like: sys._getframe().f_back We don't seem to pass arguments in, so I expect sys._getframe() without parameters might work. JeffG ps for the curious, the debugger implementation we use is FOSS, and available here: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging The DBGP protocol it is based on is doc'd here: http://www.xdebug.org/docs-dbgp.php _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jymengant at teaser.fr Fri Oct 6 09:30:37 2006 From: jymengant at teaser.fr (Jean-Yves MENGANT) Date: Fri, 6 Oct 2006 09:30:37 +0200 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061006001914.44B411BBF6@che.dreamhost.com> Message-ID: <20061006073037.502A66C883@math.teaser.net> You're right Nathan , but one of the module violating the rule (bdb.py) is part of standard core Python libs delivered inside the official python distribution + documented inside the Python Library Reference :=) Jean-Yves > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Nathan R. Ernst > Sent: Friday, October 06, 2006 2:24 AM > To: 'Discussion of IronPython' > Subject: Re: [IronPython] Standard Python Debugging not supported > > I don't mean to flame, but Python protocol dictates that methods/members > preceded by "_" are generally not supposed to be referred to. I guess you > could kind of consider them 'protected', whilst members preceded by a > double-underscore are considered 'private' (despite being accessible if > you > de-mangle the names manually). > > Perhaps the modules relying upon behavior supplied by these modules should > have defects assigned against them for using these methods, as well? If > its > generally accepted that a Python implementation should provide methods > prefixed by "_" on built-ins, maybe they ought to be moved towards more > prominent, public names? > > Just some random thoughts on the topic... > > -Nathan > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Griffiths > Sent: Thursday, October 05, 2006 12:34 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Standard Python Debugging not supported > > Dino Viehland wrote: > > Sys._getframe() is likely significantly harder to implement. I'd be > > a little bit surprised if we get this into 1.1 but it'd be nice to > > get at some point in the future. The hard part of this probably > > isn't supporting sys._getframe() but actually supporting > > sys._getframe(depth). > > > Do you know if the parameterless version will unblock you, or do you > > need the full blown functionality? > > Komodo's debugger only makes calls like: > > sys._getframe().f_back > > We don't seem to pass arguments in, so I expect sys._getframe() without > parameters might work. > > JeffG > > ps for the curious, the debugger implementation we use is FOSS, and > available here: > > http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging > > The DBGP protocol it is based on is doc'd here: > > http://www.xdebug.org/docs-dbgp.php > > > > > > > > _______________________________________________ > 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 jymengant at teaser.fr Fri Oct 6 09:42:57 2006 From: jymengant at teaser.fr (Jean-Yves MENGANT) Date: Fri, 6 Oct 2006 09:42:57 +0200 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <20061006074257.7209E6C848@math.teaser.net> An acceptable minimal implementation is sys._getframe(depth=0) returning ValueError if depth > 0 . Debuggers are mainly interested by current stack frame , which is the case for both bdb.py + pdb.py (standard lib console mode python debugger) and JpyDbg. If this minimal implementation can just happen in 1.1 that would be great Thanks Jean-Yves _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, October 05, 2006 6:10 PM To: Discussion of IronPython Subject: Re: [IronPython] Standard Python Debugging not supported Sys._getframe() is likely significantly harder to implement. I'd be a little bit surprised if we get this into 1.1 but it'd be nice to get at some point in the future. The hard part of this probably isn't supporting sys._getframe() but actually supporting sys._getframe(depth). Do you know if the parameterless version will unblock you, or do you need the full blown functionality? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Thursday, October 05, 2006 1:44 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] Standard Python Debugging not supported Complementary : Looking at the 1042 , I saw another unclear topic around the the sys_getframe entry which is marked as not supported already throwing a ValueError exception + 'The sys._getframe() function is not supported by IronPython' is also written in the 'differences between IronPython and CPython' ; I hope that this is only on short term limitation as welll since this api is also fundamental for Python debugger's implementation's Stack frame analysis and is referenced inside bdb.py standard python module Thanks for your answer below Jean-Yves _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, October 04, 2006 7:48 PM To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Standard Python Debugging not supported We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .. And the only reminding platform to make debugging happen will be the Visual Studio environment .. Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation . This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.foord at resolversystems.com Fri Oct 6 13:25:42 2006 From: michael.foord at resolversystems.com (Michael Foord) Date: Fri, 06 Oct 2006 12:25:42 +0100 Subject: [IronPython] KeyError Oddness Message-ID: <45263D36.4020707@resolversystems.com> Hello IronPython People, There is a slightly strange difference between a KeyError on CPython and a KeyError on IronPython. It certainly isn't blocking us, but will result in unnecessarily odd messages being reported to our users. CPython >>> x={} >>> try: ... x['boo'] ... except KeyError, e: ... pass ... >>> e.args ('boo',) >>> print e.args[0] boo IronPython >>> try: ... x ={} ... x['fish'] ... except KeyError, e: ... pass ... >>> e.args ("'fish'",) >>> e.args[0] "'fish'" >>> print e.args[0] 'fish' Michael Foord and Jonathan Hartley http://www.resolversystems.com http://www.voidspace.org.uk From davidf at sjsoft.com Fri Oct 6 17:07:45 2006 From: davidf at sjsoft.com (David Fraser) Date: Fri, 06 Oct 2006 17:07:45 +0200 Subject: [IronPython] Access to IronPython version control In-Reply-To: References: Message-ID: <45267141.5040307@sjsoft.com> Hi Martin Had another idea - it seems that most of the IronPython team's commits to the CodePlex repository seem to be dumps from out of another system - is that true, do you use another version control system internally and sync, or do you use CodePlex directly and just creatively name your commits the revision number in brackets? :-) David Martin Maly wrote: > Unfortunately, it turns out that at this point it is not possible to get access to the version control without being Contributor or higher. I hope that this will change sometimes in the future, but for the moment, the only way to get access to the contents of the IronPython source control is via the zip download... > > Sorry for the bad news. > > Martin > > -----Original Message----- > /Wed Oct 4 10:04:02 PDT 2006/ *Martin Maly* Martin.Maly at microsoft.com Wrote: > > > > We are talking to CodePlex development team about possibly adding a group of users which could have access to the version control without the need to be Contributor or higher. Some kind of read only access for community members. This is going on as we speak so no final word yet, but we'll keep you posted as we hear more. > > Thanks for the patience > Martin > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com ] On Behalf Of martin at teamprise.com > Sent: Monday, October 02, 2006 6:29 AM > To: users at lists.ironpython.com > Subject: Re: [IronPython] Access to IronPython version control > > > David, > > You only get access to the source code repository if you are a > developer or greater with the project. Anonymous access to source code > of CodePlex project is from the source tab. > > If you are having trouble getting Teamprise to talk to your CodePlex > project and you do have developer permissions then give me a shout (or > email support at teamprise.com ) and we'll try and help out. > > Cheers, > > Martin. > > > David Fraser wrote: > >/ Hi Martin/ > >/ / > >/ Not unless I'm blind :-)/ > >/ Maybe only for developers of the project?/ > >/ In any case Seo helped me:/ > >/ server should be https://tfs01.codeplex.com/ > >/ username should be your username + _cp/ > >/ password as normal/ > >/ domain should be SND/ > >/ / > >/ But not sure of the workspace name although this could just be a/ > >/ permissions thing - tried IronPython and $\IronPython/ > >/ / > >/ Cheers/ > >/ David/ > >/ / > >/ Martin Maly wrote:/ > >/ > If you go to the IronPython CodePlex "Source" page, in the upper right corner you'll see the settings for server, user name, port .../ > >/ >/ > >/ > http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=IronPython/ > >/ >/ > >/ > Martin/ > >/ >/ > >/ > -----Original Message-----/ > >/ > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com ] On Behalf Of David Fraser/ > >/ > Sent: Friday, September 22, 2006 8:11 AM/ > >/ > To: Discussion of IronPython/ > >/ > Subject: [IronPython] Access to IronPython version control/ > >/ >/ > >/ > Hi/ > >/ >/ > >/ > I was trying today to access the IronPython source code repository -/ > >/ > there doesn't seem to be much information online on CodePlex as to how/ > >/ > to do this without using the Visual tool./ > >/ > Being more at home on the commandline and waiting for the 200MB+/ > >/ > download (doesn't seem to be possible to get the commandline client/ > >/ > standalone) I stumbled upon Teamprise's Java client at/ > >/ > http://www.teamprise.com/download/index.html/ > >/ > Unfortunately I can't seem to access the IronPython workspace - what/ > >/ > should the settings for server, workspace, etc be? (It seems that/ > >/ > username needs a _cp appended)./ > >/ > I am beginning to suspect that access is limited to the Microsoft team/ > >/ > which would be a shame :-)/ > >/ >/ > >/ > David/ > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Martin.Maly at microsoft.com Fri Oct 6 17:44:53 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 6 Oct 2006 08:44:53 -0700 Subject: [IronPython] Access to IronPython version control In-Reply-To: <45267141.5040307@sjsoft.com> References: <45267141.5040307@sjsoft.com> Message-ID: IronPython didn't start as CodePlex project so we started with another source repository which we are slowly transitioning away from. The 'look under the hood' would reveal that we submit our changes to the other repository and changes get propagated automatically to codeplex. This version of reality will last only for few more days and after that we will be changing things. However, the final version is not completely decided yet. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David Fraser Sent: Friday, October 06, 2006 8:08 AM To: Discussion of IronPython Subject: Re: [IronPython] Access to IronPython version control Hi Martin Had another idea - it seems that most of the IronPython team's commits to the CodePlex repository seem to be dumps from out of another system - is that true, do you use another version control system internally and sync, or do you use CodePlex directly and just creatively name your commits the revision number in brackets? :-) David Martin Maly wrote: > Unfortunately, it turns out that at this point it is not possible to get access to the version control without being Contributor or higher. I hope that this will change sometimes in the future, but for the moment, the only way to get access to the contents of the IronPython source control is via the zip download... > > Sorry for the bad news. > > Martin > > -----Original Message----- > /Wed Oct 4 10:04:02 PDT 2006/ *Martin Maly* Martin.Maly at microsoft.com Wrote: > > > > We are talking to CodePlex development team about possibly adding a group of users which could have access to the version control without the need to be Contributor or higher. Some kind of read only access for community members. This is going on as we speak so no final word yet, but we'll keep you posted as we hear more. > > Thanks for the patience > Martin > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com ] On Behalf Of martin at teamprise.com > Sent: Monday, October 02, 2006 6:29 AM > To: users at lists.ironpython.com > Subject: Re: [IronPython] Access to IronPython version control > > > David, > > You only get access to the source code repository if you are a > developer or greater with the project. Anonymous access to source code > of CodePlex project is from the source tab. > > If you are having trouble getting Teamprise to talk to your CodePlex > project and you do have developer permissions then give me a shout (or > email support at teamprise.com ) and we'll try and help out. > > Cheers, > > Martin. > > > David Fraser wrote: > >/ Hi Martin/ > >/ / > >/ Not unless I'm blind :-)/ > >/ Maybe only for developers of the project?/ > >/ In any case Seo helped me:/ > >/ server should be https://tfs01.codeplex.com/ > >/ username should be your username + _cp/ > >/ password as normal/ > >/ domain should be SND/ > >/ / > >/ But not sure of the workspace name although this could just be a/ > >/ permissions thing - tried IronPython and $\IronPython/ > >/ / > >/ Cheers/ > >/ David/ > >/ / > >/ Martin Maly wrote:/ > >/ > If you go to the IronPython CodePlex "Source" page, in the upper right corner you'll see the settings for server, user name, port .../ > >/ >/ > >/ > http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=IronPython/ > >/ >/ > >/ > Martin/ > >/ >/ > >/ > -----Original Message-----/ > >/ > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com ] On Behalf Of David Fraser/ > >/ > Sent: Friday, September 22, 2006 8:11 AM/ > >/ > To: Discussion of IronPython/ > >/ > Subject: [IronPython] Access to IronPython version control/ > >/ >/ > >/ > Hi/ > >/ >/ > >/ > I was trying today to access the IronPython source code repository -/ > >/ > there doesn't seem to be much information online on CodePlex as to how/ > >/ > to do this without using the Visual tool./ > >/ > Being more at home on the commandline and waiting for the 200MB+/ > >/ > download (doesn't seem to be possible to get the commandline client/ > >/ > standalone) I stumbled upon Teamprise's Java client at/ > >/ > http://www.teamprise.com/download/index.html/ > >/ > Unfortunately I can't seem to access the IronPython workspace - what/ > >/ > should the settings for server, workspace, etc be? (It seems that/ > >/ > username needs a _cp appended)./ > >/ > I am beginning to suspect that access is limited to the Microsoft team/ > >/ > which would be a shame :-)/ > >/ >/ > >/ > David/ > ------------------------------------------------------------------------ > > _______________________________________________ > 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 christian.muirhead at resolversystems.com Fri Oct 6 18:44:57 2006 From: christian.muirhead at resolversystems.com (Christian Muirhead) Date: Fri, 06 Oct 2006 17:44:57 +0100 Subject: [IronPython] Compilation difficulties In-Reply-To: <4526596E.4000506@resolversystems.com> References: <4526596E.4000506@resolversystems.com> Message-ID: <45268809.5020005@resolversystems.com> Hi - I'm a colleague of William's and I'm looking into having some of our packages compiled as dlls (primarily to reduce startup time). I have a structure as discussed in the messages below, and compiling to an exe and running it produces the expected output. (structure) project/ | main.py + Cheesemonger/ | __init__.py | Shopkeeper.py | Counter.py (There is one minor difference: when main.py is running from the executable, the value of __name__ is 'main', rather than '__main__' - I'm not sure why this is, but if I account for it the script works correctly.) What I would like to do is keep main.py as a normal .py file, which uses the Cheesemonger package from a dll. I can compile the Cheesemonger package to a dll using pyc.py, and use clr.AddReferenceToFile to add a reference to the dll, but I can't then import Cheesemonger.Storekeeper (or anything else that I think should be included in the dll). I would guess that while this is how one would use a C# class that had been compiled into a dll from IronPython, it doesn't work for classes compiled using pyc.py because of the name-mangling done when IP generates an assembly from the Python code. Is this right? If so, how would one use a package that had been compiled to a dll with pyc? Thanks, Christian William Reade wrote: > > > -------- Original Message -------- > Subject: Re: [IronPython] Compilation difficulties > Date: Mon, 2 Oct 2006 09:50:12 -0700 > From: Dave Fugate > Reply-To: Discussion of IronPython > To: Discussion of IronPython > References: <451D110D.1070301 at resolversystems.com> > > > > I'm glad to see people are finding this sample useful! > > My first suggestion is to verify you have an __init__.py in > Cheesemonger. I'm pretty sure the answer is yes but just to be certain... > > Second, using a command such as: > E:\Temp>ipy F:\ipsd\IronPython\Samples\Pyc\pyc.py > Cheesemonger\Counter.py Cheesemonger\Shopkeeper.py > Cheesemonger\__init__.py /main:main.py /out:CM.dll > should do what I *think* you're trying to do. This creates an > (executable) CM.dll based on main.py which pretty much follows your > series of files except that my main.py invokes a function from > Cheesemonger.Counter. When I run CM.dll, the output verifies it is > indeed using modules from Cheesemonger.* > > Last but definitely not least, please stay away from using tools like > ildasm, reflector, etc to examine the contents of IronPython created > DLLs. What you'll find there is almost certainly not what you'd expect > as mentioned on the Codeplex Samples page. > > > > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade > Sent: Friday, September 29, 2006 5:27 AM > To: Discussion of IronPython > Subject: [IronPython] Compilation difficulties > > Hi all > > I've been playing with the (excellent) Pyc sample, and I've got stuck. I > have a series of files a bit like the following: > > project/ > | main.py > + Cheesemonger/ > | Shopkeeper.py > | Counter.py > > ...in which main.py contains statements like: > > from Cheesemonger.Counter import Counter > > ...and Counter.py also contains statements like: > > from Cheesemonger.Shopkeeper import Shopkeeper > > --- > > This is all very well, but I can't work out how to compile a > Cheesemonger.dll in which the above imports still function -- when I > inspect it with ildasm, the dll contains "Counter" and "Shopkeeper" > rather than "Cheesemonger.Counter" and "Cheesemonger.Shopkeeper". > > I can "fix" the issue by undisambiguating the imports: > > clr.AddReference("Cheesemonger") > from Counter import Counter > > ...and: > > from Shopkeeper import Shopkeeper > > ...but we've been burned by ambiguous imports before and would prefer > not to reintroduce them (life can get confusing when every directory > contains its own "UnitTests" directory ;)). > > Is there any way of compiling a directory (and subdirectories) into a > single dll, such that no import statements need to be changed? A quick > look at the IP source left me none the wiser, I'm afraid. > > Cheers > William > > _______________________________________________ > 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 jeffg at activestate.com Fri Oct 6 19:52:11 2006 From: jeffg at activestate.com (Jeff Griffiths) Date: Fri, 06 Oct 2006 10:52:11 -0700 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <20061006001914.44B411BBF6@che.dreamhost.com> References: <20061006001914.44B411BBF6@che.dreamhost.com> Message-ID: <452697CB.9030707@activestate.com> That's a valid design point; I didn't implement the Python dbgp client but I imagine there was a reason for it. As it happens, _getframe is the only single-underscore method in sys, but it also happens to be a pretty useful one if you are implementing a debugger, with no obvious wrapper in the 'public' namespace in that module. So I guess pragmatism wins there? cheers, JeffG Nathan R. Ernst wrote: > I don't mean to flame, but Python protocol dictates that methods/members > preceded by "_" are generally not supposed to be referred to. I guess you > could kind of consider them 'protected', whilst members preceded by a > double-underscore are considered 'private' (despite being accessible if you > de-mangle the names manually). > > Perhaps the modules relying upon behavior supplied by these modules should > have defects assigned against them for using these methods, as well? If its > generally accepted that a Python implementation should provide methods > prefixed by "_" on built-ins, maybe they ought to be moved towards more > prominent, public names? > > Just some random thoughts on the topic... > > -Nathan > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Griffiths > Sent: Thursday, October 05, 2006 12:34 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Standard Python Debugging not supported > > Dino Viehland wrote: >> Sys._getframe() is likely significantly harder to implement. I'd be >> a little bit surprised if we get this into 1.1 but it'd be nice to >> get at some point in the future. The hard part of this probably >> isn't supporting sys._getframe() but actually supporting >> sys._getframe(depth). > >> Do you know if the parameterless version will unblock you, or do you >> need the full blown functionality? > > Komodo's debugger only makes calls like: > > sys._getframe().f_back > > We don't seem to pass arguments in, so I expect sys._getframe() without > parameters might work. > > JeffG > > ps for the curious, the debugger implementation we use is FOSS, and > available here: > > http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging > > The DBGP protocol it is based on is doc'd here: > > http://www.xdebug.org/docs-dbgp.php > > > > > > > > _______________________________________________ > 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 Curtis at DAYCOS.com Fri Oct 6 20:37:22 2006 From: Curtis at DAYCOS.com (Curtis Scheer) Date: Fri, 6 Oct 2006 13:37:22 -0500 Subject: [IronPython] Visual Studio Integration Message-ID: <031936836C46D611BB1B00508BE7345D04B5ADE7@gatekeeper.daycos.com> I am having problems getting the September Visual Studio SDK IronPython sample to work. After building the sample project I run the project, I am able to create a new IronPython Class Library or windows application. As soon as I try to edit the class Visual Studio crashes out without throwing an exception in some type of message. However if I step through it with the debugger in the {Microsoft.VisualStudio.Package.Automation.OAAssemblyReference} class I get the following exception on "The method or operation is not implemented.". This orginiated it appears from the property "PublicKeyToken". Also, the debug output of the SDK project ended with this line "The program '[4172] devenv.exe: Managed' has exited with code 2 (0x2).". If I try to save the project before trying to edit the IronPython class I get an error message "Operation can not be completed. No such interface supported". Any help would be greatly appreciated. Thanks, Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Oct 6 21:47:32 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 6 Oct 2006 12:47:32 -0700 Subject: [IronPython] Visual Studio Integration In-Reply-To: <031936836C46D611BB1B00508BE7345D04B5ADE7@gatekeeper.daycos.com> References: <031936836C46D611BB1B00508BE7345D04B5ADE7@gatekeeper.daycos.com> Message-ID: <7AD436E4270DD54A94238001769C2227448E93381C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> The not implemented exception is a red herring - that is always there (I believe this gets called from COM, and they'll end up seeing a E_NOTIMPLEMENTED hresult and handles it). One issue that I've seen in the past is that you sometimes need to make sure you do a Rebuild instead of a Build to get everything re-built and on the same page. Can you see (if you haven't already) if that makes it work? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curtis Scheer Sent: Friday, October 06, 2006 11:37 AM To: users at lists.ironpython.com Subject: [IronPython] Visual Studio Integration I am having problems getting the September Visual Studio SDK IronPython sample to work. After building the sample project I run the project, I am able to create a new IronPython Class Library or windows application. As soon as I try to edit the class Visual Studio crashes out without throwing an exception in some type of message. However if I step through it with the debugger in the {Microsoft.VisualStudio.Package.Automation.OAAssemblyReference} class I get the following exception on "The method or operation is not implemented.". This orginiated it appears from the property "PublicKeyToken". Also, the debug output of the SDK project ended with this line "The program '[4172] devenv.exe: Managed' has exited with code 2 (0x2).". If I try to save the project before trying to edit the IronPython class I get an error message "Operation can not be completed. No such interface supported". Any help would be greatly appreciated. Thanks, Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Oct 6 22:02:28 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 6 Oct 2006 13:02:28 -0700 Subject: [IronPython] Compilation difficulties In-Reply-To: <45268809.5020005@resolversystems.com> References: <4526596E.4000506@resolversystems.com> <45268809.5020005@resolversystems.com> Message-ID: <7AD436E4270DD54A94238001769C2227448E933836@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Unfortunately I don't think this is going to work today. As you seem to have noticed we're going to treat the assembly as if it's a normal CLR assembly. Ideally what we'd do is do the same thing as CPython does w/ .pyc's which is the cache them for you and load them for you automatically. We do have a bug for this (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=358). I've added a +1 to the bug (currently marked for 1.1) so that when we look at the 1.1 bugs we'll make sure to prioritize this one. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christian Muirhead Sent: Friday, October 06, 2006 9:45 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Compilation difficulties Hi - I'm a colleague of William's and I'm looking into having some of our packages compiled as dlls (primarily to reduce startup time). I have a structure as discussed in the messages below, and compiling to an exe and running it produces the expected output. (structure) project/ | main.py + Cheesemonger/ | __init__.py | Shopkeeper.py | Counter.py (There is one minor difference: when main.py is running from the executable, the value of __name__ is 'main', rather than '__main__' - I'm not sure why this is, but if I account for it the script works correctly.) What I would like to do is keep main.py as a normal .py file, which uses the Cheesemonger package from a dll. I can compile the Cheesemonger package to a dll using pyc.py, and use clr.AddReferenceToFile to add a reference to the dll, but I can't then import Cheesemonger.Storekeeper (or anything else that I think should be included in the dll). I would guess that while this is how one would use a C# class that had been compiled into a dll from IronPython, it doesn't work for classes compiled using pyc.py because of the name-mangling done when IP generates an assembly from the Python code. Is this right? If so, how would one use a package that had been compiled to a dll with pyc? Thanks, Christian William Reade wrote: > > > -------- Original Message -------- > Subject: Re: [IronPython] Compilation difficulties > Date: Mon, 2 Oct 2006 09:50:12 -0700 > From: Dave Fugate > Reply-To: Discussion of IronPython > To: Discussion of IronPython > References: <451D110D.1070301 at resolversystems.com> > > > > I'm glad to see people are finding this sample useful! > > My first suggestion is to verify you have an __init__.py in > Cheesemonger. I'm pretty sure the answer is yes but just to be certain... > > Second, using a command such as: > E:\Temp>ipy F:\ipsd\IronPython\Samples\Pyc\pyc.py > Cheesemonger\Counter.py Cheesemonger\Shopkeeper.py > Cheesemonger\__init__.py /main:main.py /out:CM.dll should do what I > *think* you're trying to do. This creates an > (executable) CM.dll based on main.py which pretty much follows your > series of files except that my main.py invokes a function from > Cheesemonger.Counter. When I run CM.dll, the output verifies it is > indeed using modules from Cheesemonger.* > > Last but definitely not least, please stay away from using tools like > ildasm, reflector, etc to examine the contents of IronPython created > DLLs. What you'll find there is almost certainly not what you'd expect > as mentioned on the Codeplex Samples page. > > > > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade > Sent: Friday, September 29, 2006 5:27 AM > To: Discussion of IronPython > Subject: [IronPython] Compilation difficulties > > Hi all > > I've been playing with the (excellent) Pyc sample, and I've got stuck. > I have a series of files a bit like the following: > > project/ > | main.py > + Cheesemonger/ > | Shopkeeper.py > | Counter.py > > ...in which main.py contains statements like: > > from Cheesemonger.Counter import Counter > > ...and Counter.py also contains statements like: > > from Cheesemonger.Shopkeeper import Shopkeeper > > --- > > This is all very well, but I can't work out how to compile a > Cheesemonger.dll in which the above imports still function -- when I > inspect it with ildasm, the dll contains "Counter" and "Shopkeeper" > rather than "Cheesemonger.Counter" and "Cheesemonger.Shopkeeper". > > I can "fix" the issue by undisambiguating the imports: > > clr.AddReference("Cheesemonger") > from Counter import Counter > > ...and: > > from Shopkeeper import Shopkeeper > > ...but we've been burned by ambiguous imports before and would prefer > not to reintroduce them (life can get confusing when every directory > contains its own "UnitTests" directory ;)). > > Is there any way of compiling a directory (and subdirectories) into a > single dll, such that no import statements need to be changed? A quick > look at the IP source left me none the wiser, I'm afraid. > > Cheers > William > > _______________________________________________ > 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 Curtis at DAYCOS.com Fri Oct 6 22:10:48 2006 From: Curtis at DAYCOS.com (Curtis Scheer) Date: Fri, 6 Oct 2006 15:10:48 -0500 Subject: [IronPython] Visual Studio Integration Message-ID: <031936836C46D611BB1B00508BE7345D04B5AE2B@gatekeeper.daycos.com> Unfortunately a rebuild does not fix the problem, any other suggestions? _____ From: Dino Viehland [mailto:dinov at exchange.microsoft.com] Sent: Friday, October 06, 2006 2:48 PM To: Discussion of IronPython Subject: Re: [IronPython] Visual Studio Integration The not implemented exception is a red herring - that is always there (I believe this gets called from COM, and they'll end up seeing a E_NOTIMPLEMENTED hresult and handles it). One issue that I've seen in the past is that you sometimes need to make sure you do a Rebuild instead of a Build to get everything re-built and on the same page. Can you see (if you haven't already) if that makes it work? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curtis Scheer Sent: Friday, October 06, 2006 11:37 AM To: users at lists.ironpython.com Subject: [IronPython] Visual Studio Integration I am having problems getting the September Visual Studio SDK IronPython sample to work. After building the sample project I run the project, I am able to create a new IronPython Class Library or windows application. As soon as I try to edit the class Visual Studio crashes out without throwing an exception in some type of message. However if I step through it with the debugger in the {Microsoft.VisualStudio.Package.Automation.OAAssemblyReference} class I get the following exception on "The method or operation is not implemented.". This orginiated it appears from the property "PublicKeyToken". Also, the debug output of the SDK project ended with this line "The program '[4172] devenv.exe: Managed' has exited with code 2 (0x2).". If I try to save the project before trying to edit the IronPython class I get an error message "Operation can not be completed. No such interface supported". Any help would be greatly appreciated. Thanks, Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvm_cop at spamcop.net Fri Oct 6 22:24:34 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Fri, 06 Oct 2006 16:24:34 -0400 Subject: [IronPython] Problems with PythonSyntaxErrorException In-Reply-To: <45d38ec30609211501i7e734817q2f24167ca8d70bc1@mail.gmail.co m> References: <45d38ec30609211501i7e734817q2f24167ca8d70bc1@mail.gmail.com> Message-ID: <7.0.1.0.2.20061006161107.075efe88@wheresmymailserver.com> That value of LineText may be a bug (per Martin), but it would make some sense to me if the line & column tell you where in the source the problem seems to have started (that is, where the parser was when it went looking for follolwing text to satisfy the syntax rules and couldn't find anything that qualified), while LineText tells you what text was being processed when the parser realizes\d that there was a syntax error. That is, I don't think that it's necessarily incorrect for the "line & column of the error" to be different from "line of text being processed when the syntax error is finally known to exist." For example, if you accidentally fail to end a triple-quoted (multi-line) string, the error isn't going to be found until the whole program has been processed, as it will all appear to be part of the multi-line string. But the notion that there's a not-ever-closed string that began way back up where the triple-quoted string was started could get reflected in the line & column info. So I think you should find the line & column info, get the code of that line, and show both that and LineText. (But then again, I'm quite anal when it comes to error reporting.) At 06:01 PM 9/21/2006, Mike McGavin wrote >Hello. > >We've been attempting to use IronPython as a scripting engine for an >application we've been writing. So far it's mostly been working out, >but when trying to report errors about any incoming script, I've >noticed that the PyhonSyntaxErrorException.LineText property seems to >be inconsistent with where the error is. > >Here's a simplified program (output follows) which demonstrates it: > >=== >using System; >using IronPython.Hosting; > >namespace SyntaxExceptionProblemDemo >{ > class Program > { > static void Main(string[] args) > { > string syntaxErrorCode = @" >class HasASyntaxException: > def MethodOne(self): > print 'hello' > print 'world' > print 'again' > def MethodTwo(self) > print 'world' >"; > > try > { > IronPython.Hosting.PythonEngine engine1 = new >IronPython.Hosting.PythonEngine(); > > Console.WriteLine("\nAbout to execute\n"); > engine1.Execute(syntaxErrorCode); > } > catch (IronPython.Runtime.Exceptions.PythonSyntaxErrorException ex) > { > Console.WriteLine("Syntax exception:"); > Console.WriteLine("Message: {0}\nLineText: {1}\nLine: >{2}\nColumn: {3}", > ex.Message, ex.LineText, ex.Line, ex.Column); > } > } > } >} >=== > >Output of this program is: > >=== >About to execute > >Syntax exception: >Message: unexpected token >LineText: print 'hello' >Line: 7 >Column: 23 >=== > >The Line and Column properties are correct, but the LineText property >seems to be unrelated to where the error is. Is this a bug, or am I >just misunderstanding what it's supposed to be returning? > >I could probably try and rig something myself to manually locate the >correct line and column within the text I've given the engine to >parse, but it'd be nice to be able to use the LineText property >instead. > > >Thanks for any help. >Mike. J. Merrill / Analytical Software Corp From jvm_cop at spamcop.net Fri Oct 6 23:54:32 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Fri, 06 Oct 2006 17:54:32 -0400 Subject: [IronPython] Fwd: Where to share a script / executables (again) In-Reply-To: <6523e39a0601271255n2d540975obe78874d1fa6bc4@mail.gmail.com > References: <781C4D11561D1A4FA1D631415302FB83096F3B5F@houmail1.corp.aspentech.com> <6523e39a0601271255n2d540975obe78874d1fa6bc4@mail.gmail.com> Message-ID: <7.0.1.0.2.20061006174725.07629a20@wheresmymailserver.com> The executable that I just downloaded is bound to an older version of the IronPython DLLs. You need to either update the executable (by compiling with the release version) or add a cleanPath.exe.config file that tells the CLR it can use version 1.0.60816.1877 of the IronPython DLLs instead of the version (1.0.2216.22456) you built with. (If I knew precisely how to do the latter I would do it myself .) This is low priority for me, as I can run the .py file, but perhaps it's not for the community as a whole. At 04:55 PM 1/27/2006, Catherine Devlin wrote (in part) >For now, I created a "User Sample" at GotDotNet containing source and .exe - >http://gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=20DB65A0-A895-429E-9455-A02BF7330FA2. >(say THAT five times fast) > >The fact that the executable can be stored there is a definite advantage - if we can get executables circulating beyond the Python-using community, they might generate curiosity and corrupt impressionable youth. J. Merrill / Analytical Software Corp From kevin.gadd at gmail.com Sat Oct 7 01:12:26 2006 From: kevin.gadd at gmail.com (Kevin Gadd) Date: Fri, 6 Oct 2006 16:12:26 -0700 Subject: [IronPython] Inheriting from a C# type in IronPython - is this even possible? In-Reply-To: References: Message-ID: Blech. The lack of any (that I can find) documentation whatsoever on this subject and lack of any easy way to debug what's actually happening has resulted in me having to resort to using the clunky jscript.net hosting api. If anyone ever gets a chance to take a glance at this and guess at what the problem might be, I'd appreciate it. On 9/26/06, Kevin Gadd wrote: > > So I have an object model defined in C#, that defines various types. One > of them is a base type called 'Element' that is designed to be inherited > from. > > I have a class called ElementFactory that loads up one or more python > scripts into an IronPython.Hosting engine, and exposes my object model to > those scripts. It then tries to instantiate classes that are defined in the > scripts. > > I have a test script that looks like this: > from Designer.Schema import Element > > class TextStr(Element): > def __new__(): > System.Windows.Forms.MessageBox.Show("__new__0") > def __new__(self): > System.Windows.Forms.MessageBox.Show("__new__1") > def __new__(self, a2): > System.Windows.Forms.MessageBox.Show("__new__2") > def __new__(self, a2, a3): > System.Windows.Forms.MessageBox.Show("__new__3") > def __new__(self, a2, a3, a4): > System.Windows.Forms.MessageBox.Show("__new__4") > def __init__(): > System.Windows.Forms.MessageBox.Show("__init__0") > def __init__(self): > System.Windows.Forms.MessageBox.Show ("__init__1") > def __init__(self, a2): > System.Windows.Forms.MessageBox.Show("__init__2") > def __init__(self, a2, a3): > System.Windows.Forms.MessageBox.Show("__init__3") > def __init__(self, a2, a3, a4): > System.Windows.Forms.MessageBox.Show("__init__4") > > While I can locate the definition of the TextStr type (by finding UserType > objects in module.Globals) and can get an instance of something that seems > to be a TextStr (by using UserType.AllocateObject), I'm not sure it's > actually working. The returned object is named 'Element_1', has a __type__ > member that says 'TextStr' and it is a valid Element that runs the inherited > constructor when created. But none of the __new__ or __init__ overloads I > defined are being run when the object is created, which implies that > something strange is going on. I can't figure out what this Element_1 object > actually is or why calling UserType.AllocateObject isn't doing what I > expect it to do. The only other way I can find in the API to construct a > python type dynamically is using Evaluate, which is not a usable solution > for my circumstances, since when I load each of these scripts in as modules, > they aren't defined in the default module and can't be seen by expressions > passed into Evaluate. > > Am I just misunderstanding how this stuff works? Is it not possible to > derive from a C# type in IronPython? > > Here is the basic boilerplate code I'm using, trimmed for space: > public bool LoadScript(string filename) { > FileInfo info = new FileInfo(filename); > OptimizedEngineModule module = > Engine.CreateOptimizedModule(filename, info.Name.Replace(".py", ""), > true); > module.Execute(); > EnumTypes(module.Globals); > return true; > } > > public void EnumTypes(IDictionary globals) { > foreach (KeyValuePair pair in globals) { > UserType type = pair.Value as UserType; > if (type != null) > if (!Types.ContainsKey(type.Name)) > Types.Add(type.Name, type); > } > } > > public Element Construct(string typename, Document document, > string id) { > UserType type = Types[typename]; > return type.AllocateObject(document, id) as Element; > } > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Sat Oct 7 01:44:33 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 6 Oct 2006 16:44:33 -0700 Subject: [IronPython] IronPython 1.0.1 Released! Message-ID: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Hello IronPython Community, We have just released IronPython 1.0.1. The motivation of this release is to add a small feature that enables the community to create new built-in modules more easily. Additionally we've included a small set of minor bug fixes to the IronPython modules and engine. You can see the more complete list of changes below. The new support for community written built-in modules enables loading the .NET DLLs on startup and adding them to the built-in module list. This feature was implemented by updating site.py to check for a "DLLs" directory and looking for the PythonModuleAttribute point to an assembly. Now users can create built-in modules by simply adding this attribute to their assembly and re-distributing only the new assembly which the user can add to their DLLs directory. We'd like to thank everyone in the community for your bug reports and suggestions that helped make this a better release: Alexey Borzenkov, Bern McCarty, Chuck Kirschman, Nathan Baulch, Seo Sanghyeon, Stanislas Pinte, and Sumit Basu. Thanks and keep in touch, The IronPython Team More complete list of changes and bug fixes: ============================================ CodePlex bug 3758 - super(sometype, inst).__eq__ on derived tuple while overriding tuple stack overflows better error messge when calling delegate w/ incompatible function Added description of assembly in AssemblyDescription attribute. Fixed help output for -O option (removed : after O). Console history differs from cmd.exe history CodePlex bug 2267 - sys.winver missing? CodePlex bug 2290 - 'abc'.encode() requires encoding type CodePlex bug 2322 - - operator not working for DateTime operands CodePlex bug 2397 - time.strptime incorrectly handling %p (am/pm) CodePlex bug 2903 - IronPython's "apply" built-in is incompatible with CPython 2.4's CodePlex bug 3049 - reg ex pre-parser doesn't recognize double \ as escape sequence to skip CodePlex bug 3050 - os.utime doesn't properly set the accessed / modified times CodePlex bug 3092 - struct.unpack mishandling the "x" format code CodePlex bug 3094 - Doesn't recognise *valid* PEP0263 codings in source files CodePlex bug 3118 - .func_code.co_flags is inconsistent CodePlex bug 3160 - CodeDom should handle null return expression statement From alex at syzmk.com Sat Oct 7 05:51:24 2006 From: alex at syzmk.com (Alex Henderson) Date: Sat, 7 Oct 2006 16:51:24 +1300 Subject: [IronPython] Limitations of PythonEngine.CreateMethod? Message-ID: <002701c6e9c3$dc48c950$4201a8c0@tokai> Hi All, I've been playing with the PythonEngine's CreateMethod(..) and declaring functions within the body of another function - however it doesn't seem to work, for example I can writin a function like this: def ExternalFunc(): def InnerFunc1(): def InnerFunc2(): return "2" return "1" + InnerFunc2() return "0" + InnerFunc1() and then evaluate it... >>> ExternalFunc() '012' >>> But when I try to create a delegate for doing the same thing by shedding the outer "layer" of the function, and creating it as a method via the PythonEngine it doesn't work: PythonEngine = new PythonEngine() // some more setup code would go here... Func externalFunc = engine.CreateMethod>(@"def InnerFunc1(): def InnerFunc2(): return ""2"" return ""1"" + InnerFunc2() return ""0"" + InnerFunc1()"); The call to CreateMethod spits the dummy, with a NullReferenceException... here's the stack trace failed: System.NullReferenceException : Object reference not set to an instance of an object. at IronPython.Compiler.Generation.CodeGen.DefineDynamicMethod(String name, Type retType, Type[] paramTypes) at IronPython.Compiler.Generation.CodeGen.DefineMethod(String name, Type retType, Type[] paramTypes, SymbolId[] paramNames) at IronPython.Compiler.Ast.FunctionDefinition.Emit(CodeGen cg) at IronPython.Compiler.Ast.SuiteStatement.Emit(CodeGen cg) at IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionBody(CodeGen cg, CodeGen ocg) at IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionImplementation(CodeGe n methodCodeGen, CodeGen initCodeGen) at IronPython.Hosting.PythonEngine.CreateDelegateWorker[TDelegate](Statement s, IList`1 parameters) at IronPython.Hosting.PythonEngine.CreateMethodUnscoped[TDelegate](String statements, IList`1 parameters) at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String statements, IList`1 parameters, EngineModule engineModule) at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String statements) Am I overlooking something in my code, or is this just a limitation of using CreateMethod to get a delegate to an anonymous python function? For the mean time I'm just working around it by doing this: engine.Execute(@"def ExternalFunc(): def InnerFunc1(): def InnerFunc2(): return ""2"" return ""1"" + InnerFunc2() return ""0"" + InnerFunc1()"); PythonFunction func = _engine.EvaluateAs("ExternalFunc"); Func funcDel = delegate { return (string)func.Call(); }; Which gets me a suitable delegate, but it's not really the same as I end up having to declare the function as part of a module, which I was trying to avoid... Chez, - Alex From wierob at gmx.de Sat Oct 7 11:18:25 2006 From: wierob at gmx.de (wierob) Date: Sat, 07 Oct 2006 11:18:25 +0200 Subject: [IronPython] wrong link in IPPowerShell sample Message-ID: <452770E1.9020006@gmx.de> hi, the link to download the PowerShell, which is required for this sample, seems to be wrong. So were can I get this PowerShell? thanks robert From vwehren at home.nl Sat Oct 7 14:13:52 2006 From: vwehren at home.nl (Vincent Wehren) Date: Sat, 7 Oct 2006 13:13:52 +0100 Subject: [IronPython] wrong link in IPPowerShell sample In-Reply-To: <452770E1.9020006@gmx.de> Message-ID: <000001c6ea0a$0dc366c0$232b6459@VINWEHVAIO> Here you go: http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx /Vincent Wehren |-----Original Message----- |From: users-bounces at lists.ironpython.com |[mailto:users-bounces at lists.ironpython.com] On Behalf Of wierob |Sent: Samstag, 7. Oktober 2006 10:18 |To: users at lists.ironpython.com |Subject: [IronPython] wrong link in IPPowerShell sample | |hi, | |the link to download the PowerShell, which is required for |this sample, seems to be wrong. So were can I get this PowerShell? | |thanks |robert |_______________________________________________ |users mailing list |users at lists.ironpython.com |http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dfugate at microsoft.com Sat Oct 7 18:25:16 2006 From: dfugate at microsoft.com (Dave Fugate) Date: Sat, 7 Oct 2006 09:25:16 -0700 Subject: [IronPython] wrong link in IPPowerShell sample In-Reply-To: <000001c6ea0a$0dc366c0$232b6459@VINWEHVAIO> References: <452770E1.9020006@gmx.de>, <000001c6ea0a$0dc366c0$232b6459@VINWEHVAIO> Message-ID: <7346A825E148B049A9AD1D3ED46A2D910997F7F8A4@NA-EXMSG-C106.redmond.corp.microsoft.com> It seems the download page for PowerShell RC1 has been removed entirely now that PowerShell RC2 is out. Please use the more generic link provided by Vincent (thanks!) below. Also, it's worth mentioning there are some special steps to follow if you're upgrading from an earlier version of PowerShell - look for "Registry Information" within http://support.microsoft.com/kb/925228. ________________________________________ From: users-bounces at lists.ironpython.com On Behalf Of Vincent Wehren Sent: Saturday, October 07, 2006 5:13 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] wrong link in IPPowerShell sample Here you go: http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx /Vincent Wehren |-----Original Message----- |From: users-bounces at lists.ironpython.com |[mailto:users-bounces at lists.ironpython.com] On Behalf Of wierob |Sent: Samstag, 7. Oktober 2006 10:18 |To: users at lists.ironpython.com |Subject: [IronPython] wrong link in IPPowerShell sample | |hi, | |the link to download the PowerShell, which is required for |this sample, seems to be wrong. So were can I get this PowerShell? | |thanks |robert |_______________________________________________ |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 sjmachin at lexicon.net Sun Oct 8 04:54:00 2006 From: sjmachin at lexicon.net (John Machin) Date: Sun, 08 Oct 2006 12:54:00 +1000 Subject: [IronPython] IronPython codec names not compatible with CPython In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <45286848.7080402@lexicon.net> CPython recognises both 'gbk' and 'cp936' i.e. unicode('some string', 'gbk') does what you'd expect. IronPython 1.0.1 recognises only 'cp936'. CPython recognises 'mac_roman', 'mac_greek', etc. IronPython doesn't. After a [rare] flash of inspiration, I tried 'cp10000', 'cp10006', etc and IronPython recognises these, which CPython doesn't. The "differences" document says: """ IronPython's _codecs module implementation is incomplete. There are several replace_error/lookup_error handlers that IronPython does not implement. """ It is not apparent whether this is intended to mean that missing error handlers is the *only* known deficiency. IronPython Bug #3214 mentions "import encodings" as fixing a LookupError. Well, you learn something new every day: 1. CPython permits one to import encodings, but it's not documented AFAICT, and it's *not* necessary in order to use 'gbk', 'mac_roman', etc. 2. After import encodings, IronPython recognises 'mac_roman' and 'mac_greek', but still not 'gbk'. How much of the above is bug and how much is feature? What is this mysterious encodings module anyway? Does this mean the CPython test suite doesn't cover the above cases? Are the equivalences (mac_roman, cp10000) etc correct and official? Should I just dump all of the above into the IronPython Issue Tracker? Cheers, John From jymengant at teaser.fr Sun Oct 8 09:46:23 2006 From: jymengant at teaser.fr (Jean-Yves MENGANT) Date: Sun, 8 Oct 2006 09:46:23 +0200 Subject: [IronPython] Standard Python Debugging not supported In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9332D5@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <20061008074629.3A2576C8D8@math.teaser.net> An acceptable minimal implementation is sys._getframe(depth=0) returning ValueError if depth > 0 . Debuggers are mainly interested by current stack frame , which is the case for both bdb.py + pdb.py (standard lib console mode python debugger) and JpyDbg. If this minimal implementation can just happen in 1.1 that would be great Thanks Jean-Yves _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, October 05, 2006 6:10 PM To: Discussion of IronPython Subject: Re: [IronPython] Standard Python Debugging not supported Sys._getframe() is likely significantly harder to implement. I'd be a little bit surprised if we get this into 1.1 but it'd be nice to get at some point in the future. The hard part of this probably isn't supporting sys._getframe() but actually supporting sys._getframe(depth). Do you know if the parameterless version will unblock you, or do you need the full blown functionality? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Thursday, October 05, 2006 1:44 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] Standard Python Debugging not supported Complementary : Looking at the 1042 , I saw another unclear topic around the the sys_getframe entry which is marked as not supported already throwing a ValueError exception + 'The sys._getframe() function is not supported by IronPython' is also written in the 'differences between IronPython and CPython' ; I hope that this is only on short term limitation as welll since this api is also fundamental for Python debugger's implementation's Stack frame analysis and is referenced inside bdb.py standard python module Thanks for your answer below Jean-Yves _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, October 04, 2006 7:48 PM To: Discussion of IronPython; users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Standard Python Debugging not supported We have a couple of bugs opened on this on CodePlex for this issue: 563: Support for Code Quality Tools in IronPython missing 1042: Implement various sys module methods that currently throw a NotImplementedException We believe we know how to implement sys.settrace (we'd hook it at the same place we hook our recursion checks today) but we haven't had time to get to it yet. Currently this is scheduled in our bug database as 1.1 feature (although that may be subject to change) but it's good to note that we are seeing additional demand for these APIs. This will help us prioritize our 1.1 work better. Hopefully we'll be able to get this in for 1.1 so it'll be just a short term limitation. Thanks for the input! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jean-Yves MENGANT Sent: Wednesday, October 04, 2006 7:39 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] Standard Python Debugging not supported I have been playing around with python debugging implementation for a while , allthough IronPython is a great effort on Python implementation , lacking support for some cross platform standard libraries leeds to to serious limitation in ironpython usage versus Cpython on short and long term. One of the big missing is definitively the the sys.settrace standard function used inside bdb.py and so inherited by python debugging tools on the planet as a python standard debugging API entry point for years. The consequence to this is that trying to support IronPython in a python portable debugging environment will fail(see below) .. And the only reminding platform to make debugging happen will be the Visual Studio environment .. Even the standard pdb.py which inherits bdb.py would not be usable on short term then. Providing a descent implementation of those low level sys.function as it is already available within JPython port would definitively provide more support of IronPython by existing python debugger's on the planet. Of xourse sys.settrace is part of the current sys implementation but when it comes to get executed it's disappointing : localDebuggee= None JPyDbg connecting localhost on port 29111 JPyDbgI0001 : connected to localhost ['Traceback (most recent call last): ', ' File "F:\\IronPython-1.0\\Lib\\bdb.py", line 361, in run sys.settrace(self.trace_dispatch) ', 'NotImplementedError: sys.settrace is not yet supported by IronPython '] '+++ JPy/sessionended/ deamon ended The not yet supported by IronPython is not really an expected serious implementation . This makes VisualStudio as the only python Debugger able to support IronPython in future : Question is this a strategy or just a short term limitation that will be covered soon ? Thanks for your support to Python language Jean-Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Oct 8 13:38:04 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 8 Oct 2006 20:38:04 +0900 Subject: [IronPython] help() on bound methods Message-ID: <5b0248170610080438q2701dd2cm131526f8f85d4e5f@mail.gmail.com> >>> from System.IO import MemoryStream >>> help(MemoryStream.Write) Help on method-descriptor Write | Write(...) | Write(self, Array[Byte] buffer, int offset, int count) >>> stream = MemoryStream() >>> help(stream.Write) Help on builtin_function_or_method in module __builtin__ | | (snip not very useful nonsenses) One would expect something similar to help on MemoryStream.Write for this. In the interactive environment, one usually wants to see help on bound methods of instances. I am not sure whether this makes much sense w.r.t. IronPython internal. Workaround: >>> help(type(stream).Write) -- Seo Sanghyeon From sanxiyn at gmail.com Sun Oct 8 19:15:20 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 9 Oct 2006 02:15:20 +0900 Subject: [IronPython] zlib for IronPython Message-ID: <5b0248170610081015m2ae3b6f9l479187823aa90947@mail.gmail.com> I finally stopped procrastinating. Here's zlib module for IronPython using System.IO.Compression. It is based on the work done by Mathieu Fenniak. https://svn.sourceforge.net/svnroot/fepy/trunk/lib/zlib.py Done: adler32, compress, decompress TODO: crc32, compressobj, decompressobj At first I was confused because data compressed with Mathieu's code couldn't be decompressed with CPython's zlib module and vice versa. People on #mono channel helped me. They told me .NET's DeflateStream is "bare" in that it doesn't generate nor accept ZLIB header and footer as defined in RFC 1950. So after reading the spec, I just wrote that part myself. It still doesn't generate identical output, but compress/decompress in any mix of CPython/IronPython seem to work. I didn't test the code on Windows yet, so I'd appreciate your comments. -- Seo Sanghyeon From paschott at yahoo.com Mon Oct 9 02:48:21 2006 From: paschott at yahoo.com (Peter A. Schott) Date: Sun, 8 Oct 2006 19:48:21 -0500 Subject: [IronPython] Build/Install the SDK? In-Reply-To: Message-ID: <003001c6eb3c$9f8d98e0$481a0a0a@FT.COM> I've been trying to build the SDK so I can use IronPython natively within VS 2005's IDE, but I keep getting failures from the latest download of the SDK. Any suggestions on what to do in order to sucessfully build the projects? I'm kind of new to this, so I'm not really sure what details are needed or if this is a normal problem that is resolved by tweaking some line of code or config file. Thanks in advance. -Pete Schott From anfaleo at gmail.com Fri Oct 6 09:28:32 2006 From: anfaleo at gmail.com (ANNA CHAPOVALOV) Date: Fri, 6 Oct 2006 09:28:32 +0200 Subject: [IronPython] changing c# var values in IP Message-ID: Hi all, I'm a newbee in IP, so sorry if i ask (maybe) dumb questions.... I'm using IP for scripting in a c# app. I have something like this: public partial class frmStart : Form { string idL; ...... ...... private void frmStartBatch_Load(object sender, EventArgs e) { idL = ""; engine = new PythonEngine(); engine.ImportSite(); engine.SetVariable("idL", idL ); engine.ExecuteFile("ip.py"); //At this point i would aspect that idL has the value passed in ip.py scrypt.. but it still has ""... } } Here's my ip code: idL = "Hello World!" Is it ok? How come? I've found some workarounds... but still curious why it happens. Other thing i've noticed is that if i have a class (i've tried with a form class), if i pass it (this) as variable to a ip script, not all it's widgets and attrs are avaible... is this linked with the .NET attributes issues? thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.smith.jr at gmail.com Fri Oct 6 21:59:01 2006 From: martin.smith.jr at gmail.com (Martin Smith) Date: Fri, 6 Oct 2006 12:59:01 -0700 Subject: [IronPython] Visual Studio Integration In-Reply-To: <000001c6e977$903ffb10$0506010a@axure.local> Message-ID: <019201c6e981$df9d9fa0$9d06010a@axure.local> I get the same error. I've tried a few times (installing a few different versions of the sdk over the last few months) and never actually gotten it to work. There always seems to be one error or another. I there was just a (small) msi that would let it work properly. Martin _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curtis Scheer Sent: Friday, October 06, 2006 11:45 AM To: users at lists.ironpython.com Subject: [IronPython] Visual Studio Integration I am having problems getting the September Visual Studio SDK IronPython sample to work. After building the sample project I run the project, I am able to create a new IronPython Class Library or windows application. As soon as I try to edit the class Visual Studio crashes out without throwing an exception in some type of message. However if I step through it with the debugger in the {Microsoft.VisualStudio.Package.Automation.OAAssemblyReference} class I get the following exception on "The method or operation is not implemented.". This orginiated it appears from the property "PublicKeyToken". Also, the debug output of the SDK project ended with this line "The program '[4172] devenv.exe: Managed' has exited with code 2 (0x2).". If I try to save the project before trying to edit the IronPython class I get an error message "Operation can not be completed. No such interface supported". Any help would be greatly appreciated. Thanks, Curtis -------------- next part -------------- An HTML attachment was scrubbed... URL: From freyp576 at yahoo.de Sat Oct 7 23:48:03 2006 From: freyp576 at yahoo.de (Frey576) Date: Sat, 7 Oct 2006 14:48:03 -0700 (PDT) Subject: [IronPython] Word and MissingMemberException, 'tuple' object has no attribute 'SaveAs Message-ID: <6698479.post@talk.nabble.com> Hi, I am new to IronPython but have a couple of years experience with Python. Currently I am stuck with a problem trying to open a Word document (WordML) and saving it as .rtf back to disk The exception I get upon call of myDoc.SaveAs is: MissingMemberException, 'tuple' object has no attribute 'SaveAs' when I check myDoc (obtained from Word.Documents.Open) in the CLR debugger I see indeed that I got a tuple but it does not look like a Python tuple and I dont know how to handle that: - myDoc {(, 'D:\\Projekte\\SGMLtoRtf\\dirWatch_SGMLtoRtf\\test\\HelloWorld.xml', , True, , , , , , , , , , , , , )} object {IronPython.Runtime.Tuple} so the type is IronPython.Runtime.Tuple What is wrong with using Documents.Open from IronPython? My script, stripped down a little bit, is: import System.Type import clr clr.AddReferenceByPartialName("Microsoft.Office.Interop.Word") import Microsoft.Office.Interop.Word as Word # ApplicationClass, WdSaveFormat import sys sys.path.append(r"c:\python24\lib") import os inPath = r".\test\HelloWorld.xml" inPath = os.path.abspath(inPath) assert os.path.isfile(inPath), "not found: %s" % inPath outPath = os.path.splitext(inPath)[0] +".rtf" app = Word.ApplicationClass() try: readOnly = True myDoc = app.Documents.Open(inPath, System.Type.Missing, readOnly, *[System.Type.Missing]*13); myDoc.SaveAs( outPath, Word.WdSaveFormat.wdFormatRTF, # FileFormat System.Type.Missing, # LockComments System.Type.Missing, # Password False, # AddToRecentFiles System.Type.Missing, # WritePassword System.Type.Missing, # ReadOnlyRecommended System.Type.Missing, # EmbedTrueTypeFonts System.Type.Missing, # SaveNativePictureFormat System.Type.Missing, # SaveFormsData System.Type.Missing, # SaveAsAOCELetter System.Type.Missing, # Encoding System.Type.Missing, # InsertLineBreaks System.Type.Missing, # AllowSubstitutions System.Type.Missing, # LineEnding System.Type.Missing, # AddBiDiMarks ) myDoc.Close( False, # SaveChanges System.Type.Missing, # OriginalFormat System.Type.Missing, # RouteDocument ) finally: app.Quit(*[System.Type.Missing]*3) How can I call member functions of a Word document obtained from Documents.Open? Peter -- View this message in context: http://www.nabble.com/Word-and-MissingMemberException%2C-%27tuple%27-object-has-no-attribute-%27SaveAs-tf2402444.html#a6698479 Sent from the IronPython mailing list archive at Nabble.com. From sjmachin at lexicon.net Mon Oct 9 04:23:30 2006 From: sjmachin at lexicon.net (John Machin) Date: Mon, 09 Oct 2006 12:23:30 +1000 Subject: [IronPython] IronPython codec names not compatible with CPython In-Reply-To: <45286848.7080402@lexicon.net> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <45286848.7080402@lexicon.net> Message-ID: <4529B2A2.9070701@lexicon.net> On 8/10/2006 12:54 PM, John Machin wrote: > CPython recognises both 'gbk' and 'cp936' i.e. unicode('some string', > 'gbk') does what you'd expect. > IronPython 1.0.1 recognises only 'cp936'. > > CPython recognises 'mac_roman', 'mac_greek', etc. > IronPython doesn't. > > After a [rare] flash of inspiration, I tried 'cp10000', 'cp10006', etc > and IronPython recognises these, which CPython doesn't. > > The "differences" document says: """ > IronPython's _codecs module implementation is incomplete. There are > several replace_error/lookup_error handlers that IronPython does not > implement. > """ > It is not apparent whether this is intended to mean that missing error > handlers is the *only* known deficiency. > > IronPython Bug #3214 mentions "import encodings" as fixing a > LookupError. Well, you learn something new every day: > 1. CPython permits one to import encodings, but it's not documented > AFAICT, and it's *not* necessary in order to use 'gbk', 'mac_roman', etc. > 2. After import encodings, IronPython recognises 'mac_roman' and > 'mac_greek', but still not 'gbk'. > > How much of the above is bug and how much is feature? What is this > mysterious encodings module anyway? Does this mean the CPython test > suite doesn't cover the above cases? Are the equivalences (mac_roman, > cp10000) etc correct and official? Should I just dump all of the above > into the IronPython Issue Tracker? > An update: I had appended sys.path.append(r"C:\python24\Lib") to my IronPython site.py. Removing that: IronPython doesn't have an encodings module ... so why does Bug #3214 say to import it? Leaving it in: unicode('\xf0', 'mac_roman') produces the wrong exception: exceptions.SystemError: Object reference not set to an instance of an object. unicode('\xf0', 'mac_roman', 'replace') produces the same exception. And for the curious, the two encodings are not exactly identical: 0xdb: mac_roman u'\xa4', cp_10000 u'\u20ac' 0xf0: mac_roman u'\ufffd', cp_10000 u'\uf8ff' (the U+FFFD (REPLACEMENT CHARACTER) is what I stuffed into a DIY kludgy workaround; U+F8FF is not defined) I was going to show the names of the characters, using unicodedata.name(), but there's no unicodedata module in IronPython (and that's not mentioned in the differences file). Cheers, John From sanxiyn at gmail.com Mon Oct 9 16:12:17 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 9 Oct 2006 23:12:17 +0900 Subject: [IronPython] int() and long() incompatibility Message-ID: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> >>> int('0x20', 16) ValueError: invalid integer number literal Same for long. Python library reference isn't clear on this point, but my reading doesn't support this misfeature since one can use radix 0 to the same effect. Anyway, there are codes out there depending on this. :( -- Seo Sanghyeon From floris.vannee at gmail.com Mon Oct 9 16:26:20 2006 From: floris.vannee at gmail.com (Floris van Nee) Date: Mon, 9 Oct 2006 16:26:20 +0200 Subject: [IronPython] int() and long() incompatibility In-Reply-To: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> References: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> Message-ID: <2302ac370610090726x79ae2782hed24a4fe2ef01174@mail.gmail.com> I just checked it myself to see what works and what doesn't. You're right that it doesn't work when putting '0x' in front of it. However, when I just do int('20', 16) it returns 32, which is correct. It is a bit weird though, that int(hex(20), 16) returns an error and I think that should be fixed. The problem is I can't fix it ;). But I'm sure someone of the IronPython team will find some time to look into this bug (I think it can be classified as a bug, can't it?) and fix it. I think it is important that this will be fixed, because, as you said, there's a lot of code written by people in Python which uses this feature, who might migrate to IronPython. Floris On 10/9/06, Sanghyeon Seo wrote: > > >>> int('0x20', 16) > ValueError: invalid integer number literal > > Same for long. Python library reference isn't clear on this point, but > my reading doesn't support this misfeature since one can use radix 0 > to the same effect. Anyway, there are codes out there depending on > this. :( > > -- > Seo Sanghyeon > _______________________________________________ > 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 jvm_cop at spamcop.net Mon Oct 9 16:51:51 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Mon, 09 Oct 2006 10:51:51 -0400 Subject: [IronPython] Build/Install the SDK? In-Reply-To: <003001c6eb3c$9f8d98e0$481a0a0a@FT.COM> References: <003001c6eb3c$9f8d98e0$481a0a0a@FT.COM> Message-ID: <7.0.1.0.2.20061009103451.075bbeb8@wheresmymailserver.com> The most obvious possibility is that you have an "express edition" of VS; that is not an extendible version (it won't load "integration packages" like the one IronPython provides). See if this answers your questions or solves your problems. http://blogs.msdn.com/aaronmar/archive/2006/02/16/533273.aspx In general, knowing what version of IronPython you're using, and what version of the SDK (or anything else you're using) is important. If the blog doesn't tell you what's up (or tell you to download something you don't have etc), tell us what the error message is (or the first dozen if there are many) when you try to build. Good luck. At 08:48 PM 10/8/2006, Peter A. Schott wrote >I've been trying to build the SDK so I can use IronPython natively within VS >2005's IDE, but I keep getting failures from the latest download of the SDK. >Any suggestions on what to do in order to sucessfully build the projects? > >I'm kind of new to this, so I'm not really sure what details are needed or >if this is a normal problem that is resolved by tweaking some line of code >or config file. > >Thanks in advance. > >-Pete Schott J. Merrill / Analytical Software Corp From jvm_cop at spamcop.net Mon Oct 9 17:00:29 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Mon, 09 Oct 2006 11:00:29 -0400 Subject: [IronPython] int() and long() incompatibility In-Reply-To: <2302ac370610090726x79ae2782hed24a4fe2ef01174@mail.gmail.co m> References: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> <2302ac370610090726x79ae2782hed24a4fe2ef01174@mail.gmail.com> Message-ID: <7.0.1.0.2.20061009105345.07624580@wheresmymailserver.com> I'm wondering if int('0x20') (without the explicit radix value 16) should work. Doesn't the '0x' prefix mean that it's a hex number, radix 16, unambiguously? OTOH, I would not expect int('033') to interpret the value as if the radix is 8, because the "leading 0 means octal" convention is both very old and a really really really bad idea! But 0x prefix doesn't mean anything else -- does it? I'm waiting for the Pascal programmers to say that int('$20') should work, returning 32, because $ is the Pascal-language equivalent of '0x' -- but it shouldn't. To someone entering data into a computer program, '$20' is not a value in hex, it's an amount of money! At 10:26 AM 10/9/2006, Floris van Nee wrote >I just checked it myself to see what works and what doesn't. You're right that it doesn't work when putting '0x' in front of it. However, when I just do int('20', 16) it returns 32, which is correct. > >It is a bit weird though, that int(hex(20), 16) returns an error and I think that should be fixed. [snip] > >On 10/9/06, Sanghyeon Seo <sanxiyn at gmail.com> wrote: >>>> int('0x20', 16) >ValueError: invalid integer number literal > >Same for long. Python library reference isn't clear on this point, but >my reading doesn't support this misfeature since one can use radix 0 >to the same effect. Anyway, there are codes out there depending on >this. :( > >-- >Seo Sanghyeon J. Merrill / Analytical Software Corp -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Mon Oct 9 17:12:54 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 10 Oct 2006 00:12:54 +0900 Subject: [IronPython] FePy TODO Message-ID: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> Today I sat down and wrote down TODO list. https://svn.sourceforge.net/svnroot/fepy/TODO Ideally, I would finish most tasks on the list rather soon and push the next IPCE release. I hope so... Anything I missed? -- Seo Sanghyeon From floris.vannee at gmail.com Mon Oct 9 17:13:31 2006 From: floris.vannee at gmail.com (Floris van Nee) Date: Mon, 9 Oct 2006 17:13:31 +0200 Subject: [IronPython] int() and long() incompatibility In-Reply-To: <7.0.1.0.2.20061009105345.07624580@wheresmymailserver.com> References: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> <2302ac370610090726x79ae2782hed24a4fe2ef01174@mail.gmail.com> <7.0.1.0.2.20061009105345.07624580@wheresmymailserver.com> Message-ID: <2302ac370610090813u1dfdc8aduea5dcd89b78062ee@mail.gmail.com> Yeh, I thought of that as well (a few days ago actually ;)), but that doesn't work in CPython as well. To my knowledge the 0x prefix is only used to indicate it's a hexadecimal number, so I too thought why I had to give 16 as an argument as well. But that's not really in the scope of this list, as it's not a compatibility problem with CPython. It would be nice if they'd change that in some next release of Python though. :) Floris On 10/9/06, J. Merrill wrote: > > I'm wondering if int('0x20') (without the explicit radix value 16) > should work. Doesn't the '0x' prefix mean that it's a hex number, radix 16, > unambiguously? > > OTOH, I would not expect int('033') to interpret the value as if the > radix is 8, because the "leading 0 means octal" convention is both very old > and a really really really bad idea! But 0x prefix doesn't mean anything > else -- does it? > > I'm waiting for the Pascal programmers to say that int('$20') should > work, returning 32, because $ is the Pascal-language equivalent of '0x' -- > but it shouldn't. To someone entering data into a computer program, '$20' > is not a value in hex, it's an amount of money! > > At 10:26 AM 10/9/2006, Floris van Nee wrote > > I just checked it myself to see what works and what doesn't. You're right > that it doesn't work when putting '0x' in front of it. However, when I just > do int('20', 16) it returns 32, which is correct. > > It is a bit weird though, that int(hex(20), 16) returns an error and I > think that should be fixed. [snip] > > On 10/9/06, *Sanghyeon Seo* wrote: > >>> int('0x20', 16) > ValueError: invalid integer number literal > > Same for long. Python library reference isn't clear on this point, but > my reading doesn't support this misfeature since one can use radix 0 > to the same effect. Anyway, there are codes out there depending on > this. :( > > -- > Seo Sanghyeon > > > > J. Merrill / Analytical Software Corp > _______________________________________________ > 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 sanxiyn at gmail.com Mon Oct 9 17:43:51 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 10 Oct 2006 00:43:51 +0900 Subject: [IronPython] Float index incompatibility Message-ID: <5b0248170610090843j2bb250a5ye19562e99053be4e@mail.gmail.com> Python 2.4.4c0 (#2, Oct 2 2006, 00:57:46) [GCC 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> l = [0] >>> l[0.5] Traceback (most recent call last): File "", line 1, in ? TypeError: list indices must be integers IronPython 1.0.2463 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> l = [0] >>> l[0.5] 0 -- Seo Sanghyeon From miguel at ximian.com Mon Oct 9 17:41:51 2006 From: miguel at ximian.com (Miguel de Icaza) Date: Mon, 09 Oct 2006 11:41:51 -0400 Subject: [IronPython] FePy TODO In-Reply-To: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> Message-ID: <1160408511.8579.26.camel@erandi.dom> Hello, > Today I sat down and wrote down TODO list. > https://svn.sourceforge.net/svnroot/fepy/TODO > > Ideally, I would finish most tasks on the list rather soon and push > the next IPCE release. I hope so... > > Anything I missed? Regarding the Mono bugs: let us know what pending issues Mono has, and we will be glad to fix them. We rewrote the Console class recently to cope better with the 2.0 APIs for screen coloring, positioning and we would love to hear if there are problems with it. Miguel. From andre.korbes at gmail.com Mon Oct 9 20:37:18 2006 From: andre.korbes at gmail.com (=?ISO-8859-1?Q?Andr=E9_K=F6rbes?=) Date: Mon, 9 Oct 2006 15:37:18 -0300 Subject: [IronPython] Using 3rd party Python modules Message-ID: <45a0e0d70610091137h3cee1cbag7fc67372a8a08425@mail.gmail.com> Hi everybody, I'm new to IronPython and have a little knowledge using Python, but I have some experience with C# and the .Net Framework. I'm trying to develop an application to capture a webcam frame, process it and display some results. The point is that I want to use some common and very practical Python modules to do so, like VideoCapture and PIL. Is there a way to use these modules on IronPython? When I try to import them I get some error message, like: ImportError: No module named vidcap It seems to find the .py files, but not the associated DLL. Is there some other configuration that can be done besides the one in site.py to make IronPython see default Python modules? Tks all Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.gadd at gmail.com Mon Oct 9 20:40:10 2006 From: kevin.gadd at gmail.com (Kevin Gadd) Date: Mon, 9 Oct 2006 11:40:10 -0700 Subject: [IronPython] changing c# var values in IP In-Reply-To: References: Message-ID: I suggest making the following changes: Make idL a public member Place frmStart in a variable instead of idL itself (I am pretty sure setvariable isn't making a reference to your variable, just to the value of it) So something like ... public string idL; ... engine.SetVariable("frm", this); ... frm.idL = "Hello World!" On 10/6/06, ANNA CHAPOVALOV wrote: > > Hi all, > I'm a newbee in IP, so sorry if i ask (maybe) dumb questions.... > > I'm using IP for scripting in a c# app. I have something like this: > > public partial class frmStart : Form > { > > string idL; > ...... > ...... > private void frmStartBatch_Load(object sender, EventArgs e) > { > idL = ""; > engine = new PythonEngine(); > > engine.ImportSite(); > engine.SetVariable("idL", idL ); > engine.ExecuteFile("ip.py"); > //At this point i would aspect that idL has the value passed in > ip.py scrypt.. but it still has ""... > } > } > > Here's my ip code: > > idL = "Hello World!" > > Is it ok? How come? I've found some workarounds... but still curious why > it happens. > > Other thing i've noticed is that if i have a class (i've tried with a form > class), if i pass it (this) as variable to a ip script, not all it's widgets > and attrs are avaible... is this linked with the .NET attributes issues? > > thanks!! > > _______________________________________________ > 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 simon.dahlbacka at gmail.com Mon Oct 9 20:41:16 2006 From: simon.dahlbacka at gmail.com (Simon Dahlbacka) Date: Mon, 9 Oct 2006 21:41:16 +0300 Subject: [IronPython] Using 3rd party Python modules In-Reply-To: <45a0e0d70610091137h3cee1cbag7fc67372a8a08425@mail.gmail.com> References: <45a0e0d70610091137h3cee1cbag7fc67372a8a08425@mail.gmail.com> Message-ID: <57124720610091141r5320edf1h686a58d910ae33a5@mail.gmail.com> > > Is there a way to use these modules [VideoCapture, PIL] on IronPython? No, as of now IronPython does not support dll:s/pyd:s (which are the same thing). And this support is unlikely to appear in a near future due to implementation problems, so your best bet is to find pure python modules that does what you want or find a .NET assembly that does what you want. /Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon Oct 9 20:41:39 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 9 Oct 2006 11:41:39 -0700 Subject: [IronPython] IronPython codec names not compatible with CPython In-Reply-To: <45286848.7080402@lexicon.net> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <45286848.7080402@lexicon.net> Message-ID: <7AD436E4270DD54A94238001769C2227448E933C63@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Encodings appears to be a special module that gets imported by CPython on startup. It appears to get imported even if you startup and disable reading site.py on CPython. Currently IronPython has no dependencies on the standard CPython library and we didn't want to add one just for this. The mac_roman and mac_green encodings are all defined in this module - it's just that CPython will import it for you so it justworks. We probably also need to add some additional aliases for the encodings we support but for which you're not finding (e.g. gbk). We have some hardcoded encodings already but most of them are just automatically translated from .NET to Python names and that doesn't always get all the correct mappings. We also map all code pages to cp# so that explains why we support that but CPython doesn't. I don't think we would special case to not do this mapping in some cases either. The CPython test suite actually gives us a little trouble here because it doesn't import encodings. I believe we have a slightly modified version that does the import and makes sure everything works. Dumping this into a bug would be great.. I think the main thing to capture here is that we're missing some names & alises in our standard encodings. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of John Machin Sent: Saturday, October 07, 2006 7:54 PM To: Discussion of IronPython Subject: [IronPython] IronPython codec names not compatible with CPython CPython recognises both 'gbk' and 'cp936' i.e. unicode('some string', 'gbk') does what you'd expect. IronPython 1.0.1 recognises only 'cp936'. CPython recognises 'mac_roman', 'mac_greek', etc. IronPython doesn't. After a [rare] flash of inspiration, I tried 'cp10000', 'cp10006', etc and IronPython recognises these, which CPython doesn't. The "differences" document says: """ IronPython's _codecs module implementation is incomplete. There are several replace_error/lookup_error handlers that IronPython does not implement. """ It is not apparent whether this is intended to mean that missing error handlers is the *only* known deficiency. IronPython Bug #3214 mentions "import encodings" as fixing a LookupError. Well, you learn something new every day: 1. CPython permits one to import encodings, but it's not documented AFAICT, and it's *not* necessary in order to use 'gbk', 'mac_roman', etc. 2. After import encodings, IronPython recognises 'mac_roman' and 'mac_greek', but still not 'gbk'. How much of the above is bug and how much is feature? What is this mysterious encodings module anyway? Does this mean the CPython test suite doesn't cover the above cases? Are the equivalences (mac_roman, cp10000) etc correct and official? Should I just dump all of the above into the IronPython Issue Tracker? Cheers, John _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From andre.korbes at gmail.com Mon Oct 9 20:45:10 2006 From: andre.korbes at gmail.com (=?ISO-8859-1?Q?Andr=E9_K=F6rbes?=) Date: Mon, 9 Oct 2006 15:45:10 -0300 Subject: [IronPython] Using 3rd party Python modules In-Reply-To: <57124720610091141r5320edf1h686a58d910ae33a5@mail.gmail.com> References: <45a0e0d70610091137h3cee1cbag7fc67372a8a08425@mail.gmail.com> <57124720610091141r5320edf1h686a58d910ae33a5@mail.gmail.com> Message-ID: <45a0e0d70610091145h44cf9df3s714c0b8d1c68816b@mail.gmail.com> Ok, thanks! 2006/10/9, Simon Dahlbacka : > > Is there a way to use these modules [VideoCapture, PIL] on IronPython? > > > No, as of now IronPython does not support dll:s/pyd:s (which are the same > thing). And this support is unlikely to appear in a near future due to > implementation problems, so your best bet is to find pure python modules > that does what you want or find a .NET assembly that does what you want. > > /Simon > > _______________________________________________ > 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 freyp576 at yahoo.de Mon Oct 9 22:09:18 2006 From: freyp576 at yahoo.de (Peter Frey) Date: Mon, 9 Oct 2006 20:09:18 +0000 (GMT) Subject: [IronPython] Word and MissingMemberException, 'tuple' object has no attribute 'SaveAs Message-ID: <20061009200918.50097.qmail@web27603.mail.ukl.yahoo.com> Problem is solved now. The Tuple I get behaves indeed like a Python tuple, so I can use myDoc[0] and invoke the SaveAs operation on that. Irritation was that the CLR debugger does not allow to evaluate python expressions like myDoc[0], what is rather unexpected when used to a Python editor like WingIDE, my favorite one. Peter ----- Urspr?ngliche Mail ---- Von: Frey576 An: users at lists.ironpython.com Gesendet: Samstag, den 7. Oktober 2006, 23:48:03 Uhr Betreff: [IronPython] Word and MissingMemberException, 'tuple' object has no attribute 'SaveAs The exception I get upon call of myDoc.SaveAs is: MissingMemberException, 'tuple' object has no attribute 'SaveAs' when I check myDoc (obtained from Word.Documents.Open) in the CLR debugger I see indeed that I got a tuple but it does not look like a Python tuple and I dont know how to handle that: - myDoc {(, 'D:\\Projekte\\SGMLtoRtf\\dirWatch_SGMLtoRtf\\test\\HelloWorld.xml', , True, , , , , , , , , , , , , )} object {IronPython.Runtime.Tuple} ... ___________________________________________________________ Der fr?he Vogel f?ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon Oct 9 23:48:32 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 9 Oct 2006 14:48:32 -0700 Subject: [IronPython] help() on bound methods In-Reply-To: <5b0248170610080438q2701dd2cm131526f8f85d4e5f@mail.gmail.com> References: <5b0248170610080438q2701dd2cm131526f8f85d4e5f@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227448E933D86@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report. I've filed this as bug #4190 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4190) . -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Sunday, October 08, 2006 4:38 AM To: Discussion of IronPython Subject: [IronPython] help() on bound methods >>> from System.IO import MemoryStream >>> help(MemoryStream.Write) Help on method-descriptor Write | Write(...) | Write(self, Array[Byte] buffer, int offset, int count) >>> stream = MemoryStream() >>> help(stream.Write) Help on builtin_function_or_method in module __builtin__ | | (snip not very useful nonsenses) One would expect something similar to help on MemoryStream.Write for this. In the interactive environment, one usually wants to see help on bound methods of instances. I am not sure whether this makes much sense w.r.t. IronPython internal. Workaround: >>> help(type(stream).Write) -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From mark.john.rees at gmail.com Tue Oct 10 01:50:50 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Tue, 10 Oct 2006 09:50:50 +1000 Subject: [IronPython] FePy TODO In-Reply-To: <1160408511.8579.26.camel@erandi.dom> References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> <1160408511.8579.26.camel@erandi.dom> Message-ID: Looks good. If you want, I am happy to write up 2 items of documentation: * How to get .NET DB connection from Python DB connection. * How to set up WSGI within ASP.NET. Is ReST is the preferred format? Mark On 10/10/06, Miguel de Icaza wrote: > > Hello, > > > Today I sat down and wrote down TODO list. > > https://svn.sourceforge.net/svnroot/fepy/TODO > > > > Ideally, I would finish most tasks on the list rather soon and push > > the next IPCE release. I hope so... > > > > Anything I missed? > > Regarding the Mono bugs: let us know what pending issues Mono has, and > we will be glad to fix them. > > We rewrote the Console class recently to cope better with the 2.0 APIs > for screen coloring, positioning and we would love to hear if there are > problems with it. > > Miguel. > _______________________________________________ > 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 Tue Oct 10 02:09:48 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 9 Oct 2006 17:09:48 -0700 Subject: [IronPython] Limitations of PythonEngine.CreateMethod? In-Reply-To: <002701c6e9c3$dc48c950$4201a8c0@tokai> References: <002701c6e9c3$dc48c950$4201a8c0@tokai> Message-ID: <7AD436E4270DD54A94238001769C2227448E933E62@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the report - this sounds like a bug. I suspect we're not creating the function w/ the proper environment in this case, but I haven't had a chance to investigate. I've opened CodePlex bug #4196 for this. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Alex Henderson Sent: Friday, October 06, 2006 8:51 PM To: users at lists.ironpython.com Subject: [IronPython] Limitations of PythonEngine.CreateMethod? Hi All, I've been playing with the PythonEngine's CreateMethod(..) and declaring functions within the body of another function - however it doesn't seem to work, for example I can writin a function like this: def ExternalFunc(): def InnerFunc1(): def InnerFunc2(): return "2" return "1" + InnerFunc2() return "0" + InnerFunc1() and then evaluate it... >>> ExternalFunc() '012' >>> But when I try to create a delegate for doing the same thing by shedding the outer "layer" of the function, and creating it as a method via the PythonEngine it doesn't work: PythonEngine = new PythonEngine() // some more setup code would go here... Func externalFunc = engine.CreateMethod>(@"def InnerFunc1(): def InnerFunc2(): return ""2"" return ""1"" + InnerFunc2() return ""0"" + InnerFunc1()"); The call to CreateMethod spits the dummy, with a NullReferenceException... here's the stack trace failed: System.NullReferenceException : Object reference not set to an instance of an object. at IronPython.Compiler.Generation.CodeGen.DefineDynamicMethod(String name, Type retType, Type[] paramTypes) at IronPython.Compiler.Generation.CodeGen.DefineMethod(String name, Type retType, Type[] paramTypes, SymbolId[] paramNames) at IronPython.Compiler.Ast.FunctionDefinition.Emit(CodeGen cg) at IronPython.Compiler.Ast.SuiteStatement.Emit(CodeGen cg) at IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionBody(CodeGen cg, CodeGen ocg) at IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionImplementation(CodeGe n methodCodeGen, CodeGen initCodeGen) at IronPython.Hosting.PythonEngine.CreateDelegateWorker[TDelegate](Statement s, IList`1 parameters) at IronPython.Hosting.PythonEngine.CreateMethodUnscoped[TDelegate](String statements, IList`1 parameters) at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String statements, IList`1 parameters, EngineModule engineModule) at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String statements) Am I overlooking something in my code, or is this just a limitation of using CreateMethod to get a delegate to an anonymous python function? For the mean time I'm just working around it by doing this: engine.Execute(@"def ExternalFunc(): def InnerFunc1(): def InnerFunc2(): return ""2"" return ""1"" + InnerFunc2() return ""0"" + InnerFunc1()"); PythonFunction func = _engine.EvaluateAs("ExternalFunc"); Func funcDel = delegate { return (string)func.Call(); }; Which gets me a suitable delegate, but it's not really the same as I end up having to declare the function as part of a module, which I was trying to avoid... Chez, - Alex _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Tue Oct 10 03:28:42 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 9 Oct 2006 18:28:42 -0700 Subject: [IronPython] int() and long() incompatibility In-Reply-To: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> References: <5b0248170610090712t292b21e4yd1034309eda1f34f@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227448E933ED7@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report Seo. I've opened CodePlex bug #4197 to track this (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4197). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, October 09, 2006 7:12 AM To: Discussion of IronPython Subject: [IronPython] int() and long() incompatibility >>> int('0x20', 16) ValueError: invalid integer number literal Same for long. Python library reference isn't clear on this point, but my reading doesn't support this misfeature since one can use radix 0 to the same effect. Anyway, there are codes out there depending on this. :( -- 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 Tue Oct 10 03:28:51 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 9 Oct 2006 18:28:51 -0700 Subject: [IronPython] Word and MissingMemberException, 'tuple' object has no attribute 'SaveAs In-Reply-To: <6698479.post@talk.nabble.com> References: <6698479.post@talk.nabble.com> Message-ID: The problem is that app.Documents.Open returns multiple values (in addition to regular return value, there are others either via ref or out parameters). This is what IronPython translates into tuples. This is quite common construct in Python: def multiple(): return 1, "hello", 4.5 i, s, f = multiple() Similarly, you can capture the multiple return values from Word's Open to a tuple and then inspect its elements to find out which one is the actual document. It appears from the printout below, that it is the one at index zero. Therefore, you can write: values = app.Documents.Open( ... ); myDoc = values[0] Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Frey576 Sent: Saturday, October 07, 2006 2:48 PM To: users at lists.ironpython.com Subject: [IronPython] Word and MissingMemberException, 'tuple' object has no attribute 'SaveAs Hi, I am new to IronPython but have a couple of years experience with Python. Currently I am stuck with a problem trying to open a Word document (WordML) and saving it as .rtf back to disk The exception I get upon call of myDoc.SaveAs is: MissingMemberException, 'tuple' object has no attribute 'SaveAs' when I check myDoc (obtained from Word.Documents.Open) in the CLR debugger I see indeed that I got a tuple but it does not look like a Python tuple and I dont know how to handle that: - myDoc {(, 'D:\\Projekte\\SGMLtoRtf\\dirWatch_SGMLtoRtf\\test\\HelloWorld.xml', , True, , , , , , , , , , , , , )} object {IronPython.Runtime.Tuple} so the type is IronPython.Runtime.Tuple What is wrong with using Documents.Open from IronPython? My script, stripped down a little bit, is: import System.Type import clr clr.AddReferenceByPartialName("Microsoft.Office.Interop.Word") import Microsoft.Office.Interop.Word as Word # ApplicationClass, WdSaveFormat import sys sys.path.append(r"c:\python24\lib") import os inPath = r".\test\HelloWorld.xml" inPath = os.path.abspath(inPath) assert os.path.isfile(inPath), "not found: %s" % inPath outPath = os.path.splitext(inPath)[0] +".rtf" app = Word.ApplicationClass() try: readOnly = True myDoc = app.Documents.Open(inPath, System.Type.Missing, readOnly, *[System.Type.Missing]*13); myDoc.SaveAs( outPath, Word.WdSaveFormat.wdFormatRTF, # FileFormat System.Type.Missing, # LockComments System.Type.Missing, # Password False, # AddToRecentFiles System.Type.Missing, # WritePassword System.Type.Missing, # ReadOnlyRecommended System.Type.Missing, # EmbedTrueTypeFonts System.Type.Missing, # SaveNativePictureFormat System.Type.Missing, # SaveFormsData System.Type.Missing, # SaveAsAOCELetter System.Type.Missing, # Encoding System.Type.Missing, # InsertLineBreaks System.Type.Missing, # AllowSubstitutions System.Type.Missing, # LineEnding System.Type.Missing, # AddBiDiMarks ) myDoc.Close( False, # SaveChanges System.Type.Missing, # OriginalFormat System.Type.Missing, # RouteDocument ) finally: app.Quit(*[System.Type.Missing]*3) How can I call member functions of a Word document obtained from Documents.Open? Peter -- View this message in context: http://www.nabble.com/Word-and-MissingMemberException%2C-%27tuple%27-object-has-no-attribute-%27SaveAs-tf2402444.html#a6698479 Sent from the IronPython mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue Oct 10 07:00:42 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 10 Oct 2006 14:00:42 +0900 Subject: [IronPython] Interactive banner on IronPython 1.0.1 Message-ID: <5b0248170610092200t2c8561e4ob0abb69f949db7e4@mail.gmail.com> IronPython 1.0.1 prints: IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 on startup. Shouldn't it print: IronPython 1.0.1 (...) or something like that instead? -- Seo Sanghyeon From anthonybaxter at gmail.com Tue Oct 10 10:01:52 2006 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Tue, 10 Oct 2006 18:01:52 +1000 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: I notice the format of sys.version has changed. Since sys.version_info lies, and sys.subversion isn't supported, could this please not be changed so much? Old: IronPython 1.0.2453 on .NET 2.0.50727.42 New: IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 On another related matter, there really is no useful way to ask "what version of IronPython is the user running" that I can see. Ideally, IronPython would also support sys.subversion in some way, at least - even if it has to synthesise the values. But *please* don't just copy the sys.subversion values from CPython - actually make it relevant to the IronPython release! Python 2.5 (r25:51908, Sep 19 2006, 14:29:31) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. t>>> import sys >>> sys.subversion ('CPython', 'tags/r25', '51908') >>> From anthonybaxter at gmail.com Tue Oct 10 10:06:14 2006 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Tue, 10 Oct 2006 18:06:14 +1000 Subject: [IronPython] FePy TODO In-Reply-To: <1160408511.8579.26.camel@erandi.dom> References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> <1160408511.8579.26.camel@erandi.dom> Message-ID: > Regarding the Mono bugs: let us know what pending issues Mono has, and > we will be glad to fix them. > > We rewrote the Console class recently to cope better with the 2.0 APIs > for screen coloring, positioning and we would love to hear if there are > problems with it. Will this fix the problems of running with -X:TabCompletion? Right now, if you run ipy.exe with that flag, it's extremely easy to make it lose it's tiny mind. ^Z to suspend, fg back, and it's mental. Hitting ^U on a line will do the same. This is with Mono 1.1.17.1. It's not clear to me about the best way to report Mono/IronPython bugs - partly that's because I'm unsure exactly which of the many many categories in bugzilla to use :-) From sh at defuze.org Tue Oct 10 10:07:13 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Tue, 10 Oct 2006 09:07:13 +0100 (BST) Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> I could not agree more. If people are two write Python packages which could run in both environment they may need to differentiate both in some cases (like import statements of assemblies which would fail with CPython). This is quite an important piece of information and I was so surprised to see sys.version returning my CPython major version number (because it does not set the minor version number either). Thanks, - Sylvain > I notice the format of sys.version has changed. Since sys.version_info > lies, and sys.subversion isn't supported, could this please not be > changed so much? > > Old: > IronPython 1.0.2453 on .NET 2.0.50727.42 > New: > IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 > > On another related matter, there really is no useful way to ask "what > version of IronPython is the user running" that I can see. Ideally, > IronPython would also support sys.subversion in some way, at least - > even if it has to synthesise the values. But *please* don't just copy > the sys.subversion values from CPython - actually make it relevant to > the IronPython release! > > Python 2.5 (r25:51908, Sep 19 2006, 14:29:31) > [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > t>>> import sys >>>> sys.subversion > ('CPython', 'tags/r25', '51908') >>>> > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From fuzzyman at voidspace.org.uk Tue Oct 10 17:31:44 2006 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 10 Oct 2006 16:31:44 +0100 Subject: [IronPython] IronPython 1.0.1 and MSI Installer Message-ID: <452BBCE0.1070504@voidspace.org.uk> Hello, The changelog for IronPython 1.0.1 on the following page, lists 'distribute msi installer' as one of the issues addressed in this release : http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=IronPython Is this genuine ? I can't find an MSI installer on the codeplex site (or is there now a wix config file included in the src distribution ?). Thanks Fuzzyman http://www.voidspace.org.uk/python/weblog/arch_IronPython.shtml From Martin.Maly at microsoft.com Tue Oct 10 19:49:21 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 10 Oct 2006 10:49:21 -0700 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: There is a way to tell the difference, but first let me provide a little background ... IronPython is released as signed binaries, and in order to maintain binary compatibility (for example for the customer who writes an application that relies on particular version of IronPython binaries, but then wants to simply replace IronPython 1.0 binaries with 1.0.1 binaries without having to recompile his application) the assembly version is identical with the assembly version of the 1.0 release. However, we added some more assembly-level attributes which can be used to tell the difference between versions. They are AssemblyInformationVersionAttribute and AssemblyFileVersionAttribute. Note that they are not present on the 1.0 assemblies. Unfortunately, due to a omission/bug, one of them (AssemblyInformationVersionAttribute) still reads "1.0" on the 1.0.1 assemblies, but the other (AssemblyFileVersionAttribute) changes with each build of IronPython and its version for 1.0.1 release is: 1.0.61005.1977 Now, how can I find out which version I am running? import System a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) if len(a) > 0: if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" else: print "Unknown version" else: print "IronPython 1.0" Hope this helps and sorry for the confusion with AssemblyInformationVersionAttribute. It'll be fixed in the next release. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sylvain Hellegouarch Sent: Tuesday, October 10, 2006 1:07 AM To: Discussion of IronPython Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython 1.0.1 Released! I could not agree more. If people are two write Python packages which could run in both environment they may need to differentiate both in some cases (like import statements of assemblies which would fail with CPython). This is quite an important piece of information and I was so surprised to see sys.version returning my CPython major version number (because it does not set the minor version number either). Thanks, - Sylvain > I notice the format of sys.version has changed. Since sys.version_info > lies, and sys.subversion isn't supported, could this please not be > changed so much? > > Old: > IronPython 1.0.2453 on .NET 2.0.50727.42 > New: > IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 > > On another related matter, there really is no useful way to ask "what > version of IronPython is the user running" that I can see. Ideally, > IronPython would also support sys.subversion in some way, at least - > even if it has to synthesise the values. But *please* don't just copy > the sys.subversion values from CPython - actually make it relevant to > the IronPython release! > > Python 2.5 (r25:51908, Sep 19 2006, 14:29:31) > [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > t>>> import sys >>>> sys.subversion > ('CPython', 'tags/r25', '51908') >>>> > _______________________________________________ > 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 davidf at sjsoft.com Tue Oct 10 21:17:46 2006 From: davidf at sjsoft.com (David Fraser) Date: Tue, 10 Oct 2006 21:17:46 +0200 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: <452BF1DA.3090306@sjsoft.com> Martin Maly wrote: > There is a way to tell the difference, but first let me provide a little background ... > > IronPython is released as signed binaries, and in order to maintain binary compatibility (for example for the customer who writes an application that relies on particular version of IronPython binaries, but then wants to simply replace IronPython 1.0 binaries with 1.0.1 binaries without having to recompile his application) the assembly version is identical with the assembly version of the 1.0 release. However, we added some more assembly-level attributes which can be used to tell the difference between versions. They are AssemblyInformationVersionAttribute and AssemblyFileVersionAttribute. Note that they are not present on the 1.0 assemblies. > > Unfortunately, due to a omission/bug, one of them (AssemblyInformationVersionAttribute) still reads "1.0" on the 1.0.1 assemblies, but the other (AssemblyFileVersionAttribute) changes with each build of IronPython and its version for 1.0.1 release is: > > 1.0.61005.1977 > > Now, how can I find out which version I am running? > > import System > a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) > if len(a) > 0: > if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" > else: print "Unknown version" > else: > print "IronPython 1.0" > > Hope this helps and sorry for the confusion with AssemblyInformationVersionAttribute. It'll be fixed in the next release. > What about sys.version? Surely this doesn't have to depend on the assembly version, in which case it could return values as suggested earlier in the thread... David From fuzzyman at voidspace.org.uk Tue Oct 10 21:33:41 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 10 Oct 2006 20:33:41 +0100 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: <452BF1DA.3090306@sjsoft.com> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> <452BF1DA.3090306@sjsoft.com> Message-ID: <452BF595.4090406@voidspace.org.uk> David Fraser wrote: > Martin Maly wrote: > >> There is a way to tell the difference, but first let me provide a little background ... >> >> IronPython is released as signed binaries, and in order to maintain binary compatibility (for example for the customer who writes an application that relies on particular version of IronPython binaries, but then wants to simply replace IronPython 1.0 binaries with 1.0.1 binaries without having to recompile his application) the assembly version is identical with the assembly version of the 1.0 release. However, we added some more assembly-level attributes which can be used to tell the difference between versions. They are AssemblyInformationVersionAttribute and AssemblyFileVersionAttribute. Note that they are not present on the 1.0 assemblies. >> >> Unfortunately, due to a omission/bug, one of them (AssemblyInformationVersionAttribute) still reads "1.0" on the 1.0.1 assemblies, but the other (AssemblyFileVersionAttribute) changes with each build of IronPython and its version for 1.0.1 release is: >> >> 1.0.61005.1977 >> >> Now, how can I find out which version I am running? >> >> import System >> a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) >> if len(a) > 0: >> if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" >> else: print "Unknown version" >> else: >> print "IronPython 1.0" >> >> Hope this helps and sorry for the confusion with AssemblyInformationVersionAttribute. It'll be fixed in the next release. >> >> > What about sys.version? Surely this doesn't have to depend on the > assembly version, in which case it could return values as suggested > earlier in the thread... > There is lots of code in the wild which uses sys.version (and sys.version_info) to determine the availability of Python features. Changing this could break things. I would recommend a new attribute on the sys module to provide this information. Which could be a shortcut for the monstrosity recommended previously ;-) Fuzzyman http://www.voidspace.org.uk/python/weblog/arch_IronPython.shtml > David > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.13.1/469 - Release Date: 09/10/2006 From dinov at exchange.microsoft.com Tue Oct 10 21:36:36 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 10 Oct 2006 12:36:36 -0700 Subject: [IronPython] IronPython 1.0.1 and MSI Installer In-Reply-To: <452BBCE0.1070504@voidspace.org.uk> References: <452BBCE0.1070504@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C222744C95386AC@DF-GRTDANE-MSG.exchange.corp.microsoft.com> That was incorrectly assigned to 1.01. I've moved it to 1.1. We do include the Wix scripts for an MSI installer up on Codeplex in the depot (not in the .ZIP files we upload though) but we haven't yet taken the time to make sure we have the Wix scripts perfect and ready to ship. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fuzzyman Sent: Tuesday, October 10, 2006 8:32 AM To: Discussion of IronPython Subject: [IronPython] IronPython 1.0.1 and MSI Installer Hello, The changelog for IronPython 1.0.1 on the following page, lists 'distribute msi installer' as one of the issues addressed in this release : http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=IronPython Is this genuine ? I can't find an MSI installer on the codeplex site (or is there now a wix config file included in the src distribution ?). Thanks Fuzzyman http://www.voidspace.org.uk/python/weblog/arch_IronPython.shtml _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Wed Oct 11 01:30:43 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 10 Oct 2006 16:30:43 -0700 Subject: [IronPython] Float index incompatibility In-Reply-To: <5b0248170610090843j2bb250a5ye19562e99053be4e@mail.gmail.com> References: <5b0248170610090843j2bb250a5ye19562e99053be4e@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222744C9538819@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report Seo! I've filed this as CodePlex bug #4233 (http://www.codeplex.com/WorkItem/List.aspx?ProjectName=IronPython). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, October 09, 2006 8:44 AM To: Discussion of IronPython Subject: [IronPython] Float index incompatibility Python 2.4.4c0 (#2, Oct 2 2006, 00:57:46) [GCC 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> l = [0] >>> l[0.5] Traceback (most recent call last): File "", line 1, in ? TypeError: list indices must be integers IronPython 1.0.2463 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> l = [0] >>> l[0.5] 0 -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From alex at syzmk.com Wed Oct 11 03:28:45 2006 From: alex at syzmk.com (Alex Henderson) Date: Wed, 11 Oct 2006 14:28:45 +1300 Subject: [IronPython] Limitations of PythonEngine.CreateMethod? In-Reply-To: <7AD436E4270DD54A94238001769C2227448E933E62@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <004d01c6ecd4$98d44d70$6701a8c0@tokai> Thanks Dino, I'll keep an eye on the issue and see how you get on :) > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Dino Viehland > Sent: Tuesday, 10 October 2006 1:10 p.m. > To: Discussion of IronPython > Subject: Re: [IronPython] Limitations of > PythonEngine.CreateMethod? > > Thanks for the report - this sounds like a bug. I suspect we're not > creating the function w/ the proper environment in this case, but I > haven't had a chance to investigate. I've opened CodePlex bug #4196 for > this. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Alex Henderson > Sent: Friday, October 06, 2006 8:51 PM > To: users at lists.ironpython.com > Subject: [IronPython] Limitations of PythonEngine.CreateMethod? > > Hi All, > > I've been playing with the PythonEngine's CreateMethod(..) and > declaring functions within the body of another function - however it > doesn't seem to work, for example I can writin a function like this: > > def ExternalFunc(): > def InnerFunc1(): > def InnerFunc2(): > return "2" > return "1" + InnerFunc2() > return "0" + InnerFunc1() > > and then evaluate it... > > >>> ExternalFunc() > '012' > >>> > > But when I try to create a delegate for doing the same thing by shedding > the outer "layer" of the function, and creating it as a method via the > PythonEngine it doesn't work: > > PythonEngine = new PythonEngine() > // some more setup code would go here... > Func externalFunc = engine.CreateMethod>(@"def > InnerFunc1(): > def InnerFunc2(): > return ""2"" > return ""1"" + InnerFunc2() > return ""0"" + InnerFunc1()"); > > The call to CreateMethod spits the dummy, with a NullReferenceException... > here's the stack trace > > failed: System.NullReferenceException : Object reference not set to an > instance of an object. > at > IronPython.Compiler.Generation.CodeGen.DefineDynamicMethod(String > name, Type retType, Type[] paramTypes) > at IronPython.Compiler.Generation.CodeGen.DefineMethod(String > name, Type retType, Type[] paramTypes, SymbolId[] paramNames) > at IronPython.Compiler.Ast.FunctionDefinition.Emit(CodeGen cg) > at IronPython.Compiler.Ast.SuiteStatement.Emit(CodeGen cg) > at > IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionBody(CodeGen cg, > CodeGen ocg) > at > IronPython.Compiler.Ast.FunctionDefinition.EmitFunctionImplementation(Code > Ge > n methodCodeGen, CodeGen initCodeGen) > at > IronPython.Hosting.PythonEngine.CreateDelegateWorker[TDelegate](Statement > s, > IList`1 parameters) > at > IronPython.Hosting.PythonEngine.CreateMethodUnscoped[TDelegate](String > statements, IList`1 parameters) > at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String > statements, IList`1 parameters, EngineModule engineModule) > at IronPython.Hosting.PythonEngine.CreateMethod[TDelegate](String > statements) > > Am I overlooking something in my code, or is this just a limitation of > using CreateMethod to get a delegate to an anonymous python > function? > > For the mean time I'm just working around it by doing this: > > engine.Execute(@"def ExternalFunc(): > def InnerFunc1(): > def InnerFunc2(): > return ""2"" > return ""1"" + InnerFunc2() > return ""0"" + InnerFunc1()"); > > PythonFunction func = _engine.EvaluateAs("ExternalFunc"); > > Func funcDel = delegate { return (string)func.Call(); }; > > Which gets me a suitable delegate, but it's not really the same as I end > up having to declare the function as part of a module, which I was trying > to avoid... > > Chez, > > - Alex > > _______________________________________________ > 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 anthonybaxter at gmail.com Wed Oct 11 08:50:06 2006 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Wed, 11 Oct 2006 16:50:06 +1000 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: > import System > a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) > if len(a) > 0: > if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" > else: print "Unknown version" > else: > print "IronPython 1.0" Er - what? This isn't even close to a good approach. How on earth can I make code that uses this forward-compatible? Any code I write using this will need to be updated for IronPython1.1, and whenever there is a subsequent version. Please, please at least support sys.subversion to identify the version. I'm thinking something like ('IronPython', 'tags/1.0.1', '61005') or the like. CPython 2.5 is currently ('CPython', 'tags/r25', '51908') Right now, there is no easy way (aside from parsing sys.version) to say "is this code running on CPython or IronPython." And, as I started this thread, the format of sys.version changed from 1.0 to 1.0.1. I'd be open to suggesting some other attribute in sys - but it really does need to be in sys. If there was something like "sys.implementation" I could see we could add that to CPython as well. (But see note below about CPython release schedule) As far as sys.version_info claiming to be Python 2.4 - I can sort of understand that from a pragmatic point of view. But it leaves me with a bad feeling - it's all too similar to almost every http client identifying themselves as "Mozilla 4.0 (Actual Browser Name Here)". The basic problem is that the stuff we have now was designed really for a world where all Python implementations shared a common concept of "version" - that is, Jython 2.2 is feature-compatible with CPython 2.2. It's possible that needs to be addressed, although given we just did CPython 2.5, we're not going to be able to change it for CPython for a good 18 months (the approximate timeframe for a 2.6). Anthony From sanxiyn at gmail.com Wed Oct 11 09:30:28 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 16:30:28 +0900 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: <5b0248170610110030kcf5f160g346672c9472d8e01@mail.gmail.com> 2006/10/11, Anthony Baxter : > Right now, there is no easy way (aside from parsing sys.version) to > say "is this code running on CPython or IronPython." And, as I started > this thread, the format of sys.version changed from 1.0 to 1.0.1. Not true. Testing for sys.platform == 'cli' is easy and exact. sys.version format change is unfortunate, but it was done to provide *more* information. Hopefully special casing 1.0 only would be enough and IronPython team would keep the format from 1.0.1 on. > As far as sys.version_info claiming to be Python 2.4 - I can sort of > understand that from a pragmatic point of view. But it leaves me with > a bad feeling - it's all too similar to almost every http client > identifying themselves as "Mozilla 4.0 (Actual Browser Name Here)". Indeed. But far too many softwares test for sys.hexversion and sys.version_info to change that. Maybe it's better to change documentation to say that hexversion and version_info are intended to represent "language specification", not "language implementation"? -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 11 10:36:54 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 17:36:54 +0900 Subject: [IronPython] hashlib for IronPython Message-ID: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> hashlib is a new module using C extension added in CPython 2.5. http://docs.python.org/lib/module-hashlib.html This is now implemented in FePy: https://svn.sourceforge.net/svnroot/fepy/trunk/lib/hashlib.py In CPython 2.5, md5 and sha modules are implemented as a thin wrapper around this module. The same is true for FePy now: https://svn.sourceforge.net/svnroot/fepy/trunk/lib/md5.py https://svn.sourceforge.net/svnroot/fepy/trunk/lib/sha.py You can read the source, but here are some technical details: In CPython, hashlib is backed by OpenSSL. hashlib.new can create hash object by name, in contrast to static constructors like hashlib.md5. This is implemented by OpenSSL function EVP_get_digestbyname. I have mapped this to HashAlgorithm.Create, which was an obvious choice. This can be used, for example, to load RIPEMD160 which doesn't have static constructor in hashlib. Oh, by the way, I updated hash_test.py too, and you can see the usage there. hashlib import is conditionalized to make it run on CPython 2.4 too. https://svn.sourceforge.net/svnroot/fepy/trunk/example/hash_test.py There were two problems: 1. .NET framework doesn't provide SHA224 hash algorithm, but it is always present in CPython hashlib. I raise NotImplementedError for this case. 2. Mono's HashAlgorithm.Create doesn't accept lowercased algorithm names, while both MS.NET and CPython do. I convert the name to the uppercase myself. There's also more difficult problem which I will write about in the next post. -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 11 10:44:48 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 17:44:48 +0900 Subject: [IronPython] Copying a cryptographic context Message-ID: <5b0248170610110144r2541e09eka8cf594a806556b8@mail.gmail.com> Python's hash objects can be copied by copy() method. To quote the library reference, "This can be used to efficiently compute the digests of strings that share a common initial substring." http://docs.python.org/lib/module-hashlib.html I couldn't find any way to copy a cryptographic context encapsulated by HashAlgorithm instances on .NET framework. I found this curious, as this is so clearly useful. Someone suggested that this is same as SSPI(Security Service Provider Interface), which also doesn't provide any way to copy a cryptographic context. But this can't be the reason, as .NET framework's SHA* classes are implemented in the managed code. Can anyone shed some light? -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 11 11:06:18 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 18:06:18 +0900 Subject: [IronPython] FePy TODO In-Reply-To: References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> <1160408511.8579.26.camel@erandi.dom> Message-ID: <5b0248170610110206n5c2cbe42x1727f9f8df2ddff@mail.gmail.com> 2006/10/10, Mark Rees : > Looks good. If you want, I am happy to write up 2 items of documentation: > * How to get .NET DB connection from Python DB connection. > * How to set up WSGI within ASP.NET. > Is ReST is the preferred format? Yes. -- Seo Sanghyeon From anthonybaxter at gmail.com Wed Oct 11 11:22:57 2006 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Wed, 11 Oct 2006 19:22:57 +1000 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: <5b0248170610110030kcf5f160g346672c9472d8e01@mail.gmail.com> References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> <5b0248170610110030kcf5f160g346672c9472d8e01@mail.gmail.com> Message-ID: On 10/11/06, Sanghyeon Seo wrote: > 2006/10/11, Anthony Baxter : > > Right now, there is no easy way (aside from parsing sys.version) to > > say "is this code running on CPython or IronPython." And, as I started > > this thread, the format of sys.version changed from 1.0 to 1.0.1. > > Not true. Testing for sys.platform == 'cli' is easy and exact. That's a bad choice. sys.platform under CPython has a bunch of different values. But in the meantime, I guess it's the best we have. > sys.version format change is unfortunate, but it was done to provide > *more* information. Hopefully special casing 1.0 only would be enough > and IronPython team would keep the format from 1.0.1 on. I guess I'm used to point releases not changing user-visible things. Something like this, which is the only way to get the IronPython release, was not a good thing to change. > > As far as sys.version_info claiming to be Python 2.4 - I can sort of > > understand that from a pragmatic point of view. But it leaves me with > > a bad feeling - it's all too similar to almost every http client > > identifying themselves as "Mozilla 4.0 (Actual Browser Name Here)". > > Indeed. But far too many softwares test for sys.hexversion and > sys.version_info to change that. Maybe it's better to change > documentation to say that hexversion and version_info are intended to > represent "language specification", not "language implementation"? I guess that's what I was saying. For what it's worth, almost all uses of sys.version_info checking I'm aware of are of the form of "is this version X or higher" or "version X or lower" - because a particular bugfix or new feature is only in that version. That's why the "this magic string is version X, this is version Y, ..." is such a bad approach. I have Python packages that last had a "release" 4 or 5 years ago[1]. They still work fine. If I had to re-release them for a new version where nothing else changed, I'd be sad. Anthony [1] Why don't they have new releases? Largely, because they work fine. I don't see the need to add features that aren't needed :) From jvm_cop at spamcop.net Wed Oct 11 14:56:38 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 11 Oct 2006 08:56:38 -0400 Subject: [IronPython] Copying a cryptographic context In-Reply-To: <5b0248170610110144r2541e09eka8cf594a806556b8@mail.gmail.co m> References: <5b0248170610110144r2541e09eka8cf594a806556b8@mail.gmail.com> Message-ID: <7.0.1.0.2.20061011085528.01e41498@wheresmymailserver.com> Did you try the .Net Clone() method? If it signals Not Implemented, one could justifiably complain. At 04:44 AM 10/11/2006, Sanghyeon Seo wrote >Python's hash objects can be copied by copy() method. To quote the >library reference, "This can be used to efficiently compute the >digests of strings that share a common initial substring." > >http://docs.python.org/lib/module-hashlib.html > >I couldn't find any way to copy a cryptographic context encapsulated >by HashAlgorithm instances on .NET framework. I found this curious, as >this is so clearly useful. > >Someone suggested that this is same as SSPI(Security Service Provider >Interface), which also doesn't provide any way to copy a cryptographic >context. But this can't be the reason, as .NET framework's SHA* >classes are implemented in the managed code. > >Can anyone shed some light? > >-- >Seo Sanghyeon J. Merrill / Analytical Software Corp From sanxiyn at gmail.com Wed Oct 11 16:16:18 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 23:16:18 +0900 Subject: [IronPython] Fwd: hashlib for IronPython In-Reply-To: <1160571066.11898.148.camel@poupou.home> References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> Message-ID: <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> Forward. ---------- Forwarded message ---------- From: Sebastien Pouliot Subject: Re: [IronPython] hashlib for IronPython To: Sanghyeon Seo Hello, [I'm not subscribed to the list, someone c.c. me this email. Feel free to forward my answer to the list if it can help anybody] On Wed, 2006-10-11 at 17:36 +0900, Sanghyeon Seo wrote: > hashlib is a new module using C extension added in CPython 2.5. > http://docs.python.org/lib/module-hashlib.html > > This is now implemented in FePy: > https://svn.sourceforge.net/svnroot/fepy/trunk/lib/hashlib.py > > In CPython 2.5, md5 and sha modules are implemented as a thin wrapper > around this module. The same is true for FePy now: > https://svn.sourceforge.net/svnroot/fepy/trunk/lib/md5.py > https://svn.sourceforge.net/svnroot/fepy/trunk/lib/sha.py > > You can read the source, but here are some technical details: > > In CPython, hashlib is backed by OpenSSL. hashlib.new can create hash > object by name, in contrast to static constructors like hashlib.md5. > This is implemented by OpenSSL function EVP_get_digestbyname. > > I have mapped this to HashAlgorithm.Create, which was an obvious > choice. This can be used, for example, to load RIPEMD160 which doesn't > have static constructor in hashlib. > > Oh, by the way, I updated hash_test.py too, and you can see the usage > there. hashlib import is conditionalized to make it run on CPython 2.4 > too. > https://svn.sourceforge.net/svnroot/fepy/trunk/example/hash_test.py > > There were two problems: > > 1. .NET framework doesn't provide SHA224 hash algorithm, but it is > always present in CPython hashlib. I raise NotImplementedError for > this case. Mono.Security.dll implements the SHA224 algorithm. This assembly is always included with Mono (as many security tools depends on it). The same assembly/binary can also be used on the MS runtime without any problems. Note that calling HashAlgorithm.Create("SHA224") will work only if the machine.config file has been updated to add this mapping (as it is not part of the default mappings supplied in .NET). The implementation is also MIT X11 licensed so you should also be able to reuse the (C#) source directly. > 2. Mono's HashAlgorithm.Create doesn't accept lowercased algorithm > names, while both MS.NET and CPython do. I convert the name to the > uppercase myself. Thanks for filling the bug into our bugzilla. It is now fixed in SVN and should be part of our next release. > There's also more difficult problem which I will write about in the next post. -- Sebastien Pouliot Blog: http://pages.infinit.net/ctech/ From sanxiyn at gmail.com Wed Oct 11 16:43:35 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 23:43:35 +0900 Subject: [IronPython] Copying a cryptographic context In-Reply-To: <7.0.1.0.2.20061011085528.01e41498@wheresmymailserver.com> References: <5b0248170610110144r2541e09eka8cf594a806556b8@mail.gmail.com> <7.0.1.0.2.20061011085528.01e41498@wheresmymailserver.com> Message-ID: <5b0248170610110743u192a25d9vd4397a2f7922e676@mail.gmail.com> 2006/10/11, J. Merrill : > Did you try the .Net Clone() method? If it signals Not Implemented, one could > justifiably complain. Do you mean the MemberwiseClone() method? /me try it and feel stupid Seems to work! Oh, sorry for the noise! Here's the commit: http://svn.sourceforge.net/viewvc/fepy/trunk/lib/hashlib.py?r1=205&r2=204&pathrev=205 -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 11 16:52:41 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 11 Oct 2006 23:52:41 +0900 Subject: [IronPython] hashlib for IronPython In-Reply-To: <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> Message-ID: <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> > Mono.Security.dll implements the SHA224 algorithm. This assembly is > always included with Mono (as many security tools depends on it). The > same assembly/binary can also be used on the MS runtime without any > problems. This is now used when available. Here's the commit: http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=206 -- Seo Sanghyeon From Martin.Maly at microsoft.com Wed Oct 11 17:34:34 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 11 Oct 2006 08:34:34 -0700 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: I am sorry, this is a simple miscommunication. I am not suggesting that this is (and always will be) the way to check for IronPython's version. I only provided this temporary solution for people who absolutely must be able to tell the difference between 1.0 and 1.0.1 for simply there is no other good way to tell at this point. Of course, apart from making this (I admit not ideal) solution available now, we must find something better, something which will fit nicely with the Python model of providing version information. The script below, or probably looking for substrings in sys.version: 1.0: sys.version == 'IronPython 1.0.60816 on .NET 2.0.50727.42' 1.0.1: sys.version == 'IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42' are just about the only way to tell (for now) between 1.0 and 1.0.1. Note that our sys.version_info reports (2, 4, 0, 'final', 0) to express compatibility with CPython 2.4) and that in the absence of sys.subversion. We can certainly add the sys.subversion in the nearest release, but it will be solution going forward, unfortunately not available for 1.0 and 1.0.1 where - sadly - we don't have anything as clean as that available. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Anthony Baxter Sent: Tuesday, October 10, 2006 11:50 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 1.0.1 Released! > import System > a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) > if len(a) > 0: > if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" > else: print "Unknown version" > else: > print "IronPython 1.0" Er - what? This isn't even close to a good approach. How on earth can I make code that uses this forward-compatible? Any code I write using this will need to be updated for IronPython1.1, and whenever there is a subsequent version. Please, please at least support sys.subversion to identify the version. I'm thinking something like ('IronPython', 'tags/1.0.1', '61005') or the like. CPython 2.5 is currently ('CPython', 'tags/r25', '51908') Right now, there is no easy way (aside from parsing sys.version) to say "is this code running on CPython or IronPython." And, as I started this thread, the format of sys.version changed from 1.0 to 1.0.1. I'd be open to suggesting some other attribute in sys - but it really does need to be in sys. If there was something like "sys.implementation" I could see we could add that to CPython as well. (But see note below about CPython release schedule) As far as sys.version_info claiming to be Python 2.4 - I can sort of understand that from a pragmatic point of view. But it leaves me with a bad feeling - it's all too similar to almost every http client identifying themselves as "Mozilla 4.0 (Actual Browser Name Here)". The basic problem is that the stuff we have now was designed really for a world where all Python implementations shared a common concept of "version" - that is, Jython 2.2 is feature-compatible with CPython 2.2. It's possible that needs to be addressed, although given we just did CPython 2.5, we're not going to be able to change it for CPython for a good 18 months (the approximate timeframe for a 2.6). Anthony _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dfugate at microsoft.com Wed Oct 11 19:06:13 2006 From: dfugate at microsoft.com (Dave Fugate) Date: Wed, 11 Oct 2006 10:06:13 -0700 Subject: [IronPython] IronPython 1.0.1 Released! In-Reply-To: References: <7AD436E4270DD54A94238001769C2227448E9339C3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <35874.194.221.74.7.1160467633.squirrel@mail1.webfaction.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D910A3D81C6DC@NA-EXMSG-C106.redmond.corp.microsoft.com> A quicker way to tell if you're using IP 1.0 or 1.0.1 is to use the following: import sys ip_11 = hasattr(sys, "winver") (The "winver" global was introduced with 1.0.1 to close a Codeplex bug.) This is not a permanent solution either though and will only work between IP 1.0 and 1.0.1 -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Wednesday, October 11, 2006 8:35 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 1.0.1 Released! I am sorry, this is a simple miscommunication. I am not suggesting that this is (and always will be) the way to check for IronPython's version. I only provided this temporary solution for people who absolutely must be able to tell the difference between 1.0 and 1.0.1 for simply there is no other good way to tell at this point. Of course, apart from making this (I admit not ideal) solution available now, we must find something better, something which will fit nicely with the Python model of providing version information. The script below, or probably looking for substrings in sys.version: 1.0: sys.version == 'IronPython 1.0.60816 on .NET 2.0.50727.42' 1.0.1: sys.version == 'IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42' are just about the only way to tell (for now) between 1.0 and 1.0.1. Note that our sys.version_info reports (2, 4, 0, 'final', 0) to express compatibility with CPython 2.4) and that in the absence of sys.subversion. We can certainly add the sys.subversion in the nearest release, but it will be solution going forward, unfortunately not available for 1.0 and 1.0.1 where - sadly - we don't have anything as clean as that available. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Anthony Baxter Sent: Tuesday, October 10, 2006 11:50 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 1.0.1 Released! > import System > a = [].GetType().Assembly.GetCustomAttributes(System.Reflection.AssemblyFileVersionAttribute, False) > if len(a) > 0: > if a[0].Version == "1.0.61005.1977": print "IronPython 1.0.1" > else: print "Unknown version" > else: > print "IronPython 1.0" Er - what? This isn't even close to a good approach. How on earth can I make code that uses this forward-compatible? Any code I write using this will need to be updated for IronPython1.1, and whenever there is a subsequent version. Please, please at least support sys.subversion to identify the version. I'm thinking something like ('IronPython', 'tags/1.0.1', '61005') or the like. CPython 2.5 is currently ('CPython', 'tags/r25', '51908') Right now, there is no easy way (aside from parsing sys.version) to say "is this code running on CPython or IronPython." And, as I started this thread, the format of sys.version changed from 1.0 to 1.0.1. I'd be open to suggesting some other attribute in sys - but it really does need to be in sys. If there was something like "sys.implementation" I could see we could add that to CPython as well. (But see note below about CPython release schedule) As far as sys.version_info claiming to be Python 2.4 - I can sort of understand that from a pragmatic point of view. But it leaves me with a bad feeling - it's all too similar to almost every http client identifying themselves as "Mozilla 4.0 (Actual Browser Name Here)". The basic problem is that the stuff we have now was designed really for a world where all Python implementations shared a common concept of "version" - that is, Jython 2.2 is feature-compatible with CPython 2.2. It's possible that needs to be addressed, although given we just did CPython 2.5, we're not going to be able to change it for CPython for a good 18 months (the approximate timeframe for a 2.6). Anthony _______________________________________________ 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 RMiklos at pss.sk Tue Oct 10 12:19:15 2006 From: RMiklos at pss.sk (Roman Miklos) Date: Tue, 10 Oct 2006 12:19:15 +0200 Subject: [IronPython] How can I read password from console in IronPython? Message-ID: Hello, I need to get password from console, I tried import getpass pwd = getpass.getpass() But this do not work - I get a Warning: Problem with getpass. Password may be echoed. and really the password will be displayed on console. I looked at System.Console which has the methods Read() and ReadLine(), but I don't know how to configure these methods, so that they will not display the input string. I searched on web for an example in VB.NET or C#, but I found nothing. So, my question is: How can I read password from console in IronPython? Regards Roman Mgr. Ing. Roman MIKL?? Prv? stavebn? sporite??a a.s. Bajkalsk? 30, P. O. Box 48 829 48 Bratislava 25 Tel.: +421/ 2 / 582 31 174 Fax: +421/ 2 / 582 31 109 -------------- next part -------------- An HTML attachment was scrubbed... URL: From husfloen at gmail.com Thu Oct 12 02:49:15 2006 From: husfloen at gmail.com (Patrik Husfloen) Date: Thu, 12 Oct 2006 02:49:15 +0200 Subject: [IronPython] How can I read password from console in IronPython? In-Reply-To: References: Message-ID: <4bcbf07d0610111749u6d658f20p898eb048685956ec@mail.gmail.com> System.Console should have a GetKey() that I think you can use. /Patrik On 10/10/06, Roman Miklos wrote: > > Hello, > > I need to get password from console, I tried > import getpass > pwd = getpass.getpass() > But this do not work - I get a Warning: Problem with getpass. Password may > be echoed. > and really the password will be displayed on console. > > I looked at System.Console which has the methods Read() and ReadLine(), but > I don't know how to configure > these methods, so that they will not display the input string. > I searched on web for an example in VB.NET or C#, but I found nothing. > So, my question is: How can I read password from console in IronPython? > > Regards > > Roman > Mgr. Ing. Roman MIKL?? > Prv? stavebn? sporite??a a.s. > Bajkalsk? 30, P. O. Box 48 > 829 48 Bratislava 25 > Tel.: +421/ 2 / 582 31 174 > Fax: +421/ 2 / 582 31 109 > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From nielsreijers at gmail.com Thu Oct 12 14:46:53 2006 From: nielsreijers at gmail.com (Niels Reijers) Date: Thu, 12 Oct 2006 14:46:53 +0200 Subject: [IronPython] Security Problem in Visual Studio Message-ID: Hello, I apologise if this has been asked and answered before. I'm new to IronPython, .Net and VisualStudio (apart from some VB6 work in a distant past), but I have a couple of months of Python experience, and am really pleased with the language so far. I'm exploring IronPython for a project at work. Working within .Net and having VisualS tudio integration will be very important to us since it will make it far easier to have management consider Python as an option. I downloaded the SDK and got the VS integration working following Aaron Marten's blog post. No problems so far. Unfortunately, I can only run my code when running VS as Administrator. When I try to run it under my own account, I get an unhandled SecurityException: "Request for the permission of type ' System.Security.Permissions.SecurityPermission , mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." So I'm assuming I need to get some extra permissions for my user account, but I'm not sure which. Any help would be much appreciated. Also many thanks to the IronPython team! This is really cool stuff you're building. :-) Sincerely, Niels Reijers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ironpythonster at gmail.com Thu Oct 12 15:57:27 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Thu, 12 Oct 2006 21:57:27 +0800 Subject: [IronPython] os.system equivalent Message-ID: <8c8dcbe30610120657m73831d36yc52dc829068b7190@mail.gmail.com> -----Original Message----- From: users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] On Behalf Of Erich Lin Sent: Sunday, September 24, 2006 9:26 PM To: users at lists.ironpython.com Subject: [IronPython] os.system equivalent Hi, I am trying to run a shell command, specifically msbuild, and pstools. nt.system and os.system run on python, but neither of those run on ironpython. How would you do this using IronPython. Thanks ----------------------------------------------------------------------------- Hi,I also amaze this problem,how could the IronPyton to call the python lib.If the IronPython can call the python lib full,it should be perfect! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvm_cop at spamcop.net Thu Oct 12 17:33:17 2006 From: jvm_cop at spamcop.net (J. Merrill) Date: Thu, 12 Oct 2006 11:33:17 -0400 Subject: [IronPython] Security Problem in Visual Studio In-Reply-To: References: Message-ID: <7.0.1.0.2.20061012111334.0889fbd0@wheresmymailserver.com> If you're running the resulting code from a network share, that can be an issue -- it's not a "trusted" source for code, and IP (sometimes) does its work by generating new methods on the fly. That ought not be allowed to anything other than totally trusted code. If you're running the code from a local drive, it must be something else. (The dev team has said "You shouldn't need the SDK or full privileges to run IronPython." (Dino Viehland, 2006-05-23) At 08:46 AM 10/12/2006, Niels Reijers wrote >Hello, > >I apologise if this has been asked and answered before. I'm new to IronPython, .Net and VisualStudio (apart from some VB6 work in a distant past), but I have a couple of months of Python experience, and am really pleased with the language so far. >I'm exploring IronPython for a project at work. Working within .Net and having VisualS tudio integration will be very important to us since it will make it far easier to have management consider Python as an option. I downloaded the SDK and got the VS integration working following Aaron Marten's blog post. No problems so far. > >Unfortunately, I can only run my code when running VS as Administrator. When I try to run it under my own account, I get an unhandled SecurityException: "Request for the permission of type 'System.Security.Permissions.SecurityPermission , mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." >So I'm assuming I need to get some extra permissions for my user account, but I'm not sure which. >Any help would be much appreciated. > >Also many thanks to the IronPython team! This is really cool stuff you're building. :-) > >Sincerely, > Niels Reijers? J. Merrill / Analytical Software Corp -------------- next part -------------- An HTML attachment was scrubbed... URL: From Aaron.Marten at microsoft.com Thu Oct 12 18:03:38 2006 From: Aaron.Marten at microsoft.com (Aaron Marten) Date: Thu, 12 Oct 2006 09:03:38 -0700 Subject: [IronPython] Security Problem in Visual Studio In-Reply-To: References: Message-ID: <861464C2CBE1E04D8D4D27D8CD72CC5512DDCD0190@NA-EXMSG-C105.redmond.corp.microsoft.com> Hi Niels, I'll investigate this and let you know what we find out. Thanks, Aaron Marten (Microsoft) From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Niels Reijers Sent: Thursday, October 12, 2006 5:47 AM To: Discussion of IronPython Subject: [IronPython] Security Problem in Visual Studio Hello, I apologise if this has been asked and answered before. I'm new to IronPython, .Net and VisualStudio (apart from some VB6 work in a distant past), but I have a couple of months of Python experience, and am really pleased with the language so far. I'm exploring IronPython for a project at work. Working within .Net and having VisualS tudio integration will be very important to us since it will make it far easier to have management consider Python as an option. I downloaded the SDK and got the VS integration working following Aaron Marten's blog post. No problems so far. Unfortunately, I can only run my code when running VS as Administrator. When I try to run it under my own account, I get an unhandled SecurityException: "Request for the permission of type 'System.Security.Permissions.SecurityPermission , mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." So I'm assuming I need to get some extra permissions for my user account, but I'm not sure which. Any help would be much appreciated. Also many thanks to the IronPython team! This is really cool stuff you're building. :-) Sincerely, Niels Reijers -------------- next part -------------- An HTML attachment was scrubbed... URL: From walgri at gmail.com Thu Oct 12 19:24:46 2006 From: walgri at gmail.com (walgri) Date: Thu, 12 Oct 2006 19:24:46 +0200 Subject: [IronPython] Differences between Ironpython and CPython 2.4 Message-ID: <5f59b5ad0610121024q2cb6e252rf2fc90cdd697b8ec@mail.gmail.com> Hello, I have been trying IronPython with the Unum module (http://home.tiscali.be/be052320/Unum.html) which, in about 400 locs, adds a complete and seamless measure units support to Python. In Cpython2.4 I can write code like this: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) 0.500 [N/m2] >>> Whereas in Ironpython (both official and community edition) I get the following error: IronPython 1.0.2463 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) Traceback (most recent call last): File , line 0, in ##142 File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 566,in __repr__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 558,in __str__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 253,in normalize File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 213,in replaced File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 389,in __pow__ ZeroDivisionError: 0.0 cannot be raised to a negative power >>> I can investigate further but need some directions. I understand that this can be a very specific issue, but any help would be really appreciated. Best regards, Walgri From dinov at exchange.microsoft.com Thu Oct 12 19:49:20 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 12 Oct 2006 10:49:20 -0700 Subject: [IronPython] Differences between Ironpython and CPython 2.4 In-Reply-To: <5f59b5ad0610121024q2cb6e252rf2fc90cdd697b8ec@mail.gmail.com> References: <5f59b5ad0610121024q2cb6e252rf2fc90cdd697b8ec@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227451390F066@DF-GRTDANE-MSG.exchange.corp.microsoft.com> If you run IronPython w/ -X:ExceptionDetail you'll see where the exception is getting thrown from IronPython. Put a break point there and look at the values that are coming into that function. Then you should be able to compare that simple operation to the one in CPython and see if they're both behaving the same. If they are both behaving the same you'll need to step back and see how we're getting those values as being different then from CPython (I'm saying this because 0.0 ** -2 throws in both CPython & IronPython). Maybe we're returning 0 somewhere that CPython isn't causing you to get the exception later on. For that you'll need to start looking at what code paths you're going to get to the __pow__ call and compare the results along the way. The easiest way to do that might be to log the outputs of the operations and diff them and spot the difference. Once you've found the operation that's differing you should be able to do a side by side comparison of IronPython & CPython and see what's wrong. Let us know and we can get a bug filed on it :). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of walgri Sent: Thursday, October 12, 2006 10:25 AM To: users at lists.ironpython.com Subject: [IronPython] Differences between Ironpython and CPython 2.4 Hello, I have been trying IronPython with the Unum module (http://home.tiscali.be/be052320/Unum.html) which, in about 400 locs, adds a complete and seamless measure units support to Python. In Cpython2.4 I can write code like this: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) 0.500 [N/m2] >>> Whereas in Ironpython (both official and community edition) I get the following error: IronPython 1.0.2463 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) Traceback (most recent call last): File , line 0, in ##142 File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 566,in __repr__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 558,in __str__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 253,in normalize File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 213,in replaced File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 389,in __pow__ ZeroDivisionError: 0.0 cannot be raised to a negative power >>> I can investigate further but need some directions. I understand that this can be a very specific issue, but any help would be really appreciated. Best regards, Walgri _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From husfloen at gmail.com Thu Oct 12 20:45:42 2006 From: husfloen at gmail.com (Patrik Husfloen) Date: Thu, 12 Oct 2006 20:45:42 +0200 Subject: [IronPython] os.system equivalent In-Reply-To: <8c8dcbe30610120657m73831d36yc52dc829068b7190@mail.gmail.com> References: <8c8dcbe30610120657m73831d36yc52dc829068b7190@mail.gmail.com> Message-ID: <4bcbf07d0610121145hd0227a2o471f76877736fc18@mail.gmail.com> If you're not trying to maintain cpython compatibility you can use System.Diagnostics.Process.Start() /Patrik On 10/12/06, Kevien Lee wrote: > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Erich Lin > Sent: Sunday, September 24, 2006 9:26 PM > To: users at lists.ironpython.com > Subject: [IronPython] os.system equivalent > > Hi, > > I am trying to run a shell command, specifically msbuild, and pstools. > nt.system and os.system run on python, but neither of those run on > ironpython. How would you do this using IronPython. > > Thanks > ----------------------------------------------------------------------------- > Hi,I also amaze this problem,how could the IronPyton to call the python > lib.If the IronPython can call the python lib full,it should be perfect! > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From reed at intersiege.com Fri Oct 13 00:37:00 2006 From: reed at intersiege.com (Reed L. O'Brien) Date: Thu, 12 Oct 2006 18:37:00 -0400 Subject: [IronPython] os.system equivalent In-Reply-To: <4bcbf07d0610121145hd0227a2o471f76877736fc18@mail.gmail.com> References: <8c8dcbe30610120657m73831d36yc52dc829068b7190@mail.gmail.com> <4bcbf07d0610121145hd0227a2o471f76877736fc18@mail.gmail.com> Message-ID: What is the status of the subprocess module? ~reed On Oct 12, 2006, at 2:45 PM, Patrik Husfloen wrote: > If you're not trying to maintain cpython compatibility you can use > System.Diagnostics.Process.Start() > > /Patrik > > On 10/12/06, Kevien Lee wrote: >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto: >> users-bounces at lists.ironpython.com] On Behalf Of Erich Lin >> Sent: Sunday, September 24, 2006 9:26 PM >> To: users at lists.ironpython.com >> Subject: [IronPython] os.system equivalent >> >> Hi, >> >> I am trying to run a shell command, specifically msbuild, and >> pstools. >> nt.system and os.system run on python, but neither of those run on >> ironpython. How would you do this using IronPython. >> >> Thanks >> --------------------------------------------------------------------- >> -------- >> Hi,I also amaze this problem,how could the IronPyton to call the >> python >> lib.If the IronPython can call the python lib full,it should be >> perfect! >> >> _______________________________________________ >> 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 ironpythonster at gmail.com Fri Oct 13 09:24:24 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Fri, 13 Oct 2006 15:24:24 +0800 Subject: [IronPython] os.system equivalent Message-ID: <8c8dcbe30610130024t4f6db270r45b2a23ebd874617@mail.gmail.com> If you're not trying to maintain cpython compatibility you can use System.Diagnostics.Process.Start() /Patrik // use the System.Diagnostics.Process.Start() is easy,but some command it don't support,such as "telnet 127.0.0.1".as shell develop,calling the system command should be more easy:( > Hi, > > I am trying to run a shell command, specifically msbuild, and pstools. > nt.system and os.system run on python, but neither of those run on > ironpython. How would you do this using IronPython. > > Thanks > ----------------------------------------------------------------------------- > Hi,I also amaze this problem,how could the IronPyton to call the python > lib.If the IronPython can call the python lib full,it should be perfect! > --------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Fri Oct 13 19:03:58 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 14 Oct 2006 02:03:58 +0900 Subject: [IronPython] Blog post on IronPython problems Message-ID: <5b0248170610131003o3fe5c9a3y99013f3c69d129e2@mail.gmail.com> http://substantiality.net/articles/2006/10/05/ironpython-is-1-0 The title is really "IronPython is 1.0?". It's an interesting experience for someone who expected "1.0" to run any random Python code out there. Apparently it can't. -- Seo Sanghyeon From husfloen at gmail.com Fri Oct 13 19:27:29 2006 From: husfloen at gmail.com (Patrik Husfloen) Date: Fri, 13 Oct 2006 19:27:29 +0200 Subject: [IronPython] os.system equivalent In-Reply-To: <8c8dcbe30610130024t4f6db270r45b2a23ebd874617@mail.gmail.com> References: <8c8dcbe30610130024t4f6db270r45b2a23ebd874617@mail.gmail.com> Message-ID: <4bcbf07d0610131027t26d249d3wd26a499d3aec66fd@mail.gmail.com> On 10/13/06, Kevien Lee wrote: > use the System.Diagnostics.Process.Start() is easy,but some > command it don't support,such as "telnet 127.0.0.1".as shell develop,calling > the system command should be more easy:( Yes it does, via this overload: public static Process Start ( string fileName, string arguments ) /Patrik > > > > Hi, > > > > I am trying to run a shell command, specifically msbuild, and pstools. > > nt.system and os.system run on python, but neither of those run on > > ironpython. How would you do this using IronPython. > > > > Thanks > > > ----------------------------------------------------------------------------- > > Hi,I also amaze this problem,how could the IronPyton to call the python > > lib.If the IronPython can call the python lib full,it should be perfect! > > > > --------------------------------------------------------------- > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From sanxiyn at gmail.com Fri Oct 13 19:56:36 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 14 Oct 2006 02:56:36 +0900 Subject: [IronPython] Unum problem Message-ID: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> I had a look at Unum problem. Still not figured it out. It's ugly. Unum 4.0 source: http://heanet.dl.sourceforge.net/sourceforge/unum/Unum-4.0.tar.gz unum/__init__.py line 174 has: "if conv is 0" This is bad and no-no. It is an undefined behaviour to compare numbers by reference. Actually, CPython: >>> 0 is 0 True IronPython: >>> 0 is 0 False Strange thing is that if I change the line to "if conv == 0", *CPython* errs too. Here's the codepath leading to ZeroDivisionError in case someone wants to investigate more: 1. unum.units.si is imported, and unum/units/si/__init__.py is executed. 2. 1 imports derived.py. 3. 2 imports base.py. 4. 3 imports Unum class from unum/__init__.py. 5. Unum.unit, a static method to define new units, is called. 6. A dummy Unum object is constructed with specified unit. 7. As a side effect of 6, class variable Unum._unitTable is modified. 8. While doing 7, line 174 above is executed, which sets: 8-1. conv_unum (conversion Unum) to None on CPython. 8-2. conv_unum to a new Unum with value of 0 on IronPython. 9. Unums are constructed. (Under different _unitTable) 10. Calculation is done without any problem. 11. To print the result of the calculation, __repr__ is called. 12. 11 calls __str__. 13. 12 calls normalize. 14. 13 looks up _unitTable to find the "simplest" representation. 15. 14 ignores _unitTable with conv_unum set to None, because they are assumed to be "base unit". 16. Only IronPython executes the branch "if conv_unum is not None". 17. The branch in 16 calls replaced. 18. To replace units, replaced raises the value of conv_unum (which is 0) to the units to be converted to. -- Seo Sanghyeon From sanxiyn at gmail.com Fri Oct 13 20:09:15 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 14 Oct 2006 03:09:15 +0900 Subject: [IronPython] Unum problem In-Reply-To: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> References: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> Message-ID: <5b0248170610131109n3f4126cep4960d29d0b43e0d8@mail.gmail.com> 2006/10/14, Sanghyeon Seo : > Strange thing is that if I change the line to "if conv == 0", > *CPython* errs too. Of course, == is overloaded. Stupid me. Apply this patch to Unum. Will send to the Unum author too. http://sparcs.kaist.ac.kr/~tinuviel/download/patch-unum With the patch, IronPython passes all Unum unit tests. -- Seo Sanghyeon From sanxiyn at gmail.com Fri Oct 13 20:18:51 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 14 Oct 2006 03:18:51 +0900 Subject: [IronPython] Unum problem In-Reply-To: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> References: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> Message-ID: <5b0248170610131118s7e8a7ea2s902febedd70c237b@mail.gmail.com> 2006/10/14, Sanghyeon Seo : > unum/__init__.py line 174 has: > "if conv is 0" > > This is bad and no-no. It is an undefined behaviour to compare numbers > by reference. And it is documented in IronPython Differences. So no execuse. "Small integer caching in IronPython is different than in standard CPython. If you set i = 2 and then test "i is 2", the code produces different results in IronPython and CPython." -- Seo Sanghyeon From jsacksteder at gmail.com Fri Oct 13 23:38:56 2006 From: jsacksteder at gmail.com (jeff sacksteder) Date: Fri, 13 Oct 2006 17:38:56 -0400 Subject: [IronPython] Typing problem with vendor library? In-Reply-To: References: <51c8a7be0607192153n7c1fd931g3e570d0b0954d32d@mail.gmail.com> Message-ID: <51c8a7be0610131438i33623389g77f7b9e4bbaadc70@mail.gmail.com> I'm finally getting back to this project. I do not know the Int16() function that you call. Can you elaborate? On 7/20/06, Martin Maly wrote: > > The problem is that the method is called with int as the last parameter, > but the two overloads in question take "ref Int16" and "ref UInt16". So the > conversion is happening in the opposite direction and IronPython cannot > safely choose between Int16 and UInt16 given that the input is Int32. They > are both narrowing conversions. > > > > You can either select the method from Overloads, or cast the int to > whichever type you want to use: > > > > board.AIn(channel, mode, Int16(output)) > > > > Hope this helps > > Martin > > > ------------------------------ > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *jeff sacksteder > *Sent:* Wednesday, July 19, 2006 9:54 PM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] Typing problem with vendor library? > > > > I have a data-acquisition device whose vendor provides a dotnet library > for software integration. The dynamic nature of IP is giving me a bit of a > problem. To record data from the unit, I make a method call like this: > > errorlevel = board.AIn(channel,mode,output) > > It seems that the library wants to put an UInt16 value into the 'output' > variable. I would not expect this to be a problem, but this produces... > > TypeError: no overloads of AIn could match (int, Range, int) > AIn(int, Range, Reference[Int16]) > AIn(int, Range, Reference[UInt16]) > > Surely an unsigned Int16 should be able to go into an Int32? > > _______________________________________________ > 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 Martin.Maly at microsoft.com Sat Oct 14 00:07:15 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 13 Oct 2006 15:07:15 -0700 Subject: [IronPython] Typing problem with vendor library? In-Reply-To: <51c8a7be0610131438i33623389g77f7b9e4bbaadc70@mail.gmail.com> References: <51c8a7be0607192153n7c1fd931g3e570d0b0954d32d@mail.gmail.com> <51c8a7be0610131438i33623389g77f7b9e4bbaadc70@mail.gmail.com> Message-ID: Int16 is a type: System.Int16 and I am calling its constructor, passing "output" as the value: System.Int16(output), just like in Python you can call: int(3.5), this is very similar, except constructing .NET System.Int16 type. Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Friday, October 13, 2006 2:39 PM To: Discussion of IronPython Subject: Re: [IronPython] Typing problem with vendor library? I'm finally getting back to this project. I do not know the Int16() function that you call. Can you elaborate? On 7/20/06, Martin Maly < Martin.Maly at microsoft.com> wrote: The problem is that the method is called with int as the last parameter, but the two overloads in question take "ref Int16" and "ref UInt16". So the conversion is happening in the opposite direction and IronPython cannot safely choose between Int16 and UInt16 given that the input is Int32. They are both narrowing conversions. You can either select the method from Overloads, or cast the int to whichever type you want to use: board.AIn(channel, mode, Int16(output)) Hope this helps Martin ________________________________ From: users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Wednesday, July 19, 2006 9:54 PM To: users at lists.ironpython.com Subject: [IronPython] Typing problem with vendor library? I have a data-acquisition device whose vendor provides a dotnet library for software integration. The dynamic nature of IP is giving me a bit of a problem. To record data from the unit, I make a method call like this: errorlevel = board.AIn(channel,mode,output) It seems that the library wants to put an UInt16 value into the 'output' variable. I would not expect this to be a problem, but this produces... TypeError: no overloads of AIn could match (int, Range, int) AIn(int, Range, Reference[Int16]) AIn(int, Range, Reference[UInt16]) Surely an unsigned Int16 should be able to go into an Int32? _______________________________________________ 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 sanxiyn at gmail.com Sat Oct 14 03:47:32 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 14 Oct 2006 10:47:32 +0900 Subject: [IronPython] quopri module Message-ID: <5b0248170610131847v61db998cnc26322248507e224@mail.gmail.com> CPython >>> import quopri >>> quopri.encodestring('=') '=3D' IronPython >>> import quopri >>> quopri.encodestring('=') Traceback (most recent call last): File quopri, line unknown, in encodestring TypeError: b2a_qp() takes exactly 4 non-keyword arguments (1 given) Found while trying to run SOAPpy (http://pywebsvcs.sourceforge.net/). Easy enough to workaround, but I'd rather not. -- Seo Sanghyeon From jsacksteder at gmail.com Sat Oct 14 06:42:42 2006 From: jsacksteder at gmail.com (jeff sacksteder) Date: Sat, 14 Oct 2006 00:42:42 -0400 Subject: [IronPython] Typing problem with vendor library? In-Reply-To: References: <51c8a7be0607192153n7c1fd931g3e570d0b0954d32d@mail.gmail.com> <51c8a7be0610131438i33623389g77f7b9e4bbaadc70@mail.gmail.com> Message-ID: <51c8a7be0610132142l4060cc14ncc6891b4db5b7dd@mail.gmail.com> On 10/13/06, Martin Maly wrote: > > Int16 is a type: System.Int16 and I am calling its constructor, passing > "output" as the value: System.Int16(output), just like in Python you can > call: int(3.5), this is very similar, except constructing .NET > System.Int16 type. > An excellent description. However- "TypeError: no overloads of AIn could match (int, Range, Int16) AIn(int, Range, Reference[Int16]) AIn(int, Range, Reference[UInt16])" I think I should be using System.Type.MakeByRefType, but I'm not quite getting it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From walgri at gmail.com Sat Oct 14 11:55:26 2006 From: walgri at gmail.com (walgri) Date: Sat, 14 Oct 2006 11:55:26 +0200 Subject: [IronPython] Unum problem In-Reply-To: <5b0248170610131109n3f4126cep4960d29d0b43e0d8@mail.gmail.com> References: <5b0248170610131056g7c747b7fy1b376cd81c6ce88c@mail.gmail.com> <5b0248170610131109n3f4126cep4960d29d0b43e0d8@mail.gmail.com> Message-ID: <5f59b5ad0610140255n14c8d013k60d0c296457bc81e@mail.gmail.com> On 10/13/06, Sanghyeon Seo wrote: > > With the patch, IronPython passes all Unum unit tests. > > -- > Seo Sanghyeon Seo, thank you so much. I'll try this later. Best regards, Walgri From mark.john.rees at gmail.com Sat Oct 14 15:23:44 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Sat, 14 Oct 2006 23:23:44 +1000 Subject: [IronPython] Blog post on IronPython problems In-Reply-To: <5b0248170610131003o3fe5c9a3y99013f3c69d129e2@mail.gmail.com> References: <5b0248170610131003o3fe5c9a3y99013f3c69d129e2@mail.gmail.com> Message-ID: This is how I get round one of the authors concerns, lack of .pth file support: http://hex-dump.blogspot.com/2006/10/adding-pth-file-support-to-ironpython.html Mark On 10/14/06, Sanghyeon Seo wrote: > > http://substantiality.net/articles/2006/10/05/ironpython-is-1-0 > > The title is really "IronPython is 1.0?". It's an interesting > experience for someone who expected "1.0" to run any random Python > code out there. Apparently it can't. > > -- > Seo Sanghyeon > _______________________________________________ > 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 Sun Oct 15 08:46:06 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 15 Oct 2006 00:46:06 -0600 Subject: [IronPython] FePy TODO In-Reply-To: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> Message-ID: A simple bug I noticed (forgive me if its already been brought up -- been out of town and there's a ton of mail I haven't had a chance to parse through) -- when running ./build.sh it attempts to copy license.html (which doesn't exist) instead of license.txt (which does) from ../website to $DESTDIR/License.html On 10/9/06, Sanghyeon Seo wrote: > > Today I sat down and wrote down TODO list. > https://svn.sourceforge.net/svnroot/fepy/TODO > > Ideally, I would finish most tasks on the list rather soon and push > the next IPCE release. I hope so... > > Anything I missed? > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Oct 15 08:48:44 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 15 Oct 2006 15:48:44 +0900 Subject: [IronPython] FePy TODO In-Reply-To: References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> Message-ID: <5b0248170610142348t638486cbnca7697c6dfeff772@mail.gmail.com> 2006/10/15, M. David Peterson : > A simple bug I noticed (forgive me if its already been brought up -- been > out of town and there's a ton of mail I haven't had a chance to parse > through) -- when running ./build.sh it attempts to copy license.html (which > doesn't exist) instead of license.txt (which does) from ../website to > $DESTDIR/License.html You are supposed to "build" the website first. Type "make" in the website and you will get license.html. -- Seo Sanghyeon From xmlhacker at gmail.com Sun Oct 15 09:00:04 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 15 Oct 2006 01:00:04 -0600 Subject: [IronPython] FePy TODO In-Reply-To: <5b0248170610142348t638486cbnca7697c6dfeff772@mail.gmail.com> References: <5b0248170610090812r51a9befevc8c8ee6f0354f6c9@mail.gmail.com> <5b0248170610142348t638486cbnca7697c6dfeff772@mail.gmail.com> Message-ID: ahh... okay, thanks Seo. My guess is that if I would have actually RTFM, I would have already known this. Guess it's time to RTFM. ;) On 10/15/06, Sanghyeon Seo wrote: > > 2006/10/15, M. David Peterson : > > A simple bug I noticed (forgive me if its already been brought up -- > been > > out of town and there's a ton of mail I haven't had a chance to parse > > through) -- when running ./build.sh it attempts to copy license.html(which > > doesn't exist) instead of license.txt (which does) from ../website to > > $DESTDIR/License.html > > You are supposed to "build" the website first. Type "make" in the > website and you will get license.html. > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Sun Oct 15 09:14:38 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 15 Oct 2006 01:14:38 -0600 Subject: [IronPython] IronPython Samples In-Reply-To: <451BCBCD.4000100@voidspace.org.uk> References: <451BCBCD.4000100@voidspace.org.uk> Message-ID: Hey Michael, Quick follow-up with this: via the notes for http://dev.pypod.net/changeset/97 Not sure why I chose to name this PyPod? .Clipboard, > as it was something I created to run through FuzzyMan's clipboard tutorial. > The overall plan is to import the GlobalClip?project and use this as the primary clipboard mechanism, though there is > definitely some value in trying to ensure that the wrapper API keeps a > Pythonic look and feel, which if I can find the Python script I was working > on (in its here somewhere... I think :\) will then run through his tutorial > again to make sure things are in line with how they should be. Not sure if this is what you were refering to, but if yes, just wanted to be sure that I pointed out the correction... On 9/28/06, Michael Foord wrote: > > M. David Peterson wrote: > > http://dev.pypod.net/ (source can be viewed @ > > http://dev.pypod.net/browser/trunk and checked out via svn @ > > http://src.pypod.net/trunk) > > > > The wiki is wide open, and code samples can be attached inline to each > page. > > > Which part of this wiki (and repository) contains IronPython code > examples that aren't specific to the PyPod project ? > > Michael Foord > http://www.voidspace.org.uk/python/index.shtml > > > If you have code you want to check into the repository, register @ > > http://dev.pypod.net/register and then let me know your chosen > > username and I will add you to the the proper svnauth file. > > > > > > On 9/27/06, Slide < slide.o.mix at gmail.com> wrote: > > > >> Would be nice if there was a wiki with code samples. > >> > >> Alex > >> > >> On 9/27/06, Tim Riley < riltim at gmail.com> wrote: > >> > >>> I know you can download some neat samples from IronPython's codeplex > page > >>> but I think it would be nice if there were a place where end users > could > >>> place snippets of code and example programs for others to use. I was > >>> thinking of maybe something like http://www.infogami.com where > multiple > >>> people could add samples. Any thoughts? > >>> > >>> Regards, > >>> Tim Riley > >>> _______________________________________________ > >>> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Sun Oct 15 09:27:40 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 15 Oct 2006 01:27:40 -0600 Subject: [IronPython] hashlib for IronPython In-Reply-To: <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> Message-ID: Hey Seo, I've run into a problem with the usage of the the boto (home: http://code.google.com/p/boto/, repo: http://boto.googlecode.com/svn/trunk/) project code base and its usage of the hmac module, >>> import boto > >>> conn = boto.connect_s3() > >>> bucket = conn.create_bucket('foobarbucketfoo') > Traceback (most recent call last): > File , line 0, in ##108 > File C:\Python24\Lib\site-packages\boto\connection.py, line 282, in > create_bucket > File connection, line unknown, in make_request > File C:\Python24\Lib\site-packages\boto\connection.py, line 167, in > make_request > File C:\Python24\Lib\site-packages\boto\connection.py, line 184, in > add_aws_auth_header > File C:\Python24\Lib\site-packages\boto\connection.py, line 106, in > encode > File C:\Python24\Lib\hmac.py, line 107, in new > File C:\Python24\Lib\hmac.py, line 44, in __init__ > AttributeError: 'module' object has no attribute 'digest_size' > >>> It seems to me that at one point this was something you had fixed in regards to the MD5 module, though this was a while back and can't be certain. Any ideas in regards to the best way to work around this issue? On 10/11/06, Sanghyeon Seo wrote: > > > Mono.Security.dll implements the SHA224 algorithm. This assembly is > > always included with Mono (as many security tools depends on it). The > > same assembly/binary can also be used on the MS runtime without any > > problems. > > This is now used when available. Here's the commit: > http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=206 > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Oct 15 11:29:14 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 15 Oct 2006 18:29:14 +0900 Subject: [IronPython] hashlib for IronPython In-Reply-To: References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> Message-ID: <5b0248170610150229w7ad6377fie1266d93cd6aaafa@mail.gmail.com> 2006/10/15, M. David Peterson : > It seems to me that at one point this was something you had fixed in regards > to the MD5 module, though this was a while back and can't be certain. Any > ideas in regards to the best way to work around this issue? Workaround: open sha.py and add "digest_size = 20". Tell me if that works. I will look into this. -- Seo Sanghyeon From xmlhacker at gmail.com Sun Oct 15 12:41:25 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 15 Oct 2006 04:41:25 -0600 Subject: [IronPython] hashlib for IronPython In-Reply-To: <5b0248170610150229w7ad6377fie1266d93cd6aaafa@mail.gmail.com> References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> <5b0248170610150229w7ad6377fie1266d93cd6aaafa@mail.gmail.com> Message-ID: That seems to have fixed that problem. Traceback (most recent call last): > File , line 0, in ##108 > File C:\Python24\Lib\site-packages\boto\connection.py, line 282, in > create_bucket > File connection, line unknown, in make_request > File C:\Python24\Lib\site-packages\boto\connection.py, line 167, in > make_request > File C:\Python24\Lib\site-packages\boto\connection.py, line 184, in > add_aws_auth_header > File C:\Python24\Lib\site-packages\boto\connection.py, line 106, in > encode > File C:\Python24\Lib\hmac.py, line 86, in digest > AttributeError: 'instance' object has no attribute 'copy' > To make it easier, I will set-up a temporary S3 account and send you the keys off-list. On 10/15/06, Sanghyeon Seo wrote: > > 2006/10/15, M. David Peterson : > > It seems to me that at one point this was something you had fixed in > regards > > to the MD5 module, though this was a while back and can't be > certain. Any > > ideas in regards to the best way to work around this issue? > > Workaround: open sha.py and add "digest_size = 20". Tell me if that works. > > I will look into this. > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Mon Oct 16 13:33:00 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 16 Oct 2006 20:33:00 +0900 Subject: [IronPython] hashlib for IronPython In-Reply-To: References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> <5b0248170610150229w7ad6377fie1266d93cd6aaafa@mail.gmail.com> Message-ID: <5b0248170610160433j1b6c6989rb0f8d5e7877f21c4@mail.gmail.com> 2006/10/15, M. David Peterson : > > File C:\Python24\Lib\hmac.py, line 86, in digest > > AttributeError: 'instance' object has no attribute 'copy' This problem and digest_size problem are now fixed in SVN. Download the newest md5, sha, hashlib module from: https://svn.sourceforge.net/svnroot/fepy/trunk/lib/ > To make it easier, I will set-up a temporary S3 account and send you the > keys off-list. Received. -- Seo Sanghyeon From RMiklos at pss.sk Mon Oct 16 14:06:47 2006 From: RMiklos at pss.sk (Roman Miklos) Date: Mon, 16 Oct 2006 14:06:47 +0200 Subject: [IronPython] Problem with getpass.getpass() in IronPython Message-ID: With IronPython, this import getpass pwd = getpass.getpass() do'nt work properly, because the password will be echoed. I worked about this problem. The NET-platform probably doesn't have a direct function for getting password from console. I found only this C# example http://www.harper.no/valery/content/binary/ProtectData.cs.txt and wrote a simple module net_getpass.py which contains a function getpass(). For those who have the same problem, here is the source: ------------------------------------------------------------ source ------------------------------------------------------------------------------- ''' Module net_getpass Getting password from console in IronPython (Python.NET) Author: Roman Miklos (RMiklos at pss.sk) ''' import clr import System from System import Console def getpass(prompt="Password:"): '''Read Password from Console without echo''' # Prompt Console.Write(prompt) # create Instance of ConsoleKeyInfo key = System.ConsoleKeyInfo() # initialize vars pwd ="" EnterPressed = False # Read while input not ends while not EnterPressed: key = Console.ReadKey(True) if key.Key == System.ConsoleKey.Enter: # End of Input EnterPressed = True elif key.Key == System.ConsoleKey.Backspace: if len(pwd)>0: # Clear last character in password pwd = pwd[:-1] Console.Write(key.KeyChar) Console.Write(" ") Console.Write(key.KeyChar) else: Console.Beep() else: pwd += key.KeyChar Console.Write("*") # Next line Console.WriteLine() # return password return (pwd) ################################################################################ # Module Test ################################################################################ if __name__ == "__main__": print "Your Password is: %s" % getpass("Enter your password please:") ------------------------------------------------------------------ end of source ------------------------------------------------------------------------- However I don't make usage of .NET SecureString() object in my module as showed in above C# example, but for simplicity I used only normal python string. Mgr. Ing. Roman MIKL?? Prv? stavebn? sporite??a a.s. Bajkalsk? 30, P. O. Box 48 829 48 Bratislava 25 Tel.: +421/ 2 / 582 31 174 Fax: +421/ 2 / 582 31 109 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Mon Oct 16 14:41:57 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 16 Oct 2006 21:41:57 +0900 Subject: [IronPython] S3, boto, and strftime with %X Message-ID: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> S3 is Amazon's Simple Storage Service. boto is a Python interface to Amazon Web Services, available here: http://code.google.com/p/boto/ boto has a bug. boto uses strftime with %X format string to generate Date header, but Python Library Reference doesn't guarantee any such thing for %X. It only says: %X Locale's appropriate time representation. Fix: replace %X with %H:%M:%S. On the other hand, IronPython behaves differently in this case, causing an incompatibility. Locale was POSIX. I think this should be fixed. IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import time >>> time.strftime('%X') '21:35' Python 2.4.4c0 (#2, Oct 2 2006, 00:57:46) [GCC 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime('%X') '21:35:56' -- Seo Sanghyeon From sanxiyn at gmail.com Mon Oct 16 14:56:21 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 16 Oct 2006 21:56:21 +0900 Subject: [IronPython] KeyError Oddness In-Reply-To: <45263D36.4020707@resolversystems.com> References: <45263D36.4020707@resolversystems.com> Message-ID: <5b0248170610160556tf608bb6v7b1e3b0d270ac850@mail.gmail.com> 2006/10/6, Michael Foord : > There is a slightly strange difference between a KeyError on CPython and > a KeyError on IronPython. It certainly isn't blocking us, but will > result in unnecessarily odd messages being reported to our users. To the IronPython team: any idea on this? Is it better to create work items ourselves, or do you prefer to get it from the list, as we are currently doing? -- Seo Sanghyeon From dinov at exchange.microsoft.com Mon Oct 16 19:03:17 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 16 Oct 2006 10:03:17 -0700 Subject: [IronPython] KeyError Oddness In-Reply-To: <5b0248170610160556tf608bb6v7b1e3b0d270ac850@mail.gmail.com> References: <45263D36.4020707@resolversystems.com> <5b0248170610160556tf608bb6v7b1e3b0d270ac850@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227451390F8CF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for following up on this, looks like I might have missed the original somehow. We can remove the quotes to be more consistent. I've opened Codeplex bug #4428 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4428). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, October 16, 2006 5:56 AM To: Discussion of IronPython Subject: Re: [IronPython] KeyError Oddness 2006/10/6, Michael Foord : > There is a slightly strange difference between a KeyError on CPython > and a KeyError on IronPython. It certainly isn't blocking us, but will > result in unnecessarily odd messages being reported to our users. To the IronPython team: any idea on this? Is it better to create work items ourselves, or do you prefer to get it from the list, as we are currently doing? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Mon Oct 16 19:20:03 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 16 Oct 2006 10:20:03 -0700 Subject: [IronPython] S3, boto, and strftime with %X In-Reply-To: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> References: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227451390F8E6@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report. I've opened bug # 4429 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4429). Time/datetime have been a bit of a bug farm so there'll probably be a small amount of general cleanup here for 1.1. We fixed a couple of bugs there for 1.01, and I would have liked to have done more, but it would have just been too destabilizing. We'll try and get this one in 1.1 plus some other fixes for better compatibility. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, October 16, 2006 5:42 AM To: Discussion of IronPython Subject: [IronPython] S3, boto, and strftime with %X S3 is Amazon's Simple Storage Service. boto is a Python interface to Amazon Web Services, available here: http://code.google.com/p/boto/ boto has a bug. boto uses strftime with %X format string to generate Date header, but Python Library Reference doesn't guarantee any such thing for %X. It only says: %X Locale's appropriate time representation. Fix: replace %X with %H:%M:%S. On the other hand, IronPython behaves differently in this case, causing an incompatibility. Locale was POSIX. I think this should be fixed. IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import time >>> time.strftime('%X') '21:35' Python 2.4.4c0 (#2, Oct 2 2006, 00:57:46) [GCC 4.1.2 20060928 (prerelease) (Debian 4.1.1-15)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strftime('%X') '21:35:56' -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From xmlhacker at gmail.com Mon Oct 16 20:26:41 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Mon, 16 Oct 2006 12:26:41 -0600 Subject: [IronPython] hashlib for IronPython In-Reply-To: <5b0248170610160433j1b6c6989rb0f8d5e7877f21c4@mail.gmail.com> References: <5b0248170610110136h1e952378gf441bf442a012f06@mail.gmail.com> <1160571066.11898.148.camel@poupou.home> <5b0248170610110716ob9415b7sd12c9ae5680151a0@mail.gmail.com> <5b0248170610110752h28fec235o5e35a3c2a910add8@mail.gmail.com> <5b0248170610150229w7ad6377fie1266d93cd6aaafa@mail.gmail.com> <5b0248170610160433j1b6c6989rb0f8d5e7877f21c4@mail.gmail.com> Message-ID: YOU ROCK SEO! Thank you! :D On 10/16/06, Sanghyeon Seo wrote: > > 2006/10/15, M. David Peterson : > > > File C:\Python24\Lib\hmac.py, line 86, in digest > > > AttributeError: 'instance' object has no attribute 'copy' > > This problem and digest_size problem are now fixed in SVN. Download > the newest md5, sha, hashlib module from: > https://svn.sourceforge.net/svnroot/fepy/trunk/lib/ > > > To make it easier, I will set-up a temporary S3 account and send you the > > keys off-list. > > Received. > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsacksteder at gmail.com Mon Oct 16 22:36:36 2006 From: jsacksteder at gmail.com (jeff sacksteder) Date: Mon, 16 Oct 2006 16:36:36 -0400 Subject: [IronPython] Who understands ByRef? Message-ID: <51c8a7be0610161336y2751b0cdq53a551ecd68cdf8e@mail.gmail.com> Can anyone enlighten me? On 10/14/06, jeff sacksteder wrote: > > > > On 10/13/06, Martin Maly wrote: > > > > Int16 is a type: System.Int16 and I am calling its constructor, passing > > "output" as the value: System.Int16(output), just like in Python you > > can call: int(3.5), this is very similar, except constructing .NET > > System.Int16 type. > > > > An excellent description. However- > > "TypeError: no overloads of AIn could match (int, Range, Int16) > AIn(int, Range, Reference[Int16]) > AIn(int, Range, Reference[UInt16])" > > I think I should be using System.Type.MakeByRefType, but I'm not quite > getting it. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon Oct 16 22:59:24 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 16 Oct 2006 13:59:24 -0700 Subject: [IronPython] Who understands ByRef? In-Reply-To: <51c8a7be0610161336y2751b0cdq53a551ecd68cdf8e@mail.gmail.com> References: <51c8a7be0610161336y2751b0cdq53a551ecd68cdf8e@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C2227451390FA41@DF-GRTDANE-MSG.exchange.corp.microsoft.com> It's probably easier to use the Reference type from the clr module then using reflection to make a by-ref type. import clr import System ref = clr.Reference[System.Int16](3) someApi(ref) print ref.Value #value gets updated in the reference object This is the other way we support reference types in addition to the auto-coercion which isn't working for you due to the multiple overloads. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Monday, October 16, 2006 1:37 PM To: Discussion of IronPython Subject: [IronPython] Who understands ByRef? Can anyone enlighten me? On 10/14/06, jeff sacksteder > wrote: On 10/13/06, Martin Maly < Martin.Maly at microsoft.com> wrote: Int16 is a type: System.Int16 and I am calling its constructor, passing "output" as the value: System.Int16(output), just like in Python you can call: int(3.5), this is very similar, except constructing .NET System.Int16 type. An excellent description. However- "TypeError: no overloads of AIn could match (int, Range, Int16) AIn(int, Range, Reference[Int16]) AIn(int, Range, Reference[UInt16])" I think I should be using System.Type.MakeByRefType, but I'm not quite getting it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpardy at esri.com Wed Oct 18 23:04:45 2006 From: jpardy at esri.com (Jason Pardy) Date: Wed, 18 Oct 2006 14:04:45 -0700 Subject: [IronPython] Intefaces Message-ID: <1991EA1FD4698B469010E81AEA3AD3BE0CA47359@barbwire.esri.com> All, I have a case where my namespace contains many interfaces and classes. One of my classes contains a method that returns a pointer to an interface: >>> gp.Execute.__doc__ 'IGeoProcessorResult Execute(self, str Name, IVariantArray ipValues, ITrackCance l pTrackCancel)' >>> Anytime I do the following, my return object is unintialized: result = gp.Execute(tool, parameters, None) My question is how to I do this correctly? How would I get a result object that is initialized? Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Thu Oct 19 02:06:02 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 18 Oct 2006 17:06:02 -0700 Subject: [IronPython] Intefaces In-Reply-To: <1991EA1FD4698B469010E81AEA3AD3BE0CA47359@barbwire.esri.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47359@barbwire.esri.com> Message-ID: <7AD436E4270DD54A94238001769C2227453BE418E8@DF-GRTDANE-MSG.exchange.corp.microsoft.com> What do you mean by Uninitialized? Are you getting back None? What you should get back is an instance of the class that implements the interface. If the class is implementing the interface explicitly (so the method is actually declared w/o public in C# and w/ the interface name) then you'll need to call through the interface passing in the instance directly, eg: result = gp.Execute(...) IGeoProcessorResult.DoSomething(result, ...) From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jason Pardy Sent: Wednesday, October 18, 2006 2:05 PM To: users at lists.ironpython.com Subject: [IronPython] Intefaces All, I have a case where my namespace contains many interfaces and classes. One of my classes contains a method that returns a pointer to an interface: >>> gp.Execute.__doc__ 'IGeoProcessorResult Execute(self, str Name, IVariantArray ipValues, ITrackCance l pTrackCancel)' >>> Anytime I do the following, my return object is unintialized: result = gp.Execute(tool, parameters, None) My question is how to I do this correctly? How would I get a result object that is initialized? Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From garys at ihug.com.au Thu Oct 19 04:05:03 2006 From: garys at ihug.com.au (Gary Stephenson) Date: Thu, 19 Oct 2006 12:05:03 +1000 Subject: [IronPython] import this Message-ID: <001d01c6f323$04a401e0$0301010a@VIMES> At the risk of appearing flippant, I'd like to suggest that the following should be considered an error in need of correction. <0.5wink> IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import this Traceback (most recent call last): File , line 0, in ##9 File , line 0, in __import__##4 ImportError: No module named this >>> 'ly yrs gary "There are 10 types of people in this world - those that understand binary ... and I can't remember what the other nine are." - unknown. http://www.stephensong.com.au From jpardy at esri.com Thu Oct 19 04:22:15 2006 From: jpardy at esri.com (Jason Pardy) Date: Wed, 18 Oct 2006 19:22:15 -0700 Subject: [IronPython] Intefaces Message-ID: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> Thanks Dino. I got this to work where GetMessages is a method call. result = gp.Execute(..) IGeoProcessorResult.GetMessages(result, 0) However, when I try to retrieve the value from a read only property, I get an error. Is this supposed to work? IGeoProcessorResult.ReturnValue(result) Much thanks on this. Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Thu Oct 19 06:07:32 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 19 Oct 2006 13:07:32 +0900 Subject: [IronPython] Intefaces In-Reply-To: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> Message-ID: <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> 2006/10/19, Jason Pardy : > However, when I try to retrieve the value from a read only property, I get > an error. > > Is this supposed to work? > > IGeoProcessorResult.ReturnValue(result) Yes, but the correct syntax is: IGeoProcessorResult.ReturnValue.GetValue(result) IGeoProcessorResult.ReturnValue.SetValue(result, value) It kinda makes sense, if you think about it. All in all, calling explicitly implemented interfaces and getting/setting properties through interfaces, could be better documented. -- Seo Sanghyeon From dinov at exchange.microsoft.com Thu Oct 19 17:54:12 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 19 Oct 2006 08:54:12 -0700 Subject: [IronPython] Intefaces In-Reply-To: <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274593B20792@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Yes, we should add some info to one of our wiki pages on CodePlex or in the FAQ... I've opened a CodePlex work item (4538) so we won't forget about it. Long term we also want to expose these in a more natural way. Unfortunately we struggled with coming up with a rational way to deal w/ collisions and other corner cases and so we punted on this for v1.0 (and what C# exposes here isn't everything the CLR supports, making it even more fun to get the right answer!) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Wednesday, October 18, 2006 9:08 PM To: Discussion of IronPython Subject: Re: [IronPython] Intefaces 2006/10/19, Jason Pardy : > However, when I try to retrieve the value from a read only property, I > get an error. > > Is this supposed to work? > > IGeoProcessorResult.ReturnValue(result) Yes, but the correct syntax is: IGeoProcessorResult.ReturnValue.GetValue(result) IGeoProcessorResult.ReturnValue.SetValue(result, value) It kinda makes sense, if you think about it. All in all, calling explicitly implemented interfaces and getting/setting properties through interfaces, could be better documented. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Fri Oct 20 05:47:41 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 20 Oct 2006 12:47:41 +0900 Subject: [IronPython] CPython 2.4.4 Message-ID: <5b0248170610192047x573cbfa7ta6a32977732f6f48@mail.gmail.com> CPython 2.4.4 is now officially released. http://mail.python.org/pipermail/python-dev/2006-October/069472.html A number of places in IronPython documentation is referring to CPython 2.4.3. I think it makes sense to change all of them to 2.4.4 in the next release. I will update FePy accordingly, and the next release of FePy will include Python standard library from 2.4.4, instead of 2.4.3. Python standard library is shared between CPython and IronPython. Comparing 2.4.3 and 2.4.4, 105 files and 2280 lines were changed in the library, all mostly bugfixes. -- Seo Sanghyeon From sanxiyn at gmail.com Fri Oct 20 06:39:17 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 20 Oct 2006 13:39:17 +0900 Subject: [IronPython] import this In-Reply-To: <001d01c6f323$04a401e0$0301010a@VIMES> References: <001d01c6f323$04a401e0$0301010a@VIMES> Message-ID: <5b0248170610192139q18f57668o3222bb567e784ee7@mail.gmail.com> 2006/10/19, Gary Stephenson : > At the risk of appearing flippant, I'd like to suggest that the following > should be considered an error in need of correction. <0.5wink> "import this" is provided by Python standard library. If you have correct setup, "import this" works without problem. Please read FAQ.html for how to do that. -- Seo Sanghyeon From anthonybaxter at gmail.com Fri Oct 20 06:42:15 2006 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Fri, 20 Oct 2006 14:42:15 +1000 Subject: [IronPython] CPython 2.4.4 In-Reply-To: <5b0248170610192047x573cbfa7ta6a32977732f6f48@mail.gmail.com> References: <5b0248170610192047x573cbfa7ta6a32977732f6f48@mail.gmail.com> Message-ID: On 10/20/06, Sanghyeon Seo wrote: > Python standard library is shared between CPython and IronPython. > Comparing 2.4.3 and 2.4.4, 105 files and 2280 lines were changed in > the library, all mostly bugfixes. Um, "mostly" bugfixes? They should be _all_ bugfixes, that's part of how Python's release strategy works. Point releases (2.X.Y) don't have new features, unless it's absolutely necessary to fix a critical bug. This wasn't the case in 2.4.4 - there's nothing new. (Don't mention True/False in 2.2.1 - that wasn't my fault :) From sanxiyn at gmail.com Fri Oct 20 06:51:31 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 20 Oct 2006 13:51:31 +0900 Subject: [IronPython] CPython 2.4.4 In-Reply-To: References: <5b0248170610192047x573cbfa7ta6a32977732f6f48@mail.gmail.com> Message-ID: <5b0248170610192151x6bcddf35r950b52ed4ed6eaa7@mail.gmail.com> 2006/10/20, Anthony Baxter : > Um, "mostly" bugfixes? They should be _all_ bugfixes. Sorry. :( -- Seo Sanghyeon From sanxiyn at gmail.com Fri Oct 20 15:29:01 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 20 Oct 2006 22:29:01 +0900 Subject: [IronPython] Intefaces In-Reply-To: <7AD436E4270DD54A94238001769C22274593B20792@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B20792@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <5b0248170610200629x467d8ba6k8149c5ef07254389@mail.gmail.com> 2006/10/20, Dino Viehland : Long term we also want to expose these in a more natural way. Unfortunately we struggled with coming up with a rational way to deal w/ collisions and other corner cases and so we punted on this for v1.0 (and what C# exposes here isn't everything the CLR supports, making it even more fun to get the right answer!) How about this? Currently: IFooBar.Foo(object, arg) IFooBar.Bar.GetValue(object) IFooBar.Bar.SetValue(object, value) To: wrapper = IFooBar(object) wrapper.Foo(arg) wrapper.Bar wrapper.Bar = value -- Seo Sanghyeon From Mahesh.Prakriya at microsoft.com Fri Oct 20 00:30:36 2006 From: Mahesh.Prakriya at microsoft.com (Mahesh Prakriya) Date: Thu, 19 Oct 2006 15:30:36 -0700 Subject: [IronPython] Upcoming IronPython Talks Message-ID: <8DD6D7B47848B24F972C23F274C6E56848E75901@NA-EXMSG-C112.redmond.corp.microsoft.com> I just posted a list of our upcoming talks at http://blogs.msdn.com/ironpython I think some of you will find it interesting. In general, I'll post our upcoming presentations, webcasts, etc. there. Thanks, Mahesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Oct 20 19:58:58 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 20 Oct 2006 10:58:58 -0700 Subject: [IronPython] Intefaces In-Reply-To: <5b0248170610200629x467d8ba6k8149c5ef07254389@mail.gmail.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B20792@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170610200629x467d8ba6k8149c5ef07254389@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274593B20C6A@DF-GRTDANE-MSG.exchange.corp.microsoft.com> That's a very interesting idea. We might want to still combine that w/ exposing names when there are no collisions, but making interfaces return an interface proxy would provide an easy way when that breaks down. I've added this idea to the bug we have for this (1506, http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=1506). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Friday, October 20, 2006 6:29 AM To: Discussion of IronPython Subject: Re: [IronPython] Intefaces 2006/10/20, Dino Viehland : Long term we also want to expose these in a more natural way. Unfortunately we struggled with coming up with a rational way to deal w/ collisions and other corner cases and so we punted on this for v1.0 (and what C# exposes here isn't everything the CLR supports, making it even more fun to get the right answer!) How about this? Currently: IFooBar.Foo(object, arg) IFooBar.Bar.GetValue(object) IFooBar.Bar.SetValue(object, value) To: wrapper = IFooBar(object) wrapper.Foo(arg) wrapper.Bar wrapper.Bar = value -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Sat Oct 21 08:54:52 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 21 Oct 2006 15:54:52 +0900 Subject: [IronPython] Intefaces In-Reply-To: <7AD436E4270DD54A94238001769C22274593B20C6A@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1991EA1FD4698B469010E81AEA3AD3BE0CA47649@barbwire.esri.com> <5b0248170610182107p17b49a5eie24e33df7de47d8c@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B20792@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170610200629x467d8ba6k8149c5ef07254389@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B20C6A@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <5b0248170610202354i4a531fb1l634deb42859db256@mail.gmail.com> 2006/10/21, Dino Viehland : ... We might want to still combine that w/ exposing names when there are no collisions, but making interfaces return an interface proxy would provide an easy way when that breaks down. I don't think "exposing names when there are no collisions" is a good idea. These names logically belong to the separate namespace. As the Zen of Python said: In the face of ambiguity, refuse the temptation to guess. Namespaces are one honking great idea -- let's do more of those! -- Seo Sanghyeon From sanxiyn at gmail.com Sat Oct 21 08:58:52 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 21 Oct 2006 15:58:52 +0900 Subject: [IronPython] clr.GetString, clr.GetBytes Message-ID: <5b0248170610202358ned03862s5f5dcbd67b242396@mail.gmail.com> This is a feature request. Of course it doesn't belong to 1.0.x branch, but I hope it can be on 1.1. I want to have clr.GetString and clr.GetBytes exposed, which do the obvious thing. -- Seo Sanghyeon From sanxiyn at gmail.com Sat Oct 21 09:24:32 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 21 Oct 2006 16:24:32 +0900 Subject: [IronPython] IronPython in Czech Message-ID: <5b0248170610210024g3901a867s205b18762e087dfa@mail.gmail.com> I routinely do web/blog/newsgroup/list search for the word "IronPython". In this modern world of search engines, you don't need to be Kibo, the He Who Greps, to kiboze the world. :-) Today I encountered this: http://www.py.cz/pipermail/python/2006-September/004627.html http://www.py.cz/pipermail/python/2006-September/004666.html Hello, Roman Miklos! I know you are on the list, because you posted getpass module a few days ago. I think you may want to have a look at this: https://svn.sourceforge.net/svnroot/fepy/trunk/dbapi/ -- Seo Sanghyeon From sanxiyn at gmail.com Sat Oct 21 12:23:01 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 21 Oct 2006 19:23:01 +0900 Subject: [IronPython] Weird bug Message-ID: <5b0248170610210323o781f70a3i2a43caecbe975703@mail.gmail.com> This is downright weird: # bug.py items = globals().items() TypeError: Uninitialized object is not callable The bug happens only if you run from the file. Console is okay. I found this while trying to run test_sax.py in the Python test suite. -- Seo Sanghyeon From sanxiyn at gmail.com Sat Oct 21 14:27:55 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sat, 21 Oct 2006 21:27:55 +0900 Subject: [IronPython] S3, boto, and strftime with %X In-Reply-To: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> References: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> Message-ID: <5b0248170610210527m342bdc6cpf7110118fb82b54f@mail.gmail.com> 2006/10/16, Sanghyeon Seo : > boto is a Python interface to Amazon Web Services, available here: > http://code.google.com/p/boto/ > > boto has a bug. boto uses strftime with %X format string to generate > Date header, but Python Library Reference doesn't guarantee any such > thing for %X. boto 0.4b is now released with the fix for this bug. Thanks to Mitch Garnaat for the quick reaction! http://boto.googlecode.com/svn/trunk/dist/ -- Seo Sanghyeon From xmlhacker at gmail.com Sat Oct 21 19:48:29 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sat, 21 Oct 2006 11:48:29 -0600 Subject: [IronPython] S3, boto, and strftime with %X In-Reply-To: <5b0248170610210527m342bdc6cpf7110118fb82b54f@mail.gmail.com> References: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> <5b0248170610210527m342bdc6cpf7110118fb82b54f@mail.gmail.com> Message-ID: Hi Seo, Yeah, Mitch posted an updated fix within an hour or two after I updated him with your response in the AmazonAWS forums. Definitely a quick reaction! :) I've been out for most of the week, and haven't had much of a chance to come back to this, but I did run into an issue with the usage of the expat xml.sax parser (unknown 'intern' keyword. I can provide extended error information if necessary) when attempting to parse the response XML from AWS. Is this something you encountered and were able to work around (via your pyexpat module possibly?) On 10/21/06, Sanghyeon Seo wrote: > > 2006/10/16, Sanghyeon Seo : > > boto is a Python interface to Amazon Web Services, available here: > > http://code.google.com/p/boto/ > > > > boto has a bug. boto uses strftime with %X format string to generate > > Date header, but Python Library Reference doesn't guarantee any such > > thing for %X. > > boto 0.4b is now released with the fix for this bug. Thanks to Mitch > Garnaat for the quick reaction! > > http://boto.googlecode.com/svn/trunk/dist/ > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Sat Oct 21 21:31:13 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sat, 21 Oct 2006 12:31:13 -0700 Subject: [IronPython] IronPython in Czech In-Reply-To: <5b0248170610210024g3901a867s205b18762e087dfa@mail.gmail.com> References: <5b0248170610210024g3901a867s205b18762e087dfa@mail.gmail.com> Message-ID: A small correction, the language used in the posts is actually Slovak (http://en.wikipedia.org/wiki/Slovak_language). The two languages (Czech and Slovak) are actually very close in the Slavic family of languages, but they are still distinct languages. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Saturday, October 21, 2006 12:25 AM To: Discussion of IronPython Subject: [IronPython] IronPython in Czech I routinely do web/blog/newsgroup/list search for the word "IronPython". In this modern world of search engines, you don't need to be Kibo, the He Who Greps, to kiboze the world. :-) Today I encountered this: http://www.py.cz/pipermail/python/2006-September/004627.html http://www.py.cz/pipermail/python/2006-September/004666.html Hello, Roman Miklos! I know you are on the list, because you posted getpass module a few days ago. I think you may want to have a look at this: https://svn.sourceforge.net/svnroot/fepy/trunk/dbapi/ -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Sun Oct 22 02:42:42 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 22 Oct 2006 09:42:42 +0900 Subject: [IronPython] S3, boto, and strftime with %X In-Reply-To: References: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> <5b0248170610210527m342bdc6cpf7110118fb82b54f@mail.gmail.com> Message-ID: <5b0248170610211742r58257014m282f2a88481c48e7@mail.gmail.com> 2006/10/22, M. David Peterson : > I've been out for most of the week, and haven't had much of a chance to come > back to this, but I did run into an issue with the usage of the expat > xml.sax parser (unknown 'intern' keyword. I can provide extended error > information if necessary) when attempting to parse the response XML from > AWS. > > Is this something you encountered and were able to work around (via your > pyexpat module possibly?) I am working on it. Commit: http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=224 -- Seo Sanghyeon From xmlhacker at gmail.com Sun Oct 22 03:18:49 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sat, 21 Oct 2006 19:18:49 -0600 Subject: [IronPython] S3, boto, and strftime with %X In-Reply-To: <5b0248170610211742r58257014m282f2a88481c48e7@mail.gmail.com> References: <5b0248170610160541v7d9ab13cy2e29e26b62b767df@mail.gmail.com> <5b0248170610210527m342bdc6cpf7110118fb82b54f@mail.gmail.com> <5b0248170610211742r58257014m282f2a88481c48e7@mail.gmail.com> Message-ID: Oh, sweet! Please let me know if I can be of any help... NOTE: I had just realized that the problem I incurred was taking place via SQS (though the same would have been true for parsing the response XML from an S3 operation) -- Not sure why it didn't occur to me to enable SQS on the testing account I set-up for this, but I've now changed that. The same access keys will work, and if you would like to play with the usage of an x509 certificate for signing requests, let me know and I will get that taken care of. For quick access, SQS entry page: http://www.amazon.com/gp/browse.html?node=13584001 SQS code samples and technical documentation: http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=8 Thanks Seo! As with everything you do, there are TONS of people who have and who will be benefiting from your efforts, and this effort in particular is something that will enable some pretty amazing things, so for what its worth, again: Thank you! :) On 10/21/06, Sanghyeon Seo wrote: > > 2006/10/22, M. David Peterson : > > I've been out for most of the week, and haven't had much of a chance to > come > > back to this, but I did run into an issue with the usage of the expat > > xml.sax parser (unknown 'intern' keyword. I can provide extended error > > information if necessary) when attempting to parse the response XML from > > AWS. > > > > Is this something you encountered and were able to work around (via your > > pyexpat module possibly?) > > I am working on it. Commit: > http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=224 > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RMiklos at pss.sk Mon Oct 23 09:21:31 2006 From: RMiklos at pss.sk (Roman Miklos) Date: Mon, 23 Oct 2006 09:21:31 +0200 Subject: [IronPython] IronPython in Czech In-Reply-To: <5b0248170610210024g3901a867s205b18762e087dfa@mail.gmail.com> Message-ID: Hello Seo, Yes I have on py.cz 2 posts about using ADO.NET: 1) Using Reader object to retrieve data 2) Using DataSet and DataAdapter to retrieve data Should I post it here? "Sanghyeon Seo" Sent by: users-bounces at lists.ironpython.com 21.10.2006 09:24 Please respond to Discussion of IronPython To "Discussion of IronPython" cc Subject [IronPython] IronPython in Czech I routinely do web/blog/newsgroup/list search for the word "IronPython". In this modern world of search engines, you don't need to be Kibo, the He Who Greps, to kiboze the world. :-) Today I encountered this: http://www.py.cz/pipermail/python/2006-September/004627.html http://www.py.cz/pipermail/python/2006-September/004666.html Hello, Roman Miklos! I know you are on the list, because you posted getpass module a few days ago. I think you may want to have a look at this: https://svn.sourceforge.net/svnroot/fepy/trunk/dbapi/ -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com Mgr. Ing. Roman MIKL?? Prv? stavebn? sporite??a a.s. Bajkalsk? 30, P. O. Box 48 829 48 Bratislava 25 Tel.: +421/ 2 / 582 31 174 Fax: +421/ 2 / 582 31 109 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ngerner at microsoft.com Mon Oct 23 18:33:02 2006 From: ngerner at microsoft.com (Nick Gerner) Date: Mon, 23 Oct 2006 09:33:02 -0700 Subject: [IronPython] GetTypeFromProgID and Remoting issue Message-ID: I run into a problem similar to "Remoting is broken for well-known objects" work item id 470. But I'm using the following pattern (to access a DCOM object): >>>t = System.Type.GetTypeFromProgID("Namespace.MyRemoteType", "MyRemoteMachineName") >>>obj = System.Activator.CreateInstance(t) I tried the typedproxy helper class workaround for the above workitem issue (when using Activator.GetObject), but it doesn't solve this problem. I get the following error when using the typedproxy workaround: >>>Obj.MyMethod() IronPython.Runtime.Exceptions.ArgumentTypeException: descriptor 'MyMethod' requires a 'MyRemoteType' object but received a 'MarshalByRefObject' I know this works from c# (without the typed proxy workaround, of course). Is there an alternate workaround? I know this question is out of scope here, but, is there an alternate way to access DCOM objects (without doing a .NET publish in a process on the remote machine? Nick Gerner From kfarmer at thuban.org Mon Oct 23 23:11:32 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 23 Oct 2006 14:11:32 -0700 Subject: [IronPython] IronPython in Czech Message-ID: As I recall, at least for a time there were weekly listings of Python hits sent out to comp.lang.python. But that was some time ago for me. Something more IronPython-specific could be done... ________________________________ From: users-bounces at lists.ironpython.com on behalf of Sanghyeon Seo Sent: Sat 10/21/2006 12:24 AM To: Discussion of IronPython Subject: [IronPython] IronPython in Czech I routinely do web/blog/newsgroup/list search for the word "IronPython". In this modern world of search engines, you don't need to be Kibo, the He Who Greps, to kiboze the world. :-) Today I encountered this: http://www.py.cz/pipermail/python/2006-September/004627.html http://www.py.cz/pipermail/python/2006-September/004666.html Hello, Roman Miklos! I know you are on the list, because you posted getpass module a few days ago. I think you may want to have a look at this: https://svn.sourceforge.net/svnroot/fepy/trunk/dbapi/ -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Tue Oct 24 00:47:53 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 23 Oct 2006 15:47:53 -0700 Subject: [IronPython] clr.GetString, clr.GetBytes In-Reply-To: <5b0248170610202358ned03862s5f5dcbd67b242396@mail.gmail.com> References: <5b0248170610202358ned03862s5f5dcbd67b242396@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274593B2128B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I'm not sure I know what the obvious thing here is... is GetString the same as calling ToString (after importing clr or a .NET namespace)? Or are these helper methods to go from string -> byte array and back again (presumably w/ some encoding as a parameter?). If that's the case I'm not sure how this differs from System.Text.Encoding.GetString / GetBytes. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Friday, October 20, 2006 11:59 PM To: Discussion of IronPython Subject: [IronPython] clr.GetString, clr.GetBytes This is a feature request. Of course it doesn't belong to 1.0.x branch, but I hope it can be on 1.1. I want to have clr.GetString and clr.GetBytes exposed, which do the obvious thing. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Tue Oct 24 01:54:14 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 23 Oct 2006 16:54:14 -0700 Subject: [IronPython] GetTypeFromProgID and Remoting issue In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C22274593B212F0@DF-GRTDANE-MSG.exchange.corp.microsoft.com> This one will require a bit of investigation... Can you give the exception you get whe you just do obj.MyMethod() after the CreateInstance call (w/o the wrapping into the typedproxy)? If you could get this when running w/ the -X:ExceptionDetails command line switch that'd be very helpful. It almost sounds like what you're getting back isn't a typical proxy, but I'm not sure how it differs. Ultimately I'll probably need to setup a simple DCOM object to test it to fully understand what's going on here, but the stack trace might be useful. Also, have you tried calling through an interface instead of the type? Sometimes interfaces are little more manageable w/ remoting. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Nick Gerner Sent: Monday, October 23, 2006 9:33 AM To: users at lists.ironpython.com Subject: [IronPython] GetTypeFromProgID and Remoting issue I run into a problem similar to "Remoting is broken for well-known objects" work item id 470. But I'm using the following pattern (to access a DCOM object): >>>t = System.Type.GetTypeFromProgID("Namespace.MyRemoteType", "MyRemoteMachineName") >>>obj = System.Activator.CreateInstance(t) I tried the typedproxy helper class workaround for the above workitem issue (when using Activator.GetObject), but it doesn't solve this problem. I get the following error when using the typedproxy workaround: >>>Obj.MyMethod() IronPython.Runtime.Exceptions.ArgumentTypeException: descriptor 'MyMethod' requires a 'MyRemoteType' object but received a 'MarshalByRefObject' I know this works from c# (without the typed proxy workaround, of course). Is there an alternate workaround? I know this question is out of scope here, but, is there an alternate way to access DCOM objects (without doing a .NET publish in a process on the remote machine? Nick Gerner _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue Oct 24 02:24:15 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 24 Oct 2006 09:24:15 +0900 Subject: [IronPython] clr.GetString, clr.GetBytes In-Reply-To: <7AD436E4270DD54A94238001769C22274593B2128B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <5b0248170610202358ned03862s5f5dcbd67b242396@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B2128B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <5b0248170610231724y4ba4ed3cpfa1317e1a4d6a7a3@mail.gmail.com> 2006/10/24, Dino Viehland : > Or are these helper methods to go from string -> byte array and back again Yes. > (presumably w/ some encoding as a parameter?). No. > If that's the case I'm not sure how this differs from System.Text.Encoding.GetString / GetBytes. It doesn't. But which encoding? ASCII is not appropriate, since it doesn't convert some byte arrays. Let's say this way. clr.GetString would be equivalent to StringOps.FromByteArray already in IronPython. clr.GetBytes would be its reverse. -- Seo Sanghyeon From sanxiyn at gmail.com Tue Oct 24 05:22:26 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 24 Oct 2006 12:22:26 +0900 Subject: [IronPython] Someone using Mac OS X Message-ID: <5b0248170610232022v12f6162dsf5aa69629735f77f@mail.gmail.com> Someone using Mac OS X could comment on this? http://alienghic.livejournal.com/359786.html -- Seo Sanghyeon From xmlhacker at gmail.com Tue Oct 24 08:14:42 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Tue, 24 Oct 2006 00:14:42 -0600 Subject: [IronPython] Someone using Mac OS X In-Reply-To: <5b0248170610232022v12f6162dsf5aa69629735f77f@mail.gmail.com> References: <5b0248170610232022v12f6162dsf5aa69629735f77f@mail.gmail.com> Message-ID: I've run into this on my Mac -- This was a while back, around the time there were various issues being resolved between the Unix and Windows command line, so assumed it was something that would work its way through the system from the Linux side of the testing world. Guess not. I'll crack open my iBook and build the latest IPCE and report back what I assume is probably a given... On 10/23/06, Sanghyeon Seo wrote: > > Someone using Mac OS X could comment on this? > http://alienghic.livejournal.com/359786.html > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Tue Oct 24 11:01:28 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Tue, 24 Oct 2006 03:01:28 -0600 Subject: [IronPython] Someone using Mac OS X In-Reply-To: References: <5b0248170610232022v12f6162dsf5aa69629735f77f@mail.gmail.com> Message-ID: Yep, most definitely doesn't work. I'm happy to rebuild and test as necessary. Let me know if I can be of any help. On 10/24/06, M. David Peterson wrote: > > I've run into this on my Mac -- This was a while back, around the time > there were various issues being resolved between the Unix and Windows > command line, so assumed it was something that would work its way through > the system from the Linux side of the testing world. > > Guess not. > > I'll crack open my iBook and build the latest IPCE and report back what I > assume is probably a given... > > On 10/23/06, Sanghyeon Seo wrote: > > > > Someone using Mac OS X could comment on this? > > http://alienghic.livejournal.com/359786.html > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > 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 -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Oct 24 19:51:31 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 24 Oct 2006 10:51:31 -0700 Subject: [IronPython] Weird bug In-Reply-To: <5b0248170610210323o781f70a3i2a43caecbe975703@mail.gmail.com> References: <5b0248170610210323o781f70a3i2a43caecbe975703@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222745A3241B67@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Great find! I've opened CodePlex bug 4716. (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4716). The problem goes away if you change the name from items = .... So I suspect this is a conflict between the name binder & our built-in cache, but I need to investigate it more to be sure. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Saturday, October 21, 2006 3:23 AM To: Discussion of IronPython Subject: [IronPython] Weird bug This is downright weird: # bug.py items = globals().items() TypeError: Uninitialized object is not callable The bug happens only if you run from the file. Console is okay. I found this while trying to run test_sax.py in the Python test suite. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Wed Oct 25 03:40:06 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 25 Oct 2006 10:40:06 +0900 Subject: [IronPython] Another import strangeness Message-ID: <5b0248170610241840t2d56ece4nf342b019587e8b6c@mail.gmail.com> Import bugs seem to be especially difficult to reduce the testcase, since it's often unclear what the hell is going on. Reduced from some large bunch o' code: $ ipy test.py False $ python test.py True File contents follow: # test.py import a print hasattr(a, 'c') # a/__init__.py import b # a/b.py import c # a/c.py #empty -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 25 04:02:15 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 25 Oct 2006 11:02:15 +0900 Subject: [IronPython] pyexpat for IronPython and xml.dom Message-ID: <5b0248170610241902w5af15ad4v5d46fa06792325e2@mail.gmail.com> I have made some changes to my pyexpat module for IronPython, and it can run some simple xml.dom codes now. https://svn.sourceforge.net/svnroot/fepy/trunk/lib/pyexpat.py Test cases were written too. It exercises DOM Level 1 constructs (tagName, getAttribute, childNodes, data) and DOM Level 2 namespace supports (prefix, localName, namespaceURI). https://svn.sourceforge.net/svnroot/fepy/trunk/example/dom_test.py Following DOM interfaces currently don't work: DocumentType, Comment, CDATASection, ProcessingInstruction. Undoubtedly there are more. To make pyexpat.py work with xml.dom.minidom, I had to implement ordered_attributes and namespace_prefixes parsing options. ordered_attributes let pyexpat return attributes in list instead of dict to preserve the ordering. namespace_prefixes let pyexpat return namespace prefixes, in addition to URI. In theory, namespace prefixes are meaningless, but in reality, several specifications, including XPath and C14N, need this information. -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 25 06:24:39 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 25 Oct 2006 13:24:39 +0900 Subject: [IronPython] DOM binding for .NET? Message-ID: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> Where can I read about W3C Document Object Model Binding for .NET? http://www.w3.org/DOM/ W3C only defines bindings for Java and ECMAScript. Python binding is defined in the Python Library Reference, and linked here: http://www.w3.org/DOM/Bindings But I can't find anything about .NET there. Especially, I want something akin to "Conformance" section of the Python Library Reference. http://docs.python.org/lib/dom-conformance.html This would help me to develop a Python DOM implementaion backed by .NET Base Class Library, not pure-Python minidom, that can be registered to xml.dom. -- Seo Sanghyeon From sanxiyn at gmail.com Wed Oct 25 06:35:57 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 25 Oct 2006 13:35:57 +0900 Subject: [IronPython] DOM binding for .NET? In-Reply-To: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> Message-ID: <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> 2006/10/25, Sanghyeon Seo : > Where can I read about W3C Document Object Model Binding for .NET? > > http://www.w3.org/DOM/ > > W3C only defines bindings for Java and ECMAScript. W3C also defines the interface in OMG IDL, but I can't find anything about .NET on OMG website, while I can download Python Language Mapping Specification there. http://www.omg.org/technology/documents/idl2x_spec_catalog.htm -- Seo Sanghyeon From xmlhacker at gmail.com Wed Oct 25 08:31:02 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 25 Oct 2006 00:31:02 -0600 Subject: [IronPython] DOM binding for .NET? In-Reply-To: <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> Message-ID: Hi Seo, System.Xml is compliant with both DOM Level 1 and Level 2. You can find the the SDK documentation @ http://msdn2.microsoft.com/en-us/library/system.xml.aspx In addition, as per the intro into the above linked page, The *System.Xml* namespace provides standards-based support for processing XML. The supported standards include: - XML 1.0 - http://www.w3.org/TR/1998/REC-xml-19980210 - including DTD support. - XML Namespaces - http://www.w3.org/TR/REC-xml-names/ - both stream level and DOM. - XSD Schemas - http://www.w3.org/2001/XMLSchema - XPath expressions - http://www.w3.org/TR/xpath - XSLT transformations - http://www.w3.org/TR/xslt - DOM Level 1 Core - http://www.w3.org/TR/REC-DOM-Level-1/ - DOM Level 2 Core - http://www.w3.org/TR/DOM-Level-2/ In addition, there is a good presentation series located @ http://msdn.microsoft.com/library/default.asp?url=/seminar/mmcfeed/mmcdisplayfeed.asp?lang=en&product=103337&audience=100402that covers all of the XML-related technlogies for .NET. While the presentations are somewhat old, the content is still relevant. In regards to the conformance reference, I will need to dig around, but I know Joshua Allen has posted a lot of content in the past to places like the XML-Dev mailing list that discuss at least some of the conformance related questions. Let me dig around a bit and follow-up with a couple of links. In addition to this, the entire org.w3.dom Java bindings are available as part of IKVM.NET in the IKVM.GNU.Classpath.dll, and as such, you can utilize these as well inside of any .NET accessible language. To implement this is C#, use the same syntax for classpath~namepath that you would in java, replacing (obviously) import with using. Hope this helps! On 10/24/06, Sanghyeon Seo wrote: > > 2006/10/25, Sanghyeon Seo : > > Where can I read about W3C Document Object Model Binding for .NET? > > > > http://www.w3.org/DOM/ > > > > W3C only defines bindings for Java and ECMAScript. > > W3C also defines the interface in OMG IDL, but I can't find anything > about .NET on OMG website, while I can download Python Language > Mapping Specification there. > > http://www.omg.org/technology/documents/idl2x_spec_catalog.htm > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Wed Oct 25 08:44:11 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 25 Oct 2006 00:44:11 -0600 Subject: [IronPython] DOM binding for .NET? In-Reply-To: References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> Message-ID: Here's one of the posts from Joshua Allen I was referring to, http://lists.xml.org/archives/xml-dev/200106/msg00552.html On 10/25/06, M. David Peterson wrote: > > Hi Seo, > > System.Xml is compliant with both DOM Level 1 and Level 2. You can find > the the SDK documentation @ http://msdn2.microsoft.com/en-us/library/system.xml.aspx > > > In addition, as per the intro into the above linked page, > > The *System.Xml* namespace provides standards-based support for processing > XML. > > The supported standards include: > > - > > XML 1.0 - http://www.w3.org/TR/1998/REC-xml-19980210 - including DTD > support. > - > > XML Namespaces - http://www.w3.org/TR/REC-xml-names/ - both stream > level and DOM. > - > > XSD Schemas - http://www.w3.org/2001/XMLSchema > - > > XPath expressions - http://www.w3.org/TR/xpath > - > > XSLT transformations - http://www.w3.org/TR/xslt > - > > DOM Level 1 Core - http://www.w3.org/TR/REC-DOM-Level-1/ > - > > DOM Level 2 Core - http://www.w3.org/TR/DOM-Level-2/ > > > In addition, there is a good presentation series located @ http://msdn.microsoft.com/library/default.asp?url=/seminar/mmcfeed/mmcdisplayfeed.asp?lang=en&product=103337&audience=100402 > that covers all of the XML-related technlogies for .NET. While the > presentations are somewhat old, the content is still relevant. > > In regards to the conformance reference, I will need to dig around, but I > know Joshua Allen has posted a lot of content in the past to places like the > XML-Dev mailing list that discuss at least some of the conformance related > questions. Let me dig around a bit and follow-up with a couple of links. > > In addition to this, the entire org.w3.dom Java bindings are available as > part of IKVM.NET in the IKVM.GNU.Classpath.dll, and as such, you can > utilize these as well inside of any .NET accessible language. To implement > this is C#, use the same syntax for classpath~namepath that you would in > java, replacing (obviously) import with using. > > Hope this helps! > > > On 10/24/06, Sanghyeon Seo wrote: > > > > 2006/10/25, Sanghyeon Seo : > > > Where can I read about W3C Document Object Model Binding for .NET? > > > > > > http://www.w3.org/DOM/ > > > > > > W3C only defines bindings for Java and ECMAScript. > > > > W3C also defines the interface in OMG IDL, but I can't find anything > > about .NET on OMG website, while I can download Python Language > > Mapping Specification there. > > > > http://www.omg.org/technology/documents/idl2x_spec_catalog.htm > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > 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 -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Wed Oct 25 09:11:21 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 25 Oct 2006 01:11:21 -0600 Subject: [IronPython] DOM binding for .NET? In-Reply-To: References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> Message-ID: This is a nice overview in regards to some of the key advantages in System.Xml for .NET 2.0. It provides a deeper understanding the of the design goals, with code samples that showcase how to take advantage of them. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxml/html/sysxmlVS05.asp On 10/25/06, M. David Peterson wrote: > > Here's one of the posts from Joshua Allen I was referring to, > > http://lists.xml.org/archives/xml-dev/200106/msg00552.html > > On 10/25/06, M. David Peterson wrote: > > > > Hi Seo, > > > > System.Xml is compliant with both DOM Level 1 and Level 2. You can find > > the the SDK documentation @ http://msdn2.microsoft.com/en-us/library/system.xml.aspx > > > > > > In addition, as per the intro into the above linked page, > > > > The *System.Xml* namespace provides standards-based support for > > processing XML. > > > > The supported standards include: > > > > - > > > > XML 1.0 - http://www.w3.org/TR/1998/REC-xml-19980210 - including > > DTD support. > > - > > > > XML Namespaces - http://www.w3.org/TR/REC-xml-names/ - both stream > > level and DOM. > > - > > > > XSD Schemas - http://www.w3.org/2001/XMLSchema > > - > > > > XPath expressions - http://www.w3.org/TR/xpath > > - > > > > XSLT transformations - http://www.w3.org/TR/xslt > > - > > > > DOM Level 1 Core - http://www.w3.org/TR/REC-DOM-Level-1/ > > - > > > > DOM Level 2 Core - http://www.w3.org/TR/DOM-Level-2/ > > > > > > In addition, there is a good presentation series located @ http://msdn.microsoft.com/library/default.asp?url=/seminar/mmcfeed/mmcdisplayfeed.asp?lang=en&product=103337&audience=100402 > > that covers all of the XML-related technlogies for .NET. While the > > presentations are somewhat old, the content is still relevant. > > > > In regards to the conformance reference, I will need to dig around, but > > I know Joshua Allen has posted a lot of content in the past to places like > > the XML-Dev mailing list that discuss at least some of the conformance > > related questions. Let me dig around a bit and follow-up with a couple of > > links. > > > > In addition to this, the entire org.w3.dom Java bindings are available > > as part of IKVM.NET in the IKVM.GNU.Classpath.dll , and as such, you can > > utilize these as well inside of any .NET accessible language. To implement > > this is C#, use the same syntax for classpath~namepath that you would in > > java, replacing (obviously) import with using. > > > > Hope this helps! > > > > > > On 10/24/06, Sanghyeon Seo wrote: > > > > > > 2006/10/25, Sanghyeon Seo : > > > > Where can I read about W3C Document Object Model Binding for .NET? > > > > > > > > http://www.w3.org/DOM/ > > > > > > > > W3C only defines bindings for Java and ECMAScript. > > > > > > W3C also defines the interface in OMG IDL, but I can't find anything > > > about .NET on OMG website, while I can download Python Language > > > Mapping Specification there. > > > > > > http://www.omg.org/technology/documents/idl2x_spec_catalog.htm > > > > > > -- > > > Seo Sanghyeon > > > _______________________________________________ > > > 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 > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Wed Oct 25 10:54:19 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 25 Oct 2006 17:54:19 +0900 Subject: [IronPython] Patches summary updated Message-ID: <5b0248170610250154s1839a20bk305c0b8d4d1c5e02@mail.gmail.com> I updated patches summary on the SourceForge site to reflect the current reality. http://fepy.sourceforge.net/patches.html 1. Issues fixed in IronPython 1.0.1 were splitted to the separate page. 2. Remaining patches were moved to new 1.0.1 directory, and diff headers were changed. 3. The page also lists patches to Python Standard Library now. There are 2 new patches to Python Standard Library. These patches are not suitable for submission to CPython, as they are just workarounds. -- Seo Sanghyeon From fredrik at pythonware.com Mon Oct 23 08:43:40 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon, 23 Oct 2006 08:43:40 +0200 Subject: [IronPython] register module with an IronPython engine Message-ID: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> how do I register a module with an IronPython engine, so that code that runs in that engine can do "import mymodule" and get a reference to the module I just added? In CPython, I can simply call Py_InitModule and pass in the module name and a pointer to an array of PyMethodDef structs. Surely there's a corresponding mechanism in IronPython? (preferrably taking a name and an object, or some- thing. And yes, engine.Globals.Add almost does what I want, but not quite.) cheers /F From diane at ghic.org Tue Oct 24 07:44:25 2006 From: diane at ghic.org (Diane Trout) Date: Mon, 23 Oct 2006 22:44:25 -0700 Subject: [IronPython] Possible IronPython and FePy Issues Message-ID: <9FF5BA14-FE46-4123-9668-4D5FA95D5843@ghic.org> Hi, I'm trying to run IronPython under Mono on OS X and found a couple of issues. This code fragment fails when it shouldn't: d = dict() d[None] = "bleem" del d[None] With CPython, the key None is deleted on IronPython I get this exception: Traceback (most recent call last): TypeError: index must be integer or slice Also another minor issue is that OS X's Terminal.app sends DEL instead of BS, so I needed to add if (key.KeyChar == '\x7f') goto case ConsoleKey.Backspace; // DEL to the default case in SuperConsole.ReadLine Diane -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: From dinov at exchange.microsoft.com Wed Oct 25 20:43:53 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 25 Oct 2006 11:43:53 -0700 Subject: [IronPython] register module with an IronPython engine In-Reply-To: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> References: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> You can apply the PythonModule to your assembly specifying the type that corresponds with the module type. In 1.0.1 our site.py will load any DLLs in the "DLLs" directory and the module will be available for you to import. The type that PythonModule references should be a static type (no instance members). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fredrik Lundh Sent: Sunday, October 22, 2006 11:44 PM To: users at lists.ironpython.com Subject: [IronPython] register module with an IronPython engine how do I register a module with an IronPython engine, so that code that runs in that engine can do "import mymodule" and get a reference to the module I just added? In CPython, I can simply call Py_InitModule and pass in the module name and a pointer to an array of PyMethodDef structs. Surely there's a corresponding mechanism in IronPython? (preferrably taking a name and an object, or some- thing. And yes, engine.Globals.Add almost does what I want, but not quite.) cheers /F _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Wed Oct 25 22:33:04 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 25 Oct 2006 13:33:04 -0700 Subject: [IronPython] Possible IronPython and FePy Issues In-Reply-To: <9FF5BA14-FE46-4123-9668-4D5FA95D5843@ghic.org> References: <9FF5BA14-FE46-4123-9668-4D5FA95D5843@ghic.org> Message-ID: <7AD436E4270DD54A94238001769C222745BF931846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug reports. I've opened a bug for the dictionary deletion issue (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4769). I'm a little worried about treating DEL the same as backspace - what happens when an actual DEL character comes in? This one has come up before too, but I don't think we yet have a bug on it. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Diane Trout Sent: Monday, October 23, 2006 10:44 PM To: users at lists.ironpython.com Subject: [IronPython] Possible IronPython and FePy Issues Hi, I'm trying to run IronPython under Mono on OS X and found a couple of issues. This code fragment fails when it shouldn't: d = dict() d[None] = "bleem" del d[None] With CPython, the key None is deleted on IronPython I get this exception: Traceback (most recent call last): TypeError: index must be integer or slice Also another minor issue is that OS X's Terminal.app sends DEL instead of BS, so I needed to add if (key.KeyChar == '\x7f') goto case ConsoleKey.Backspace; // DEL to the default case in SuperConsole.ReadLine Diane From fuzzyman at voidspace.org.uk Wed Oct 25 23:05:37 2006 From: fuzzyman at voidspace.org.uk (fuzzyman at voidspace.org.uk) Date: Wed, 25 Oct 2006 22:05:37 +0100 Subject: [IronPython] Python and Overloaded Methods Message-ID: <453FD1A1.2090905@voidspace.org.uk> Hello all, If any of you C# programmers miss overloaded methods in Python, I've just written a metaclass that provides them. :-) http://www.voidspace.org.uk/python/weblog/arch_d7_2006_10_21.shtml#e514 Ok, so it's a silly hack: but I've been itching to try metaclasses for a long time. Fuzzyman -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.11/496 - Release Date: 24/10/2006 From xmlhacker at gmail.com Thu Oct 26 01:35:31 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 25 Oct 2006 17:35:31 -0600 Subject: [IronPython] Possible IronPython and FePy Issues In-Reply-To: <7AD436E4270DD54A94238001769C222745BF931846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <9FF5BA14-FE46-4123-9668-4D5FA95D5843@ghic.org> <7AD436E4270DD54A94238001769C222745BF931846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: Couldn't you simply check the platform at load time, adapting the behavior of the DEL to mimic BS when running under OSX? That, or have a separate mapping file for each platform that loads at run-time which would also hold potential to all a more user definable approach for mapping key sequences and such to user-defined macros. On 10/25/06, Dino Viehland wrote: > > Thanks for the bug reports. I've opened a bug for the dictionary deletion > issue ( > http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=4769 > ). > > I'm a little worried about treating DEL the same as backspace - what > happens when an actual DEL character comes in? This one has come up before > too, but I don't think we yet have a bug on it. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Diane Trout > Sent: Monday, October 23, 2006 10:44 PM > To: users at lists.ironpython.com > Subject: [IronPython] Possible IronPython and FePy Issues > > Hi, > > I'm trying to run IronPython under Mono on OS X and found a couple of > issues. > > This code fragment fails when it shouldn't: > > d = dict() > d[None] = "bleem" > del d[None] > > With CPython, the key None is deleted on IronPython I get this > exception: > Traceback (most recent call last): > TypeError: index must be integer or slice > > > Also another minor issue is that OS X's Terminal.app sends DEL instead of > BS, so I needed to add > > if (key.KeyChar == '\x7f') goto case ConsoleKey.Backspace; // DEL > > to the default case in SuperConsole.ReadLine > > Diane > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Thu Oct 26 01:36:25 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Wed, 25 Oct 2006 17:36:25 -0600 Subject: [IronPython] Possible IronPython and FePy Issues In-Reply-To: References: <9FF5BA14-FE46-4123-9668-4D5FA95D5843@ghic.org> <7AD436E4270DD54A94238001769C222745BF931846@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: s/all/allow On 10/25/06, M. David Peterson wrote: > > Couldn't you simply check the platform at load time, adapting the behavior > of the DEL to mimic BS when running under OSX? That, or have a separate > mapping file for each platform that loads at run-time which would also hold > potential to all a more user definable approach for mapping key sequences > and such to user-defined macros. -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Thu Oct 26 04:26:55 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 26 Oct 2006 11:26:55 +0900 Subject: [IronPython] Another import strangeness In-Reply-To: <5b0248170610241840t2d56ece4nf342b019587e8b6c@mail.gmail.com> References: <5b0248170610241840t2d56ece4nf342b019587e8b6c@mail.gmail.com> Message-ID: <5b0248170610251926q771af008m88ffad802eee0ca@mail.gmail.com> 2006/10/25, Sanghyeon Seo : > Import bugs seem to be especially difficult to reduce the testcase, > since it's often unclear what the hell is going on. Oops, this is a duplicate of CodePlex issue 2648, and actually found from the same code. Sorry for the noise. http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=2648 -- Seo Sanghyeon From sanxiyn at gmail.com Thu Oct 26 07:10:44 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 26 Oct 2006 14:10:44 +0900 Subject: [IronPython] IronPython URLs Message-ID: <5b0248170610252210j2d7074dfh7063fed9166b8b5e@mail.gmail.com> IronPython uploaded to Debian. http://packages.debian.org/experimental/python/ironpython James Bryne asked about running SimPy with IronPython. http://thread.gmane.org/gmane.comp.python.simpy.user/373 Alp Toker mentions IronPython in the Managed D-BUS release note. http://lists.freedesktop.org/archives/dbus/2006-October/005945.html -- Seo Sanghyeon From mark.john.rees at gmail.com Thu Oct 26 07:26:14 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Thu, 26 Oct 2006 15:26:14 +1000 Subject: [IronPython] register module with an IronPython engine In-Reply-To: <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: I am sure that effbot (fredrik) understands how to do what DIno suggested, but for those who do not or are interested, I have an example at http://hex-dump.blogspot.com/2006/10/using-ironpythons-101-new-community.html Regards Mark On 10/26/06, Dino Viehland wrote: > > You can apply the PythonModule to your assembly specifying the type that > corresponds with the module type. In 1.0.1 our site.py will load any DLLs > in the "DLLs" directory and the module will be available for you to > import. The type that PythonModule references should be a static type (no > instance members). > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Fredrik Lundh > Sent: Sunday, October 22, 2006 11:44 PM > To: users at lists.ironpython.com > Subject: [IronPython] register module with an IronPython engine > > how do I register a module with an IronPython engine, so that code that > runs > in that engine can do "import mymodule" and get a reference to the module > I > just added? > > In CPython, I can simply call Py_InitModule and pass in the module name > and > a pointer to an array of PyMethodDef structs. Surely there's a > corresponding > mechanism in IronPython? (preferrably taking a name and an object, or > some- > thing. And yes, engine.Globals.Add almost does what I want, but not > quite.) > > cheers /F > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredrik at pythonware.com Thu Oct 26 11:42:47 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 26 Oct 2006 11:42:47 +0200 Subject: [IronPython] register module with an IronPython engine In-Reply-To: <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <368a5cd50610260242n41227f6fh5463b0227676b4c0@mail.gmail.com> Dino Viehland wrote: > You can apply the PythonModule to your assembly specifying the type > that corresponds with the module type. In 1.0.1 our site.py will load any > DLLs in the "DLLs" directory and the module will be available for you to > import. The type that PythonModule references should be a static type > (no instance members). I was probably a bit unclear, but I want to inject the module from inside the embedding application. i.e. something like engine = new PythonEngine(); engine.AddObjectAsModule("myapp", new MyAppProxy()); engine.Execute( "import myapp\n" + "myapp.ping()" ); where MyAppProxy is some suitable object that has a "ping" method. I can easily do engine = new PythonEngine(); engine.GlobalsAdd("myapp", new MyAppProxy()); engine.Execute( "myapp.ping()" ); but that only makes "myapp" available for executed code, not for other modules, and it makes it harder to write code that can run in other con- texts (in this case, a CPython prototype/test harness). we've currently solved this by using a separate python module to make the contents of the global "myapp" available as a module: engine = new PythonEngine(); engine.GlobalsAdd("_myapp", new MyAppProxy()); engine.Execute("import myapp; myapp.init(_myapp)"); (where myapp.init copies relevant attributes to module globals) but I would like to get rid of that extra layer, if possible. (I'm probably missing something trivial here) cheers /F From sanxiyn at gmail.com Thu Oct 26 17:59:01 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 27 Oct 2006 00:59:01 +0900 Subject: [IronPython] [ANN] IronPython Community Edition r3 Message-ID: <5b0248170610260859w6a46ca98rb48847be6de08ded@mail.gmail.com> This is the third release of IronPython Community Edition (IPCE). Get it here. http://sparcs.kaist.ac.kr/~tinuviel/download/IPCE-r3.zip This release is also available on SourceForge mirrors near you. http://sourceforge.net/projects/fepy IPCE has a homepage. You can read about licenses and patches there. There's also some new documentations like FePy Library Reference. http://fepy.sourceforge.net/ Changes in this release: * Latest and greatest! Updated to IronPython 1.0.1. Updated to CPython 2.4.4. Compiled with Mono 1.1.18. * Relicensed under the MIT license, for those who found previous license terms (Do What The Fuck You Want To Public License) offensive, or humor-impaired. * New CPython-compatible wrappers. zlib, using System.IO.Compression. hashlib, using System.Security.Cryptography. sqlite3, using generic DB-API module already developed. hashlib and sqlite3 are modules new in CPython 2.5. * Updated CPython-compatible wrappers. Numerous updates to pyexpat. Previously, pyexpat.py was only intended to run ElementTree. It is now compatible enough to run xml.dom and xml.sax codes. * Patches to Python standard library. patch-stdlib-tarfile-null-terminated fixes (arguably) a bug. patch-stdlib-httplib-disable-idna and patch-stdlib-xml-sax-import are workarounds, but changes are minimal and make using httplib and xml.sax much better on IronPython. -- Seo Sanghyeon From dinov at exchange.microsoft.com Thu Oct 26 18:08:22 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 26 Oct 2006 09:08:22 -0700 Subject: [IronPython] register module with an IronPython engine In-Reply-To: <368a5cd50610260242n41227f6fh5463b0227676b4c0@mail.gmail.com> References: <368a5cd50610222343q51b24361kb3a1ad97941b12b0@mail.gmail.com> <7AD436E4270DD54A94238001769C222745BF93177C@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <368a5cd50610260242n41227f6fh5463b0227676b4c0@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222745BF931B06@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Ahh, got it... From your engine you can access SystemState (engine.Sys) and from there you can publish your object in the module table: engine = new PythonEngine(); engine.Sys.modules['myapp'] = new MyAppProxy(); this is equivalent to the Python code: import sys sys.modules['myapp'] = MyAppProxy() from there anyone importing myapp should get the MyAppProxy object. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fredrik Lundh Sent: Thursday, October 26, 2006 2:43 AM To: Discussion of IronPython Subject: Re: [IronPython] register module with an IronPython engine Dino Viehland wrote: > You can apply the PythonModule to your assembly specifying the type > that corresponds with the module type. In 1.0.1 our site.py will load any > DLLs in the "DLLs" directory and the module will be available for you to > import. The type that PythonModule references should be a static type > (no instance members). I was probably a bit unclear, but I want to inject the module from inside the embedding application. i.e. something like engine = new PythonEngine(); engine.AddObjectAsModule("myapp", new MyAppProxy()); engine.Execute( "import myapp\n" + "myapp.ping()" ); where MyAppProxy is some suitable object that has a "ping" method. I can easily do engine = new PythonEngine(); engine.GlobalsAdd("myapp", new MyAppProxy()); engine.Execute( "myapp.ping()" ); but that only makes "myapp" available for executed code, not for other modules, and it makes it harder to write code that can run in other con- texts (in this case, a CPython prototype/test harness). we've currently solved this by using a separate python module to make the contents of the global "myapp" available as a module: engine = new PythonEngine(); engine.GlobalsAdd("_myapp", new MyAppProxy()); engine.Execute("import myapp; myapp.init(_myapp)"); (where myapp.init copies relevant attributes to module globals) but I would like to get rid of that extra layer, if possible. (I'm probably missing something trivial here) cheers /F _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ionrock at gmail.com Thu Oct 26 18:21:47 2006 From: ionrock at gmail.com (Eric Larson) Date: Thu, 26 Oct 2006 11:21:47 -0500 Subject: [IronPython] DOM binding for .NET? In-Reply-To: References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> Message-ID: <6e46dd1e0610260921v126e2d68p694d5b10850c4c37@mail.gmail.com> Thanks for all the great info! Eric On 10/25/06, M. David Peterson wrote: > > This is a nice overview in regards to some of the key advantages in > System.Xml for .NET 2.0. It provides a deeper understanding the of the > design goals, with code samples that showcase how to take advantage of them. > > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxml/html/sysxmlVS05.asp > > > > On 10/25/06, M. David Peterson wrote: > > > > Here's one of the posts from Joshua Allen I was referring to, > > > > http://lists.xml.org/archives/xml-dev/200106/msg00552.html > > > > On 10/25/06, M. David Peterson wrote: > > > > > > Hi Seo, > > > > > > System.Xml is compliant with both DOM Level 1 and Level 2. You can > > > find the the SDK documentation @ http://msdn2.microsoft.com/en-us/library/system.xml.aspx > > > > > > > > > In addition, as per the intro into the above linked page, > > > > > > The *System.Xml* namespace provides standards-based support for > > > processing XML. > > > > > > The supported standards include: > > > > > > - > > > > > > XML 1.0 - http://www.w3.org/TR/1998/REC-xml-19980210 - including > > > DTD support. > > > - > > > > > > XML Namespaces - http://www.w3.org/TR/REC-xml-names/ - both > > > stream level and DOM. > > > - > > > > > > XSD Schemas - http://www.w3.org/2001/XMLSchema > > > - > > > > > > XPath expressions - http://www.w3.org/TR/xpath > > > - > > > > > > XSLT transformations - http://www.w3.org/TR/xslt > > > - > > > > > > DOM Level 1 Core - http://www.w3.org/TR/REC-DOM-Level-1/ > > > - > > > > > > DOM Level 2 Core - http://www.w3.org/TR/DOM-Level-2/ > > > > > > > > > In addition, there is a good presentation series located @ http://msdn.microsoft.com/library/default.asp?url=/seminar/mmcfeed/mmcdisplayfeed.asp?lang=en&product=103337&audience=100402 > > > that covers all of the XML-related technlogies for .NET. While the > > > presentations are somewhat old, the content is still relevant. > > > > > > In regards to the conformance reference, I will need to dig around, > > > but I know Joshua Allen has posted a lot of content in the past to places > > > like the XML-Dev mailing list that discuss at least some of the conformance > > > related questions. Let me dig around a bit and follow-up with a couple of > > > links. > > > > > > In addition to this, the entire org.w3.dom Java bindings are available > > > as part of IKVM.NET in the IKVM.GNU.Classpath.dll , > > > and as such, you can utilize these as well inside of any .NET accessible > > > language. To implement this is C#, use the same syntax for > > > classpath~namepath that you would in java, replacing (obviously) import with > > > using. > > > > > > Hope this helps! > > > > > > > > > On 10/24/06, Sanghyeon Seo wrote: > > > > > > > > 2006/10/25, Sanghyeon Seo : > > > > > Where can I read about W3C Document Object Model Binding for .NET? > > > > > > > > > > > > > > http://www.w3.org/DOM/ > > > > > > > > > > W3C only defines bindings for Java and ECMAScript. > > > > > > > > W3C also defines the interface in OMG IDL, but I can't find anything > > > > about .NET on OMG website, while I can download Python Language > > > > Mapping Specification there. > > > > > > > > http://www.omg.org/technology/documents/idl2x_spec_catalog.htm > > > > > > > > -- > > > > Seo Sanghyeon > > > > _______________________________________________ > > > > 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 > > > > > > > > > > -- > > /M:D > > > > M. David Peterson > > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 > > > > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 > > _______________________________________________ > 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 Thu Oct 26 18:57:02 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Thu, 26 Oct 2006 10:57:02 -0600 Subject: [IronPython] [ANN] IronPython Community Edition r3 In-Reply-To: <5b0248170610260859w6a46ca98rb48847be6de08ded@mail.gmail.com> References: <5b0248170610260859w6a46ca98rb48847be6de08ded@mail.gmail.com> Message-ID: Yee Hah! :D Thanks Seo! :D > http://www.oreillynet.com/xml/blog/2006/10/seo_sanghyeonipce_ironpython_c.html On 10/26/06, Sanghyeon Seo wrote: > > This is the third release of IronPython Community Edition (IPCE). > > Get it here. > http://sparcs.kaist.ac.kr/~tinuviel/download/IPCE-r3.zip > > This release is also available on SourceForge mirrors near you. > http://sourceforge.net/projects/fepy > > IPCE has a homepage. You can read about licenses and patches there. > There's also some new documentations like FePy Library Reference. > http://fepy.sourceforge.net/ > > Changes in this release: > > * Latest and greatest! > > Updated to IronPython 1.0.1. > Updated to CPython 2.4.4. > Compiled with Mono 1.1.18. > > * Relicensed under the MIT license, for those who found previous > license terms (Do What The Fuck You Want To Public License) offensive, > or humor-impaired. > > * New CPython-compatible wrappers. > > zlib, using System.IO.Compression. > hashlib, using System.Security.Cryptography. > sqlite3, using generic DB-API module already developed. > > hashlib and sqlite3 are modules new in CPython 2.5. > > * Updated CPython-compatible wrappers. > > Numerous updates to pyexpat. Previously, pyexpat.py was only intended > to run ElementTree. It is now compatible enough to run xml.dom and > xml.sax codes. > > * Patches to Python standard library. > > patch-stdlib-tarfile-null-terminated fixes (arguably) a bug. > > patch-stdlib-httplib-disable-idna and patch-stdlib-xml-sax-import are > workarounds, but changes are minimal and make using httplib and > xml.sax much better on IronPython. > > -- > Seo Sanghyeon > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Thu Oct 26 18:59:06 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Thu, 26 Oct 2006 10:59:06 -0600 Subject: [IronPython] DOM binding for .NET? In-Reply-To: <6e46dd1e0610260921v126e2d68p694d5b10850c4c37@mail.gmail.com> References: <5b0248170610242124n7877c92dpa44d008d26314cac@mail.gmail.com> <5b0248170610242135u229a97bau760f352030843678@mail.gmail.com> <6e46dd1e0610260921v126e2d68p694d5b10850c4c37@mail.gmail.com> Message-ID: On 10/26/06, Eric Larson wrote: > > Thanks for all the great info! > > > Eric > np :) -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Oct 26 21:09:27 2006 From: slide.o.mix at gmail.com (Slide) Date: Thu, 26 Oct 2006 12:09:27 -0700 Subject: [IronPython] [ANN] IronPython Community Edition r3 In-Reply-To: References: <5b0248170610260859w6a46ca98rb48847be6de08ded@mail.gmail.com> Message-ID: Would there be any desire for someone to package this up with an installer? On 10/26/06, M. David Peterson wrote: > Yee Hah! :D Thanks Seo! :D > > http://www.oreillynet.com/xml/blog/2006/10/seo_sanghyeonipce_ironpython_c.html > > > On 10/26/06, Sanghyeon Seo wrote: > > This is the third release of IronPython Community Edition (IPCE). > > > > Get it here. > > http://sparcs.kaist.ac.kr/~tinuviel/download/IPCE-r3.zip > > > > This release is also available on SourceForge mirrors near you. > > http://sourceforge.net/projects/fepy > > > > IPCE has a homepage. You can read about licenses and patches there. > > There's also some new documentations like FePy Library Reference. > > http://fepy.sourceforge.net/ > > > > Changes in this release: > > > > * Latest and greatest! > > > > Updated to IronPython 1.0.1. > > Updated to CPython 2.4.4. > > Compiled with Mono 1.1.18. > > > > * Relicensed under the MIT license, for those who found previous > > license terms (Do What The Fuck You Want To Public License) offensive, > > or humor-impaired. > > > > * New CPython-compatible wrappers. > > > > zlib, using System.IO.Compression. > > hashlib, using System.Security.Cryptography. > > sqlite3, using generic DB-API module already developed. > > > > hashlib and sqlite3 are modules new in CPython 2.5. > > > > * Updated CPython-compatible wrappers. > > > > Numerous updates to pyexpat. Previously, pyexpat.py was only intended > > to run ElementTree. It is now compatible enough to run xml.dom and > > xml.sax codes. > > > > * Patches to Python standard library. > > > > patch-stdlib-tarfile-null-terminated fixes (arguably) a > bug. > > > > patch-stdlib-httplib-disable-idna and > patch-stdlib-xml-sax-import are > > workarounds, but changes are minimal and make using httplib and > > xml.sax much better on IronPython. > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > 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 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From sanxiyn at gmail.com Fri Oct 27 14:25:23 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 27 Oct 2006 21:25:23 +0900 Subject: [IronPython] New-style exceptions in Python 2.5 Message-ID: <5b0248170610270525k4e6946ccn1e7addee71816021@mail.gmail.com> Exceptions became new-style in Python 2.5. How will this be handled? Given test.py below, $ python2.4 test.py True False $ python2.5 test.py False True While, $ ipy test.py True False $ ipy -X:Python25 test.py True False # test.py class error(Exception): pass import types et = type(error) print et is types.ClassType print et is types.TypeType -- Seo Sanghyeon From giles.thomas at resolversystems.com Fri Oct 27 17:14:05 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Fri, 27 Oct 2006 16:14:05 +0100 Subject: [IronPython] Direct3D demo Message-ID: <4542223D.1010205@resolversystems.com> Hi, Is there going to be an updated version of the Direct3D demo now that the DirectX SDK to which it points has expired? Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com From dinov at exchange.microsoft.com Fri Oct 27 18:11:25 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 27 Oct 2006 09:11:25 -0700 Subject: [IronPython] New-style exceptions in Python 2.5 In-Reply-To: <5b0248170610270525k4e6946ccn1e7addee71816021@mail.gmail.com> References: <5b0248170610270525k4e6946ccn1e7addee71816021@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222745CB622EBB@DF-GRTDANE-MSG.exchange.corp.microsoft.com> There's also several other Python 2.5 features we don't yet support. We're hoping to get to these for 1.1. For new-style exceptions we'll update the ExceptionConverter to use new-style classes instead of old-style classes. The hope is that the rest of the runtime then basically picks this change up for free because it's abstracted away from it. If that works as planned then the -X:Python25 feature could switch the exception modes as well as the other 2.5 features. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Friday, October 27, 2006 5:25 AM To: Discussion of IronPython Subject: [IronPython] New-style exceptions in Python 2.5 Exceptions became new-style in Python 2.5. How will this be handled? Given test.py below, $ python2.4 test.py True False $ python2.5 test.py False True While, $ ipy test.py True False $ ipy -X:Python25 test.py True False # test.py class error(Exception): pass import types et = type(error) print et is types.ClassType print et is types.TypeType -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From william at resolversystems.com Fri Oct 27 19:55:38 2006 From: william at resolversystems.com (william) Date: Fri, 27 Oct 2006 17:55:38 +0000 Subject: [IronPython] Direct3D demo In-Reply-To: 4542223D.1010205@resolversystems.com Message-ID: <73ea6cee4534f7151ea91276374c3684@127.0.0.1> For reference, this was what I needed to do to get GravityDemo working with the october DirectX SDK. pwn3d:~/Shared-XP william$ diff old new diff old/GravityDemo.py new/GravityDemo.py 34c34 < distSquared = direction.LengthSquared() --- > distSquared = direction.LengthSq() 81,83c81,82 < pos.X /= l-1 < pos.Y /= l-1 < pos.Z /= l-1 --- > lM1 = l - 1 > pos = DirectX.Vector3(pos.X/lM1, pos.Y/lM1, pos.Z/lM1) diff old/framework.py new/framework.py 24,26c24,28 < clr.AddReferenceByPartialName("System.Drawing") < clr.AddReferenceByPartialName("System.Windows.Forms") < clr.AddReferenceByPartialName("Microsoft.DirectX") --- > clr.AddReference("System.Drawing") > clr.AddReference("System.Windows.Forms") > clr.AddReference("Microsoft.DirectX") > clr.AddReference("Microsoft.DirectX.Direct3D") > clr.AddReference("Microsoft.DirectX.Direct3DX") 35c37,38 < from Microsoft.DirectX import Direct3D --- > import Microsoft.DirectX.Direct3D as Direct3D > 189c192 < self.LookAtMatrix = DirectX.Matrix.LookAtLeftHanded(zero, direction, up) --- > self.LookAtMatrix = DirectX.Matrix.LookAtLH(zero, direction, up) 250c253 < color = DirectX.ColorValue.FromColor(color) --- > color = Direct3D.ColorValue.FromColor(color) 406c409 < params.IsWindowed = True --- > params.Windowed = True 411c414 < self.Device = Direct3D.Device(0, Direct3D.DeviceType.Hardware, handle, --- > self.Device = Direct3D.Device(0, Direct3D.DeviceType.Reference, handle, 416,417c419,420 < self.Device.Transform.Projection = DirectX.Matrix.PerspectiveFieldOfViewLeftHanded(System.Math.PI/4.0, 1, 1, 100) < self.Device.Transform.View = DirectX.Matrix.LookAtLeftHanded(DirectX.Vector3(0, 3, -5), DirectX.Vector3(0, 0, 0), DirectX.Vector3(0, 1, 0)) --- > self.Device.Transform.Projection = DirectX.Matrix.PerspectiveFovLH(System.Math.PI/4.0, 1, 1, 100) > self.Device.Transform.View = DirectX.Matrix.LookAtLH(DirectX.Vector3(0, 3, -5), DirectX.Vector3(0, 0, 0), DirectX.Vector3(0, 1, 0)) pwn3d:~/Shared-XP william$ On Fri, 27 Oct 2006 16:14:05 +0100, Giles Thomas wrote: > Hi, > > Is there going to be an updated version of the Direct3D demo now that > the DirectX SDK to which it points has expired? > > > Regards, > > Giles > > -- > Giles Thomas > Resolver Systems > giles.thomas at resolversystems.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Sun Oct 29 06:07:21 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 29 Oct 2006 14:07:21 +0900 Subject: [IronPython] Nice article on XmlReader and SAX Message-ID: <5b0248170610282207r3402a336ge8dc27887026a6a4@mail.gmail.com> Today I found this nice article on XmlReader and SAX, written in 2002. Many years passed, but it was still helpful. Thank you, Dan Wahlin! http://www.informit.com/articles/article.asp?p=25485 You see, my work on pyexpat module is basically converting pull-model of XmlReader to push-model of Expat. And SAX is push-model too. In the article, Dan Wahlin presents the complete source code converting XmlReader model to SAX model. Had I read this earlier, my job would have been *much* easier. Still, later is better than never. It already helped me implemeting StartNamespaceDeclHandler/EndNamespaceDeclHandler pair used by SOAPpy. -- Seo Sanghyeon From sanxiyn at gmail.com Sun Oct 29 07:47:36 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 29 Oct 2006 15:47:36 +0900 Subject: [IronPython] Nice article on XmlReader and SAX In-Reply-To: <5b0248170610282207r3402a336ge8dc27887026a6a4@mail.gmail.com> References: <5b0248170610282207r3402a336ge8dc27887026a6a4@mail.gmail.com> Message-ID: <5b0248170610282347u65613b49l29337908ea8ec2fc@mail.gmail.com> 2006/10/29, Sanghyeon Seo : > Still, later is better than never. It already helped me implemeting > StartNamespaceDeclHandler/EndNamespaceDeclHandler pair used by SOAPpy. Commit: http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=258 -- Seo Sanghyeon From sanxiyn at gmail.com Sun Oct 29 07:51:10 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 29 Oct 2006 15:51:10 +0900 Subject: [IronPython] quopri module In-Reply-To: <5b0248170610131847v61db998cnc26322248507e224@mail.gmail.com> References: <5b0248170610131847v61db998cnc26322248507e224@mail.gmail.com> Message-ID: <5b0248170610282351q5fd80021q3f04ad4ea0f7bb03@mail.gmail.com> 2006/10/14, Sanghyeon Seo : > CPython > >>> import quopri > >>> quopri.encodestring('=') > '=3D' > > IronPython > >>> import quopri > >>> quopri.encodestring('=') > Traceback (most recent call last): > File quopri, line unknown, in encodestring > TypeError: b2a_qp() takes exactly 4 non-keyword arguments (1 given) > > Found while trying to run SOAPpy (http://pywebsvcs.sourceforge.net/). > Easy enough to workaround, but I'd rather not. Follow up on this? -- Seo Sanghyeon From sanxiyn at gmail.com Sun Oct 29 08:14:21 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 29 Oct 2006 16:14:21 +0900 Subject: [IronPython] SOAPpy client running on IronPython! Message-ID: <5b0248170610290014g6e5c34c4p44be6af0de019eee@mail.gmail.com> SOAPpy is a part of Python Web Services project. It helps you writing web services servers and clients. http://pywebsvcs.sourceforge.net/ Here is a server example: import SOAPpy def hello(): return 'Hello, world!' server = SOAPpy.SOAPServer(('localhost', 10000)) server.registerFunction(hello) server.serve_forever() And a client: import SOAPpy server = SOAPpy.SOAPProxy('http://localhost:10000/') print server.hello() * * * Today I got the above client program running on IronPython. All related files are available here: https://svn.sourceforge.net/svnroot/fepy/trunk/seasoap/ Be sure to read the README.txt! (Big smile) 1. Get IPCE r3. 2. Get the latest pyexpat.py from FePy SVN. 3. Get SOAPpy 0.11.3 (not the latest version! sorry for that). This is the version available in Debian. 4. Apply patch-soappy 5. Run the client example. Enjoy! -- Seo Sanghyeon From Josh.L at microsoft.com Sun Oct 29 10:43:09 2006 From: Josh.L at microsoft.com (Josh Cassell) Date: Sun, 29 Oct 2006 01:43:09 -0800 Subject: [IronPython] Svn/Cvs API's? Message-ID: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> Hi guys, I've had some awful experiences using shell integrated/Windows Service based Cvs/Svn applications. What Api's are there that I could use from either, preferably Ironpython, or c#? No need for a local repository. Am I wrong or is Svn the only way that the Fepy stuff is available? Also, what simple simple cmd-line only windows tools might be available that let someone get a set of files from an Svn repository? Thanks! Josh From Josh.L at microsoft.com Sun Oct 29 10:44:57 2006 From: Josh.L at microsoft.com (Josh Cassell) Date: Sun, 29 Oct 2006 01:44:57 -0800 Subject: [IronPython] Svn/Cvs API's? In-Reply-To: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> References: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> Message-ID: <519260D16FC91741B95E725517B734B8AA57E6BF@NA-EXMSG-C109.redmond.corp.microsoft.com> woops that should have been one simple, but I will certainly take simple simple! :D ________________________________ From: Josh Cassell Sent: Sunday, October 29, 2006 2:43 AM To: users at lists.ironpython.com Subject: Svn/Cvs API's? Hi guys, I've had some awful experiences using shell integrated/Windows Service based Cvs/Svn applications. What Api's are there that I could use from either, preferably Ironpython, or c#? No need for a local repository. Am I wrong or is Svn the only way that the Fepy stuff is available? Also, what simple simple cmd-line only windows tools might be available that let someone get a set of files from an Svn repository? Thanks! Josh From diane at ghic.org Sun Oct 29 09:50:21 2006 From: diane at ghic.org (Diane Trout) Date: Sun, 29 Oct 2006 01:50:21 -0700 Subject: [IronPython] Svn/Cvs API's? In-Reply-To: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> References: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> Message-ID: <7ED63D66-EFFF-4F80-B592-1C84039C12DF@ghic.org> > > Also, what simple simple cmd-line only windows tools might be > available that let someone get a set of files from an Svn repository? The official subversion command line client is available for windows http://subversion.tigris.org/project_packages.html#binary-packages If you're willing to use CPython http://pysvn.tigris.org/ provides a python API to subversion. Diane -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: From fredrik at pythonware.com Sun Oct 29 09:55:16 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sun, 29 Oct 2006 09:55:16 +0100 Subject: [IronPython] Svn/Cvs API's? In-Reply-To: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> References: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> Message-ID: <368a5cd50610290155j6d76c761off3506dbf01398b6@mail.gmail.com> On 10/29/06, Josh Cassell wrote: > Am I wrong or is Svn the only way that the Fepy stuff is available? > > Also, what simple simple cmd-line only windows tools might be available > that let someone get a set of files from an Svn repository? the standard subversion distribution runs just fine on Windows: http://subversion.tigris.org/project_packages.html running the installer puts the necessary binaries into C:\Program Files\Subversion\bin From sanxiyn at gmail.com Mon Oct 30 01:38:22 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 30 Oct 2006 09:38:22 +0900 Subject: [IronPython] Svn/Cvs API's? In-Reply-To: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> References: <519260D16FC91741B95E725517B734B8AA57E6BE@NA-EXMSG-C109.redmond.corp.microsoft.com> Message-ID: <5b0248170610291638m74647254n6a2f2b2b97ce375a@mail.gmail.com> 2006/10/29, Josh Cassell : > Am I wrong or is Svn the only way that the FePy stuff is available? You can download the release, packed in .zip format. -- Seo Sanghyeon From dfugate at microsoft.com Mon Oct 30 03:10:47 2006 From: dfugate at microsoft.com (Dave Fugate) Date: Sun, 29 Oct 2006 18:10:47 -0800 Subject: [IronPython] Direct3D demo In-Reply-To: <4542223D.1010205@resolversystems.com> References: <4542223D.1010205@resolversystems.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D910A4314ED30@NA-EXMSG-C106.redmond.corp.microsoft.com> At the moment there has been no decision on whether we will downgrade this example to be compatible with an earlier version of managed DirectX or migrate it to use XNA. If we take the latter option, I suspect we'll wait until the final XNA assemblies are released (i.e., they're still currently beta). In the meantime, are you unable to run the Direct3D sample with the August DirectX SDK for some reason? I checked the link to the August SDK download page from the tutorial and that seems to still be available for download. ________________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] Sent: Friday, October 27, 2006 8:14 AM To: Discussion of IronPython Subject: [IronPython] Direct3D demo Hi, Is there going to be an updated version of the Direct3D demo now that the DirectX SDK to which it points has expired? Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Mon Oct 30 05:28:44 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 30 Oct 2006 13:28:44 +0900 Subject: [IronPython] IronPython URLs Message-ID: <5b0248170610292028h604bd963y7b39af608d5c83f3@mail.gmail.com> Introduction to Python and IronPython (in Japanese) by Oki Software. http://www.okisoft.co.jp/esc/python/iron-python-intro.html Steven Knight, the lead developer of SCons, wants to get SCons working on IronPython. http://thread.gmane.org/gmane.comp.programming.tools.scons.user/12587/focus=12602 Gary Stephenson announced OxIDE, a compiler for Xbase++ into IronPython. http://www.oxide.net.au/ -- Seo Sanghyeon From ironpythonster at gmail.com Mon Oct 30 07:51:37 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Mon, 30 Oct 2006 14:51:37 +0800 Subject: [IronPython] Svn/Cvs API's? Message-ID: <8c8dcbe30610292251o6216e6e6rc2d6d78218ef1bae@mail.gmail.com> > > Also, what simple simple cmd-line only windows tools might be > available that let someone get a set of files from an Svn repository? Recently,I also do some work to integrated CVS to my project.I found that is is very difficulty to use ironpython to finish this work. especial use ironpython to paras the result after run CVS command. -------------- next part -------------- An HTML attachment was scrubbed... URL: From giles.thomas at resolversystems.com Mon Oct 30 12:40:46 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Mon, 30 Oct 2006 11:40:46 +0000 Subject: [IronPython] Direct3D demo In-Reply-To: <7346A825E148B049A9AD1D3ED46A2D910A4314ED30@NA-EXMSG-C106.redmond.corp.microsoft.com> References: <4542223D.1010205@resolversystems.com> <7346A825E148B049A9AD1D3ED46A2D910A4314ED30@NA-EXMSG-C106.redmond.corp.microsoft.com> Message-ID: <4545E4BE.2070601@resolversystems.com> Dave, Thanks for the reply. When I run the demo using the August SDK, I get a message saying "This pre-release version of DirectX has expired, please upgrade to the latest version from http://www.microsoft.com/directx" It looks like one of my colleagues has had more luck with an October SDK, so perhaps the demo could be updated to support that? Regarding XNA - I thought it was C#-only, but I guess I was wrong... does this mean that people will be able to write for the Xbox in IP? Regards, Giles Dave Fugate wrote: > At the moment there has been no decision on whether we will downgrade this example to be compatible with an earlier version of managed DirectX or migrate it to use XNA. If we take the latter option, I suspect we'll wait until the final XNA assemblies are released (i.e., they're still currently beta). > > In the meantime, are you unable to run the Direct3D sample with the August DirectX SDK for some reason? I checked the link to the August SDK download page from the tutorial and that seems to still be available for download. > > ________________________________________ > From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] > Sent: Friday, October 27, 2006 8:14 AM > To: Discussion of IronPython > Subject: [IronPython] Direct3D demo > > Hi, > > Is there going to be an updated version of the Direct3D demo now that > the DirectX SDK to which it points has expired? > > > Regards, > > Giles > > -- > Giles Thomas > Resolver Systems > giles.thomas at resolversystems.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 > -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.hill at gmail.com Mon Oct 30 20:13:54 2006 From: adam.hill at gmail.com (Adam Hill) Date: Mon, 30 Oct 2006 14:13:54 -0500 Subject: [IronPython] Direct3D demo In-Reply-To: <4545E4BE.2070601@resolversystems.com> References: <4542223D.1010205@resolversystems.com> <7346A825E148B049A9AD1D3ED46A2D910A4314ED30@NA-EXMSG-C106.redmond.corp.microsoft.com> <4545E4BE.2070601@resolversystems.com> Message-ID: XNA is just a set of assemblies/framework and Visual Studio tools. Now for PC/XBox 360 cross platform games only C# is supported. It is just a .NET assembly and any CLR/CLI compliant system can run the code. Whether or not the 360 can check some special metadata inserted by the toolset to see if it is C# is unknown at this time. adam... -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon Oct 30 20:31:32 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 30 Oct 2006 11:31:32 -0800 Subject: [IronPython] quopri module In-Reply-To: <5b0248170610282351q5fd80021q3f04ad4ea0f7bb03@mail.gmail.com> References: <5b0248170610131847v61db998cnc26322248507e224@mail.gmail.com> <5b0248170610282351q5fd80021q3f04ad4ea0f7bb03@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C222745F9D1CD4F@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Even if you get past the number of arguments issue it seems that this will still throw NotImplemented. I'm tempted to think the good quick-fix is to completely remove b2a_qp from the binascii module and quopri will then detect that and fall back to some other behavior. I've opened CodePlex bug #4928 (http://www.codeplex.com/WorkItem/List.aspx?ProjectName=IronPython) for the issue and set it as a 1.1 bug. Thanks for the report (and sorry for missing this one the 1st time). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Saturday, October 28, 2006 11:51 PM To: Discussion of IronPython Subject: Re: [IronPython] quopri module 2006/10/14, Sanghyeon Seo : > CPython > >>> import quopri > >>> quopri.encodestring('=') > '=3D' > > IronPython > >>> import quopri > >>> quopri.encodestring('=') > Traceback (most recent call last): > File quopri, line unknown, in encodestring > TypeError: b2a_qp() takes exactly 4 non-keyword arguments (1 given) > > Found while trying to run SOAPpy (http://pywebsvcs.sourceforge.net/). > Easy enough to workaround, but I'd rather not. Follow up on this? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Mon Oct 30 21:29:11 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 30 Oct 2006 12:29:11 -0800 Subject: [IronPython] Direct3D demo Message-ID: I *think* (I do not *know*) that the VC# Express restriction is a matter of the deployment/debugging implementation integration for the 360. They've certainly received a lot of push from people to expand the availability. ________________________________ From: users-bounces at lists.ironpython.com on behalf of Adam Hill Sent: Mon 10/30/2006 11:13 AM To: Discussion of IronPython Subject: Re: [IronPython] Direct3D demo XNA is just a set of assemblies/framework and Visual Studio tools. Now for PC/XBox 360 cross platform games only C# is supported. It is just a .NET assembly and any CLR/CLI compliant system can run the code. Whether or not the 360 can check some special metadata inserted by the toolset to see if it is C# is unknown at this time. adam... -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3651 bytes Desc: not available URL: From sanxiyn at gmail.com Tue Oct 31 02:04:45 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 31 Oct 2006 10:04:45 +0900 Subject: [IronPython] IronPython URLs Message-ID: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> Mark Rees presents the second part of his IronPython and ADO.NET tutorial. http://hex-dump.blogspot.com/2006/10/ironpython-and-adonet-part-2.html Przemek Piotrowski discusses using Oracle Data Provider with IronPython. http://prpi.blogspot.com/2006/10/oracle-data-provider-for-net-under.html perezvon presents Django running on IronPython/Mono/Mac. http://d.hatena.ne.jp/perezvon/20061030/1162209668 -- Seo Sanghyeon From adam.hill at gmail.com Tue Oct 31 02:06:12 2006 From: adam.hill at gmail.com (Adam Hill) Date: Mon, 30 Oct 2006 20:06:12 -0500 Subject: [IronPython] Direct3D demo In-Reply-To: References: Message-ID: You are correct there is no VC# Express restriction. If you have the desire you can get XNA integrated into VS.2005 proper. adam... -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Tue Oct 31 04:23:31 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 30 Oct 2006 19:23:31 -0800 Subject: [IronPython] Direct3D demo Message-ID: And here is some tutorial on using VB.NET: http://www.alanphipps.com/VisualBasicdotNET-XNA.html ________________________________ From: users-bounces at lists.ironpython.com on behalf of Adam Hill Sent: Mon 10/30/2006 5:06 PM To: Discussion of IronPython Subject: Re: [IronPython] Direct3D demo You are correct there is no VC# Express restriction. If you have the desire you can get XNA integrated into VS.2005 proper. adam... -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3375 bytes Desc: not available URL: From christopher at baus.net Tue Oct 31 06:13:32 2006 From: christopher at baus.net (Christopher Baus) Date: Tue, 31 Oct 2006 05:13:32 -0000 (GMT) Subject: [IronPython] wsgi.py update and codecs errors Message-ID: <1238.24.182.26.162.1162271612.squirrel@webmail.tuffmail.net> Hi All, I'm new to the list, but Jon Udell's sceencast with Jim Hugunin got me pretty excited about the technology. The fact that it seems to be working well with Mono got me even more excited. Anyway I'm working on a new app to test to viability of IronPython for web development on linux. I want to thank Sanghyeon Seo for the work on IPCE. With a little bit of hacking, I was able to get an app up and running with WSGI and xsp2 over the weekend. I do have a couple patches, and not sure where to post them, I hope it is ok to post them here. Anyway, I'm attaching an updated version of wsgi.py where I attempt to set more of the variables in the environ. I don't have a good solution for PATH_INFO or SERVER_PROTOCOL, but it is enough to bring up more frameworks. At least this gets us a bit further. I am also attaching a file called codecs_errors.py which I lifted from pypy. I am loading it from my site.py. The codecs error registration in IronPython seems to be missing. This is causing problems with the standard email module. This file addresses the problem. Thanks, Christopher http://baus.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: wsgi.py Type: application/x-python Size: 1948 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: codecs_errors.py Type: application/x-python Size: 2425 bytes Desc: not available URL: From mark.john.rees at gmail.com Tue Oct 31 07:27:08 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Tue, 31 Oct 2006 17:27:08 +1100 Subject: [IronPython] wsgi.py update and codecs errors In-Reply-To: <1238.24.182.26.162.1162271612.squirrel@webmail.tuffmail.net> References: <1238.24.182.26.162.1162271612.squirrel@webmail.tuffmail.net> Message-ID: Hi Christopher, I had just checked in some changes to wsgi.py and checked my email and found your patch. I am getting the CGI variables a different way and would be interested in your comments. I am happy to include your changes as well re wsgi.py, but will leave the codecs_errors.py for Sanghyeon to review. For your wsgi app were you using WSGI or WSGI-SI? Mark On 10/31/06, Christopher Baus wrote: > > Hi All, > > I'm new to the list, but Jon Udell's sceencast with Jim Hugunin got me > pretty excited about the technology. The fact that it seems to be working > well with Mono got me even more excited. > > Anyway I'm working on a new app to test to viability of IronPython for web > development on linux. I want to thank Sanghyeon Seo for the work on IPCE. > With a little bit of hacking, I was able to get an app up and running > with WSGI and xsp2 over the weekend. > > I do have a couple patches, and not sure where to post them, I hope it is > ok to post them here. > > Anyway, I'm attaching an updated version of wsgi.py where I attempt to set > more of the variables in the environ. I don't have a good solution for > PATH_INFO or SERVER_PROTOCOL, but it is enough to bring up more > frameworks. At least this gets us a bit further. > > I am also attaching a file called codecs_errors.py which I lifted from > pypy. I am loading it from my site.py. The codecs error registration in > IronPython seems to be missing. This is causing problems with the > standard email module. This file addresses the problem. > > Thanks, > > Christopher > http://baus.net/ > > _______________________________________________ > 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 ironpythonster at gmail.com Tue Oct 31 07:52:16 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Tue, 31 Oct 2006 14:52:16 +0800 Subject: [IronPython] No use Process.Start() , How to execute these command line? Message-ID: <8c8dcbe30610302252m7ee24084x6736147f3aa99bcb@mail.gmail.com> Hi,guys I want to excute some command line to get CVS information.But use the Process.Start() is very burden . Now,if i want to do like these: set path=C:\Program Files\WinCvs\cvsnt set CVSROOT=:pserver:test:test123 at 192.168.0.4:2401:/test/CVS CVS status -d "E:\Project\Test\Test\Document" It could i use ironpython make it simple? Thanks Kevien -------------- next part -------------- An HTML attachment was scrubbed... URL: From leafgarland+ironpython at gmail.com Tue Oct 31 13:09:18 2006 From: leafgarland+ironpython at gmail.com (Leaf Garland) Date: Tue, 31 Oct 2006 12:09:18 +0000 Subject: [IronPython] Direct3D demo In-Reply-To: References: <4542223D.1010205@resolversystems.com> <7346A825E148B049A9AD1D3ED46A2D910A4314ED30@NA-EXMSG-C106.redmond.corp.microsoft.com> <4545E4BE.2070601@resolversystems.com> Message-ID: I'm guessing that any pure .Net assembly compatible with the .Net Compact Framework (which the Xbox360 framework is based on) will be acceptable on the Xbox but the deployment will need to be done via VC# Express. The .Net Compact Framework compatability is a problem for IronPython because of the lack of code generation facilities (System.Reflection.Emit etc.). Obviously this is not a problem for Xna on Windows. Cheers, Leaf. On 30/10/06, Adam Hill wrote: > XNA is just a set of assemblies/framework and Visual Studio tools. Now for > PC/XBox 360 cross platform games only C# is supported. It is just a .NET > assembly and any CLR/CLI compliant system can run the code. > > Whether or not the 360 can check some special metadata inserted by the > toolset to see if it is C# is unknown at this time. > > adam... From riltim at gmail.com Tue Oct 31 16:02:41 2006 From: riltim at gmail.com (Tim Riley) Date: Tue, 31 Oct 2006 10:02:41 -0500 Subject: [IronPython] Web.py and Ironpython Message-ID: Has anyone successfully got web.py to work with IronPython? I'd be very interested to hear about it if anyone has. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Tue Oct 31 16:34:20 2006 From: christopher at baus.net (Christopher Baus) Date: Tue, 31 Oct 2006 15:34:20 -0000 (GMT) Subject: [IronPython] Web.py and Ironpython In-Reply-To: References: Message-ID: <1498.24.182.26.162.1162308860.squirrel@webmail.tuffmail.net> > Has anyone successfully got web.py to work with IronPython? I'd be very > interested to hear about it if anyone has. I tried to get it running over the weekend, but it fails due to its use of getframe. This is the exact code that Guido complained about in his review. I am now experimenting with Colubrid with some success. http://baus.net/ From christopher at baus.net Tue Oct 31 16:41:46 2006 From: christopher at baus.net (Christopher Baus) Date: Tue, 31 Oct 2006 15:41:46 -0000 (GMT) Subject: [IronPython] wsgi.py update and codecs errors In-Reply-To: References: <1238.24.182.26.162.1162271612.squirrel@webmail.tuffmail.net> Message-ID: <1507.24.182.26.162.1162309306.squirrel@webmail.tuffmail.net> > > For your wsgi app were you using WSGI or WSGI-SI? To get it running I am using WSGI, but I can already see the advantage of using WSGI-SI and I'm probably going to move to that. I made a couple changes to WSGI.cs locally that I am testing out. I thought about setting the environ variables from WSGI.cs directly, but I saw Seo had already started working on the problem in wsgi.py, so that's the direction I went. http://baus.net/ From mark.john.rees at gmail.com Tue Oct 31 23:44:58 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Wed, 1 Nov 2006 09:44:58 +1100 Subject: [IronPython] IronPython URLs In-Reply-To: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> Message-ID: To provide a permanent location for interesting links relating to IronPython and to generate Atom and RSS feeds I have created a simple blog. http://ironpython-urls.blogspot.com/ Atom feed http://ironpython-urls.blogspot.com/feeds/posts/default RSS feed http://ironpython-urls.blogspot.com/feeds/posts/default?alt=rss Any links or suggestions appreciated. Mark On 10/31/06, Sanghyeon Seo wrote: > > Mark Rees presents the second part of his IronPython and ADO.NET tutorial. > http://hex-dump.blogspot.com/2006/10/ironpython-and-adonet-part-2.html > > Przemek Piotrowski discusses using Oracle Data Provider with IronPython. > http://prpi.blogspot.com/2006/10/oracle-data-provider-for-net-under.html > > perezvon presents Django running on IronPython/Mono/Mac. > http://d.hatena.ne.jp/perezvon/20061030/1162209668 > > -- > Seo Sanghyeon > _______________________________________________ > 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: