From william at resolversystems.com Fri May 1 19:35:31 2009 From: william at resolversystems.com (William Reade) Date: Fri, 01 May 2009 18:35:31 +0100 Subject: [IronPython] Control event ids In-Reply-To: References: <49F98547.3040801@resolversystems.com> Message-ID: <49FB32E3.5040407@resolversystems.com> Curt Hagenlocher wrote: >> iour makes it extremely cumbersome to detach from events >> (some events, anyway; I'm pretty certain that I've seen events which >> don't exhibit this behaviour, but I can't remember what they are). >> > > An example of this would be useful. > Sorry for the noise -- it seems I was hallucinating. > -- > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From vkhaskel at hotmail.com Sat May 2 06:12:55 2009 From: vkhaskel at hotmail.com (Vadim Khaskel) Date: Sat, 2 May 2009 04:12:55 +0000 Subject: [IronPython] .exe is not pre-compiled Message-ID: I'm trying to import C-python module and getting the following ecxeption: C:\Documents and Settings\vkhask\My Documents\IronPython Studio\pygnu\pygnu\bin\Debug\pygnu.exe is not pre-compiled module; try again after deleting it. Please let me know what is the work around if you saw something like this. thanks a lot, Vadim _________________________________________________________________ Insert movie times and more without leaving Hotmail?. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daftspaniel at gmail.com Sat May 2 07:47:00 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Sat, 2 May 2009 06:47:00 +0100 Subject: [IronPython] IronPython on Win7 Build7100 Message-ID: <20253b0c0905012247h70398ce8o91e042e2cf79857d@mail.gmail.com> Hi Folks, Just upgraded from the Beta to RC for Win7. The OS is snappier than ever. Good stuff. However I've noticed IP (2.01 and 2.6) running a good bit slower since the Beta. Does anyone have any suggestions to why this might be or what I can look into? Thanks, Davy Mitchell From daftspaniel at gmail.com Sat May 2 09:54:43 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Sat, 2 May 2009 08:54:43 +0100 Subject: [IronPython] IronPython on Win7 Build7100 In-Reply-To: <20253b0c0905012247h70398ce8o91e042e2cf79857d@mail.gmail.com> References: <20253b0c0905012247h70398ce8o91e042e2cf79857d@mail.gmail.com> Message-ID: <20253b0c0905020054k71d6ca8bv229016b2b33deec0@mail.gmail.com> Well it seems normal now :-) Maybe a setup something was churning away in the background... Sorry for the noise! Davy On Sat, May 2, 2009 at 6:47 AM, Davy Mitchell wrote: > Hi Folks, > > Just upgraded from the Beta to RC for Win7. The OS is snappier than > ever. Good stuff. > > However I've noticed IP (2.01 and 2.6) running a good bit slower since > the Beta. Does anyone have any suggestions to why this might be or > what I can look into? > > Thanks, > Davy Mitchell > From jdhardy at gmail.com Sat May 2 16:46:56 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 2 May 2009 08:46:56 -0600 Subject: [IronPython] 2.6 Release Plan In-Reply-To: <350E7D38B6D819428718949920EC23555728B8A522@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC23555728B8A522@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: Hi Dino, Looks good!. So, September-October time frame - plenty of time to get more bug reports in :). - Jeff P.S. I took a look at the _ctypes code last night; your knowledge of IronPython internals astounds me. The big difference between yours and mine is that yours impements _ctypes while mine tried to cover all of ctypes. Interesting to see where they're similar and where they're different. On Thu, Apr 30, 2009 at 11:16 AM, Dino Viehland wrote: > Based upon the feedback from the mailing list here?s the 2.6 release plan > and list of new features: > > > > http://ironpython.codeplex.com/Wiki/View.aspx?title=2.6%20Release%20Plan > > > > Let me know if you have any questions or think there?s areas we should > include more info on. > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From jdhardy at gmail.com Sat May 2 16:51:59 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 2 May 2009 08:51:59 -0600 Subject: [IronPython] Pure Python zipimport Message-ID: Hi all, I've heard tales of a pure python version of zipimport, but can't seem to find it. Anybody have any links? - Jeff From dinov at microsoft.com Sat May 2 18:34:23 2009 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 2 May 2009 09:34:23 -0700 Subject: [IronPython] IronPython on Win7 Build7100 In-Reply-To: <20253b0c0905020054k71d6ca8bv229016b2b33deec0@mail.gmail.com> References: <20253b0c0905012247h70398ce8o91e042e2cf79857d@mail.gmail.com> <20253b0c0905020054k71d6ca8bv229016b2b33deec0@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E7E16@NA-EXMSG-C102.redmond.corp.microsoft.com> My guess this is due to ngen. Normally after the .NET framework installs there's a ngen service waiting to run in the background and compile all of the .NET framework. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell Sent: Saturday, May 02, 2009 12:55 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython on Win7 Build7100 Well it seems normal now :-) Maybe a setup something was churning away in the background... Sorry for the noise! Davy On Sat, May 2, 2009 at 6:47 AM, Davy Mitchell wrote: > Hi Folks, > > Just upgraded from the Beta to RC for Win7. The OS is snappier than > ever. Good stuff. > > However I've noticed IP (2.01 and 2.6) running a good bit slower since > the Beta. Does anyone have any suggestions to why this might be or > what I can look into? > > Thanks, > Davy Mitchell > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Sat May 2 20:43:44 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 02 May 2009 19:43:44 +0100 Subject: [IronPython] Pure Python zipimport In-Reply-To: References: Message-ID: <49FC9460.4070808@voidspace.org.uk> Hello Jeff, There is one here: http://code.google.com/p/googleappengine/issues/detail?id=161#c27 It implements 'most' of zipimport - but doesn't do some of the caching needed by setuptools I believe. Michael Jeff Hardy wrote: > Hi all, > I've heard tales of a pure python version of zipimport, but can't seem > to find it. Anybody have any links? > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From jdhardy at gmail.com Sat May 2 21:23:48 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 2 May 2009 13:23:48 -0600 Subject: [IronPython] Mercurial Status Message-ID: I've been testing IronPython with Mercurial. Using the 2.6 nightlies as the base, lots of it will "just work". (Make sure you grab zlib from http://cid-414fa1a9bd174b4b.skydrive.live.com/self.aspx/Public/IronPython.Zlib.zip). The attached patch moves things a little further on. Also, you'll need to use the pure modules. Basic stuff like hg status or hg version will work, but hg clone is the first problematic command I ran into. The current bugs are: - #13702 - Support errno interface in error derived from EnvironmentError - #22258 - _sha does not support 2.6 byte buffers - #22259 - len(buffer) is incorrect - #22260 - Cannot write buffer to file I ran into a unicode error caused by the workarounds for #22260 (converting randow binary data to a string doesn't always seem to work...), so that's kind of the showstopper right now. - Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: hg-ipy-20090502.diff Type: application/octet-stream Size: 3009 bytes Desc: not available URL: From adamb at silverkeytech.com Sat May 2 23:53:26 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Sat, 2 May 2009 14:53:26 -0700 Subject: [IronPython] ASP.Net Dynamic Language Support Download Location? Message-ID: <029301c9cb70$6cce39c0$466aad40$@com> Sorry if this sounds like a newbie question, but where can I get the September 2008 ASP.Net Dynamic Language Support files? I looked here: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 but for the life of me I can't see any link to the actual binaries. All I see are two examples and some documentation. Thanks, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From vkhaskel at hotmail.com Sun May 3 03:12:22 2009 From: vkhaskel at hotmail.com (Vadim Khaskel) Date: Sun, 3 May 2009 01:12:22 +0000 Subject: [IronPython] Adding GUI to multi threaded server Message-ID: Hello everybody, I'm trying to add GUI to Multi-threaded server, is there good resource or example (even better) how to do that? thank you, V. _________________________________________________________________ Hotmail? has a new way to see what's up with your friends. http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Sun May 3 09:23:21 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 3 May 2009 10:23:21 +0300 Subject: [IronPython] ASP.Net Dynamic Language Support Download Location? In-Reply-To: <029301c9cb70$6cce39c0$466aad40$@com> References: <029301c9cb70$6cce39c0$466aad40$@com> Message-ID: <8cd017b80905030023m4153eab6ufeda421e582c37c1@mail.gmail.com> FYI, ASP.Net Dynamic Language release in September 2008 does not work with .Net 3.5 libraries. On Sun, May 3, 2009 at 12:53 AM, Adam Brand wrote: > Sorry if this sounds like a newbie question, but where can I get the > September 2008 ASP.Net Dynamic Language Support files? > > > > I looked here: > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613but for the life of me I can?t see any link to the actual binaries. All I > see are two examples and some documentation. > > > > Thanks, > > Adam > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sun May 3 12:02:29 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 3 May 2009 10:02:29 +0000 Subject: [IronPython] ASP.Net Dynamic Language Support Download Location? In-Reply-To: <029301c9cb70$6cce39c0$466aad40$@com> References: <029301c9cb70$6cce39c0$466aad40$@com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC016B167C@tk5ex14mbxc106.redmond.corp.microsoft.com> The binaries are in the "ASP.NET WebForms IronPython Sample". From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand Sent: Saturday, May 02, 2009 2:53 PM To: 'Discussion of IronPython' Subject: [IronPython] ASP.Net Dynamic Language Support Download Location? Sorry if this sounds like a newbie question, but where can I get the September 2008 ASP.Net Dynamic Language Support files? I looked here: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 but for the life of me I can't see any link to the actual binaries. All I see are two examples and some documentation. Thanks, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Sun May 3 13:21:24 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 3 May 2009 12:21:24 +0100 Subject: [IronPython] Adding GUI to multi threaded server In-Reply-To: References: Message-ID: <065D1686-BF29-41BD-91FC-4AA8EB0A0142@voidspace.org.uk> Hello, I'm afraid the question is a bit vague to be able to answer. Is your problem with the GUI, the threading or the server part? If you want help writing a GUI with windows forms you may find some of the articles here helpful: http://voidspace.org.uk/ironpython/ Michael -- http://www.ironpythoninaction.com On 3 May 2009, at 02:12, Vadim Khaskel wrote: > Hello everybody, > > I'm trying to add GUI to Multi-threaded server, is there good > resource or example (even better) how to do that? > > thank you, > > V. > > Hotmail? has a new way to see what's up with your friends. Check it > out. > _______________________________________________ > 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 curt at hagenlocher.org Sun May 3 18:00:52 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 3 May 2009 09:00:52 -0700 Subject: [IronPython] .exe is not pre-compiled In-Reply-To: References: Message-ID: On Fri, May 1, 2009 at 9:12 PM, Vadim Khaskel wrote: > I'm trying to import C-python module and getting the following ecxeption: > > C:\Documents and Settings\vkhask\My Documents\IronPython > Studio\pygnu\pygnu\bin\Debug\pygnu.exe is not pre-compiled module; try again > after deleting it. If this is a Python extension written in C, then you might be able to use it with the Ironclad project ( http://code.google.com/p/ironclad/ ). IronPython itself doesn't support loading C extensions directly. -- Curt Hagenlocher curt at hagenlocher.org From jdhardy at gmail.com Sun May 3 19:49:54 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 3 May 2009 11:49:54 -0600 Subject: [IronPython] Pure Python zipimport In-Reply-To: <49FC9460.4070808@voidspace.org.uk> References: <49FC9460.4070808@voidspace.org.uk> Message-ID: Thanks Michael! - Jeff On Sat, May 2, 2009 at 12:43 PM, Michael Foord wrote: > Hello Jeff, > > There is one here: > > http://code.google.com/p/googleappengine/issues/detail?id=161#c27 > > It implements 'most' of zipimport - but doesn't do some of the caching > needed by setuptools I believe. > > Michael > > Jeff Hardy wrote: >> >> Hi all, >> I've heard tales of a pure python version of zipimport, but can't seem >> to find it. Anybody have any links? >> >> - Jeff >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jdhardy at gmail.com Sun May 3 22:18:31 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 3 May 2009 14:18:31 -0600 Subject: [IronPython] Assertion failure in IPy 2.6 while running Django Message-ID: The assertion is on line 91 of PythonFunction.Generated.cs (as of r49699, anyway): mi != null. Why mi is null I have no idea. The smallest repro I've found still requires Django (any recent checkout should do): >>> from django.db import models >>> message = models.TextField('message') If I had the following __init__ function to TextField the problem goes away: def __init__(self, *args, **kwargs): Field.__init__(self, *args, **kwargs) - Jeff From vkhaskel at hotmail.com Sun May 3 23:48:01 2009 From: vkhaskel at hotmail.com (Vadim Khaskel) Date: Sun, 3 May 2009 21:48:01 +0000 Subject: [IronPython] Users Digest, Vol 58, Issue 3 In-Reply-To: References: Message-ID: My multi threaded server is working fine, I just want to find out the way to redirect server's messages to rich text box for example. thank you, V. > From: users-request at lists.ironpython.com > Subject: Users Digest, Vol 58, Issue 3 > To: users at lists.ironpython.com > Date: Sun, 3 May 2009 13:06:49 -0700 > > Send Users mailing list submissions to > users at lists.ironpython.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > or, via email, send a message with subject or body 'help' to > users-request at lists.ironpython.com > > You can reach the person managing the list at > users-owner at lists.ironpython.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Users digest..." > > > Today's Topics: > > 1. ASP.Net Dynamic Language Support Download Location? (Adam Brand) > 2. Adding GUI to multi threaded server (Vadim Khaskel) > 3. Re: ASP.Net Dynamic Language Support Download Location? > (Dody Gunawinata) > 4. Re: ASP.Net Dynamic Language Support Download Location? > (Jimmy Schementi) > 5. Re: Adding GUI to multi threaded server (Michael Foord) > 6. Re: .exe is not pre-compiled (Curt Hagenlocher) > 7. Re: Pure Python zipimport (Jeff Hardy) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 2 May 2009 14:53:26 -0700 > From: "Adam Brand" > Subject: [IronPython] ASP.Net Dynamic Language Support Download > Location? > To: "'Discussion of IronPython'" > Message-ID: <029301c9cb70$6cce39c0$466aad40$@com> > Content-Type: text/plain; charset="us-ascii" > > Sorry if this sounds like a newbie question, but where can I get the > September 2008 ASP.Net Dynamic Language Support files? > > > > I looked here: > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 but > for the life of me I can't see any link to the actual binaries. All I see > are two examples and some documentation. > > > > Thanks, > > Adam > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Sun, 3 May 2009 01:12:22 +0000 > From: Vadim Khaskel > Subject: [IronPython] Adding GUI to multi threaded server > To: > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > > Hello everybody, > > I'm trying to add GUI to Multi-threaded server, is there good resource or example (even better) how to do that? > > thank you, > > V. > > _________________________________________________________________ > Hotmail? has a new way to see what's up with your friends. > http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 3 > Date: Sun, 3 May 2009 10:23:21 +0300 > From: Dody Gunawinata > Subject: Re: [IronPython] ASP.Net Dynamic Language Support Download > Location? > To: Discussion of IronPython > Message-ID: > <8cd017b80905030023m4153eab6ufeda421e582c37c1 at mail.gmail.com> > Content-Type: text/plain; charset="windows-1252" > > FYI, ASP.Net Dynamic Language release in September 2008 does not work with > .Net 3.5 libraries. > > On Sun, May 3, 2009 at 12:53 AM, Adam Brand wrote: > > > Sorry if this sounds like a newbie question, but where can I get the > > September 2008 ASP.Net Dynamic Language Support files? > > > > > > > > I looked here: > > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613but for the life of me I can?t see any link to the actual binaries. All I > > see are two examples and some documentation. > > > > > > > > Thanks, > > > > Adam > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > -- > nomadlife.org > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 4 > Date: Sun, 3 May 2009 10:02:29 +0000 > From: Jimmy Schementi > Subject: Re: [IronPython] ASP.Net Dynamic Language Support Download > Location? > To: Discussion of IronPython > Message-ID: > <0047ECBFA2E0DF4A834AA369282A5AFC016B167C at tk5ex14mbxc106.redmond.corp.microsoft.com> > > Content-Type: text/plain; charset="us-ascii" > > The binaries are in the "ASP.NET WebForms IronPython Sample". > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand > Sent: Saturday, May 02, 2009 2:53 PM > To: 'Discussion of IronPython' > Subject: [IronPython] ASP.Net Dynamic Language Support Download Location? > > Sorry if this sounds like a newbie question, but where can I get the September 2008 ASP.Net Dynamic Language Support files? > > I looked here: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 but for the life of me I can't see any link to the actual binaries. All I see are two examples and some documentation. > > Thanks, > Adam > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 5 > Date: Sun, 3 May 2009 12:21:24 +0100 > From: Michael Foord > Subject: Re: [IronPython] Adding GUI to multi threaded server > To: Discussion of IronPython > Cc: "" > Message-ID: <065D1686-BF29-41BD-91FC-4AA8EB0A0142 at voidspace.org.uk> > Content-Type: text/plain; charset="utf-8"; Format="flowed"; > DelSp="yes" > > Hello, > > I'm afraid the question is a bit vague to be able to answer. > > Is your problem with the GUI, the threading or the server part? > > If you want help writing a GUI with windows forms you may find some of > the articles here helpful: > > http://voidspace.org.uk/ironpython/ > > Michael > > > -- > http://www.ironpythoninaction.com > > On 3 May 2009, at 02:12, Vadim Khaskel wrote: > > > Hello everybody, > > > > I'm trying to add GUI to Multi-threaded server, is there good > > resource or example (even better) how to do that? > > > > thank you, > > > > V. > > > > Hotmail? has a new way to see what's up with your friends. Check it > > out. > > _______________________________________________ > > 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: > > ------------------------------ > > Message: 6 > Date: Sun, 3 May 2009 09:00:52 -0700 > From: Curt Hagenlocher > Subject: Re: [IronPython] .exe is not pre-compiled > To: Discussion of IronPython > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > On Fri, May 1, 2009 at 9:12 PM, Vadim Khaskel wrote: > > I'm trying to import C-python module and getting the following ecxeption: > > > > C:\Documents and Settings\vkhask\My Documents\IronPython > > Studio\pygnu\pygnu\bin\Debug\pygnu.exe is not pre-compiled module; try again > > after deleting it. > > If this is a Python extension written in C, then you might be able to > use it with the Ironclad project ( http://code.google.com/p/ironclad/ > ). IronPython itself doesn't support loading C extensions directly. > > -- > Curt Hagenlocher > curt at hagenlocher.org > > > ------------------------------ > > Message: 7 > Date: Sun, 3 May 2009 11:49:54 -0600 > From: Jeff Hardy > Subject: Re: [IronPython] Pure Python zipimport > To: Discussion of IronPython > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Thanks Michael! > > - Jeff > > On Sat, May 2, 2009 at 12:43 PM, Michael Foord > wrote: > > Hello Jeff, > > > > There is one here: > > > > http://code.google.com/p/googleappengine/issues/detail?id=161#c27 > > > > It implements 'most' of zipimport - but doesn't do some of the caching > > needed by setuptools I believe. > > > > Michael > > > > Jeff Hardy wrote: > >> > >> Hi all, > >> I've heard tales of a pure python version of zipimport, but can't seem > >> to find it. Anybody have any links? > >> > >> - Jeff > >> _______________________________________________ > >> Users mailing list > >> Users at lists.ironpython.com > >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >> > > > > > > -- > > http://www.ironpythoninaction.com/ > > http://www.voidspace.org.uk/blog > > > > > > _______________________________________________ > > 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 > > > End of Users Digest, Vol 58, Issue 3 > ************************************ _________________________________________________________________ Hotmail? has a new way to see what's up with your friends. http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Sun May 3 23:51:14 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 03 May 2009 22:51:14 +0100 Subject: [IronPython] Users Digest, Vol 58, Issue 3 In-Reply-To: References: Message-ID: <49FE11D2.9020900@voidspace.org.uk> Vadim Khaskel wrote: > My multi threaded server is working fine, I just want to find out the > way to redirect server's messages to rich text box for example. > Well, simply put the messages in the textbox - probably by invoking onto the GUI thread. Michael > thank you, > > V. > > > From: users-request at lists.ironpython.com > > Subject: Users Digest, Vol 58, Issue 3 > > To: users at lists.ironpython.com > > Date: Sun, 3 May 2009 13:06:49 -0700 > > > > Send Users mailing list submissions to > > users at lists.ironpython.com > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > or, via email, send a message with subject or body 'help' to > > users-request at lists.ironpython.com > > > > You can reach the person managing the list at > > users-owner at lists.ironpython.com > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Users digest..." > > > > > > Today's Topics: > > > > 1. ASP.Net Dynamic Language Support Download Location? (Adam Brand) > > 2. Adding GUI to multi threaded server (Vadim Khaskel) > > 3. Re: ASP.Net Dynamic Language Support Download Location? > > (Dody Gunawinata) > > 4. Re: ASP.Net Dynamic Language Support Download Location? > > (Jimmy Schementi) > > 5. Re: Adding GUI to multi threaded server (Michael Foord) > > 6. Re: .exe is not pre-compiled (Curt Hagenlocher) > > 7. Re: Pure Python zipimport (Jeff Hardy) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sat, 2 May 2009 14:53:26 -0700 > > From: "Adam Brand" > > Subject: [IronPython] ASP.Net Dynamic Language Support Download > > Location? > > To: "'Discussion of IronPython'" > > Message-ID: <029301c9cb70$6cce39c0$466aad40$@com> > > Content-Type: text/plain; charset="us-ascii" > > > > Sorry if this sounds like a newbie question, but where can I get the > > September 2008 ASP.Net Dynamic Language Support files? > > > > > > > > I looked here: > > > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 > but > > for the life of me I can't see any link to the actual binaries. All > I see > > are two examples and some documentation. > > > > > > > > Thanks, > > > > Adam > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > > > > ------------------------------ > > > > Message: 2 > > Date: Sun, 3 May 2009 01:12:22 +0000 > > From: Vadim Khaskel > > Subject: [IronPython] Adding GUI to multi threaded server > > To: > > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Hello everybody, > > > > I'm trying to add GUI to Multi-threaded server, is there good > resource or example (even better) how to do that? > > > > thank you, > > > > V. > > > > _________________________________________________________________ > > Hotmail? has a new way to see what's up with your friends. > > > http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > > > > ------------------------------ > > > > Message: 3 > > Date: Sun, 3 May 2009 10:23:21 +0300 > > From: Dody Gunawinata > > Subject: Re: [IronPython] ASP.Net Dynamic Language Support Download > > Location? > > To: Discussion of IronPython > > Message-ID: > > <8cd017b80905030023m4153eab6ufeda421e582c37c1 at mail.gmail.com> > > Content-Type: text/plain; charset="windows-1252" > > > > FYI, ASP.Net Dynamic Language release in September 2008 does not > work with > > .Net 3.5 libraries. > > > > On Sun, May 3, 2009 at 12:53 AM, Adam Brand > wrote: > > > > > Sorry if this sounds like a newbie question, but where can I get the > > > September 2008 ASP.Net Dynamic Language Support files? > > > > > > > > > > > > I looked here: > > > > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613but > for the life of me I can?t see any link to the actual binaries. All I > > > see are two examples and some documentation. > > > > > > > > > > > > Thanks, > > > > > > Adam > > > > > > _______________________________________________ > > > Users mailing list > > > Users at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > > > > > -- > > nomadlife.org > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > > > > ------------------------------ > > > > Message: 4 > > Date: Sun, 3 May 2009 10:02:29 +0000 > > From: Jimmy Schementi > > Subject: Re: [IronPython] ASP.Net Dynamic Language Support Download > > Location? > > To: Discussion of IronPython > > Message-ID: > > > <0047ECBFA2E0DF4A834AA369282A5AFC016B167C at tk5ex14mbxc106.redmond.corp.microsoft.com> > > > > Content-Type: text/plain; charset="us-ascii" > > > > The binaries are in the "ASP.NET WebForms IronPython Sample". > > > > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand > > Sent: Saturday, May 02, 2009 2:53 PM > > To: 'Discussion of IronPython' > > Subject: [IronPython] ASP.Net Dynamic Language Support Download > Location? > > > > Sorry if this sounds like a newbie question, but where can I get the > September 2008 ASP.Net Dynamic Language Support files? > > > > I looked here: > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 > but for the life of me I can't see any link to the actual binaries. > All I see are two examples and some documentation. > > > > Thanks, > > Adam > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > > > > > ------------------------------ > > > > Message: 5 > > Date: Sun, 3 May 2009 12:21:24 +0100 > > From: Michael Foord > > Subject: Re: [IronPython] Adding GUI to multi threaded server > > To: Discussion of IronPython > > Cc: "" > > Message-ID: <065D1686-BF29-41BD-91FC-4AA8EB0A0142 at voidspace.org.uk> > > Content-Type: text/plain; charset="utf-8"; Format="flowed"; > > DelSp="yes" > > > > Hello, > > > > I'm afraid the question is a bit vague to be able to answer. > > > > Is your problem with the GUI, the threading or the server part? > > > > If you want help writing a GUI with windows forms you may find some of > > the articles here helpful: > > > > http://voidspace.org.uk/ironpython/ > > > > Michael > > > > > > -- > > http://www.ironpythoninaction.com > > > > On 3 May 2009, at 02:12, Vadim Khaskel wrote: > > > > > Hello everybody, > > > > > > I'm trying to add GUI to Multi-threaded server, is there good > > > resource or example (even better) how to do that? > > > > > > thank you, > > > > > > V. > > > > > > Hotmail? has a new way to see what's up with your friends. Check it > > > out. > > > _______________________________________________ > > > 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: > > > > > ------------------------------ > > > > Message: 6 > > Date: Sun, 3 May 2009 09:00:52 -0700 > > From: Curt Hagenlocher > > Subject: Re: [IronPython] .exe is not pre-compiled > > To: Discussion of IronPython > > Message-ID: > > > > Content-Type: text/plain; charset=ISO-8859-1 > > > > On Fri, May 1, 2009 at 9:12 PM, Vadim Khaskel > wrote: > > > I'm trying to import C-python module and getting the following > ecxeption: > > > > > > C:\Documents and Settings\vkhask\My Documents\IronPython > > > Studio\pygnu\pygnu\bin\Debug\pygnu.exe is not pre-compiled module; > try again > > > after deleting it. > > > > If this is a Python extension written in C, then you might be able to > > use it with the Ironclad project ( http://code.google.com/p/ironclad/ > > ). IronPython itself doesn't support loading C extensions directly. > > > > -- > > Curt Hagenlocher > > curt at hagenlocher.org > > > > > > ------------------------------ > > > > Message: 7 > > Date: Sun, 3 May 2009 11:49:54 -0600 > > From: Jeff Hardy > > Subject: Re: [IronPython] Pure Python zipimport > > To: Discussion of IronPython > > Message-ID: > > > > Content-Type: text/plain; charset=ISO-8859-1 > > > > Thanks Michael! > > > > - Jeff > > > > On Sat, May 2, 2009 at 12:43 PM, Michael Foord > > wrote: > > > Hello Jeff, > > > > > > There is one here: > > > > > > http://code.google.com/p/googleappengine/issues/detail?id=161#c27 > > > > > > It implements 'most' of zipimport - but doesn't do some of the caching > > > needed by setuptools I believe. > > > > > > Michael > > > > > > Jeff Hardy wrote: > > >> > > >> Hi all, > > >> I've heard tales of a pure python version of zipimport, but can't > seem > > >> to find it. Anybody have any links? > > >> > > >> - Jeff > > >> _______________________________________________ > > >> Users mailing list > > >> Users at lists.ironpython.com > > >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > >> > > > > > > > > > -- > > > http://www.ironpythoninaction.com/ > > > http://www.voidspace.org.uk/blog > > > > > > > > > _______________________________________________ > > > 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 > > > > > > End of Users Digest, Vol 58, Issue 3 > > ************************************ > > ------------------------------------------------------------------------ > Hotmail? has a new way to see what's up with your friends. Check it > out. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Sun May 3 23:59:05 2009 From: dinov at microsoft.com (Dino Viehland) Date: Sun, 3 May 2009 14:59:05 -0700 Subject: [IronPython] Assertion failure in IPy 2.6 while running Django In-Reply-To: References: Message-ID: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> Do you happen to know what baseName is when the assertion is hit? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Sunday, May 03, 2009 1:19 PM To: Discussion of IronPython Subject: [IronPython] Assertion failure in IPy 2.6 while running Django The assertion is on line 91 of PythonFunction.Generated.cs (as of r49699, anyway): mi != null. Why mi is null I have no idea. The smallest repro I've found still requires Django (any recent checkout should do): >>> from django.db import models >>> message = models.TextField('message') If I had the following __init__ function to TextField the problem goes away: def __init__(self, *args, **kwargs): Field.__init__(self, *args, **kwargs) - Jeff _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From nxnth at yahoo.com.cn Mon May 4 03:43:28 2009 From: nxnth at yahoo.com.cn (nixon) Date: Mon, 4 May 2009 09:43:28 +0800 (CST) Subject: [IronPython] XBAP Partial Trust Failure Message-ID: <98611.96665.qm@web15004.mail.cnb.yahoo.com> Hi, dear all, When writing a WPF browser application (XBAP) and trying to create a scriptEngine using Python.CreateEngine(), I get the following error: Type 'IronPython.Runtime.PythonContext' doesn't provide a suitable public constructor or its implementation is faulty: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. This is because IronPython doesnot adhere to the standard "Internet Zone" CAS permission by XBAP. A workaround is to evelate permission through setting the "Create and control application domains" of SecurityPermission. However, it requires further handling during Deployment, which is not convenient to the end users. How can I recompile IronPython to make it adhere the standard "Internet Zone" CAS permission? I think this is also helpful to make IronPython popular in XBAP. Thank you! Best Regards Nixon ___________________________________________________________ ????????????????? http://card.mail.cn.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From william at resolversystems.com Mon May 4 14:58:38 2009 From: william at resolversystems.com (William Reade) Date: Mon, 04 May 2009 13:58:38 +0100 Subject: [IronPython] .exe is not pre-compiled In-Reply-To: References: Message-ID: <49FEE67E.1020603@resolversystems.com> Generally, CPython modules have the .pyd extension -- and, in fact, Ironclad will only detect and handle attempts to import .pyd files. So, sadly, it won't help you here. It wouldn't be hard to make Ironclad handle .exe files, but the likelihood of it doing anything useful with them is minimal. Is it the case that you've somehow compiled an IronPython project to an .exe, when you really wanted to use Pyc (included with ipy2, I think) to turn it into a .dll that you can import from? If you search these lists, you should find more help on that topic. Curt Hagenlocher wrote: > On Fri, May 1, 2009 at 9:12 PM, Vadim Khaskel wrote: > >> I'm trying to import C-python module and getting the following ecxeption: >> >> C:\Documents and Settings\vkhask\My Documents\IronPython >> Studio\pygnu\pygnu\bin\Debug\pygnu.exe is not pre-compiled module; try again >> after deleting it. >> > > If this is a Python extension written in C, then you might be able to > use it with the Ironclad project ( http://code.google.com/p/ironclad/ > ). IronPython itself doesn't support loading C extensions directly. > > -- > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From kristian.jaksch at gmail.com Mon May 4 16:25:13 2009 From: kristian.jaksch at gmail.com (Kristian Jaksch) Date: Mon, 4 May 2009 16:25:13 +0200 Subject: [IronPython] How to get access to enum? Message-ID: <1dab55500905040725h6ed2fee7jd216f573b7e749ca@mail.gmail.com> How can I get access to enums in IronPython? For example, when running IronPython + Silverlight I need access to the Visibility enum: btnMaxPlot.Visibility = Visibility.Collapsed This results in an error: "NameError:?name?'Visibility'?is?not?defined" Thanks for help! /Kristian From max at ford-consulting.com Mon May 4 16:28:07 2009 From: max at ford-consulting.com (Max Barry) Date: Mon, 4 May 2009 07:28:07 -0700 Subject: [IronPython] Getting type error when calling a .NET DLL interface. Message-ID: <731F45C552FF0E47973E42EDBFFB4852A9D8C5@cooper.ford-consulting.local> Hi all, I am trying to call an interface from DLL created in .Net to work with a IronPython script and am getting the following error when I run the code: TypeError: Cannot create instances of IDSSCatalog The trace is below: Traceback (most recent call last): File ".\Tutorial\ShiftIntervalMaxValue.py", line 82, in RunApp Process() File ".\Tutorial\ShiftIntervalMaxValue.py", line 97, in Process dictgages = GetCatalogDictFromDSSRS(db,DSS_RS_FILTER) File ".\Tutorial\ShiftIntervalMaxValue.py", line 176, in GetCatalogDictFromDSS RS ds = CatalogAsDataSet(db) File ".\Tutorial\ShiftIntervalMaxValue.py", line 198, in CatalogAsDataSet dssCatalog = IDSSCatalog(db) TypeError: Cannot create instances of IDSSCatalog Below is an example of the code that created the error: import clr def LoadTSMNet(): import string,sys from os import path #from System.Reflection import Assembly #Import .Net Assembly to import DLL mypath = path.dirname(sys.argv[0]) tsmpath = path.join(mypath,"TimeSeriesMgrNet.dll") tsmpath = string.replace(tsmpath,'\\','\\\\') clr.AddReferenceToFileAndPath(tsmpath) #Assembly.LoadFile(tsmpath) LoadTSMNet() clr.AddReferenceByPartialName("TimeSeriesMgrNet") import TimeSeriesMgrNet from TimeSeriesMgrNet import IDSSCatalog, DSSDatabase DSS_DATABASE_PATH = "C:/temp/myfile.dss" db = DSSDatabase() db.Name = DSS_DATABASE_PATH db.Connect(False) dssCatalog = IDSSCatalog(db) dssCatalog.MakeNewCatalog('') ds = dssCatalog.AsDataSet(True,'') db.Disconnect() IDSSCatalog is the interface and DSSDatabase implements the interface. Any ideas on why I am getting this error? Thanks, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.p.lepisto at intel.com Mon May 4 17:12:36 2009 From: stephen.p.lepisto at intel.com (Lepisto, Stephen P) Date: Mon, 4 May 2009 08:12:36 -0700 Subject: [IronPython] How to get access to enum? In-Reply-To: <1dab55500905040725h6ed2fee7jd216f573b7e749ca@mail.gmail.com> References: <1dab55500905040725h6ed2fee7jd216f573b7e749ca@mail.gmail.com> Message-ID: <6AF28EB9F93A354894F2F3916DF6F96E0C6E8BCCD7@orsmsx510.amr.corp.intel.com> I believe you just need to import the enumeration: from import Visibility where is the module containing the definition of the enumeration. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kristian Jaksch Sent: Monday, May 04, 2009 7:25 AM To: users at lists.ironpython.com Subject: [IronPython] How to get access to enum? How can I get access to enums in IronPython? For example, when running IronPython + Silverlight I need access to the Visibility enum: btnMaxPlot.Visibility = Visibility.Collapsed This results in an error: "NameError:?name?'Visibility'?is?not?defined" Thanks for help! /Kristian _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kristian.jaksch at gmail.com Mon May 4 17:20:46 2009 From: kristian.jaksch at gmail.com (Kristian Jaksch) Date: Mon, 4 May 2009 17:20:46 +0200 Subject: [IronPython] How to get access to enum? In-Reply-To: <6AF28EB9F93A354894F2F3916DF6F96E0C6E8BCCD7@orsmsx510.amr.corp.intel.com> References: <1dab55500905040725h6ed2fee7jd216f573b7e749ca@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E8BCCD7@orsmsx510.amr.corp.intel.com> Message-ID: <1dab55500905040820v3d10e571i72b15eae1ba8f2a1@mail.gmail.com> Yes, I found it just before you replied. Thanks anyway! 2009/5/4 Lepisto, Stephen P : > I believe you just need to import the enumeration: > > from import Visibility > > where is the module containing the definition of the enumeration. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kristian Jaksch > Sent: Monday, May 04, 2009 7:25 AM > To: users at lists.ironpython.com > Subject: [IronPython] How to get access to enum? > > How can I get access to enums in IronPython? > > For example, when running IronPython + Silverlight I need access to > the Visibility enum: > > btnMaxPlot.Visibility = Visibility.Collapsed > > This results in an error: > "NameError:?name?'Visibility'?is?not?defined" > > Thanks for help! > > /Kristian > _______________________________________________ > 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 jdhardy at gmail.com Mon May 4 17:32:14 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 4 May 2009 09:32:14 -0600 Subject: [IronPython] Assertion failure in IPy 2.6 while running Django In-Reply-To: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: On Sun, May 3, 2009 at 3:59 PM, Dino Viehland wrote: > Do you happen to know what baseName is when the assertion is hit? Default19, IIRC. - Jeff > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Sunday, May 03, 2009 1:19 PM > To: Discussion of IronPython > Subject: [IronPython] Assertion failure in IPy 2.6 while running Django > > The assertion is on line 91 of PythonFunction.Generated.cs (as of > r49699, anyway): mi != null. Why mi is null I have no idea. > > The smallest repro I've found still requires Django (any recent > checkout should do): > >>>> from django.db import models >>>> message = models.TextField('message') > > If I had the following __init__ function to TextField the problem goes away: > def __init__(self, *args, **kwargs): > ? ? ? ?Field.__init__(self, *args, **kwargs) > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From dfugate at microsoft.com Mon May 4 18:10:32 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 4 May 2009 09:10:32 -0700 Subject: [IronPython] Getting type error when calling a .NET DLL interface. In-Reply-To: <731F45C552FF0E47973E42EDBFFB4852A9D8C5@cooper.ford-consulting.local> References: <731F45C552FF0E47973E42EDBFFB4852A9D8C5@cooper.ford-consulting.local> Message-ID: At first glance, I'd say there's no need for the "dssCatalog = IDSSCatalog(db)" line which doesn't work because you're attempting to instantiate an interface. That is, if DSSDatabase truly implements IDSSCatalog; just call "db.MakeNewCatalog('')". Dave From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Max Barry Sent: Monday, May 04, 2009 7:28 AM To: users at lists.ironpython.com Subject: [IronPython] Getting type error when calling a .NET DLL interface. Hi all, I am trying to call an interface from DLL created in .Net to work with a IronPython script and am getting the following error when I run the code: TypeError: Cannot create instances of IDSSCatalog The trace is below: Traceback (most recent call last): File ".\Tutorial\ShiftIntervalMaxValue.py", line 82, in RunApp Process() File ".\Tutorial\ShiftIntervalMaxValue.py", line 97, in Process dictgages = GetCatalogDictFromDSSRS(db,DSS_RS_FILTER) File ".\Tutorial\ShiftIntervalMaxValue.py", line 176, in GetCatalogDictFromDSS RS ds = CatalogAsDataSet(db) File ".\Tutorial\ShiftIntervalMaxValue.py", line 198, in CatalogAsDataSet dssCatalog = IDSSCatalog(db) TypeError: Cannot create instances of IDSSCatalog Below is an example of the code that created the error: import clr def LoadTSMNet(): import string,sys from os import path #from System.Reflection import Assembly #Import .Net Assembly to import DLL mypath = path.dirname(sys.argv[0]) tsmpath = path.join(mypath,"TimeSeriesMgrNet.dll") tsmpath = string.replace(tsmpath,'\\','\\\\') clr.AddReferenceToFileAndPath(tsmpath) #Assembly.LoadFile(tsmpath) LoadTSMNet() clr.AddReferenceByPartialName("TimeSeriesMgrNet") import TimeSeriesMgrNet from TimeSeriesMgrNet import IDSSCatalog, DSSDatabase DSS_DATABASE_PATH = "C:/temp/myfile.dss" db = DSSDatabase() db.Name = DSS_DATABASE_PATH db.Connect(False) dssCatalog = IDSSCatalog(db) dssCatalog.MakeNewCatalog('') ds = dssCatalog.AsDataSet(True,'') db.Disconnect() IDSSCatalog is the interface and DSSDatabase implements the interface. Any ideas on why I am getting this error? Thanks, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon May 4 19:10:47 2009 From: timr at probo.com (Tim Roberts) Date: Mon, 04 May 2009 10:10:47 -0700 Subject: [IronPython] IronPython on Win7 Build7100 In-Reply-To: References: Message-ID: <49FF2197.9040801@probo.com> On Sat, 2 May 2009 06:47:00 +0100, Davy Mitchell wrote: > Just upgraded from the Beta to RC for Win7. The OS is snappier than > ever. Good stuff. > It's a bit off-topic for this list, but I'd like to second this. I primarily write Windows drivers, and I really hated Vista. I have a big test box with 4 different OS partitions, but I only booted Vista when I absolutely had to. However, my Win 7 experience has been significantly better. I find that I'm actually CHOOSING to boot Win 7 when I start up my test box. I'm not sure I can put my finger on exactly what's different, but it has certainly made it a lot more pleasant to test drivers. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From dinov at microsoft.com Mon May 4 22:13:38 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 4 May 2009 13:13:38 -0700 Subject: [IronPython] Mercurial Status In-Reply-To: References: Message-ID: <350E7D38B6D819428718949920EC235557298E8177@NA-EXMSG-C102.redmond.corp.microsoft.com> You mention bug #22258 - is Mercurial using byte array notation wherever they intend to have a non-Unicode string? I'm just curious because there may be a lot of other subtle Unicode issues. For example: foo = open('foo', 'w+b') b = buffer(u'hello world', 6) foo.write(b) foo.close() in CPython doing readlines brings back: ['l\x00o\x00 \x00w\x00o\x00r\x00l\x00d\x00'] For us this is the same as doing b = buffer('hello world', 6) - which in CPython returns 'world' as one would expect. So I'm thinking we should match the Unicode string behavior here but that could break something else. But as long as Mercurial is consistently using b'' for its non-Unicode strings then things will work. Hopefully if they're not they'd look upon those changes as just being goodness for 3.x compat. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Saturday, May 02, 2009 12:24 PM > To: Discussion of IronPython > Subject: [IronPython] Mercurial Status > > I've been testing IronPython with Mercurial. Using the 2.6 nightlies as > the base, lots of it will "just work". (Make sure you grab zlib from > http://cid- > 414fa1a9bd174b4b.skydrive.live.com/self.aspx/Public/IronPython.Zlib.zip > ). > The attached patch moves things a little further on. Also, you'll need > to use the pure modules. > > Basic stuff like hg status or hg version will work, but hg clone is the > first problematic command I ran into. > > The current bugs are: > - #13702 - Support errno interface in error derived from > EnvironmentError > - #22258 - _sha does not support 2.6 byte buffers > - #22259 - len(buffer) is incorrect > - #22260 - Cannot write buffer to file > > I ran into a unicode error caused by the workarounds for #22260 > (converting randow binary data to a string doesn't always seem to > work...), so that's kind of the showstopper right now. > > - Jeff From glenn.schmottlach at harman.com Mon May 4 22:15:08 2009 From: glenn.schmottlach at harman.com (Schmottlach, Glenn) Date: Mon, 4 May 2009 16:15:08 -0400 Subject: [IronPython] Making asynchronous calls in IronPython Message-ID: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> Although I'm very comfortable with CPython, I'm new to IronPython and the .NET framework. What I am looking for is sample code that shows how to issue an asynchronous call from IronPython using the BeginInvoke/EndInvoke mechanism of .NET. Currently, I'm playing around with GTK# and a D-Bus .NET implementation (NDesk-DBus) that only provides synchronous proxy methods for D-Bus services. I believe (please correct me if I'm wrong) that I should be able to use the BeginInvoke/EndInvoke mechanism to issue these blocking proxy requests asynchronously and be notified (via a callback) when the method has completed. My blocking proxy calls look something like this: ret = self._proxy.TunerGetCurrentWaveBand(0) where 'ret' returns the current waveband (AM, FM, etc..) and are called from a button "clicked" delegate. I would rather not block the GTK# dispatch loop while waiting for the reply from the service. Can someone offer me any advice or provide a reference to sample code that illustrates the basic concept from IronPython? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Mon May 4 22:17:24 2009 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 4 May 2009 13:17:24 -0700 Subject: [IronPython] [OT] RE: IronPython on Win7 Build7100 References: <49FF2197.9040801@probo.com> Message-ID: Might I suggest: the fact that it doesn't have "Vista" on the label? Don't get me wrong, Win7 is a great advance over Vista -- I'm using it exclusively at home and have been since the beta, but the only differences from Vista (whch I use on my work laptop until tomorrow) that I encounter day-to-day are the superbar and the smoother processing (see Russinovich's video about detangling the scheduler that was passed down from times long forgotten). If you can't put your finger one a reason, I suspect the reason has more to do with a (subconscious) attitude about Vista that you don't have about Win7 (and Vista had a *lot* of social baggage from the start that was never properly handled). ________________________________ From: users-bounces at lists.ironpython.com on behalf of Tim Roberts Sent: Mon 5/4/2009 10:10 AM To: users at lists.ironpython.com Subject: [IronPython] IronPython on Win7 Build7100 On Sat, 2 May 2009 06:47:00 +0100, Davy Mitchell wrote: > Just upgraded from the Beta to RC for Win7. The OS is snappier than > ever. Good stuff. > It's a bit off-topic for this list, but I'd like to second this. I primarily write Windows drivers, and I really hated Vista. I have a big test box with 4 different OS partitions, but I only booted Vista when I absolutely had to. However, my Win 7 experience has been significantly better. I find that I'm actually CHOOSING to boot Win 7 when I start up my test box. I'm not sure I can put my finger on exactly what's different, but it has certainly made it a lot more pleasant to test drivers. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Mon May 4 22:33:11 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 04 May 2009 21:33:11 +0100 Subject: [IronPython] Making asynchronous calls in IronPython In-Reply-To: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> Message-ID: <49FF5107.4030500@voidspace.org.uk> Schmottlach, Glenn wrote: > > Although I?m very comfortable with CPython, I?m new to IronPython and > the .NET framework. What I am looking for is sample code that shows > how to issue an asynchronous call from IronPython using the > BeginInvoke/EndInvoke mechanism of .NET. > I can't remember the usage off the top of my head - but usage from IronPython is identical to usage from C#, so an MSDN example ought to give you what you need. All the best, Michael > > Currently, I?m playing around with GTK# and a D-Bus .NET > implementation (NDesk-DBus) that only provides synchronous proxy > methods for D-Bus services. I believe (please correct me if I?m wrong) > that I should be able to use the BeginInvoke/EndInvoke mechanism to > issue these blocking proxy requests asynchronously and be notified > (via a callback) when the method has completed. > > My blocking proxy calls look something like this: > > ret = /self/._proxy.TunerGetCurrentWaveBand(0) > > where ?ret? returns the current waveband (AM, FM, etc..) and are > called from a button ?clicked? delegate. I would rather not block the > GTK# dispatch loop while waiting for the reply from the service. Can > someone offer me any advice or provide a reference to sample code that > illustrates the basic concept from IronPython? > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From glenn.schmottlach at harman.com Mon May 4 23:01:29 2009 From: glenn.schmottlach at harman.com (Schmottlach, Glenn) Date: Mon, 4 May 2009 17:01:29 -0400 Subject: [IronPython] Making asynchronous calls in IronPython References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> <49FF5107.4030500@voidspace.org.uk> Message-ID: <45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> I've looked at the C# examples in MSDN but they don't appear to lend themselves (at least with my limited experience in .NET) to an easy implementation in IronPython due to the dynamic nature of the type system in Python. The example I looked at: http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx declares a delegate type which seems difficult to do in IronPython, e.g. C# public delegate bool AsyncFactorCaller ( int number, ref int primefactor1, ref int primefactor2); So what's the equivalent in IronPython? Also, (out) parameters are passed by reference to BeginInvoke and EndInvoke and it's not clear to me how to handle this in IronPython. So, I suspect I'm missing something in order to get things working. What I really need to see is a concrete IronPython example and I think things would gel at that point. Could you offer such an example . . . Google hasn't been helpful in this respect. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, May 04, 2009 4:33 PM To: Discussion of IronPython Subject: Re: [IronPython] Making asynchronous calls in IronPython Schmottlach, Glenn wrote: > > Although I'm very comfortable with CPython, I'm new to IronPython and > the .NET framework. What I am looking for is sample code that shows > how to issue an asynchronous call from IronPython using the > BeginInvoke/EndInvoke mechanism of .NET. > I can't remember the usage off the top of my head - but usage from IronPython is identical to usage from C#, so an MSDN example ought to give you what you need. All the best, Michael > > Currently, I'm playing around with GTK# and a D-Bus .NET > implementation (NDesk-DBus) that only provides synchronous proxy > methods for D-Bus services. I believe (please correct me if I'm wrong) > that I should be able to use the BeginInvoke/EndInvoke mechanism to > issue these blocking proxy requests asynchronously and be notified > (via a callback) when the method has completed. > > My blocking proxy calls look something like this: > > ret = /self/._proxy.TunerGetCurrentWaveBand(0) > > where 'ret' returns the current waveband (AM, FM, etc..) and are > called from a button "clicked" delegate. I would rather not block the > GTK# dispatch loop while waiting for the reply from the service. Can > someone offer me any advice or provide a reference to sample code that > illustrates the basic concept from IronPython? > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From max at ford-consulting.com Mon May 4 23:16:47 2009 From: max at ford-consulting.com (Max Barry) Date: Mon, 4 May 2009 14:16:47 -0700 Subject: [IronPython] Getting type error when calling a .NET DLL interface. In-Reply-To: References: Message-ID: <731F45C552FF0E47973E42EDBFFB4852A9D964@cooper.ford-consulting.local> Thanks Dave that seemed to work. Can you tell me why this is the case? I ran the code in python for .NET and it work correctly. I would expect to have implemented the interface in this way in order to use it. Thanks, Max From fuzzyman at voidspace.org.uk Mon May 4 23:47:49 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 04 May 2009 22:47:49 +0100 Subject: [IronPython] Making asynchronous calls in IronPython In-Reply-To: <45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> <49FF5107.4030500@voidspace.org.uk> <45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> Message-ID: <49FF6285.6020804@voidspace.org.uk> Schmottlach, Glenn wrote: > I've looked at the C# examples in MSDN but they don't appear to lend > themselves (at least with my limited experience in .NET) to an easy > implementation in IronPython due to the dynamic nature of the type > system in Python. > > The example I looked at: > > http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx > > > declares a delegate type which seems difficult to do in IronPython, e.g. > > C# > > public delegate bool AsyncFactorCaller ( > int number, > ref int primefactor1, > ref int primefactor2); > > So what's the equivalent in IronPython? > > Also, (out) parameters are passed by reference to BeginInvoke and > EndInvoke and it's not clear to me how to handle this in IronPython. > > So, I suspect I'm missing something in order to get things working. What > I really need to see is a concrete IronPython example and I think things > would gel at that point. Could you offer such an example . . . Google > hasn't been helpful in this respect. > out parameters are handled by IronPython as extra return values - you wrap your callback function in CallTarget0 and an AsyncCallback. I hope this helps. Michael > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, May 04, 2009 4:33 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > Schmottlach, Glenn wrote: > >> Although I'm very comfortable with CPython, I'm new to IronPython and >> the .NET framework. What I am looking for is sample code that shows >> how to issue an asynchronous call from IronPython using the >> BeginInvoke/EndInvoke mechanism of .NET. >> >> > > I can't remember the usage off the top of my head - but usage from > IronPython is identical to usage from C#, so an MSDN example ought to > give you what you need. > > All the best, > > Michael > >> Currently, I'm playing around with GTK# and a D-Bus .NET >> implementation (NDesk-DBus) that only provides synchronous proxy >> methods for D-Bus services. I believe (please correct me if I'm wrong) >> > > >> that I should be able to use the BeginInvoke/EndInvoke mechanism to >> issue these blocking proxy requests asynchronously and be notified >> (via a callback) when the method has completed. >> >> My blocking proxy calls look something like this: >> >> ret = /self/._proxy.TunerGetCurrentWaveBand(0) >> >> where 'ret' returns the current waveband (AM, FM, etc..) and are >> called from a button "clicked" delegate. I would rather not block the >> GTK# dispatch loop while waiting for the reply from the service. Can >> someone offer me any advice or provide a reference to sample code that >> > > >> illustrates the basic concept from IronPython? >> >> >> > ------------------------------------------------------------------------ > >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From curt at hagenlocher.org Mon May 4 23:50:05 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 4 May 2009 14:50:05 -0700 Subject: [IronPython] Getting type error when calling a .NET DLL interface. In-Reply-To: <731F45C552FF0E47973E42EDBFFB4852A9D964@cooper.ford-consulting.local> References: <731F45C552FF0E47973E42EDBFFB4852A9D964@cooper.ford-consulting.local> Message-ID: In a statically-typed language like C#, if you have a reference to an "object", you need to tell the compiler that this object is really a "Foo" in order to use any of Foo's methods with the object. The compiler generates whatever code is necessary to cast the variable to a Foo and will then allow you to use any of Foo's public methods with the object. (In a strongly-typed language like C#, the typecast may also throw an exception if the object isn't really a Foo.) Variables don't have types in a dynamically-typed language like Python, so the idea that you can cast the variable to another type simply doesn't exist. Instead, when you call a method by a particular name, the call is dispatched at runtime based on whatever form of method resolution is appropriate for that object. Side note: for .NET, unless some kind of remoting comes into the picture, all references to an object see the entire object. This is in contrast to COM, where you never really see more than one interface at a time on the object. On Mon, May 4, 2009 at 2:16 PM, Max Barry wrote: > Thanks Dave that seemed to work. Can you tell me why this is the case? I > ran the code in python for .NET and it work correctly. I would expect to > have implemented the interface in this way in order to use it. > > Thanks, > Max > _______________________________________________ > 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 glenn.schmottlach at harman.com Mon May 4 23:58:23 2009 From: glenn.schmottlach at harman.com (Schmottlach, Glenn) Date: Mon, 4 May 2009 17:58:23 -0400 Subject: [IronPython] Making asynchronous calls in IronPython References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> <49FF5107.4030500@voidspace.org.uk><45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> <49FF6285.6020804@voidspace.org.uk> Message-ID: <45624339E59DEC4993D0D7AEBDE346BF048A6117@HBFHEX02> Okay, call me clueless . . . This is what I have so far as an example: import clr clr.AddReference('IronPython') from System import * from System.Threading import Thread from IronPython.Compiler import CallTarget0 class Foo: def start(self): print 'Started.' Thread.Sleep(3000) threadId = System.Threading.Thread.CurrentThread return 'Exiting thread %r' % (threadId) def finish(self, r): print 'Finished.' if __name__ == '__main__': f = Foo() caller = CallTarget0(f.start) result = caller.BeginInvoke(None, None) caller.EndInvoke(result) Can you give me a concrete example of using CallTarget0 and AsyncCallback to implement this? What it does now is print: Finished. SystemError:Object reference not set to an instance of an object. Obviously, I'm not using AsyncCallback because it's not clear to me what I pass to the constructor and where I pass the subsequent object. If you could spare me a few moments and correct this simple sample it would be very grateful. Thanks . . . -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, May 04, 2009 5:48 PM To: Discussion of IronPython Subject: Re: [IronPython] Making asynchronous calls in IronPython Schmottlach, Glenn wrote: > I've looked at the C# examples in MSDN but they don't appear to lend > themselves (at least with my limited experience in .NET) to an easy > implementation in IronPython due to the dynamic nature of the type > system in Python. > > The example I looked at: > > http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx > > > declares a delegate type which seems difficult to do in IronPython, e.g. > > C# > > public delegate bool AsyncFactorCaller ( > int number, > ref int primefactor1, > ref int primefactor2); > > So what's the equivalent in IronPython? > > Also, (out) parameters are passed by reference to BeginInvoke and > EndInvoke and it's not clear to me how to handle this in IronPython. > > So, I suspect I'm missing something in order to get things working. What > I really need to see is a concrete IronPython example and I think things > would gel at that point. Could you offer such an example . . . Google > hasn't been helpful in this respect. > out parameters are handled by IronPython as extra return values - you wrap your callback function in CallTarget0 and an AsyncCallback. I hope this helps. Michael > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, May 04, 2009 4:33 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > Schmottlach, Glenn wrote: > >> Although I'm very comfortable with CPython, I'm new to IronPython and >> the .NET framework. What I am looking for is sample code that shows >> how to issue an asynchronous call from IronPython using the >> BeginInvoke/EndInvoke mechanism of .NET. >> >> > > I can't remember the usage off the top of my head - but usage from > IronPython is identical to usage from C#, so an MSDN example ought to > give you what you need. > > All the best, > > Michael > >> Currently, I'm playing around with GTK# and a D-Bus .NET >> implementation (NDesk-DBus) that only provides synchronous proxy >> methods for D-Bus services. I believe (please correct me if I'm wrong) >> > > >> that I should be able to use the BeginInvoke/EndInvoke mechanism to >> issue these blocking proxy requests asynchronously and be notified >> (via a callback) when the method has completed. >> >> My blocking proxy calls look something like this: >> >> ret = /self/._proxy.TunerGetCurrentWaveBand(0) >> >> where 'ret' returns the current waveband (AM, FM, etc..) and are >> called from a button "clicked" delegate. I would rather not block the >> GTK# dispatch loop while waiting for the reply from the service. Can >> someone offer me any advice or provide a reference to sample code that >> > > >> illustrates the basic concept from IronPython? >> >> >> > ------------------------------------------------------------------------ > >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Tue May 5 00:17:44 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 4 May 2009 15:17:44 -0700 Subject: [IronPython] Making asynchronous calls in IronPython In-Reply-To: <45624339E59DEC4993D0D7AEBDE346BF048A6117@HBFHEX02> References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> <49FF5107.4030500@voidspace.org.uk><45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> <49FF6285.6020804@voidspace.org.uk> <45624339E59DEC4993D0D7AEBDE346BF048A6117@HBFHEX02> Message-ID: <350E7D38B6D819428718949920EC235557298E8231@NA-EXMSG-C102.redmond.corp.microsoft.com> This is actually a CLR bug. A simple repro of the issue is below if anyone is curious. The CLR team has resolved this bug as "Won't Fix" and says a workaround is available. The only workaround I can think of is explicitly queueing the work item to the thread pool and provide an object for you to get state back on. I've asked them for more information. Unfortunately it means that currently this just won't work in IronPython on MS .NET at all today :(. using System; using System.Reflection; using System.Reflection.Emit; using System.Globalization; class Test { delegate void MyDelegate(); public static void Main(string[]args) { DynamicMethod test = new DynamicMethod("Hello", typeof(void), new Type[]{typeof(string)}, typeof(string).Module); MethodInfo writeString = typeof(Console).GetMethod("WriteLine", new Type[]{typeof(string)}); ILGenerator il = test.GetILGenerator(256); il.Emit(OpCodes.Ldarg_0); il.EmitCall(OpCodes.Call, writeString, null); il.Emit(OpCodes.Ret); MyDelegate dlg = (MyDelegate) test.CreateDelegate(typeof(MyDelegate), "Hello World!"); dlg.BeginInvoke(new AsyncCallback(Finished), null); Console.ReadLine(); } public static void Finished(IAsyncResult ar) { } } > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Schmottlach, Glenn > Sent: Monday, May 04, 2009 2:58 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > Okay, call me clueless . . . > > This is what I have so far as an example: > > import clr > clr.AddReference('IronPython') > > from System import * > from System.Threading import Thread > from IronPython.Compiler import CallTarget0 > > class Foo: > def start(self): > print 'Started.' > Thread.Sleep(3000) > threadId = System.Threading.Thread.CurrentThread > return 'Exiting thread %r' % (threadId) > > def finish(self, r): > print 'Finished.' > > > if __name__ == '__main__': > f = Foo() > caller = CallTarget0(f.start) > result = caller.BeginInvoke(None, None) > caller.EndInvoke(result) > > > Can you give me a concrete example of using CallTarget0 and > AsyncCallback to implement this? What it does now is print: > > Finished. > SystemError:Object reference not set to an instance of an object. > > Obviously, I'm not using AsyncCallback because it's not clear to me > what > I pass to the constructor and where I pass the subsequent object. > > If you could spare me a few moments and correct this simple sample it > would be very grateful. > > Thanks . . . > > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, May 04, 2009 5:48 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > Schmottlach, Glenn wrote: > > I've looked at the C# examples in MSDN but they don't appear to lend > > themselves (at least with my limited experience in .NET) to an easy > > implementation in IronPython due to the dynamic nature of the type > > system in Python. > > > > The example I looked at: > > > > http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx > > > > > > declares a delegate type which seems difficult to do in IronPython, > e.g. > > > > C# > > > > public delegate bool AsyncFactorCaller ( > > int number, > > ref int primefactor1, > > ref int primefactor2); > > > > So what's the equivalent in IronPython? > > > > Also, (out) parameters are passed by reference to BeginInvoke and > > EndInvoke and it's not clear to me how to handle this in IronPython. > > > > So, I suspect I'm missing something in order to get things working. > What > > I really need to see is a concrete IronPython example and I think > things > > would gel at that point. Could you offer such an example . . . Google > > hasn't been helpful in this respect. > > > > out parameters are handled by IronPython as extra return values - you > wrap your callback function in CallTarget0 and an AsyncCallback. > > I hope this helps. > > Michael > > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com > > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael > Foord > > Sent: Monday, May 04, 2009 4:33 PM > > To: Discussion of IronPython > > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > > > Schmottlach, Glenn wrote: > > > >> Although I'm very comfortable with CPython, I'm new to IronPython > and > > >> the .NET framework. What I am looking for is sample code that shows > >> how to issue an asynchronous call from IronPython using the > >> BeginInvoke/EndInvoke mechanism of .NET. > >> > >> > > > > I can't remember the usage off the top of my head - but usage from > > IronPython is identical to usage from C#, so an MSDN example ought to > > give you what you need. > > > > All the best, > > > > Michael > > > >> Currently, I'm playing around with GTK# and a D-Bus .NET > >> implementation (NDesk-DBus) that only provides synchronous proxy > >> methods for D-Bus services. I believe (please correct me if I'm > wrong) > >> > > > > > >> that I should be able to use the BeginInvoke/EndInvoke mechanism to > >> issue these blocking proxy requests asynchronously and be notified > >> (via a callback) when the method has completed. > >> > >> My blocking proxy calls look something like this: > >> > >> ret = /self/._proxy.TunerGetCurrentWaveBand(0) > >> > >> where 'ret' returns the current waveband (AM, FM, etc..) and are > >> called from a button "clicked" delegate. I would rather not block > the > > >> GTK# dispatch loop while waiting for the reply from the service. Can > >> someone offer me any advice or provide a reference to sample code > that > >> > > > > > >> illustrates the basic concept from IronPython? > >> > >> > >> > > > ----------------------------------------------------------------------- > - > > > >> _______________________________________________ > >> Users mailing list > >> Users at lists.ironpython.com > >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >> > >> > > > > > > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > 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 microsoft.com Tue May 5 00:23:02 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 4 May 2009 15:23:02 -0700 Subject: [IronPython] Making asynchronous calls in IronPython In-Reply-To: <350E7D38B6D819428718949920EC235557298E8231@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <45624339E59DEC4993D0D7AEBDE346BF048A60E8@HBFHEX02> <49FF5107.4030500@voidspace.org.uk><45624339E59DEC4993D0D7AEBDE346BF048A6104@HBFHEX02> <49FF6285.6020804@voidspace.org.uk> <45624339E59DEC4993D0D7AEBDE346BF048A6117@HBFHEX02> <350E7D38B6D819428718949920EC235557298E8231@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <350E7D38B6D819428718949920EC235557298E823D@NA-EXMSG-C102.redmond.corp.microsoft.com> Oh, one possible work around is to write a C# stub that will do the begin invoke for you. That'll be annoying if you have lots of delegate types that you need to begin invoke on though. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Dino Viehland > Sent: Monday, May 04, 2009 3:18 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > This is actually a CLR bug. A simple repro of the issue is below if > anyone is curious. > > The CLR team has resolved this bug as "Won't Fix" and says a workaround > is available. The > only workaround I can think of is explicitly queueing the work item to > the thread pool and > provide an object for you to get state back on. I've asked them for > more information. > > Unfortunately it means that currently this just won't work in > IronPython on MS .NET at > all today :(. > > using System; > using System.Reflection; > using System.Reflection.Emit; > using System.Globalization; > > class Test { > delegate void MyDelegate(); > > public static void Main(string[]args) { > DynamicMethod test = new DynamicMethod("Hello", > typeof(void), > new Type[]{typeof(string)}, > typeof(string).Module); > > > > MethodInfo writeString = typeof(Console).GetMethod("WriteLine", > new Type[]{typeof(string)}); > > ILGenerator il = test.GetILGenerator(256); > il.Emit(OpCodes.Ldarg_0); > il.EmitCall(OpCodes.Call, writeString, null); > il.Emit(OpCodes.Ret); > > > MyDelegate dlg = (MyDelegate) > test.CreateDelegate(typeof(MyDelegate), "Hello World!"); > dlg.BeginInvoke(new AsyncCallback(Finished), null); > Console.ReadLine(); > } > > > public static void Finished(IAsyncResult ar) { > } > } > > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users- > > bounces at lists.ironpython.com] On Behalf Of Schmottlach, Glenn > > Sent: Monday, May 04, 2009 2:58 PM > > To: Discussion of IronPython > > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > > > Okay, call me clueless . . . > > > > This is what I have so far as an example: > > > > import clr > > clr.AddReference('IronPython') > > > > from System import * > > from System.Threading import Thread > > from IronPython.Compiler import CallTarget0 > > > > class Foo: > > def start(self): > > print 'Started.' > > Thread.Sleep(3000) > > threadId = System.Threading.Thread.CurrentThread > > return 'Exiting thread %r' % (threadId) > > > > def finish(self, r): > > print 'Finished.' > > > > > > if __name__ == '__main__': > > f = Foo() > > caller = CallTarget0(f.start) > > result = caller.BeginInvoke(None, None) > > caller.EndInvoke(result) > > > > > > Can you give me a concrete example of using CallTarget0 and > > AsyncCallback to implement this? What it does now is print: > > > > Finished. > > SystemError:Object reference not set to an instance of an object. > > > > Obviously, I'm not using AsyncCallback because it's not clear to me > > what > > I pass to the constructor and where I pass the subsequent object. > > > > If you could spare me a few moments and correct this simple sample it > > would be very grateful. > > > > Thanks . . . > > > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com > > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael > Foord > > Sent: Monday, May 04, 2009 5:48 PM > > To: Discussion of IronPython > > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > > > Schmottlach, Glenn wrote: > > > I've looked at the C# examples in MSDN but they don't appear to > lend > > > themselves (at least with my limited experience in .NET) to an easy > > > implementation in IronPython due to the dynamic nature of the type > > > system in Python. > > > > > > The example I looked at: > > > > > > http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx > > > > > > > > > declares a delegate type which seems difficult to do in IronPython, > > e.g. > > > > > > C# > > > > > > public delegate bool AsyncFactorCaller ( > > > int number, > > > ref int primefactor1, > > > ref int primefactor2); > > > > > > So what's the equivalent in IronPython? > > > > > > Also, (out) parameters are passed by reference to BeginInvoke and > > > EndInvoke and it's not clear to me how to handle this in > IronPython. > > > > > > So, I suspect I'm missing something in order to get things working. > > What > > > I really need to see is a concrete IronPython example and I think > > things > > > would gel at that point. Could you offer such an example . . . > Google > > > hasn't been helpful in this respect. > > > > > > > out parameters are handled by IronPython as extra return values - you > > wrap your callback function in CallTarget0 and an AsyncCallback. > > > > I hope this helps. > > > > Michael > > > > > > > > -----Original Message----- > > > From: users-bounces at lists.ironpython.com > > > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael > > Foord > > > Sent: Monday, May 04, 2009 4:33 PM > > > To: Discussion of IronPython > > > Subject: Re: [IronPython] Making asynchronous calls in IronPython > > > > > > Schmottlach, Glenn wrote: > > > > > >> Although I'm very comfortable with CPython, I'm new to IronPython > > and > > > > >> the .NET framework. What I am looking for is sample code that > shows > > >> how to issue an asynchronous call from IronPython using the > > >> BeginInvoke/EndInvoke mechanism of .NET. > > >> > > >> > > > > > > I can't remember the usage off the top of my head - but usage from > > > IronPython is identical to usage from C#, so an MSDN example ought > to > > > give you what you need. > > > > > > All the best, > > > > > > Michael > > > > > >> Currently, I'm playing around with GTK# and a D-Bus .NET > > >> implementation (NDesk-DBus) that only provides synchronous proxy > > >> methods for D-Bus services. I believe (please correct me if I'm > > wrong) > > >> > > > > > > > > >> that I should be able to use the BeginInvoke/EndInvoke mechanism > to > > >> issue these blocking proxy requests asynchronously and be notified > > >> (via a callback) when the method has completed. > > >> > > >> My blocking proxy calls look something like this: > > >> > > >> ret = /self/._proxy.TunerGetCurrentWaveBand(0) > > >> > > >> where 'ret' returns the current waveband (AM, FM, etc..) and are > > >> called from a button "clicked" delegate. I would rather not block > > the > > > > >> GTK# dispatch loop while waiting for the reply from the service. > Can > > >> someone offer me any advice or provide a reference to sample code > > that > > >> > > > > > > > > >> illustrates the basic concept from IronPython? > > >> > > >> > > >> > > > > > --------------------------------------------------------------------- > -- > > - > > > > > >> _______________________________________________ > > >> Users mailing list > > >> Users at lists.ironpython.com > > >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > >> > > >> > > > > > > > > > > > > > > > -- > > http://www.ironpythoninaction.com/ > > http://www.voidspace.org.uk/blog > > > > > > _______________________________________________ > > 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 timr at probo.com Tue May 5 02:08:41 2009 From: timr at probo.com (Tim Roberts) Date: Mon, 04 May 2009 17:08:41 -0700 Subject: [IronPython] [OT] IronPython on Win7 Build7100 In-Reply-To: References: Message-ID: <49FF8389.4010101@probo.com> On Mon, 4 May 2009 13:17:24 -0700, Keith J. Farmer" wrote: > Might I suggest: the fact that it doesn't have "Vista" on the label? > > Don't get me wrong, Win7 is a great advance over Vista -- I'm using it exclusively at home and have been since the beta, but the only differences from Vista (whch I use on my work laptop until tomorrow) that I encounter day-to-day are the superbar and the smoother processing (see Russinovich's video about detangling the scheduler that was passed down from times long forgotten). If you can't put your finger one a reason, I suspect the reason has more to do with a (subconscious) attitude about Vista that you don't have about Win7 (and Vista had a *lot* of social baggage from the start that was never properly handled). Well, I can't completely rule that out, although of course I want to believe that I am immune from that kind of psychological prejudice. There is more to it than that, however. When I started moving my driver work to Vista, it felt like I was doing battle against the operating system at every turn. It seemed to be actively interfering with the tasks I needed to do to get my job done. I don't have that sense with Win 7, even though I'm running 64-bit, which has additional driver restrictions. For what it's worth, we had a short discussion on the OSR driver developer's mailing list this morning, and it appears that I am not the only curmudgeon who is having this change of heart. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From max at ford-consulting.com Tue May 5 16:49:36 2009 From: max at ford-consulting.com (Max Barry) Date: Tue, 5 May 2009 07:49:36 -0700 Subject: [IronPython] Getting type error when calling a .NET DLL interface. In-Reply-To: <5DC7529A24A54B0C8EFC724B7B262D02@fordconsulting.local> References: <5DC7529A24A54B0C8EFC724B7B262D02@fordconsulting.local> Message-ID: <731F45C552FF0E47973E42EDBFFB4852A9D9AC@cooper.ford-consulting.local> Curt, Thanks for the great explanation. Max From dinov at microsoft.com Tue May 5 22:26:29 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 5 May 2009 13:26:29 -0700 Subject: [IronPython] bytes behavior on 2.6... Message-ID: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> We have an active bug against our new bytes implementation for 2.6. Currently if you do: b'***'[0] you get back 42 as an int. This matches the 3.0 behavior of bytes but in CPython 2.6 you get back '*'. We could choose to match either form and then we could change it for 3.0. But because we only have Unicode strings today it seems like we might want to match the 3.0 behavior. Of course people might write code expecting the 2.6 behavior and they might be explicitly using byte literals as part of migrating to being compatible w/ 3.0. Does anyone have an opinion on what we should do here? -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Tue May 5 22:37:03 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Tue, 5 May 2009 23:37:03 +0300 Subject: [IronPython] bytes behavior on 2.6... In-Reply-To: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <8cd017b80905051337q1487dba9n78136ae6f5d3ae7f@mail.gmail.com> Keep it to 3.0 behavior because it answers the question of life, universe and everything. On Tue, May 5, 2009 at 11:26 PM, Dino Viehland wrote: > We have an active bug against our new bytes implementation for 2.6. > Currently if you do: > > > > b'***'[0] > > > > you get back 42 as an int. This matches the 3.0 behavior of bytes but in > CPython 2.6 you get back ?*?. > > > > We could choose to match either form and then we could change it for 3.0. > But because we only have Unicode strings today it seems like we might want > to match the 3.0 behavior. Of course people might write code expecting the > 2.6 behavior and they might be explicitly using byte literals as part of > migrating to being compatible w/ 3.0. > > > > Does anyone have an opinion on what we should do here? > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue May 5 23:49:59 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 05 May 2009 22:49:59 +0100 Subject: [IronPython] bytes behavior on 2.6... In-Reply-To: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <4A00B487.5000401@voidspace.org.uk> Dino Viehland wrote: > > We have an active bug against our new bytes implementation for 2.6. > Currently if you do: > > b'***'[0] > > you get back 42 as an int. This matches the 3.0 behavior of bytes but > in CPython 2.6 you get back ?*?. > > We could choose to match either form and then we could change it for > 3.0. But because we only have Unicode strings today it seems like we > might want to match the 3.0 behavior. Of course people might write > code expecting the 2.6 behavior and they might be explicitly using > byte literals as part of migrating to being compatible w/ 3.0. > > Does anyone have an opinion on what we should do here? > Personally I think if you are targeting compatibility with Python 2.6 then you should be compatible with Python 2.6... I'm still hoping you will relent and maintain an IronPython 2.X branch as long as Python 2.X is being developed... Michael > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From jdhardy at gmail.com Wed May 6 01:57:41 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 5 May 2009 17:57:41 -0600 Subject: [IronPython] Mercurial Status In-Reply-To: <350E7D38B6D819428718949920EC235557298E8177@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E8177@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: On Mon, May 4, 2009 at 2:13 PM, Dino Viehland wrote: > You mention bug #22258 - is Mercurial using byte array notation wherever > they intend to have a non-Unicode string? Turns out, I thought buffers == byte arrays, but apparently they're not. I also managed to mix up changes that are in 3.0 with what went in to 2.6 (I thought file.read() returned a byte[] in 2.6...nope). I've just thoroughly confused myself. Whee. It still repros if you use b = buffer(...); my description is just wrong. However, Mercurial does not use b'', since they have to be compatible with more than 2.6. > > But as long as Mercurial is consistently using b'' for its non-Unicode > strings then things will work. ?Hopefully if they're not they'd look > upon those changes as just being goodness for 3.x compat. I don't think there are many places where b'' would be necessary. Most of the intersting data in Mercurial is read from files and handled in chunks (using struct.pack/unpack), or at least the stuff I've dealt with so far. It looks like calling str() on a buffer should just return the underlying string data, but I'm not sure. The changes to PythonFile don't look as bad as I thought, so maybe I'll play with it a bit and see if writing the buffers to file directly helps at all. - Jeff From dinov at microsoft.com Wed May 6 02:10:04 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 5 May 2009 17:10:04 -0700 Subject: [IronPython] Mercurial Status In-Reply-To: References: <350E7D38B6D819428718949920EC235557298E8177@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8786@NA-EXMSG-C102.redmond.corp.microsoft.com> Ok, I do have a fix for this and the other issues - I'm just waiting for a code review then I'll check it in. If we do f.write(buffer('foo')) where f was opened as a binary file we'll write out b'foo' and not b'f\x00o\x00\x00' which I suspect will work for your purposes (but won't be compatible w/ buffer(u'foo'). I also have the fixes for the other issues you reported so hopefully you'll be largely unblocked to find the next set of issues soon :) > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Tuesday, May 05, 2009 4:58 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Mercurial Status > > On Mon, May 4, 2009 at 2:13 PM, Dino Viehland > wrote: > > You mention bug #22258 - is Mercurial using byte array notation > wherever > > they intend to have a non-Unicode string? > > Turns out, I thought buffers == byte arrays, but apparently they're > not. I also managed to mix up changes that are in 3.0 with what went > in to 2.6 (I thought file.read() returned a byte[] in 2.6...nope). > I've just thoroughly confused myself. Whee. > > It still repros if you use b = buffer(...); my description is just > wrong. > > However, Mercurial does not use b'', since they have to be compatible > with more than 2.6. > > > > > But as long as Mercurial is consistently using b'' for its non- > Unicode > > strings then things will work. ?Hopefully if they're not they'd look > > upon those changes as just being goodness for 3.x compat. > > I don't think there are many places where b'' would be necessary. Most > of the intersting data in Mercurial is read from files and handled in > chunks (using struct.pack/unpack), or at least the stuff I've dealt > with so far. It looks like calling str() on a buffer should just > return the underlying string data, but I'm not sure. > > The changes to PythonFile don't look as bad as I thought, so maybe > I'll play with it a bit and see if writing the buffers to file > directly helps at all. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Wed May 6 02:31:48 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 5 May 2009 17:31:48 -0700 Subject: [IronPython] bytes behavior on 2.6... In-Reply-To: <4A00B487.5000401@voidspace.org.uk> References: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> <4A00B487.5000401@voidspace.org.uk> Message-ID: <350E7D38B6D819428718949920EC235557298E879F@NA-EXMSG-C102.redmond.corp.microsoft.com> I guess the good news here then is that our post-2.6 planning is still very unclear. While I'd love us to move to 3.0 to get rid of our Unicode issues it seems like there's not enough movement forward in the community at large - of course until then we're always going to have subtle Unicode compat issues :(. My personal thoughts on this is that we could do a 2.6.1/2/3 after 2.6 ships that focuses on lots of bug fixes and adding non-disruptive 3.0 features under a -X:Python30 flag. But we still have some time to figure out what to do here. As always input is always welcome! > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Tuesday, May 05, 2009 2:50 PM > To: Discussion of IronPython > Subject: Re: [IronPython] bytes behavior on 2.6... > > Dino Viehland wrote: > > > > We have an active bug against our new bytes implementation for 2.6. > > Currently if you do: > > > > b'***'[0] > > > > you get back 42 as an int. This matches the 3.0 behavior of bytes but > > in CPython 2.6 you get back '*'. > > > > We could choose to match either form and then we could change it for > > 3.0. But because we only have Unicode strings today it seems like we > > might want to match the 3.0 behavior. Of course people might write > > code expecting the 2.6 behavior and they might be explicitly using > > byte literals as part of migrating to being compatible w/ 3.0. > > > > Does anyone have an opinion on what we should do here? > > > > Personally I think if you are targeting compatibility with Python 2.6 > then you should be compatible with Python 2.6... > > I'm still hoping you will relent and maintain an IronPython 2.X branch > as long as Python 2.X is being developed... > > Michael > > > --------------------------------------------------------------------- > --- > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From adamb at silverkeytech.com Wed May 6 02:39:14 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Tue, 5 May 2009 17:39:14 -0700 Subject: [IronPython] Announcing IronPython 2.6 Alpha 1 In-Reply-To: References: <918705E903F4714CB713D89AB5F1857D884DB20530@NA-EXMSG-C116.redmond.corp.microsoft.com> <49CBEECA.2080104@resolversystems.com> <8cd017b80903281309m4a1e2767n9003a4034a8b0113@mail.gmail.com> <064c01c9afe4$f736d560$e5a48020$@com> Message-ID: <8bd92c0e0905051739u531d6854u80ee19727e35200d@mail.gmail.com> Any updated timeline on this (IronPython 2.6/ASP.Net Integration)? Just wanted to check in and see where it was on the list. Thanks, Adam 2009/3/30 Jimmy Schementi > A IronPython 2.6 version of the ASP.NET integration will be out shortly, > I have to get time to make a build and get it sent over to the ASP.NETteam. I?m working through some other things I need to get done first, but > assume two weeks. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Adam Brand > *Sent:* Saturday, March 28, 2009 1:37 PM > > *To:* 'Discussion of IronPython' > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > Any update on the timeline for getting IronPython for ASP.Net updated? This > would make a world of difference for our IronPython-based web app. > > > > Adam > > > > Adam Brand > > SilverKey Technologies > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Saturday, March 28, 2009 1:09 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > This is awesome. Web application can benefit from this "adaptive > compilation" approach a lot - especially for low trafficked sites. > > On Thu, Mar 26, 2009 at 11:08 PM, Giles Thomas < > giles.thomas at resolversystems.com> wrote: > > Dave, > > This is great news, congratulations to the IP team on this release! We'll > do a test-port of Resolver One early next week and will reply to the list > with any issues we find. > > > Cheers, > > Giles > > > Dave Fugate wrote: > > Hello Python Community, > > We?re pleased to announce the release of IronPython 2.6 Alpha 1. As you > might imagine, this release is all about supporting new CPython 2.6 features > such as the ?bytes? and ?bytearray? types (PEP 3112), decorators for classes > (PEP 3129), advanced string formatting (PEP 3101), etc. The minimum .NET > version required for this release is the same as IronPython 2.0; namely .NET > 2.0 Service Pack 1. Unlike the 2.0 series of IronPython, we plan to release > only a couple Alphas and Betas of IronPython 2.6. As such, it?s key that we > get your feedback on the release(s) quickly to incorporate requested > changes. > > Besides CPython 2.6 features, another significant change in this release is > that ipy.exe now uses ?adaptive compilation? by default. Adaptive > compilation is a technique in which IronPython: > > 1. Interprets and executes Python method calls up to /N/ times for a given > method. If you?re only going to execute a method a few times, it?s typically > faster to interpret the method instead of compiling and executing it > > 2. Compiles and executes the Python method call on the /N+1/ invocation of > the method. Compilation of a Python method is a heavyweight operation, but > we can reuse the result for subsequent invocations > > 3. Reuses the previously compiled method for new calls to the Python > method. This operation is much faster than interpreting the method call as > the method was already compiled in the previous step > > The reason for this change is that it provides a nice performance gain for > Python code containing lots of functions/methods that only get called a few > times. All this said, this feature is still undergoing active development > and as a consequence some Python scripts may actually run slower with it > turned on. For this reason, our old default mode of running Python scripts > is still available by passing the ?O or -D flags to ipy.exe. Any feedback on > how this new feature affects your IronPython applications performance-wise > would be greatly appreciated. > > There?s also a few minor changes since IronPython 2.0.1 that are worth > calling out here: > > ? IronPython.msi now installs NGEN?ed binaries by default > > ? IronPython.msi now offers a little more selection with respect to what > you?d like to install. For example, Silverlight templates are optional > > ? The default installation location of IronPython.msi no longer indicates > whether the 2.6 release is an Alpha, Beta, or a patched release. Future > IronPython 2.6 installations will replace previous 2.6 releases which will > be uninstalled automatically > > ? The -X:PreferComInteropAssembly flag has been removed. All COM interop is > now done through normal COM dispatch > > You can download IronPython 2.6 Alpha 1 at: > http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22982 > > The IronPython Team > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > > > > > -- > nomadlife.org > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- Adam Brand Managing Partner SilverKey Technologies Direct: +1-312-239-6722 Main: +1-312-951-7525 Skype: adamsilverkey Email: adamb at silverkeytech.com www.silverkeytech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Wed May 6 06:24:57 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 6 May 2009 04:24:57 +0000 Subject: [IronPython] Announcing IronPython 2.6 Alpha 1 In-Reply-To: <8bd92c0e0905051739u531d6854u80ee19727e35200d@mail.gmail.com> References: <918705E903F4714CB713D89AB5F1857D884DB20530@NA-EXMSG-C116.redmond.corp.microsoft.com> <49CBEECA.2080104@resolversystems.com> <8cd017b80903281309m4a1e2767n9003a4034a8b0113@mail.gmail.com> <064c01c9afe4$f736d560$e5a48020$@com> <8bd92c0e0905051739u531d6854u80ee19727e35200d@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC016B6B4C@tk5ex14mbxc106.redmond.corp.microsoft.com> Rather than just releasing builds, I'm waiting on the OK from the ASP.NET to release to source code for it, so it can be included in the IronPython releases and the Codeplex sources/daily builds. That seems like a much better solution. =) I'll keep you posted (I've been in conference-mode for the past couple months, so things have been slow, sorry!). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand Sent: Tuesday, May 05, 2009 5:39 PM To: Discussion of IronPython Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 Any updated timeline on this (IronPython 2.6/ASP.Net Integration)? Just wanted to check in and see where it was on the list. Thanks, Adam 2009/3/30 Jimmy Schementi > A IronPython 2.6 version of the ASP.NET integration will be out shortly, I have to get time to make a build and get it sent over to the ASP.NET team. I'm working through some other things I need to get done first, but assume two weeks. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand Sent: Saturday, March 28, 2009 1:37 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 Any update on the timeline for getting IronPython for ASP.Net updated? This would make a world of difference for our IronPython-based web app. Adam Adam Brand SilverKey Technologies From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Saturday, March 28, 2009 1:09 PM To: Discussion of IronPython Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 This is awesome. Web application can benefit from this "adaptive compilation" approach a lot - especially for low trafficked sites. On Thu, Mar 26, 2009 at 11:08 PM, Giles Thomas > wrote: Dave, This is great news, congratulations to the IP team on this release! We'll do a test-port of Resolver One early next week and will reply to the list with any issues we find. Cheers, Giles Dave Fugate wrote: Hello Python Community, We're pleased to announce the release of IronPython 2.6 Alpha 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP 3101), etc. The minimum .NET version required for this release is the same as IronPython 2.0; namely .NET 2.0 Service Pack 1. Unlike the 2.0 series of IronPython, we plan to release only a couple Alphas and Betas of IronPython 2.6. As such, it's key that we get your feedback on the release(s) quickly to incorporate requested changes. Besides CPython 2.6 features, another significant change in this release is that ipy.exe now uses "adaptive compilation" by default. Adaptive compilation is a technique in which IronPython: 1. Interprets and executes Python method calls up to /N/ times for a given method. If you're only going to execute a method a few times, it's typically faster to interpret the method instead of compiling and executing it 2. Compiles and executes the Python method call on the /N+1/ invocation of the method. Compilation of a Python method is a heavyweight operation, but we can reuse the result for subsequent invocations 3. Reuses the previously compiled method for new calls to the Python method. This operation is much faster than interpreting the method call as the method was already compiled in the previous step The reason for this change is that it provides a nice performance gain for Python code containing lots of functions/methods that only get called a few times. All this said, this feature is still undergoing active development and as a consequence some Python scripts may actually run slower with it turned on. For this reason, our old default mode of running Python scripts is still available by passing the -O or -D flags to ipy.exe. Any feedback on how this new feature affects your IronPython applications performance-wise would be greatly appreciated. There's also a few minor changes since IronPython 2.0.1 that are worth calling out here: * IronPython.msi now installs NGEN'ed binaries by default * IronPython.msi now offers a little more selection with respect to what you'd like to install. For example, Silverlight templates are optional * The default installation location of IronPython.msi no longer indicates whether the 2.6 release is an Alpha, Beta, or a patched release. Future IronPython 2.6 installations will replace previous 2.6 releases which will be uninstalled automatically * The -X:PreferComInteropAssembly flag has been removed. All COM interop is now done through normal COM dispatch You can download IronPython 2.6 Alpha 1 at: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22982 The IronPython Team ------------------------------------------------------------------------ _______________________________________________ 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 -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- Adam Brand Managing Partner SilverKey Technologies Direct: +1-312-239-6722 Main: +1-312-951-7525 Skype: adamsilverkey Email: adamb at silverkeytech.com www.silverkeytech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamb at silverkeytech.com Wed May 6 06:26:06 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Tue, 5 May 2009 21:26:06 -0700 Subject: [IronPython] Announcing IronPython 2.6 Alpha 1 In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC016B6B4C@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <918705E903F4714CB713D89AB5F1857D884DB20530@NA-EXMSG-C116.redmond.corp.microsoft.com> <49CBEECA.2080104@resolversystems.com> <8cd017b80903281309m4a1e2767n9003a4034a8b0113@mail.gmail.com> <064c01c9afe4$f736d560$e5a48020$@com> <8bd92c0e0905051739u531d6854u80ee19727e35200d@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC016B6B4C@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <006a01c9ce02$c6bb7440$54325cc0$@com> That is great news, and a great solution! Thanks! Adam From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Tuesday, May 05, 2009 9:25 PM To: Discussion of IronPython Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 Rather than just releasing builds, I'm waiting on the OK from the ASP.NET to release to source code for it, so it can be included in the IronPython releases and the Codeplex sources/daily builds. That seems like a much better solution. =) I'll keep you posted (I've been in conference-mode for the past couple months, so things have been slow, sorry!). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand Sent: Tuesday, May 05, 2009 5:39 PM To: Discussion of IronPython Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 Any updated timeline on this (IronPython 2.6/ASP.Net Integration)? Just wanted to check in and see where it was on the list. Thanks, Adam 2009/3/30 Jimmy Schementi A IronPython 2.6 version of the ASP.NET integration will be out shortly, I have to get time to make a build and get it sent over to the ASP.NET team. I'm working through some other things I need to get done first, but assume two weeks. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Adam Brand Sent: Saturday, March 28, 2009 1:37 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 Any update on the timeline for getting IronPython for ASP.Net updated? This would make a world of difference for our IronPython-based web app. Adam Adam Brand SilverKey Technologies From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Saturday, March 28, 2009 1:09 PM To: Discussion of IronPython Subject: Re: [IronPython] Announcing IronPython 2.6 Alpha 1 This is awesome. Web application can benefit from this "adaptive compilation" approach a lot - especially for low trafficked sites. On Thu, Mar 26, 2009 at 11:08 PM, Giles Thomas wrote: Dave, This is great news, congratulations to the IP team on this release! We'll do a test-port of Resolver One early next week and will reply to the list with any issues we find. Cheers, Giles Dave Fugate wrote: Hello Python Community, We're pleased to announce the release of IronPython 2.6 Alpha 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP 3101), etc. The minimum .NET version required for this release is the same as IronPython 2.0; namely .NET 2.0 Service Pack 1. Unlike the 2.0 series of IronPython, we plan to release only a couple Alphas and Betas of IronPython 2.6. As such, it's key that we get your feedback on the release(s) quickly to incorporate requested changes. Besides CPython 2.6 features, another significant change in this release is that ipy.exe now uses "adaptive compilation" by default. Adaptive compilation is a technique in which IronPython: 1. Interprets and executes Python method calls up to /N/ times for a given method. If you're only going to execute a method a few times, it's typically faster to interpret the method instead of compiling and executing it 2. Compiles and executes the Python method call on the /N+1/ invocation of the method. Compilation of a Python method is a heavyweight operation, but we can reuse the result for subsequent invocations 3. Reuses the previously compiled method for new calls to the Python method. This operation is much faster than interpreting the method call as the method was already compiled in the previous step The reason for this change is that it provides a nice performance gain for Python code containing lots of functions/methods that only get called a few times. All this said, this feature is still undergoing active development and as a consequence some Python scripts may actually run slower with it turned on. For this reason, our old default mode of running Python scripts is still available by passing the -O or -D flags to ipy.exe. Any feedback on how this new feature affects your IronPython applications performance-wise would be greatly appreciated. There's also a few minor changes since IronPython 2.0.1 that are worth calling out here: . IronPython.msi now installs NGEN'ed binaries by default . IronPython.msi now offers a little more selection with respect to what you'd like to install. For example, Silverlight templates are optional . The default installation location of IronPython.msi no longer indicates whether the 2.6 release is an Alpha, Beta, or a patched release. Future IronPython 2.6 installations will replace previous 2.6 releases which will be uninstalled automatically . The -X:PreferComInteropAssembly flag has been removed. All COM interop is now done through normal COM dispatch You can download IronPython 2.6 Alpha 1 at: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22982 The IronPython Team ------------------------------------------------------------------------ _______________________________________________ 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 -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- Adam Brand Managing Partner SilverKey Technologies Direct: +1-312-239-6722 Main: +1-312-951-7525 Skype: adamsilverkey Email: adamb at silverkeytech.com www.silverkeytech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Wed May 6 17:53:12 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 08:53:12 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe Message-ID: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> Hello list I am new here :-) I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete? Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Wed May 6 17:57:03 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 6 May 2009 08:57:03 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. MODIFIED SOURCES $/IronPython/IronPython_Main/Readme.html CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 859030 Date: 5/6/2009 8:49:46 AM This is a test to see if comments get properly published to the IP mailing list. From dfugate at microsoft.com Wed May 6 18:05:33 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Wed, 6 May 2009 09:05:33 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: Below is an automated report listing all sources that changed on the IronPython CodePlex source repository in the last update a few minutes ago. Also included are IronPython checkin comments from our internal source repository. From this point on these automated reports will be sent to the IronPython mailing list each time sources are updated on CodePlex. The reason we're publishing checkin comments in this manner (as opposed to adding the internal checkin comments directly to the CodePlex checkin comment) is because there's a size limitation on CodePlex checkin comments which isn't always large enough to accommodate the N internal checkins bundled into each CodePlex checkin. We would appreciate any feedback people have on this. Thanks, Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of merllab at microsoft.com Sent: Wednesday, May 06, 2009 8:57 AM To: users at lists.ironpython.com Subject: [IronPython] IronPython 2.6 CodePlex Source Update This is an automated email letting you know that sources have recently been pushed out. MODIFIED SOURCES $/IronPython/IronPython_Main/Readme.html CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 859030 Date: 5/6/2009 8:49:46 AM This is a test to see if comments get properly published to the IP mailing list. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From empirebuilder at gmail.com Wed May 6 18:10:10 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 6 May 2009 19:10:10 +0300 Subject: [IronPython] Announcing IronPython 2.6 Alpha 1 In-Reply-To: <006a01c9ce02$c6bb7440$54325cc0$@com> References: <49CBEECA.2080104@resolversystems.com> <8cd017b80903281309m4a1e2767n9003a4034a8b0113@mail.gmail.com> <064c01c9afe4$f736d560$e5a48020$@com> <8bd92c0e0905051739u531d6854u80ee19727e35200d@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC016B6B4C@tk5ex14mbxc106.redmond.corp.microsoft.com> <006a01c9ce02$c6bb7440$54325cc0$@com> Message-ID: <8cd017b80905060910w79119d13g1ccff16adc0098c4@mail.gmail.com> Hopefully the approval is speedy. The other parts of ASP.Net Futures 2007 source code have been made available last month http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25804 On Wed, May 6, 2009 at 7:26 AM, Adam Brand wrote: > That is great news, and a great solution! Thanks! > > > > Adam > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Jimmy Schementi > *Sent:* Tuesday, May 05, 2009 9:25 PM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > Rather than just releasing builds, I?m waiting on the OK from the ASP.NETto release to source code for it, so it can be included in the IronPython > releases and the Codeplex sources/daily builds. That seems like a much > better solution. =) I?ll keep you posted (I?ve been in conference-mode for > the past couple months, so things have been slow, sorry!). > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Adam Brand > *Sent:* Tuesday, May 05, 2009 5:39 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > Any updated timeline on this (IronPython 2.6/ASP.Net Integration)? Just > wanted to check in and see where it was on the list. > > > > Thanks, > > Adam > > 2009/3/30 Jimmy Schementi > > A IronPython 2.6 version of the ASP.NET integration will be out shortly, I > have to get time to make a build and get it sent over to the ASP.NET team. > I?m working through some other things I need to get done first, but assume > two weeks. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Adam Brand > *Sent:* Saturday, March 28, 2009 1:37 PM > > > *To:* 'Discussion of IronPython' > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > Any update on the timeline for getting IronPython for ASP.Net updated? This > would make a world of difference for our IronPython-based web app. > > > > Adam > > > > Adam Brand > > SilverKey Technologies > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Saturday, March 28, 2009 1:09 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Announcing IronPython 2.6 Alpha 1 > > > > This is awesome. Web application can benefit from this "adaptive > compilation" approach a lot - especially for low trafficked sites. > > On Thu, Mar 26, 2009 at 11:08 PM, Giles Thomas < > giles.thomas at resolversystems.com> wrote: > > Dave, > > This is great news, congratulations to the IP team on this release! We'll > do a test-port of Resolver One early next week and will reply to the list > with any issues we find. > > > Cheers, > > Giles > > > Dave Fugate wrote: > > Hello Python Community, > > We?re pleased to announce the release of IronPython 2.6 Alpha 1. As you > might imagine, this release is all about supporting new CPython 2.6 features > such as the ?bytes? and ?bytearray? types (PEP 3112), decorators for classes > (PEP 3129), advanced string formatting (PEP 3101), etc. The minimum .NET > version required for this release is the same as IronPython 2.0; namely .NET > 2.0 Service Pack 1. Unlike the 2.0 series of IronPython, we plan to release > only a couple Alphas and Betas of IronPython 2.6. As such, it?s key that we > get your feedback on the release(s) quickly to incorporate requested > changes. > > Besides CPython 2.6 features, another significant change in this release is > that ipy.exe now uses ?adaptive compilation? by default. Adaptive > compilation is a technique in which IronPython: > > 1. Interprets and executes Python method calls up to /N/ times for a given > method. If you?re only going to execute a method a few times, it?s typically > faster to interpret the method instead of compiling and executing it > > 2. Compiles and executes the Python method call on the /N+1/ invocation of > the method. Compilation of a Python method is a heavyweight operation, but > we can reuse the result for subsequent invocations > > 3. Reuses the previously compiled method for new calls to the Python > method. This operation is much faster than interpreting the method call as > the method was already compiled in the previous step > > The reason for this change is that it provides a nice performance gain for > Python code containing lots of functions/methods that only get called a few > times. All this said, this feature is still undergoing active development > and as a consequence some Python scripts may actually run slower with it > turned on. For this reason, our old default mode of running Python scripts > is still available by passing the ?O or -D flags to ipy.exe. Any feedback on > how this new feature affects your IronPython applications performance-wise > would be greatly appreciated. > > There?s also a few minor changes since IronPython 2.0.1 that are worth > calling out here: > > ? IronPython.msi now installs NGEN?ed binaries by default > > ? IronPython.msi now offers a little more selection with respect to what > you?d like to install. For example, Silverlight templates are optional > > ? The default installation location of IronPython.msi no longer indicates > whether the 2.6 release is an Alpha, Beta, or a patched release. Future > IronPython 2.6 installations will replace previous 2.6 releases which will > be uninstalled automatically > > ? The -X:PreferComInteropAssembly flag has been removed. All COM interop is > now done through normal COM dispatch > > You can download IronPython 2.6 Alpha 1 at: > http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=22982 > > The IronPython Team > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > Adam Brand > > Managing Partner > SilverKey Technologies > > Direct: +1-312-239-6722 > Main: +1-312-951-7525 > Skype: adamsilverkey > Email: adamb at silverkeytech.com > www.silverkeytech.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Wed May 6 18:40:23 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 6 May 2009 09:40:23 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. MODIFIED SOURCES $/IronPython/IronPython_Main/Readme.html CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 859108 Date: 5/6/2009 9:32:59 AM This is a second test to see if comments get properly published to the IP mailing list. From stephen.p.lepisto at intel.com Wed May 6 18:45:23 2009 From: stephen.p.lepisto at intel.com (Lepisto, Stephen P) Date: Wed, 6 May 2009 09:45:23 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> Message-ID: <6AF28EB9F93A354894F2F3916DF6F96E0C6E915C59@orsmsx510.amr.corp.intel.com> Andrew, I've had no problems building IronPythonConsole.exe from the source drop for v2.0.1. What kind of build errors are you getting? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 8:53 AM To: users at lists.ironpython.com Subject: [IronPython] Compiling IronPythonConsole.exe Hello list I am new here :-) I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete? Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.sy at neotitans.com Wed May 6 19:02:25 2009 From: andy.sy at neotitans.com (Andy Sy) Date: Thu, 07 May 2009 01:02:25 +0800 Subject: [IronPython] [OT] RE: IronPython on Win7 Build7100 In-Reply-To: References: <49FF2197.9040801@probo.com> Message-ID: <4A01C2A1.3070702@neotitans.com> Keith J. Farmer wrote: > Might I suggest: the fact that it doesn't have "Vista" on the label? > > Don't get me wrong, Win7 is a great advance over Vista -- I'm using it > exclusively at home and have been since the beta, but the only > differences from Vista (whch I use on my work laptop until tomorrow) > that I encounter day-to-day are the superbar and the smoother processing > (see Russinovich's video about detangling the scheduler that was passed > down from times long forgotten). If you can't put your finger one a > reason, I suspect the reason has more to do with a (subconscious) > attitude about Vista that you don't have about Win7 (and Vista had a > *lot* of social baggage from the start that was never properly handled). I *never* touched Vista but I have the same experience as Tim, on my dual boot box, I choose Win7 over XP more than 90% of the time. Win7 really feels superior to XP... ============================ http://webmechs.com/webpress The Webpress Blog From brian.curtin at gmail.com Wed May 6 19:19:01 2009 From: brian.curtin at gmail.com (curtin@acm.org) Date: Wed, 6 May 2009 12:19:01 -0500 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> Message-ID: On Wed, May 6, 2009 at 10:53, Andrew Evans wrote: > Hello list I am new here :-) > > I am trying to figure out how to get IronPythonConsole.exe as I need it for > Pyreadline... I am using 2.01 version of IronPython > > I have tried compiling from source to but to no avail. Is IronPythonConsole > obsolete? > > Thanks in > > Advance > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > The specific error(s) you received would be helpful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Wed May 6 19:29:59 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 10:29:59 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> Message-ID: <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> Hello maybe I should explain I have been trying to get readline to work with no success import readline fails with this message "No Module Named IronPythonConsole" the line in question is in the file "ironpython_console.py" import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole Just thought at this moment do I need to add anything to my environment variables? it was mentioned on the readline web site to post here hope some one can help *cheers Andrew using readline in IronPython produces and an error "no mo On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org wrote: > On Wed, May 6, 2009 at 10:53, Andrew Evans wrote: > >> Hello list I am new here :-) >> >> I am trying to figure out how to get IronPythonConsole.exe as I need it >> for Pyreadline... I am using 2.01 version of IronPython >> >> I have tried compiling from source to but to no avail. Is >> IronPythonConsole obsolete? >> >> Thanks in >> >> Advance >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > The specific error(s) you received would be helpful. > > _______________________________________________ > 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 microsoft.com Wed May 6 19:39:06 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 10:39:06 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> Where does ironpython_console.py come from? There is no IronPythonConsole class anymore so knowing what exactly the .py file is trying to do would be helpful. But likely you want to map existing things we're looking for into the Microsoft.Scripting.Hosting.Shell namespace which lives in Microsoft.Scripting.dll. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 10:30 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello maybe I should explain I have been trying to get readline to work with no success import readline fails with this message "No Module Named IronPythonConsole" the line in question is in the file "ironpython_console.py" import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole Just thought at this moment do I need to add anything to my environment variables? it was mentioned on the readline web site to post here hope some one can help *cheers Andrew using readline in IronPython produces and an error "no mo On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: On Wed, May 6, 2009 at 10:53, Andrew Evans > wrote: Hello list I am new here :-) I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete? Thanks in Advance _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com The specific error(s) you received would be helpful. _______________________________________________ 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 andrew.canit at gmail.com Wed May 6 19:47:37 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 10:47:37 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> Hi the ironpython_console.py comes from pyreadine in the folder "pyreadline/console/ironpython_console.py" the file itself in the areas where IronPythonConsole are referenced are import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole class IronPythonWrapper(IronPythonConsole.IConsole): def ReadLine(self,autoIndentSize): return hook_wrap() def Write(self,text, style): System.Console.Write(text) def WriteLine(self,text, style): System.Console.WriteLine(text) IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() I have not been able to find an updated pyreadline I have attached the file in question to see which module I am refering to see http://ipython.scipy.org/moin/PyReadline/Intro *cheers And thank you On Wed, May 6, 2009 at 10:39 AM, Dino Viehland wrote: > Where does ironpython_console.py come from? There is no > IronPythonConsole class anymore so knowing what exactly the .py file is > trying to do would be helpful. But likely you want to map existing things > we?re looking for into the Microsoft.Scripting.Hosting.Shell namespace which > lives in Microsoft.Scripting.dll. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 10:30 AM > *To:* users at lists.ironpython.com > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello maybe I should explain I have been trying to get readline to work > with no success > > import readline fails with this message "No Module Named IronPythonConsole" > > the line in question is in the file "ironpython_console.py" > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > Just thought at this moment do I need to add anything to my environment > variables? > > it was mentioned on the readline web site to post here hope some one can > help > > *cheers > > Andrew > > using readline in IronPython produces and an error "no mo > > On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: > > On Wed, May 6, 2009 at 10:53, Andrew Evans wrote: > > Hello list I am new here :-) > > I am trying to figure out how to get IronPythonConsole.exe as I need it for > Pyreadline... I am using 2.01 version of IronPython > > I have tried compiling from source to but to no avail. Is IronPythonConsole > obsolete? > > Thanks in > > Advance > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > The specific error(s) you received would be helpful. > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: ironpython_console.py Type: text/x-python Size: 14051 bytes Desc: not available URL: From dinov at microsoft.com Wed May 6 19:54:41 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 10:54:41 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> IConsole now lives in Microsoft.Scripting.Hosting.Shell, so you should be able to change this to: clr.AddReference('Microsoft.Scripting') ... from Microsoft.Scripting.Hosting.Shell import IConsole class IronPythonWrapper(IConsole): From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 10:48 AM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hi the ironpython_console.py comes from pyreadine in the folder "pyreadline/console/ironpython_console.py" the file itself in the areas where IronPythonConsole are referenced are import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole class IronPythonWrapper(IronPythonConsole.IConsole): def ReadLine(self,autoIndentSize): return hook_wrap() def Write(self,text, style): System.Console.Write(text) def WriteLine(self,text, style): System.Console.WriteLine(text) IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() I have not been able to find an updated pyreadline I have attached the file in question to see which module I am refering to see http://ipython.scipy.org/moin/PyReadline/Intro *cheers And thank you On Wed, May 6, 2009 at 10:39 AM, Dino Viehland > wrote: Where does ironpython_console.py come from? There is no IronPythonConsole class anymore so knowing what exactly the .py file is trying to do would be helpful. But likely you want to map existing things we're looking for into the Microsoft.Scripting.Hosting.Shell namespace which lives in Microsoft.Scripting.dll. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 10:30 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello maybe I should explain I have been trying to get readline to work with no success import readline fails with this message "No Module Named IronPythonConsole" the line in question is in the file "ironpython_console.py" import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole Just thought at this moment do I need to add anything to my environment variables? it was mentioned on the readline web site to post here hope some one can help *cheers Andrew using readline in IronPython produces and an error "no mo On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: On Wed, May 6, 2009 at 10:53, Andrew Evans > wrote: Hello list I am new here :-) I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete? Thanks in Advance _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com The specific error(s) you received would be helpful. _______________________________________________ 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 andrew.canit at gmail.com Wed May 6 20:29:37 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 11:29:37 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> hmm same error No Module named IronPythonConsole I removed everything related to that but I still get that error in the same file I am confused... it doesn't seem like my system is cached I have rebooted now several times.... anyway here is the exact error I really appreciate your help so far :-) IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pyreadline\console\__init__.py", line 8, i n C:\Python25\Lib\site-packages\pyreadline\console\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 28, in C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console .py File "", line unknown, in File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize ImportError: No module named IronPythonConsole >>> On Wed, May 6, 2009 at 10:54 AM, Dino Viehland wrote: > IConsole now lives in Microsoft.Scripting.Hosting.Shell, so you should be > able to change this to: > > > > clr.AddReference(?Microsoft.Scripting?) > > ? > > from Microsoft.Scripting.Hosting.Shell import IConsole > > > > class IronPythonWrapper(IConsole): > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 10:48 AM > *To:* Discussion of IronPython > > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hi the ironpython_console.py comes from pyreadine in the folder > "pyreadline/console/ironpython_console.py" > > the file itself in the areas where IronPythonConsole are referenced are > > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > > class IronPythonWrapper(IronPythonConsole.IConsole): > def ReadLine(self,autoIndentSize): > return hook_wrap() > def Write(self,text, style): > System.Console.Write(text) > def WriteLine(self,text, style): > System.Console.WriteLine(text) > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > > I have not been able to find an updated pyreadline I have attached the file > in question > > to see which module I am refering to see > http://ipython.scipy.org/moin/PyReadline/Intro > > *cheers > > And thank you > > On Wed, May 6, 2009 at 10:39 AM, Dino Viehland > wrote: > > Where does ironpython_console.py come from? There is no IronPythonConsole > class anymore so knowing what exactly the .py file is trying to do would be > helpful. But likely you want to map existing things we?re looking for into > the Microsoft.Scripting.Hosting.Shell namespace which lives in > Microsoft.Scripting.dll. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 10:30 AM > > > *To:* users at lists.ironpython.com > > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello maybe I should explain I have been trying to get readline to work > with no success > > import readline fails with this message "No Module Named IronPythonConsole" > > the line in question is in the file "ironpython_console.py" > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > Just thought at this moment do I need to add anything to my environment > variables? > > it was mentioned on the readline web site to post here hope some one can > help > > *cheers > > Andrew > > using readline in IronPython produces and an error "no mo > > On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: > > On Wed, May 6, 2009 at 10:53, Andrew Evans wrote: > > Hello list I am new here :-) > > I am trying to figure out how to get IronPythonConsole.exe as I need it for > Pyreadline... I am using 2.01 version of IronPython > > I have tried compiling from source to but to no avail. Is IronPythonConsole > obsolete? > > Thanks in > > Advance > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > The specific error(s) you received would be helpful. > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed May 6 20:44:15 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 06 May 2009 19:44:15 +0100 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: <4A01DA7F.7010600@voidspace.org.uk> merllab at microsoft.com wrote: > This is an automated email letting you know that sources > have recently been pushed out. > > MODIFIED SOURCES > $/IronPython/IronPython_Main/Readme.html > > CHECKIN COMMENTS > -------------------------------------------------------------------------------- > Changeset Id: 859108 > Date: 5/6/2009 9:32:59 AM > > This is a second test to see if comments get properly published to the IP mailing list. > > Very interesting... :-) Michael > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Wed May 6 21:01:29 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 06 May 2009 20:01:29 +0100 Subject: [IronPython] bytes behavior on 2.6... In-Reply-To: <350E7D38B6D819428718949920EC235557298E879F@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E8650@NA-EXMSG-C102.redmond.corp.microsoft.com> <4A00B487.5000401@voidspace.org.uk> <350E7D38B6D819428718949920EC235557298E879F@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <4A01DE89.6040500@voidspace.org.uk> Dino Viehland wrote: > I guess the good news here then is that our post-2.6 planning is still > very unclear. While I'd love us to move to 3.0 to get rid of our > Unicode issues it seems like there's not enough movement forward in the > community at large - of course until then we're always going to have > subtle Unicode compat issues :(. > Understood, but for example Resolver One would have a real problem with moving to Python 3 (right now anyway) as our users depend on libraries not available for Python 3. The Unicode problems are therefore inevitable, but we've been bitten by it surprisingly few times (I don't recall any but there may have been a couple of occasions). All the best, Michael Foord > My personal thoughts on this is that we could do a 2.6.1/2/3 after 2.6 > ships that focuses on lots of bug fixes and adding non-disruptive > 3.0 features under a -X:Python30 flag. But we still have some time > to figure out what to do here. As always input is always welcome! > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Michael Foord >> Sent: Tuesday, May 05, 2009 2:50 PM >> To: Discussion of IronPython >> Subject: Re: [IronPython] bytes behavior on 2.6... >> >> Dino Viehland wrote: >> >>> We have an active bug against our new bytes implementation for 2.6. >>> Currently if you do: >>> >>> b'***'[0] >>> >>> you get back 42 as an int. This matches the 3.0 behavior of bytes but >>> in CPython 2.6 you get back '*'. >>> >>> We could choose to match either form and then we could change it for >>> 3.0. But because we only have Unicode strings today it seems like we >>> might want to match the 3.0 behavior. Of course people might write >>> code expecting the 2.6 behavior and they might be explicitly using >>> byte literals as part of migrating to being compatible w/ 3.0. >>> >>> Does anyone have an opinion on what we should do here? >>> >>> >> Personally I think if you are targeting compatibility with Python 2.6 >> then you should be compatible with Python 2.6... >> >> I'm still hoping you will relent and maintain an IronPython 2.X branch >> as long as Python 2.X is being developed... >> >> Michael >> >> >>> --------------------------------------------------------------------- >>> >> --- >> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From stephen.p.lepisto at intel.com Wed May 6 21:20:32 2009 From: stephen.p.lepisto at intel.com (Lepisto, Stephen P) Date: Wed, 6 May 2009 12:20:32 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> Message-ID: <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> Andrew, based on your traceback output, I reconstructed the problem on my system and I get a similar error with IronPython 2.0.1 when trying to import readline. However, on my system, I get the following error: >>> import sys >>> sys.path.append(r"c:\python25\Lib\site-packages") >>> import readline Traceback (most recent call last): File "", line 1, in File "c:\python25\Lib\site-packages\readline\__init__.py", line 1, in c:\python25\Lib\site-packages\readline\__init__.py File "c:\python25\Lib\site-packages\readline\PyReadline.py", line 12, in c:\python25\Lib\site-packages\readline\PyReadline.py ImportError: No module named win32con The win32con module is a .pyd module in python25. IronPython 2.0 cannot load .pyd modules. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 11:30 AM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe hmm same error No Module named IronPythonConsole I removed everything related to that but I still get that error in the same file I am confused... it doesn't seem like my system is cached I have rebooted now several times.... anyway here is the exact error I really appreciate your help so far :-) IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pyreadline\console\__init__.py", line 8, i n C:\Python25\Lib\site-packages\pyreadline\console\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 28, in C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console .py File "", line unknown, in File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize File "Snippets.scripting", line unknown, in Initialize ImportError: No module named IronPythonConsole >>> On Wed, May 6, 2009 at 10:54 AM, Dino Viehland > wrote: IConsole now lives in Microsoft.Scripting.Hosting.Shell, so you should be able to change this to: clr.AddReference('Microsoft.Scripting') ... from Microsoft.Scripting.Hosting.Shell import IConsole class IronPythonWrapper(IConsole): From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 10:48 AM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hi the ironpython_console.py comes from pyreadine in the folder "pyreadline/console/ironpython_console.py" the file itself in the areas where IronPythonConsole are referenced are import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole class IronPythonWrapper(IronPythonConsole.IConsole): def ReadLine(self,autoIndentSize): return hook_wrap() def Write(self,text, style): System.Console.Write(text) def WriteLine(self,text, style): System.Console.WriteLine(text) IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() I have not been able to find an updated pyreadline I have attached the file in question to see which module I am refering to see http://ipython.scipy.org/moin/PyReadline/Intro *cheers And thank you On Wed, May 6, 2009 at 10:39 AM, Dino Viehland > wrote: Where does ironpython_console.py come from? There is no IronPythonConsole class anymore so knowing what exactly the .py file is trying to do would be helpful. But likely you want to map existing things we're looking for into the Microsoft.Scripting.Hosting.Shell namespace which lives in Microsoft.Scripting.dll. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 10:30 AM To: users at lists.ironpython.com Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello maybe I should explain I have been trying to get readline to work with no success import readline fails with this message "No Module Named IronPythonConsole" the line in question is in the file "ironpython_console.py" import clr,sys clr.AddReferenceToFileAndPath(sys.executable) import IronPythonConsole Just thought at this moment do I need to add anything to my environment variables? it was mentioned on the readline web site to post here hope some one can help *cheers Andrew using readline in IronPython produces and an error "no mo On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: On Wed, May 6, 2009 at 10:53, Andrew Evans > wrote: Hello list I am new here :-) I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete? Thanks in Advance _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com The specific error(s) you received would be helpful. _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Wed May 6 22:06:54 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 13:06:54 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> Message-ID: <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) On Wed, May 6, 2009 at 12:20 PM, Lepisto, Stephen P < stephen.p.lepisto at intel.com> wrote: > Andrew, based on your traceback output, I reconstructed the problem on my > system and I get a similar error with IronPython 2.0.1 when trying to import > readline. However, on my system, I get the following error: > > > > >>> import sys > > >>> sys.path.append(r"c:\python25\Lib\site-packages") > > >>> import readline > > Traceback (most recent call last): > > File "", line 1, in > > File "c:\python25\Lib\site-packages\readline\__init__.py", line 1, in > c:\python25\Lib\site-packages\readline\__init__.py > > File "c:\python25\Lib\site-packages\readline\PyReadline.py", line 12, in > c:\python25\Lib\site-packages\readline\PyReadline.py > > ImportError: No module named win32con > > > > The win32con module is a .pyd module in python25. IronPython 2.0 cannot > load .pyd modules. > > > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 11:30 AM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > hmm same error > > No Module named IronPythonConsole > > I removed everything related to that but I still get that error in the same > file > > I am confused... it doesn't seem like my system is cached I have rebooted > now several times.... > > anyway here is the exact error I really appreciate your help so far :-) > > IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053 > Type "help", "copyright", "credits" or "license" for more information. > >>> import readline > Traceback (most recent call last): > File "C:\Python25\Lib\site-packages\pyreadline\console\__init__.py", line > 8, i > n C:\Python25\Lib\site-packages\pyreadline\console\__init__.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 28, in > C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console > .py > File "", line unknown, in > File "Snippets.scripting", line unknown, in Initialize > File "Snippets.scripting", line unknown, in Initialize > File "Snippets.scripting", line unknown, in Initialize > File "Snippets.scripting", line unknown, in Initialize > ImportError: No module named IronPythonConsole > >>> > > On Wed, May 6, 2009 at 10:54 AM, Dino Viehland > wrote: > > IConsole now lives in Microsoft.Scripting.Hosting.Shell, so you should be > able to change this to: > > > > clr.AddReference(?Microsoft.Scripting?) > > ? > > from Microsoft.Scripting.Hosting.Shell import IConsole > > > > class IronPythonWrapper(IConsole): > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 10:48 AM > *To:* Discussion of IronPython > > > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hi the ironpython_console.py comes from pyreadine in the folder > "pyreadline/console/ironpython_console.py" > > the file itself in the areas where IronPythonConsole are referenced are > > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > > class IronPythonWrapper(IronPythonConsole.IConsole): > def ReadLine(self,autoIndentSize): > return hook_wrap() > def Write(self,text, style): > System.Console.Write(text) > def WriteLine(self,text, style): > System.Console.WriteLine(text) > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > > I have not been able to find an updated pyreadline I have attached the file > in question > > to see which module I am refering to see > http://ipython.scipy.org/moin/PyReadline/Intro > > *cheers > > And thank you > > On Wed, May 6, 2009 at 10:39 AM, Dino Viehland > wrote: > > Where does ironpython_console.py come from? There is no IronPythonConsole > class anymore so knowing what exactly the .py file is trying to do would be > helpful. But likely you want to map existing things we?re looking for into > the Microsoft.Scripting.Hosting.Shell namespace which lives in > Microsoft.Scripting.dll. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 10:30 AM > > > *To:* users at lists.ironpython.com > > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello maybe I should explain I have been trying to get readline to work > with no success > > import readline fails with this message "No Module Named IronPythonConsole" > > the line in question is in the file "ironpython_console.py" > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > Just thought at this moment do I need to add anything to my environment > variables? > > it was mentioned on the readline web site to post here hope some one can > help > > *cheers > > Andrew > > using readline in IronPython produces and an error "no mo > > On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org > wrote: > > On Wed, May 6, 2009 at 10:53, Andrew Evans wrote: > > Hello list I am new here :-) > > I am trying to figure out how to get IronPythonConsole.exe as I need it for > Pyreadline... I am using 2.01 version of IronPython > > I have tried compiling from source to but to no avail. Is IronPythonConsole > obsolete? > > Thanks in > > Advance > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > The specific error(s) you received would be helpful. > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorgen.stenarson at bostream.nu Wed May 6 22:20:53 2009 From: jorgen.stenarson at bostream.nu (=?windows-1252?Q?J=F6rgen_Stenarson?=) Date: Wed, 06 May 2009 22:20:53 +0200 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> Message-ID: <4A01F125.9040202@bostream.nu> Andrew Evans skrev: > Hey Stephen thank you > > You solved my problem (I had copied pyreadline from previously to the > ironpython folder.) I modified the file in the ironpython folder... > modifying it in the default directory in C:\Python25 fixed it > > Thank You :-) > Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen From andrew.canit at gmail.com Wed May 6 22:35:56 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 13:35:56 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <4A01F125.9040202@bostream.nu> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> Message-ID: <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> Hello pyreadline plays an important part in scapy ( http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson < jorgen.stenarson at bostream.nu> wrote: > Andrew Evans skrev: > >> Hey Stephen thank you >> >> You solved my problem (I had copied pyreadline from previously to the >> ironpython folder.) I modified the file in the ironpython folder... >> modifying it in the default directory in C:\Python25 fixed it >> >> Thank You :-) >> >> > Andrew, > > I'm happy to see that someone is trying to use pyreadline (I'm the > maintainer of pyreadline) on ironpython. I have not tried it myself for a > long time so I have no idea how much bitrot has crept into it. If you have > any patches to make it work out of the box I would be happy to include it. > > Please file any patches via the bugtracker: > https://bugs.launchpad.net/pyreadline > > We use the ipython lists to discuss pyreadline > http://mail.scipy.org/mailman/listinfo/ipython-user > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > /J?rgen > > _______________________________________________ > 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 microsoft.com Wed May 6 23:48:24 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 14:48:24 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <321b88ab0905061029n6f0ddc2eic5b4cf0dd74c65a4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> This one?s a little more complex. It looks like there?s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That?d look something like: import clr clr.AddReference(?IronPython?) clr.AddReference(?Microsoft.Scripting?) from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python cmdLine = PythonCommandLine() cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, PythonConsoleOptions()) When you call Run here that will then start the interactive interpreter loop ? I?m not sure if that?s exactly what you want. This is also going to create a 2nd IronPython engine because you can?t really get to the current ScriptEngine from within IronPython itself ? again there could be reasons why you wouldn?t want this to happen. If you?ve got suggestions on what you?d like the APIs to look like for this scenario let us know ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello pyreadline plays an important part in scapy (http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson > wrote: Andrew Evans skrev: Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen _______________________________________________ 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 jdhardy at gmail.com Thu May 7 01:22:18 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 6 May 2009 17:22:18 -0600 Subject: [IronPython] Mercurial Status In-Reply-To: <350E7D38B6D819428718949920EC235557298E8786@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E8177@NA-EXMSG-C102.redmond.corp.microsoft.com> <350E7D38B6D819428718949920EC235557298E8786@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: On Tue, May 5, 2009 at 6:10 PM, Dino Viehland wrote: > Ok, I do have a fix for this and the other issues - I'm just waiting for > a code review then I'll check it in. ?If we do f.write(buffer('foo')) where > f was opened as a binary file we'll write out b'foo' and not > b'f\x00o\x00\x00' which I suspect will work for your purposes (but won't be > compatible w/ buffer(u'foo'). I think that's fine. I doubt buffer(u'') is a common case, and that bridge can be crossed if it comes up. > > I also have the fixes for the other issues you reported so hopefully > you'll be largely unblocked to find the next set of issues soon :) And every other issue I've ever reported :). Thanks, Dino. - Jeff From jdhardy at gmail.com Thu May 7 01:37:08 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 6 May 2009 17:37:08 -0600 Subject: [IronPython] Assertion failure in IPy 2.6 while running Django In-Reply-To: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: On Sun, May 3, 2009 at 3:59 PM, Dino Viehland wrote: > Do you happen to know what baseName is when the assertion is hit? > Hit this again (different subclass of Field); baseName was Default20. This might have something to do with the fact that Field.__init__ has 20(!) optional, defaulted parameters. - Jeff From dinov at microsoft.com Thu May 7 01:46:23 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 16:46:23 -0700 Subject: [IronPython] Assertion failure in IPy 2.6 while running Django In-Reply-To: References: <350E7D38B6D819428718949920EC235557298E7EA1@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8BC2@NA-EXMSG-C102.redmond.corp.microsoft.com> Ahh, I see, we need to disable the fast path for functions w/ too many parameters. That'll be trivial to fix - but really, 20 parameters!?!? :) > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Wednesday, May 06, 2009 4:37 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Assertion failure in IPy 2.6 while running > Django > > On Sun, May 3, 2009 at 3:59 PM, Dino Viehland > wrote: > > Do you happen to know what baseName is when the assertion is hit? > > > > Hit this again (different subclass of Field); baseName was Default20. > > This might have something to do with the fact that Field.__init__ has > 20(!) optional, defaulted parameters. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From andrew.canit at gmail.com Thu May 7 02:23:58 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 17:23:58 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> Hello Ive tried implementing what you suggested with no success I have attached the source just in case you or anyone can shed some light on it Cheers >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can IT\Desktop \readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 408, in install_readline TypeError: expected IConsole, got type >>> On Wed, May 6, 2009 at 2:48 PM, Dino Viehland wrote: > This one?s a little more complex. It looks like there?s no longer a > writable IConsole property. Instead it looks like you need to create a > PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a > ConsoleOptions object. That?d look something like: > > > > import clr > > clr.AddReference(?IronPython?) > > clr.AddReference(?Microsoft.Scripting?) > > from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, > Python > > cmdLine = PythonCommandLine() > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, > PythonConsoleOptions()) > > > > When you call Run here that will then start the interactive interpreter > loop ? I?m not sure if that?s exactly what you want. This is also going to > create a 2nd IronPython engine because you can?t really get to the current > ScriptEngine from within IronPython itself ? again there could be reasons > why you wouldn?t want this to happen. > > > > If you?ve got suggestions on what you?d like the APIs to look like for this > scenario let us know J > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 1:36 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello > > > pyreadline plays an important part in scapy ( > http://www.secdev.org/projects/scapy/) which is what I am porting to > IronPython. My reason for this is well I like a challenge. That's the only > reason as self serving as that may seem :-P > > Thats the result of my console > > Welcome to Scapy (1.2.0.2-win) > ??[34m?[1m?>>> ??[0m? > > > I am not 100 % sure I implented this line correct > > "MyConsole = IronPythonWrapper()" > > which was previously > > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > maybe more experienced people can shed a light on this > > when that is solved I can submit a patch :-) I would be happy to > > > On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson < > jorgen.stenarson at bostream.nu> wrote: > > Andrew Evans skrev: > > > > Hey Stephen thank you > > You solved my problem (I had copied pyreadline from previously to the > ironpython folder.) I modified the file in the ironpython folder... > modifying it in the default directory in C:\Python25 fixed it > > Thank You :-) > > > > Andrew, > > I'm happy to see that someone is trying to use pyreadline (I'm the > maintainer of pyreadline) on ironpython. I have not tried it myself for a > long time so I have no idea how much bitrot has crept into it. If you have > any patches to make it work out of the box I would be happy to include it. > > Please file any patches via the bugtracker: > https://bugs.launchpad.net/pyreadline > > We use the ipython lists to discuss pyreadline > http://mail.scipy.org/mailman/listinfo/ipython-user > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > /J?rgen > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: ironpython_console.py Type: text/x-python Size: 14227 bytes Desc: not available URL: From dinov at microsoft.com Thu May 7 02:31:01 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 17:31:01 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8960@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061047o1c72213ej30b4ffdd13cd3659@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> The last line should probably be: cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), PythonConsoleOptions()) I thought IronPythonWrapper was an instance but it looks like it?s a type ? so it needs to be constructed. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:24 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello Ive tried implementing what you suggested with no success I have attached the source just in case you or anyone can shed some light on it Cheers >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can IT\Desktop \readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 408, in install_readline TypeError: expected IConsole, got type >>> On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: This one?s a little more complex. It looks like there?s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That?d look something like: import clr clr.AddReference(?IronPython?) clr.AddReference(?Microsoft.Scripting?) from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python cmdLine = PythonCommandLine() cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, PythonConsoleOptions()) When you call Run here that will then start the interactive interpreter loop ? I?m not sure if that?s exactly what you want. This is also going to create a 2nd IronPython engine because you can?t really get to the current ScriptEngine from within IronPython itself ? again there could be reasons why you wouldn?t want this to happen. If you?ve got suggestions on what you?d like the APIs to look like for this scenario let us know ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello pyreadline plays an important part in scapy (http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson > wrote: Andrew Evans skrev: Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen _______________________________________________ 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 andrew.canit at gmail.com Thu May 7 02:56:03 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 17:56:03 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> Well I am about ready to give up for the night anyway here is my last error :-) >>> import sys >>> sys.path.append(r"C:\Python25\Lib\site-packages") >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\readline.py", line 4, in C:\Python25\Lib\s ite-packages\readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 409, in install_readline AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' >>> On Wed, May 6, 2009 at 5:31 PM, Dino Viehland wrote: > The last line should probably be: > > > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), > PythonConsoleOptions()) > > I thought IronPythonWrapper was an instance but it looks like it?s a type ? > so it needs to be constructed. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 5:24 PM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello Ive tried implementing what you suggested with no success > > I have attached the source just in case you or anyone can shed some light > on it > > Cheers > > >>> import readline > Traceback (most recent call last): > File "", line 1, in > File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can > IT\Desktop > \readline.py > File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\__init__.py > File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\rlmain.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 408, in install_readline > TypeError: expected IConsole, got type > >>> > > > > On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: > > This one?s a little more complex. It looks like there?s no longer a > writable IConsole property. Instead it looks like you need to create a > PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a > ConsoleOptions object. That?d look something like: > > > > import clr > > clr.AddReference(?IronPython?) > > clr.AddReference(?Microsoft.Scripting?) > > from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, > Python > > cmdLine = PythonCommandLine() > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, > PythonConsoleOptions()) > > > > When you call Run here that will then start the interactive interpreter > loop ? I?m not sure if that?s exactly what you want. This is also going to > create a 2nd IronPython engine because you can?t really get to the current > ScriptEngine from within IronPython itself ? again there could be reasons > why you wouldn?t want this to happen. > > > > If you?ve got suggestions on what you?d like the APIs to look like for this > scenario let us know J > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 1:36 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello > > > > pyreadline plays an important part in scapy ( > http://www.secdev.org/projects/scapy/) which is what I am porting to > IronPython. My reason for this is well I like a challenge. That's the only > reason as self serving as that may seem :-P > > Thats the result of my console > > Welcome to Scapy (1.2.0.2-win) > ??[34m?[1m?>>> ??[0m? > > > I am not 100 % sure I implented this line correct > > "MyConsole = IronPythonWrapper()" > > which was previously > > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > maybe more experienced people can shed a light on this > > when that is solved I can submit a patch :-) I would be happy to > > On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson < > jorgen.stenarson at bostream.nu> wrote: > > Andrew Evans skrev: > > > > Hey Stephen thank you > > You solved my problem (I had copied pyreadline from previously to the > ironpython folder.) I modified the file in the ironpython folder... > modifying it in the default directory in C:\Python25 fixed it > > Thank You :-) > > > > Andrew, > > I'm happy to see that someone is trying to use pyreadline (I'm the > maintainer of pyreadline) on ironpython. I have not tried it myself for a > long time so I have no idea how much bitrot has crept into it. If you have > any patches to make it work out of the box I would be happy to include it. > > Please file any patches via the bugtracker: > https://bugs.launchpad.net/pyreadline > > We use the ipython lists to discuss pyreadline > http://mail.scipy.org/mailman/listinfo/ipython-user > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > /J?rgen > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu May 7 03:32:27 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 18:32:27 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E897D@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061129x74d8125aq116fd1e9b31528e1@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> Is there an actual call to a ?something.set_Output(?)? method somewhere in the code? If so it should be ?something.Output = ?.? ? in 2.0 we no longer allow calling properties via the property methods. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:56 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Well I am about ready to give up for the night anyway here is my last error :-) >>> import sys >>> sys.path.append(r"C:\Python25\Lib\site-packages") >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\readline.py", line 4, in C:\Python25\Lib\s ite-packages\readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 409, in install_readline AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' >>> On Wed, May 6, 2009 at 5:31 PM, Dino Viehland > wrote: The last line should probably be: cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), PythonConsoleOptions()) I thought IronPythonWrapper was an instance but it looks like it?s a type ? so it needs to be constructed. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:24 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello Ive tried implementing what you suggested with no success I have attached the source just in case you or anyone can shed some light on it Cheers >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can IT\Desktop \readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 408, in install_readline TypeError: expected IConsole, got type >>> On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: This one?s a little more complex. It looks like there?s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That?d look something like: import clr clr.AddReference(?IronPython?) clr.AddReference(?Microsoft.Scripting?) from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python cmdLine = PythonCommandLine() cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, PythonConsoleOptions()) When you call Run here that will then start the interactive interpreter loop ? I?m not sure if that?s exactly what you want. This is also going to create a 2nd IronPython engine because you can?t really get to the current ScriptEngine from within IronPython itself ? again there could be reasons why you wouldn?t want this to happen. If you?ve got suggestions on what you?d like the APIs to look like for this scenario let us know ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello pyreadline plays an important part in scapy (http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson > wrote: Andrew Evans skrev: Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Thu May 7 04:00:45 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 19:00:45 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061900p6e13ce00uc2c4ad529197b0b6@mail.gmail.com> hmm I did a search through the code there is no set_Output and I searched Output and set_ as separate search nothing... Now I am confused Anyway I really appreciate your help :-) *cheers Andrew On Wed, May 6, 2009 at 6:32 PM, Dino Viehland wrote: > Is there an actual call to a ?something.set_Output(?)? method somewhere > in the code? > > > > If so it should be ?something.Output = ?.? ? in 2.0 we no longer allow > calling properties > > via the property methods. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 5:56 PM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Well I am about ready to give up for the night anyway here is my last error > :-) > > > >>> import sys > >>> sys.path.append(r"C:\Python25\Lib\site-packages") > >>> import readline > Traceback (most recent call last): > File "", line 1, in > File "C:\Python25\Lib\site-packages\readline.py", line 4, in > C:\Python25\Lib\s > ite-packages\readline.py > File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\__init__.py > File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\rlmain.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 409, in install_readline > AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' > >>> > > On Wed, May 6, 2009 at 5:31 PM, Dino Viehland > wrote: > > The last line should probably be: > > > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), > PythonConsoleOptions()) > > I thought IronPythonWrapper was an instance but it looks like it?s a type ? > so it needs to be constructed. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 5:24 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello Ive tried implementing what you suggested with no success > > I have attached the source just in case you or anyone can shed some light > on it > > Cheers > > >>> import readline > Traceback (most recent call last): > File "", line 1, in > File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can > IT\Desktop > \readline.py > File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\__init__.py > File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\rlmain.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 408, in install_readline > TypeError: expected IConsole, got type > >>> > > > On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: > > This one?s a little more complex. It looks like there?s no longer a > writable IConsole property. Instead it looks like you need to create a > PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a > ConsoleOptions object. That?d look something like: > > > > import clr > > clr.AddReference(?IronPython?) > > clr.AddReference(?Microsoft.Scripting?) > > from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, > Python > > cmdLine = PythonCommandLine() > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, > PythonConsoleOptions()) > > > > When you call Run here that will then start the interactive interpreter > loop ? I?m not sure if that?s exactly what you want. This is also going to > create a 2nd IronPython engine because you can?t really get to the current > ScriptEngine from within IronPython itself ? again there could be reasons > why you wouldn?t want this to happen. > > > > If you?ve got suggestions on what you?d like the APIs to look like for this > scenario let us know J > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 1:36 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello > > > > pyreadline plays an important part in scapy ( > http://www.secdev.org/projects/scapy/) which is what I am porting to > IronPython. My reason for this is well I like a challenge. That's the only > reason as self serving as that may seem :-P > > Thats the result of my console > > Welcome to Scapy (1.2.0.2-win) > ??[34m?[1m?>>> ??[0m? > > > I am not 100 % sure I implented this line correct > > "MyConsole = IronPythonWrapper()" > > which was previously > > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > maybe more experienced people can shed a light on this > > when that is solved I can submit a patch :-) I would be happy to > > On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson < > jorgen.stenarson at bostream.nu> wrote: > > Andrew Evans skrev: > > > > Hey Stephen thank you > > You solved my problem (I had copied pyreadline from previously to the > ironpython folder.) I modified the file in the ironpython folder... > modifying it in the default directory in C:\Python25 fixed it > > Thank You :-) > > > > Andrew, > > I'm happy to see that someone is trying to use pyreadline (I'm the > maintainer of pyreadline) on ironpython. I have not tried it myself for a > long time so I have no idea how much bitrot has crept into it. If you have > any patches to make it work out of the box I would be happy to include it. > > Please file any patches via the bugtracker: > https://bugs.launchpad.net/pyreadline > > We use the ipython lists to discuss pyreadline > http://mail.scipy.org/mailman/listinfo/ipython-user > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > /J?rgen > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu May 7 04:12:58 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 6 May 2009 19:12:58 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061900p6e13ce00uc2c4ad529197b0b6@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <6AF28EB9F93A354894F2F3916DF6F96E0C6E915F25@orsmsx510.amr.corp.intel.com> <321b88ab0905061306h11f2672bu25b6edc46ccf966e@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061900p6e13ce00uc2c4ad529197b0b6@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8C26@NA-EXMSG-C102.redmond.corp.microsoft.com> Ahh, I see, there?s new properties on IConsole to get/set the Output/ErrorOutput TextWriters. You can define get_Output/set_Output/get_ErrorOutput/set_ErrorOutput methods to implement them for the interface on IronPythonWrapper. They can simply save/return the values and you can ignore it or you can use the TextWriter to pick up when the user redirects sys.stdout/sys.stderr. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 7:01 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe hmm I did a search through the code there is no set_Output and I searched Output and set_ as separate search nothing... Now I am confused Anyway I really appreciate your help :-) *cheers Andrew On Wed, May 6, 2009 at 6:32 PM, Dino Viehland > wrote: Is there an actual call to a ?something.set_Output(?)? method somewhere in the code? If so it should be ?something.Output = ?.? ? in 2.0 we no longer allow calling properties via the property methods. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:56 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Well I am about ready to give up for the night anyway here is my last error :-) >>> import sys >>> sys.path.append(r"C:\Python25\Lib\site-packages") >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\readline.py", line 4, in C:\Python25\Lib\s ite-packages\readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 409, in install_readline AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' >>> On Wed, May 6, 2009 at 5:31 PM, Dino Viehland > wrote: The last line should probably be: cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), PythonConsoleOptions()) I thought IronPythonWrapper was an instance but it looks like it?s a type ? so it needs to be constructed. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:24 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello Ive tried implementing what you suggested with no success I have attached the source just in case you or anyone can shed some light on it Cheers >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can IT\Desktop \readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 408, in install_readline TypeError: expected IConsole, got type >>> On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: This one?s a little more complex. It looks like there?s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That?d look something like: import clr clr.AddReference(?IronPython?) clr.AddReference(?Microsoft.Scripting?) from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python cmdLine = PythonCommandLine() cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, PythonConsoleOptions()) When you call Run here that will then start the interactive interpreter loop ? I?m not sure if that?s exactly what you want. This is also going to create a 2nd IronPython engine because you can?t really get to the current ScriptEngine from within IronPython itself ? again there could be reasons why you wouldn?t want this to happen. If you?ve got suggestions on what you?d like the APIs to look like for this scenario let us know ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello pyreadline plays an important part in scapy (http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson > wrote: Andrew Evans skrev: Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Thu May 7 04:33:30 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Wed, 6 May 2009 19:33:30 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <350E7D38B6D819428718949920EC235557298E8C26@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061900p6e13ce00uc2c4ad529197b0b6@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C26@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <321b88ab0905061933k3e82e5acpa40588b86c403364@mail.gmail.com> Where can I find the docs on this I am not the best coder but maybe the documentation will help me to understand what your saying *cheers What I understand I need to create the function "get_Output" "set_Output" etc but in order for them to return the values would it be def set_Output(): set_Output Anyway once again thank you btw it isn't my code its a IronPython module I need to work :-) On Wed, May 6, 2009 at 7:12 PM, Dino Viehland wrote: > Ahh, I see, there?s new properties on IConsole to get/set the > Output/ErrorOutput TextWriters. You can define > get_Output/set_Output/get_ErrorOutput/set_ErrorOutput methods to implement > them for the interface on IronPythonWrapper. > > > > They can simply save/return the values and you can ignore it or you can use > the TextWriter to pick up when the user redirects sys.stdout/sys.stderr. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 7:01 PM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > hmm I did a search through the code there is no set_Output and I searched > Output and set_ as separate search nothing... Now I am confused > > Anyway I really appreciate your help :-) > > *cheers > > Andrew > > On Wed, May 6, 2009 at 6:32 PM, Dino Viehland wrote: > > Is there an actual call to a ?something.set_Output(?)? method somewhere in > the code? > > > > If so it should be ?something.Output = ?.? ? in 2.0 we no longer allow > calling properties > > via the property methods. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 5:56 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Well I am about ready to give up for the night anyway here is my last error > :-) > > > >>> import sys > >>> sys.path.append(r"C:\Python25\Lib\site-packages") > >>> import readline > Traceback (most recent call last): > File "", line 1, in > File "C:\Python25\Lib\site-packages\readline.py", line 4, in > C:\Python25\Lib\s > ite-packages\readline.py > File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\__init__.py > File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\rlmain.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 409, in install_readline > AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' > >>> > > On Wed, May 6, 2009 at 5:31 PM, Dino Viehland wrote: > > The last line should probably be: > > > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), > PythonConsoleOptions()) > > I thought IronPythonWrapper was an instance but it looks like it?s a type ? > so it needs to be constructed. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 5:24 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello Ive tried implementing what you suggested with no success > > I have attached the source just in case you or anyone can shed some light > on it > > Cheers > > >>> import readline > Traceback (most recent call last): > File "", line 1, in > File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can > IT\Desktop > \readline.py > File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\__init__.py > File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in > C:\Pyt > hon25\Lib\site-packages\pyreadline\rlmain.py > File > "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", > line 408, in install_readline > TypeError: expected IConsole, got type > >>> > > On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: > > This one?s a little more complex. It looks like there?s no longer a > writable IConsole property. Instead it looks like you need to create a > PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a > ConsoleOptions object. That?d look something like: > > > > import clr > > clr.AddReference(?IronPython?) > > clr.AddReference(?Microsoft.Scripting?) > > from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, > Python > > cmdLine = PythonCommandLine() > > cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, > PythonConsoleOptions()) > > > > When you call Run here that will then start the interactive interpreter > loop ? I?m not sure if that?s exactly what you want. This is also going to > create a 2nd IronPython engine because you can?t really get to the current > ScriptEngine from within IronPython itself ? again there could be reasons > why you wouldn?t want this to happen. > > > > If you?ve got suggestions on what you?d like the APIs to look like for this > scenario let us know J > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Wednesday, May 06, 2009 1:36 PM > > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Compiling IronPythonConsole.exe > > > > Hello > > > > pyreadline plays an important part in scapy ( > http://www.secdev.org/projects/scapy/) which is what I am porting to > IronPython. My reason for this is well I like a challenge. That's the only > reason as self serving as that may seem :-P > > Thats the result of my console > > Welcome to Scapy (1.2.0.2-win) > ??[34m?[1m?>>> ??[0m? > > > I am not 100 % sure I implented this line correct > > "MyConsole = IronPythonWrapper()" > > which was previously > > IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() > > maybe more experienced people can shed a light on this > > when that is solved I can submit a patch :-) I would be happy to > > On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson < > jorgen.stenarson at bostream.nu> wrote: > > Andrew Evans skrev: > > > > Hey Stephen thank you > > You solved my problem (I had copied pyreadline from previously to the > ironpython folder.) I modified the file in the ironpython folder... > modifying it in the default directory in C:\Python25 fixed it > > Thank You :-) > > > > Andrew, > > I'm happy to see that someone is trying to use pyreadline (I'm the > maintainer of pyreadline) on ironpython. I have not tried it myself for a > long time so I have no idea how much bitrot has crept into it. If you have > any patches to make it work out of the box I would be happy to include it. > > Please file any patches via the bugtracker: > https://bugs.launchpad.net/pyreadline > > We use the ipython lists to discuss pyreadline > http://mail.scipy.org/mailman/listinfo/ipython-user > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > /J?rgen > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dblank at brynmawr.edu Thu May 7 05:51:02 2009 From: dblank at brynmawr.edu (Douglas Blank) Date: Wed, 6 May 2009 23:51:02 -0400 (EDT) Subject: [IronPython] Some Objects not visible in my Shell? Message-ID: <1044276343.6306601241668262348.JavaMail.root@ganesh.brynmawr.edu> I'm working on a couple of variations of an IronPython Shell, and I have the following issue. When I import some DLLs interactively, I'm not seeing all of the available objects. For example, in my shells I try: >>> import clr >>> clr.AddReference("System") >>> from System.Threading import Thread and I get the error that 'Cannot import name Thread'. In fact, if I: >>> import System.Threading >>> dir(System.Threading) I get: ['Semaphore', 'SemaphoreFullException', 'ThreadExceptionEventArgs', 'ThreadExceptionEventHandler'] However, using the ipy.exe console, I correctly get: >>> import System.Threading >>> dir(System.Threading) ['AbandonedMutexException', 'ApartmentState', 'AsyncFlowControl', 'AutoResetEvent', 'CompressedStack', 'ContextCallback', 'EventResetMode', 'EventWaitHandle', 'ExecutionContext', 'HostExecutionContext', 'HostExecutionContextManager', 'IOCompletionCallback', 'Interlocked', 'LockCookie', 'ManualResetEvent', 'Monitor', 'Mutex', 'NativeOverlapped', 'Overlapped', 'ParameterizedThreadStart', 'ReaderWriterLock', 'RegisteredWaitHandle', 'Semaphore', 'SemaphoreFullException', 'SendOrP ostCallback', 'SynchronizationContext', 'SynchronizationLockException', 'Thread', 'ThreadAbortException', 'ThreadExceptionEventArgs', 'ThreadExceptionEventHandler', 'ThreadInterruptedException', 'ThreadPool', 'ThreadPriority', 'ThreadStart', 'ThreadStartException', 'ThreadState', 'ThreadStateException', 'Timeout', 'Timer', 'TimerCallback', 'WaitCallback', 'WaitHandle', 'WaitHandleCannotBeOpenedException', 'WaitOrTimerCallback'] I feel I must be doing something fundamentally wrong... anyone have a guess as to what that might be? Thanks for any ideas! -Doug From curt at hagenlocher.org Thu May 7 06:27:23 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 6 May 2009 21:27:23 -0700 Subject: [IronPython] Some Objects not visible in my Shell? In-Reply-To: <1044276343.6306601241668262348.JavaMail.root@ganesh.brynmawr.edu> References: <1044276343.6306601241668262348.JavaMail.root@ganesh.brynmawr.edu> Message-ID: System.Threading is actually in mscorlib, so you'd have to AddReference("mscorlib") as well. Alternatively, you can load both mscorlib and System.dll in your hosting code by saying something like this: ScriptDomainManager.CurrentManager.LoadAssembly(typeof(string).Assembly); //mscorlib.dll ScriptDomainManager.CurrentManager.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly); //System.dll I think we've changed this in 2.6A1 so that these are always loaded by default in hosting scenarios. On Wed, May 6, 2009 at 8:51 PM, Douglas Blank wrote: > I'm working on a couple of variations of an IronPython Shell, and I have > the following issue. When I import some DLLs interactively, I'm not seeing > all of the available objects. For example, in my shells I try: > > >>> import clr > >>> clr.AddReference("System") > >>> from System.Threading import Thread > > and I get the error that 'Cannot import name Thread'. In fact, if I: > > >>> import System.Threading > >>> dir(System.Threading) > > I get: > > ['Semaphore', 'SemaphoreFullException', 'ThreadExceptionEventArgs', > 'ThreadExceptionEventHandler'] > > However, using the ipy.exe console, I correctly get: > > >>> import System.Threading > >>> dir(System.Threading) > ['AbandonedMutexException', 'ApartmentState', 'AsyncFlowControl', > 'AutoResetEvent', 'CompressedStack', 'ContextCallback', 'EventResetMode', > 'EventWaitHandle', 'ExecutionContext', 'HostExecutionContext', > 'HostExecutionContextManager', 'IOCompletionCallback', 'Interlocked', > 'LockCookie', 'ManualResetEvent', 'Monitor', 'Mutex', 'NativeOverlapped', > 'Overlapped', 'ParameterizedThreadStart', 'ReaderWriterLock', > 'RegisteredWaitHandle', 'Semaphore', 'SemaphoreFullException', 'SendOrP > ostCallback', 'SynchronizationContext', 'SynchronizationLockException', > 'Thread', 'ThreadAbortException', 'ThreadExceptionEventArgs', > 'ThreadExceptionEventHandler', 'ThreadInterruptedException', 'ThreadPool', > 'ThreadPriority', 'ThreadStart', 'ThreadStartException', 'ThreadState', > 'ThreadStateException', 'Timeout', 'Timer', 'TimerCallback', > 'WaitCallback', 'WaitHandle', 'WaitHandleCannotBeOpenedException', > 'WaitOrTimerCallback'] > > I feel I must be doing something fundamentally wrong... anyone have a > guess as to what that might be? Thanks for any ideas! > > -Doug > > _______________________________________________ > 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 merllab at microsoft.com Thu May 7 17:52:30 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Thu, 7 May 2009 08:52:30 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_md5.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha256.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha512.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/sha512.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/sha256.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/sha.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/md5.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_md5.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha256.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha512.cs $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/pytraits/method.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_event_override.py $/IronPython/IronPython_Main/Src/Tests/test_bytes.py $/IronPython/IronPython_Main/Src/Tests/regressions.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOperationBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinMethodDescriptor.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFile.cs $/IronPython/IronPython_Main/Src/Tests/test_tuple.py $/IronPython/IronPython_Main/Src/Tests/test_str.py $/IronPython/IronPython_Main/Src/Tests/test_slice.py $/IronPython/IronPython_Main/Src/Tests/test_file.py $/IronPython/IronPython_Main/Src/IronPython.Modules/re.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/nt.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/IronPython.Modules.csproj $/IronPython/IronPython_Main/Src/Tests/test_buffer.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 860081 Date: 5/6/2009 5:51:12 PM (dfugate) - test_slice.py: Dev10 588465 is fixed. Closed and enabled regression - test_event_override.py: Dev10 438724 closed by design. Rewrote/enabled the related test case as a negative scenario (Shelveset: CP55;REDMOND\dfugate | SNAP CheckinId: 8257) -------------------------------------------------------------------------------- Changeset Id: 859286 Date: 5/6/2009 11:04:19 AM (dinov) #22259 - len(buffer) is incorrect Fixed the buffer ctor to accurately track the length/offset of the incoming object and generally cleaned up the code a little bit. #22260 - Cannot write buffer to file Added write overloads for buffers and arrays. Updated writelines to also support the new overloads. #22258 - _sha does not support 2.6 byte buffers Updated all of the hashing modules to support bytes #13702 Support errno interface in error derived from EnvironmentError getsa n InitializeFromClr implementation which inspects the exception object to the best of our ability to determine the correct error number. #20457 subclass of tuple __contains__ returning None causes SystemError #19724 Cannot convert callable class to delegate These were both already fixed ? I?m just adding test cases. #20393 IronPython implements str.__cmp__ but CPython does not Removing __cmp__ implementation, it?s not necessary. #15514 os.spawn{v,l} do not work with certain command lines We need to double quote the command lines which contain quotes. #16560 RE_Pattern missing attributes Partial fix ? Jeff mentions that we don?t have __copy__ / __deepcopy__. We don?t actually need these attributes and in fact in CPython these attributes would appear to be defined on the instance, not on the type. Instead we need general pickle support. CPython achieves this through adding a registry entry into copy_reg. We now do the same. This change does not implement the ?scanner? attribute which I need to go read about on Python-dev. Also we?re not using the pre-compiled version of string comparisons because the function type check is wrong. Also I apparently disabled System.Core.csproj updates from build system core ? re-enabling that. (Shelveset: FixJeffsBugsfinal2;REDMOND\dinov | SNAP CheckinId: 8249) From dinov at microsoft.com Thu May 7 18:31:12 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 7 May 2009 09:31:12 -0700 Subject: [IronPython] Compiling IronPythonConsole.exe In-Reply-To: <321b88ab0905061933k3e82e5acpa40588b86c403364@mail.gmail.com> References: <321b88ab0905060853p5b8e3629y68cfa29b87f089a3@mail.gmail.com> <4A01F125.9040202@bostream.nu> <321b88ab0905061335o55ee6fd3pfd9b88d460509ca4@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8AF5@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061723x61d6a81amcc185b7cae929816@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8BE4@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061756x31138020pb6520965938fb24b@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C17@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061900p6e13ce00uc2c4ad529197b0b6@mail.gmail.com> <350E7D38B6D819428718949920EC235557298E8C26@NA-EXMSG-C102.redmond.corp.microsoft.com> <321b88ab0905061933k3e82e5acpa40588b86c403364@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC235557298E8D87@NA-EXMSG-C102.redmond.corp.microsoft.com> What you?re attempting to do here is define overridden properties for the methods on the IConsole interface. IConsole itself isn?t very well documented but the there?s info on properties here: http://www.ironpython.info/index.php/Overridable_Properties I do realize you?re just trying to get someone else?s stuff to work. If you want an experience that just works my guess is that you could use IronPython 1.x which readline probably works with. But making something new work is always more fun! ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 7:34 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Where can I find the docs on this I am not the best coder but maybe the documentation will help me to understand what your saying *cheers What I understand I need to create the function "get_Output" "set_Output" etc but in order for them to return the values would it be def set_Output(): set_Output Anyway once again thank you btw it isn't my code its a IronPython module I need to work :-) On Wed, May 6, 2009 at 7:12 PM, Dino Viehland > wrote: Ahh, I see, there?s new properties on IConsole to get/set the Output/ErrorOutput TextWriters. You can define get_Output/set_Output/get_ErrorOutput/set_ErrorOutput methods to implement them for the interface on IronPythonWrapper. They can simply save/return the values and you can ignore it or you can use the TextWriter to pick up when the user redirects sys.stdout/sys.stderr. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 7:01 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe hmm I did a search through the code there is no set_Output and I searched Output and set_ as separate search nothing... Now I am confused Anyway I really appreciate your help :-) *cheers Andrew On Wed, May 6, 2009 at 6:32 PM, Dino Viehland > wrote: Is there an actual call to a ?something.set_Output(?)? method somewhere in the code? If so it should be ?something.Output = ?.? ? in 2.0 we no longer allow calling properties via the property methods. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:56 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Well I am about ready to give up for the night anyway here is my last error :-) >>> import sys >>> sys.path.append(r"C:\Python25\Lib\site-packages") >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\readline.py", line 4, in C:\Python25\Lib\s ite-packages\readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 409, in install_readline AttributeError: 'IronPythonWrapper' object has no attribute 'set_Output' >>> On Wed, May 6, 2009 at 5:31 PM, Dino Viehland > wrote: The last line should probably be: cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), PythonConsoleOptions()) I thought IronPythonWrapper was an instance but it looks like it?s a type ? so it needs to be constructed. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 5:24 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello Ive tried implementing what you suggested with no success I have attached the source just in case you or anyone can shed some light on it Cheers >>> import readline Traceback (most recent call last): File "", line 1, in File "C:\Users\Can IT\Desktop\readline.py", line 4, in C:\Users\Can IT\Desktop \readline.py File "C:\Python25\Lib\site-packages\pyreadline\__init__.py", line 9, in C:\Pyt hon25\Lib\site-packages\pyreadline\__init__.py File "C:\Python25\Lib\site-packages\pyreadline\rlmain.py", line 477, in C:\Pyt hon25\Lib\site-packages\pyreadline\rlmain.py File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py", line 408, in install_readline TypeError: expected IConsole, got type >>> On Wed, May 6, 2009 at 2:48 PM, Dino Viehland > wrote: This one?s a little more complex. It looks like there?s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That?d look something like: import clr clr.AddReference(?IronPython?) clr.AddReference(?Microsoft.Scripting?) from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python cmdLine = PythonCommandLine() cmdLine.Run(Python.CreateEngine(), IronPythonWrapper, PythonConsoleOptions()) When you call Run here that will then start the interactive interpreter loop ? I?m not sure if that?s exactly what you want. This is also going to create a 2nd IronPython engine because you can?t really get to the current ScriptEngine from within IronPython itself ? again there could be reasons why you wouldn?t want this to happen. If you?ve got suggestions on what you?d like the APIs to look like for this scenario let us know ? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Wednesday, May 06, 2009 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Compiling IronPythonConsole.exe Hello pyreadline plays an important part in scapy (http://www.secdev.org/projects/scapy/) which is what I am porting to IronPython. My reason for this is well I like a challenge. That's the only reason as self serving as that may seem :-P Thats the result of my console Welcome to Scapy (1.2.0.2-win) ??[34m?[1m?>>> ??[0m? I am not 100 % sure I implented this line correct "MyConsole = IronPythonWrapper()" which was previously IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper() maybe more experienced people can shed a light on this when that is solved I can submit a patch :-) I would be happy to On Wed, May 6, 2009 at 1:20 PM, J?rgen Stenarson > wrote: Andrew Evans skrev: Hey Stephen thank you You solved my problem (I had copied pyreadline from previously to the ironpython folder.) I modified the file in the ironpython folder... modifying it in the default directory in C:\Python25 fixed it Thank You :-) Andrew, I'm happy to see that someone is trying to use pyreadline (I'm the maintainer of pyreadline) on ironpython. I have not tried it myself for a long time so I have no idea how much bitrot has crept into it. If you have any patches to make it work out of the box I would be happy to include it. Please file any patches via the bugtracker: https://bugs.launchpad.net/pyreadline We use the ipython lists to discuss pyreadline http://mail.scipy.org/mailman/listinfo/ipython-user http://mail.scipy.org/mailman/listinfo/ipython-dev /J?rgen _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Harry.Pierson at microsoft.com Thu May 7 20:03:39 2009 From: Harry.Pierson at microsoft.com (Harry Pierson) Date: Thu, 7 May 2009 18:03:39 +0000 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: <6B5AE3B08809CC47A81ACBF99E2690F520389E@tk5ex14mbxc106.redmond.corp.microsoft.com> This is awesome Dave. Good work. One small suggestion: Is it possible to include the CodePlex Change Set number in this automated email? The changeset you're including is for the internal TFS so there's no easy way to find the associated CodePlex change set other than manually comparing the checkin comments on the web site with the ones in the email. Once we have the CP change set number, we can include a link to browse and download the source from codeplex (for example: http://ironpython.codeplex.com/SourceControl/changeset/view/49849) Harry -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dave Fugate Sent: Wednesday, May 06, 2009 9:06 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 2.6 CodePlex Source Update Below is an automated report listing all sources that changed on the IronPython CodePlex source repository in the last update a few minutes ago. Also included are IronPython checkin comments from our internal source repository. From this point on these automated reports will be sent to the IronPython mailing list each time sources are updated on CodePlex. The reason we're publishing checkin comments in this manner (as opposed to adding the internal checkin comments directly to the CodePlex checkin comment) is because there's a size limitation on CodePlex checkin comments which isn't always large enough to accommodate the N internal checkins bundled into each CodePlex checkin. We would appreciate any feedback people have on this. Thanks, Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of merllab at microsoft.com Sent: Wednesday, May 06, 2009 8:57 AM To: users at lists.ironpython.com Subject: [IronPython] IronPython 2.6 CodePlex Source Update This is an automated email letting you know that sources have recently been pushed out. MODIFIED SOURCES $/IronPython/IronPython_Main/Readme.html CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 859030 Date: 5/6/2009 8:49:46 AM This is a test to see if comments get properly published to the IP mailing list. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Thu May 7 21:29:48 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 07 May 2009 20:29:48 +0100 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: <4A0336AC.30704@voidspace.org.uk> This is great guys - thanks! Michael merllab at microsoft.com wrote: > This is an automated email letting you know that sources > have recently been pushed out. > > ADDED SOURCES > $/IronPython/IronPython_Main/Src/IronPython.Modules/_md5.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha256.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha512.cs > > DELETED SOURCES > $/IronPython/IronPython_Main/Src/IronPython.Modules/sha512.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/sha256.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/sha.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/md5.cs > > MODIFIED SOURCES > $/IronPython/IronPython_Main/Src/IronPython.Modules/_md5.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha256.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha512.cs > $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/pytraits/method.py > $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_event_override.py > $/IronPython/IronPython_Main/Src/Tests/test_bytes.py > $/IronPython/IronPython_Main/Src/Tests/regressions.py > $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOperationBinder.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinMethodDescriptor.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs > $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFile.cs > $/IronPython/IronPython_Main/Src/Tests/test_tuple.py > $/IronPython/IronPython_Main/Src/Tests/test_str.py > $/IronPython/IronPython_Main/Src/Tests/test_slice.py > $/IronPython/IronPython_Main/Src/Tests/test_file.py > $/IronPython/IronPython_Main/Src/IronPython.Modules/re.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/nt.cs > $/IronPython/IronPython_Main/Src/IronPython.Modules/IronPython.Modules.csproj > $/IronPython/IronPython_Main/Src/Tests/test_buffer.py > > CHECKIN COMMENTS > -------------------------------------------------------------------------------- > Changeset Id: 860081 > Date: 5/6/2009 5:51:12 PM > > (dfugate) > - test_slice.py: Dev10 588465 is fixed. Closed and enabled regression > - test_event_override.py: Dev10 438724 closed by design. Rewrote/enabled the related test case as a negative scenario > > (Shelveset: CP55;REDMOND\dfugate | SNAP CheckinId: 8257) > -------------------------------------------------------------------------------- > Changeset Id: 859286 > Date: 5/6/2009 11:04:19 AM > > (dinov) #22259 - len(buffer) is incorrect > Fixed the buffer ctor to accurately track the length/offset of the incoming object and generally cleaned up the code a little bit. > #22260 - Cannot write buffer to file > Added write overloads for buffers and arrays. Updated writelines to also support the new overloads. > #22258 - _sha does not support 2.6 byte buffers > Updated all of the hashing modules to support bytes > #13702 Support errno interface in error derived from > EnvironmentError getsa n InitializeFromClr implementation which inspects the exception object to the best of our ability to determine the correct error number. > #20457 subclass of tuple __contains__ returning None causes SystemError > #19724 Cannot convert callable class to delegate > These were both already fixed ? I?m just adding test cases. > #20393 IronPython implements str.__cmp__ but CPython does not > Removing __cmp__ implementation, it?s not necessary. > #15514 os.spawn{v,l} do not work with certain command lines > We need to double quote the command lines which contain quotes. > #16560 RE_Pattern missing attributes > Partial fix ? Jeff mentions that we don?t have __copy__ / __deepcopy__. We don?t actually need these attributes and in fact in CPython these attributes would appear to be defined on the instance, not on the type. Instead we need general pickle support. CPython achieves this through adding a registry entry into copy_reg. We now do the same. This change does not implement the ?scanner? attribute which I need to go read about on Python-dev. > > Also we?re not using the pre-compiled version of string comparisons because the function type check is wrong. > > Also I apparently disabled System.Core.csproj updates from build system core ? re-enabling that. > > > (Shelveset: FixJeffsBugsfinal2;REDMOND\dinov | SNAP CheckinId: 8249) > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From jdhardy at gmail.com Fri May 8 00:53:55 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 7 May 2009 16:53:55 -0600 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: > (Shelveset: FixJeffsBugsfinal2;REDMOND\dinov | SNAP CheckinId: 8249) Mmm...notoriety. - Jeff From jdhardy at gmail.com Fri May 8 00:55:30 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 7 May 2009 16:55:30 -0600 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: Nice work! This will make tracking bugs a lot easier. - Jeff On Wed, May 6, 2009 at 10:05 AM, Dave Fugate wrote: > Below is an automated report listing all sources that changed on the IronPython CodePlex source repository in the last update a few minutes ago. ?Also included are IronPython checkin comments from our internal source repository. ?From this point on these automated reports will be sent to the IronPython mailing list each time sources are updated on CodePlex. ?The reason we're publishing checkin comments in this manner (as opposed to adding the internal checkin comments directly to the CodePlex checkin comment) is because there's a size limitation on CodePlex checkin comments which isn't always large enough to accommodate the N internal checkins bundled into each CodePlex checkin. ?We would appreciate any feedback people have on this. > > Thanks, > > Dave > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of merllab at microsoft.com > Sent: Wednesday, May 06, 2009 8:57 AM > To: users at lists.ironpython.com > Subject: [IronPython] IronPython 2.6 CodePlex Source Update > > This is an automated email letting you know that sources > have recently been pushed out. > > MODIFIED SOURCES > ? ? ? ?$/IronPython/IronPython_Main/Readme.html > > CHECKIN COMMENTS > -------------------------------------------------------------------------------- > Changeset Id: 859030 > Date: 5/6/2009 8:49:46 AM > > This is a test to see if comments get properly published to the IP mailing list. > > > > > _______________________________________________ > 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 microsoft.com Fri May 8 01:04:12 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 7 May 2009 16:04:12 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: <350E7D38B6D819428718949920EC23555729CD68A2@NA-EXMSG-C102.redmond.corp.microsoft.com> And even after that there's still more bugs of yours to fix! :) > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Thursday, May 07, 2009 3:54 PM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython 2.6 CodePlex Source Update > > > (Shelveset: FixJeffsBugsfinal2;REDMOND\dinov | SNAP CheckinId: 8249) > > Mmm...notoriety. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri May 8 01:11:23 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 7 May 2009 17:11:23 -0600 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: <350E7D38B6D819428718949920EC23555729CD68A2@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <350E7D38B6D819428718949920EC23555729CD68A2@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: Well, chop chop! I don't have all day, you know. - Jeff On Thu, May 7, 2009 at 5:04 PM, Dino Viehland wrote: > And even after that there's still more bugs of yours to fix! :) > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Jeff Hardy >> Sent: Thursday, May 07, 2009 3:54 PM >> To: Discussion of IronPython >> Subject: Re: [IronPython] IronPython 2.6 CodePlex Source Update >> >> > (Shelveset: FixJeffsBugsfinal2;REDMOND\dinov | SNAP CheckinId: 8249) >> >> Mmm...notoriety. >> >> - Jeff >> _______________________________________________ >> 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 patrik.hagne at sembo.se Fri May 8 08:49:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 08:49:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) Message-ID: <2c2f9bc4.1c9cfa9.13201c4a.4db7@sembo.se> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2850 bytes Desc: not available URL: From empirebuilder at gmail.com Fri May 8 10:52:48 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 8 May 2009 11:52:48 +0300 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <2c2f9bc4.1c9cfa9.13201c4a.4db7@sembo.se> References: <2c2f9bc4.1c9cfa9.13201c4a.4db7@sembo.se> Message-ID: <8cd017b80905080152u38a87290r851520c745354849@mail.gmail.com> I'll try to reproduce this. I need the following details: - What version of IronPython are you using? - Are you using the website model or the web project model for your asp.net application. - What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > [image: Sembo Semesterbost?der AB] > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrik.hagne at sembo.se Fri May 8 11:01:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 11:01:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <8cd017b80905080152u38a87290r851520c745354849@mail.gmail.com> Message-ID: <8ba08ed8.1c9cfbb.13988443.4dc8@sembo.se> 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: What version of IronPython are you using? Are you using the website model or the web project model for your asp.net application. What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Fri May 8 13:15:07 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 8 May 2009 14:15:07 +0300 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <8ba08ed8.1c9cfbb.13988443.4dc8@sembo.se> References: <8cd017b80905080152u38a87290r851520c745354849@mail.gmail.com> <8ba08ed8.1c9cfbb.13988443.4dc8@sembo.se> Message-ID: <8cd017b80905080415u4ac606b0n9917d3b9c086bd68@mail.gmail.com> I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne wrote: > 1. I've tried the current release (2.0.1), the 2.0 release from Dec > 10 and even the 1.1.2 version from Aug 8 all with the same result. > > 2. We're using the Web Application project model, not the website > model. > > 3. The language for code behinds is VB.net. > > > > Thanks for looking into this, it's greatly appreciated. > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 10:53 > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I'll try to reproduce this. I need the following details: > > > > - What version of IronPython are you using? > - Are you using the website model or the web project model for your > asp.net application. > - What language do you use for your code behind, C# or VB or some other > code behind language? > > > > Dody G. > > On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: > > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > *Fel! Inget filnamn angivet.* > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrik.hagne at sembo.se Fri May 8 13:25:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 13:25:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <8cd017b80905080415u4ac606b0n9917d3b9c086bd68@mail.gmail.com> Message-ID: Thank you for your help I'll have a look at it. Using is a keyword in VB though, the syntax is pretty much the same as in c# sans curly braces: Using foo = GetSomeDisposable() ' Do something here... End Using Or maybe you mean the using keyword for referencing namespaces, in that case the VB-keyword is "Imports": Imports System.Collections Imports System.Collections.Generic /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 13:15 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne wrote: 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: What version of IronPython are you using? Are you using the website model or the web project model for your asp.net application. What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Fri May 8 13:26:58 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 8 May 2009 14:26:58 +0300 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: References: <8cd017b80905080415u4ac606b0n9917d3b9c086bd68@mail.gmail.com> Message-ID: <8cd017b80905080426k2e267e1ftf6122ed0faf77539@mail.gmail.com> Yeah, I had to lookup a VB.Net cheat sheet to figure out "imports" :) On Fri, May 8, 2009 at 2:25 PM, Patrik H?gne wrote: > Thank you for your help I'll have a look at it. > > > > Using is a keyword in VB though, the syntax is pretty much the same as in > c# sans curly braces: > > > > > > Using foo = GetSomeDisposable() > > ' Do something here... > > End Using > > > > Or maybe you mean the using keyword for referencing namespaces, in that > case the VB-keyword is "Imports": > > > > Imports System.Collections > > Imports System.Collections.Generic > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 13:15 > > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I don't have VB installed in my VS 2008, so this is what I did. > > > > I use this IronPython > http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles > > > > For each of the project, I reference all the following assemblies: > > IronPython.dll > > IronPython.Modules.dll > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > I use the hosting API in a C# WAP using C# only in 3.5 and it worked > without a hitch. This is the code > https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 > > > > I downloaded SharpDevelop 3.0 and use it to write a console application in > VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB > :) It worked in console application. Here's the code > https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. > > > > > > I can't exactly replicate your problem since I don't have VB on VS 2008. > But I hope I help you further along with these two small codes. It seems > that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure > if the VB ASP.net code provider does something else that make IP 2.01 > breaks. > > > > Dody G. > > > > > > On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne > wrote: > > 1. I've tried the current release (2.0.1), the 2.0 release from Dec > 10 and even the 1.1.2 version from Aug 8 all with the same result. > > 2. We're using the Web Application project model, not the website > model. > > 3. The language for code behinds is VB.net. > > > > Thanks for looking into this, it's greatly appreciated. > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 10:53 > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I'll try to reproduce this. I need the following details: > > > > - What version of IronPython are you using? > - Are you using the website model or the web project model for your > asp.net application. > - What language do you use for your code behind, C# or VB or some other > code behind language? > > > > Dody G. > > On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: > > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > *Fel! Inget filnamn angivet.* > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrik.hagne at sembo.se Fri May 8 14:06:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 14:06:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <8cd017b80905080415u4ac606b0n9917d3b9c086bd68@mail.gmail.com> Message-ID: <78d977db.1c9cfd5.14419dbf.2213@sembo.se> I'm not sure if this helps but I've included a VB.Net-site that reproduces the problem in the same solution. I'm not sure if you have an environment where you can run it. Also as far as I can tell you do not directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project you included but it is present in the bin-folder, I did the same thing for the VB.Net project, it should mirror the c# variant pretty closely but it will fail at runtime. http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 13:15 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne wrote: 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: What version of IronPython are you using? Are you using the website model or the web project model for your asp.net application. What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Fri May 8 14:53:27 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 8 May 2009 15:53:27 +0300 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <78d977db.1c9cfd5.14419dbf.2213@sembo.se> References: <8cd017b80905080415u4ac606b0n9917d3b9c086bd68@mail.gmail.com> <78d977db.1c9cfd5.14419dbf.2213@sembo.se> Message-ID: <8cd017b80905080553l59dd6a41y56fb0e62918bb589@mail.gmail.com> I ran your demo and it threw this error "*Description: *An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. *Compiler Error Message: *BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. *Source Error:* [No relevant source lines] *Source File:* InternalXmlHelper.vb *Line:* 9 " This problem surfaced back in http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then it got fixed, at least for C#. It looks like the VB compatibility issue wasn't fixed. Let's see what Dino thinks of this. Dody G. On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne wrote: > I'm not sure if this helps but I've included a VB.Net-site that > reproduces the problem in the same solution. I'm not sure if you have an > environment where you can run it. Also as far as I can tell you do not > directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the > site project you included but it is present in the bin-folder, I did the > same thing for the VB.Net project, it should mirror the c# variant pretty > closely but it will fail at runtime. > > > > > http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 13:15 > > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I don't have VB installed in my VS 2008, so this is what I did. > > > > I use this IronPython > http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles > > > > For each of the project, I reference all the following assemblies: > > IronPython.dll > > IronPython.Modules.dll > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > I use the hosting API in a C# WAP using C# only in 3.5 and it worked > without a hitch. This is the code > https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 > > > > I downloaded SharpDevelop 3.0 and use it to write a console application in > VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB > :) It worked in console application. Here's the code > https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. > > > > > > I can't exactly replicate your problem since I don't have VB on VS 2008. > But I hope I help you further along with these two small codes. It seems > that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure > if the VB ASP.net code provider does something else that make IP 2.01 > breaks. > > > > Dody G. > > > > > > On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne > wrote: > > 1. I've tried the current release (2.0.1), the 2.0 release from Dec > 10 and even the 1.1.2 version from Aug 8 all with the same result. > > 2. We're using the Web Application project model, not the website > model. > > 3. The language for code behinds is VB.net. > > > > Thanks for looking into this, it's greatly appreciated. > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 10:53 > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I'll try to reproduce this. I need the following details: > > > > - What version of IronPython are you using? > - Are you using the website model or the web project model for your > asp.net application. > - What language do you use for your code behind, C# or VB or some other > code behind language? > > > > Dody G. > > On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: > > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > *Fel! Inget filnamn angivet.* > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrik.hagne at sembo.se Fri May 8 14:58:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 14:58:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <8cd017b80905080553l59dd6a41y56fb0e62918bb589@mail.gmail.com> Message-ID: Yes, I did read the correspondence from August and that's why I thought it should work. However, I'm glad we've tracked down the actual problem so there is at least a chance that we can come up with a solution. /Patrik Fr?n: Dody Gunawinata [mailto:empirebuilder at gmail.com] Skickat: den 8 maj 2009 14:53 Till: Patrik H?gne Kopia: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I ran your demo and it threw this error "Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. Source Error: [No relevant source lines] Source File: InternalXmlHelper.vb Line: 9 " This problem surfaced back in http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then it got fixed, at least for C#. It looks like the VB compatibility issue wasn't fixed. Let's see what Dino thinks of this. Dody G. On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne wrote: I'm not sure if this helps but I've included a VB.Net-site that reproduces the problem in the same solution. I'm not sure if you have an environment where you can run it. Also as far as I can tell you do not directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project you included but it is present in the bin-folder, I did the same thing for the VB.Net project, it should mirror the c# variant pretty closely but it will fail at runtime. http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 13:15 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne wrote: 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: What version of IronPython are you using? Are you using the website model or the web project model for your asp.net application. What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Fri May 8 15:17:06 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 8 May 2009 06:17:06 -0700 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: References: <8cd017b80905080553l59dd6a41y56fb0e62918bb589@mail.gmail.com> Message-ID: As I recall, we were never able to come up with a workaround for a VB "web site", but a VB "web application" could be made to work. It would be easier if IronPython could depend on .NET 3.5, but we still have customers who need it to work on 2.0 and 3.0. There's nothing to prevent you from recompiling IronPython yourself, though -- just remove Microsoft.Scripting.ExtensionAttribute.csproj from the solution and add references to System.Core instead. On Fri, May 8, 2009 at 5:58 AM, Patrik H?gne wrote: > Yes, I did read the correspondence from August and that's why I thought > it should work. However, I'm glad we've tracked down the actual problem so > there is at least a chance that we can come up with a solution. > > > > /Patrik > > > > *Fr?n:* Dody Gunawinata [mailto:empirebuilder at gmail.com] > *Skickat:* den 8 maj 2009 14:53 > *Till:* Patrik H?gne > *Kopia:* Discussion of IronPython > > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I ran your demo and it threw this error > > > > "*Description: *An error occurred during the compilation of a resource > required to service this request. Please review the following specific error > details and modify your source code appropriately. > > > *Compiler Error Message: *BC30560: 'ExtensionAttribute' is ambiguous in > the namespace 'System.Runtime.CompilerServices'. > > *Source Error:* > > > > [No relevant source lines] > > > *Source File:* InternalXmlHelper.vb *Line:* 9 " > > > > > > This problem surfaced back in > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then > it got fixed, at least for C#. It looks like the VB compatibility issue > wasn't fixed. > > > > Let's see what Dino thinks of this. > > > > Dody G. > > On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne > wrote: > > I'm not sure if this helps but I've included a VB.Net-site that reproduces > the problem in the same solution. I'm not sure if you have an environment > where you can run it. Also as far as I can tell you do not directly > reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project > you included but it is present in the bin-folder, I did the same thing for > the VB.Net project, it should mirror the c# variant pretty closely but it > will fail at runtime. > > > > > http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 13:15 > > > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I don't have VB installed in my VS 2008, so this is what I did. > > > > I use this IronPython > http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles > > > > For each of the project, I reference all the following assemblies: > > IronPython.dll > > IronPython.Modules.dll > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > I use the hosting API in a C# WAP using C# only in 3.5 and it worked > without a hitch. This is the code > https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 > > > > I downloaded SharpDevelop 3.0 and use it to write a console application in > VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB > :) It worked in console application. Here's the code > https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. > > > > > > I can't exactly replicate your problem since I don't have VB on VS 2008. > But I hope I help you further along with these two small codes. It seems > that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure > if the VB ASP.net code provider does something else that make IP 2.01 > breaks. > > > > Dody G. > > > > > > On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne > wrote: > > 1. I've tried the current release (2.0.1), the 2.0 release from Dec > 10 and even the 1.1.2 version from Aug 8 all with the same result. > > 2. We're using the Web Application project model, not the website > model. > > 3. The language for code behinds is VB.net. > > > > Thanks for looking into this, it's greatly appreciated. > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 10:53 > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I'll try to reproduce this. I need the following details: > > > > - What version of IronPython are you using? > - Are you using the website model or the web project model for your > asp.net application. > - What language do you use for your code behind, C# or VB or some other > code behind language? > > > > Dody G. > > On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: > > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > *Fel! Inget filnamn angivet.* > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > > > -- > nomadlife.org > > _______________________________________________ > 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 patrik.hagne at sembo.se Fri May 8 15:24:00 2009 From: patrik.hagne at sembo.se (=?iso-8859-1?Q?Patrik_H=E4gne?=) Date: Fri, 08 May 2009 15:24:00 +0200 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: Message-ID: <4e9e3b2f.1c9cfe0.14889f65.759a@sembo.se> The project in question is not a "web site" but a "web application" so I'm still interested in how to make that work. I did a quick spike on compiling it myself yesterday but it seemed to be a bigger problem than just removing that and recompile, but it might be that I also reset the projects to use the 3.5 framework version. Do you mean that I should reference System.Core but keep the framework version 2? Cheers, Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Curt Hagenlocher Skickat: den 8 maj 2009 15:17 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) As I recall, we were never able to come up with a workaround for a VB "web site", but a VB "web application" could be made to work. It would be easier if IronPython could depend on .NET 3.5, but we still have customers who need it to work on 2.0 and 3.0. There's nothing to prevent you from recompiling IronPython yourself, though -- just remove Microsoft.Scripting.ExtensionAttribute.csproj from the solution and add references to System.Core instead. On Fri, May 8, 2009 at 5:58 AM, Patrik H?gne wrote: Yes, I did read the correspondence from August and that's why I thought it should work. However, I'm glad we've tracked down the actual problem so there is at least a chance that we can come up with a solution. /Patrik Fr?n: Dody Gunawinata [mailto:empirebuilder at gmail.com] Skickat: den 8 maj 2009 14:53 Till: Patrik H?gne Kopia: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I ran your demo and it threw this error "Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. Source Error: [No relevant source lines] Source File: InternalXmlHelper.vb Line: 9 " This problem surfaced back in http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then it got fixed, at least for C#. It looks like the VB compatibility issue wasn't fixed. Let's see what Dino thinks of this. Dody G. On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne wrote: I'm not sure if this helps but I've included a VB.Net-site that reproduces the problem in the same solution. I'm not sure if you have an environment where you can run it. Also as far as I can tell you do not directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project you included but it is present in the bin-folder, I did the same thing for the VB.Net project, it should mirror the c# variant pretty closely but it will fail at runtime. http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 13:15 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne wrote: 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: What version of IronPython are you using? Are you using the website model or the web project model for your asp.net application. What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -- nomadlife.org _______________________________________________ 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 curt at hagenlocher.org Fri May 8 15:55:08 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 8 May 2009 06:55:08 -0700 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: <4e9e3b2f.1c9cfe0.14889f65.759a@sembo.se> References: <4e9e3b2f.1c9cfe0.14889f65.759a@sembo.se> Message-ID: Ah, I remember this a little bit better now. What's probably happened is that the version of Microsoft.Scripting.ExtensionAttribute has changed since then, so the alternate version with the type forwarder doesn't get recognized as "the right version" by the other assemblies. If this is the case, it shouldn't be too hard to make a new version of the alternate assembly, but it's not something I'll be able to get to today. You might be able to work around this by doing whatever it takes to convince the CLR that version X of assembly A is an acceptable substitute for version Y. To reference System.Core when rebuilding, you do need to set the target framework version to 3.5. This shouldn't cause any trouble. On Fri, May 8, 2009 at 6:24 AM, Patrik H?gne wrote: > The project in question is not a "web site" but a "web application" so > I'm still interested in how to make that work. I did a quick spike on > compiling it myself yesterday but it seemed to be a bigger problem than just > removing that and recompile, but it might be that I also reset the projects > to use the 3.5 framework version. Do you mean that I should reference > System.Core but keep the framework version 2? > > > > Cheers, > > Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Curt Hagenlocher > *Skickat:* den 8 maj 2009 15:17 > > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > As I recall, we were never able to come up with a workaround for a VB "web > site", but a VB "web application" could be made to work. > > It would be easier if IronPython could depend on .NET 3.5, but we still > have customers who need it to work on 2.0 and 3.0. There's nothing to > prevent you from recompiling IronPython yourself, though -- just remove > Microsoft.Scripting.ExtensionAttribute.csproj from the solution and add > references to System.Core instead. > > On Fri, May 8, 2009 at 5:58 AM, Patrik H?gne > wrote: > > Yes, I did read the correspondence from August and that's why I thought it > should work. However, I'm glad we've tracked down the actual problem so > there is at least a chance that we can come up with a solution. > > > > /Patrik > > > > *Fr?n:* Dody Gunawinata [mailto:empirebuilder at gmail.com] > *Skickat:* den 8 maj 2009 14:53 > *Till:* Patrik H?gne > *Kopia:* Discussion of IronPython > > > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I ran your demo and it threw this error > > > > "*Description: *An error occurred during the compilation of a resource > required to service this request. Please review the following specific error > details and modify your source code appropriately. > > > *Compiler Error Message: *BC30560: 'ExtensionAttribute' is ambiguous in > the namespace 'System.Runtime.CompilerServices'. > > *Source Error:* > > > > [No relevant source lines] > > > *Source File:* InternalXmlHelper.vb *Line:* 9 " > > > > > > This problem surfaced back in > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then > it got fixed, at least for C#. It looks like the VB compatibility issue > wasn't fixed. > > > > Let's see what Dino thinks of this. > > > > Dody G. > > On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne > wrote: > > I'm not sure if this helps but I've included a VB.Net-site that reproduces > the problem in the same solution. I'm not sure if you have an environment > where you can run it. Also as far as I can tell you do not directly > reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project > you included but it is present in the bin-folder, I did the same thing for > the VB.Net project, it should mirror the c# variant pretty closely but it > will fail at runtime. > > > > > http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 13:15 > > > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I don't have VB installed in my VS 2008, so this is what I did. > > > > I use this IronPython > http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles > > > > For each of the project, I reference all the following assemblies: > > IronPython.dll > > IronPython.Modules.dll > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > I use the hosting API in a C# WAP using C# only in 3.5 and it worked > without a hitch. This is the code > https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 > > > > I downloaded SharpDevelop 3.0 and use it to write a console application in > VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB > :) It worked in console application. Here's the code > https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. > > > > > > I can't exactly replicate your problem since I don't have VB on VS 2008. > But I hope I help you further along with these two small codes. It seems > that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure > if the VB ASP.net code provider does something else that make IP 2.01 > breaks. > > > > Dody G. > > > > > > On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne > wrote: > > 1. I've tried the current release (2.0.1), the 2.0 release from Dec > 10 and even the 1.1.2 version from Aug 8 all with the same result. > > 2. We're using the Web Application project model, not the website > model. > > 3. The language for code behinds is VB.net. > > > > Thanks for looking into this, it's greatly appreciated. > > > > /Patrik > > > > *Fr?n:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *F?r *Dody Gunawinata > *Skickat:* den 8 maj 2009 10:53 > *Till:* Discussion of IronPython > *?mne:* Re: [IronPython] Iron Python and Asp.net (framework 3.5) > > > > I'll try to reproduce this. I need the following details: > > > > - What version of IronPython are you using? > - Are you using the website model or the web project model for your > asp.net application. > - What language do you use for your code behind, C# or VB or some other > code behind language? > > > > Dody G. > > On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: > > I have the problem described in the issue > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126when including an assembly that depends upon the DLR and Iron Python for > scripting. I can't get the suggested workaround to work, when I replace the > Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the > issue-page I get no compilation errors but on the other hand when running > the page where the scripting engine is used I get a runtime error saying > that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be > found. > > > > Is there something I'm missing? Might it be that I have to install > something into the GAC? > > > > Kind Regards > > Patrik H?gne > Systems Development > > *Fel! Inget filnamn angivet.* > ------------------------------ > > Drottninggatan 72A > Box 1324, 251 13 HELSINGBORG > E-mail: patrik.hagne at sembo.se > > Phone: > Fax: > Internet: > > +46(0)42 37 85 52 > +46(0)42 37 85 25 > www.sembo.se > > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > > > > > -- > nomadlife.org > > > _______________________________________________ > 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 merllab at microsoft.com Fri May 8 17:52:00 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 8 May 2009 08:52:00 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <49e9ec27-f388-42ef-9d22-1ea70a78f67f@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/49878. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/LanguageBoundTextContentProvider.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.GetMember.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/LanguageContext.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.SetMember.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ScriptEngine.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs $/IronPython/IronPython_Main/Src/Tests/pyc/test_pyc.ps1 $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_assembly.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/IListOfByteOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/ByteArray.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Bytes.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/ClrModule.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonAsciiEncoding.cs $/IronPython/IronPython_Main/Src/Tests/test_nt.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Generator.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/Tests/test_tuple.py $/IronPython/IronPython_Main/Src/Tests/test_superconsole.py $/IronPython/IronPython_Main/Src/IronPythonTest/IronPythonTest.csproj $/IronPython/IronPython_Main/Src/IronPythonTest/EngineTest.cs $/IronPython/IronPython_Main/Src/Tests/test_generator.py $/IronPython/IronPython_Main/Src/IronPython.Modules/thread.cs $/IronPython/IronPython_Main/Src/Tests/test_codecs.py $/IronPython/IronPython_Main/Src/IronPython.Modules/IronPython.Modules.csproj $/IronPython/IronPython_Main/Tutorial/Tutorial.htm $/IronPython/IronPython_Main/Src/IronPython/Compiler/Tokenizer.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 861717 Date: 5/7/2009 2:21:37 PM (dfugate) EngineTest.cs - added a second regression for CP19724 amazon.py - updated to use a consistent version of AWSECommerceService.wsdl test_nt.py - added regression for CP15514 test_tuple.py - extended regression test (test_wacky_contains) Tutorial.htm - removed references to CPython 25 IPTutorialTest.ps1 - CP18322 is fixed (Shelveset: CP56;REDMOND\dfugate | SNAP CheckinId: 8269) -------------------------------------------------------------------------------- Changeset Id: 861404 Date: 5/7/2009 11:13:51 AM (dinov) 16485 - AssemblyBuilder cannot be created except in SaveAssemblies mode this is passing, just enabling the test 20203 - SIGNOFF: test_assembly.py failing under -X:SaveAssemblies mode test just needs to be updated for new attributes that were added in 2.6 21976 - Executables created by Pyc.py broken without access to original Python sources this is passing, just enabling the test 19516 - IronTunes sample broken default binder should allow binding based upon .NET type, not just expression type when we hit a COM object. This enables fallback to work when the current COM binding is insufficient. 20143 - calling close on generator does not raise GeneratorExit generator is getting __exit__ and __enter__ attributes on it because it's IDisposable. We need to special case this and not allow these to show up on generators. 22235 - Improve doc strings adding new XML doc comments to the clr module 11334: Warnings: IP silently replaces non-ASCII chars with ?-marks (needs to warn) we now report an error matching the 2.6 behavior. 17461: Implement rest of thread module (mainly removing thread.lock etc) hiding "lock" from the module 21976 Executables created by Pyc.py broken without access to original Python sources this seems to be working probably due to some of the recent other pyc fixes. Enabling the test 21343 "bytearray.split()" should remove leading/trailing whitespace Fixing our splitting implementation and other test_bytes issues (Shelveset: Beta1BugsFinal;REDMOND\dinov | SNAP CheckinId: 8266) From dinov at microsoft.com Fri May 8 18:03:12 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 8 May 2009 09:03:12 -0700 Subject: [IronPython] Iron Python and Asp.net (framework 3.5) In-Reply-To: References: <4e9e3b2f.1c9cfe0.14889f65.759a@sembo.se> Message-ID: <350E7D38B6D819428718949920EC23555729CD6A3C@NA-EXMSG-C102.redmond.corp.microsoft.com> The "whatever it takes" is a bindingRedirect tag in some XML config file. More info is here: http://msdn.microsoft.com/en-us/library/eftw1fys.aspx From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher Sent: Friday, May 08, 2009 6:55 AM To: Discussion of IronPython Subject: Re: [IronPython] Iron Python and Asp.net (framework 3.5) Ah, I remember this a little bit better now. What's probably happened is that the version of Microsoft.Scripting.ExtensionAttribute has changed since then, so the alternate version with the type forwarder doesn't get recognized as "the right version" by the other assemblies. If this is the case, it shouldn't be too hard to make a new version of the alternate assembly, but it's not something I'll be able to get to today. You might be able to work around this by doing whatever it takes to convince the CLR that version X of assembly A is an acceptable substitute for version Y. To reference System.Core when rebuilding, you do need to set the target framework version to 3.5. This shouldn't cause any trouble. On Fri, May 8, 2009 at 6:24 AM, Patrik H?gne > wrote: The project in question is not a "web site" but a "web application" so I'm still interested in how to make that work. I did a quick spike on compiling it myself yesterday but it seemed to be a bigger problem than just removing that and recompile, but it might be that I also reset the projects to use the 3.5 framework version. Do you mean that I should reference System.Core but keep the framework version 2? Cheers, Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Curt Hagenlocher Skickat: den 8 maj 2009 15:17 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) As I recall, we were never able to come up with a workaround for a VB "web site", but a VB "web application" could be made to work. It would be easier if IronPython could depend on .NET 3.5, but we still have customers who need it to work on 2.0 and 3.0. There's nothing to prevent you from recompiling IronPython yourself, though -- just remove Microsoft.Scripting.ExtensionAttribute.csproj from the solution and add references to System.Core instead. On Fri, May 8, 2009 at 5:58 AM, Patrik H?gne > wrote: Yes, I did read the correspondence from August and that's why I thought it should work. However, I'm glad we've tracked down the actual problem so there is at least a chance that we can come up with a solution. /Patrik Fr?n: Dody Gunawinata [mailto:empirebuilder at gmail.com] Skickat: den 8 maj 2009 14:53 Till: Patrik H?gne Kopia: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I ran your demo and it threw this error "Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. Source Error: [No relevant source lines] Source File: InternalXmlHelper.vb Line: 9 " This problem surfaced back in http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008036.html then it got fixed, at least for C#. It looks like the VB compatibility issue wasn't fixed. Let's see what Dino thinks of this. Dody G. On Fri, May 8, 2009 at 3:06 PM, Patrik H?gne > wrote: I'm not sure if this helps but I've included a VB.Net-site that reproduces the problem in the same solution. I'm not sure if you have an environment where you can run it. Also as far as I can tell you do not directly reference the Microsoft.Scripting.ExtensionAttribute.dll in the site project you included but it is present in the bin-folder, I did the same thing for the VB.Net project, it should mirror the c# variant pretty closely but it will fail at runtime. http://cid-8b0c290cf9b30fd9.skydrive.live.com/self.aspx/.Public/IronPythonDemoWithVB.zip /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 13:15 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I don't have VB installed in my VS 2008, so this is what I did. I use this IronPython http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=IronPython&DownloadId=58404&FileTime=128789375840200000&Build=15036#ReleaseFiles For each of the project, I reference all the following assemblies: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll I use the hosting API in a C# WAP using C# only in 3.5 and it worked without a hitch. This is the code https://rcpt.yousendit.com/685289274/f6b7c3f2a38002c2656f54ada3364d26 I downloaded SharpDevelop 3.0 and use it to write a console application in VB targeting .Net 3.5. I was surprised that "using" is not a keyword in VB :) It worked in console application. Here's the code https://download.yousendit.com/U0d6RE9uQzMzeUtGa1E9PQ. I can't exactly replicate your problem since I don't have VB on VS 2008. But I hope I help you further along with these two small codes. It seems that IronPython 2.01 works just fine with VB in .Net 3.5 but I'm not sure if the VB ASP.net code provider does something else that make IP 2.01 breaks. Dody G. On Fri, May 8, 2009 at 12:01 PM, Patrik H?gne > wrote: 1. I've tried the current release (2.0.1), the 2.0 release from Dec 10 and even the 1.1.2 version from Aug 8 all with the same result. 2. We're using the Web Application project model, not the website model. 3. The language for code behinds is VB.net. Thanks for looking into this, it's greatly appreciated. /Patrik Fr?n: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] F?r Dody Gunawinata Skickat: den 8 maj 2009 10:53 Till: Discussion of IronPython ?mne: Re: [IronPython] Iron Python and Asp.net (framework 3.5) I'll try to reproduce this. I need the following details: * What version of IronPython are you using? * Are you using the website model or the web project model for your asp.net application. * What language do you use for your code behind, C# or VB or some other code behind language? Dody G. On Fri, May 8, 2009 at 9:49 AM, Patrik H?gne > wrote: I have the problem described in the issue http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126 when including an assembly that depends upon the DLR and Iron Python for scripting. I can't get the suggested workaround to work, when I replace the Microsoft.Scripting.ExtensionAttribute.dll with the one posted to the issue-page I get no compilation errors but on the other hand when running the page where the scripting engine is used I get a runtime error saying that the Microsoft.Scripting.ExtensionAttribute version 0.9.0.0 can not be found. Is there something I'm missing? Might it be that I have to install something into the GAC? Kind Regards Patrik H?gne Systems Development Fel! Inget filnamn angivet. ________________________________ Drottninggatan 72A Box 1324, 251 13 HELSINGBORG E-mail: patrik.hagne at sembo.se Phone: Fax: Internet: +46(0)42 37 85 52 +46(0)42 37 85 25 www.sembo.se _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -- nomadlife.org _______________________________________________ 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 sanxiyn at gmail.com Sat May 9 12:04:39 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 9 May 2009 19:04:39 +0900 Subject: [IronPython] FePy status update Message-ID: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> FePy seems to be dead, right? Sorry about that. This is a brief status update. And I could use it later as a changelog. How convinient. 1. I am now testing IronPython with CPython 2.6 standard library. FePy used 2.4 so far. Be sure to check collections.py issue Dave mentions here: http://knowbody.livejournal.com/13271.html 2. NAnt build system has been updated to the latest source layout change. My goal still is to do away with NAnt and improve Mono's implementation of MSBuild to build IronPython out of the box, but that hasn't progressed a bit, sorry. Dave wrote about the source layout change here: http://knowbody.livejournal.com/13980.html 3. ExtensionAttribute problem mentioned in the last December is gone. Mono bug on reference equality with generic constraints mentioned in March is still there. FePy trunk patches/latest has a workaround for this. Net result is that latest IronPython source drops from CodePlex compiles and runs with Mono! And no compiler warnings! (This has been my pet peeve, you know.) And I had no problem keeping it that way for some time. I updated "IronPython on Mono reports" page with relevant mails. http://fepy.sourceforge.net/doc/ironpython-mono-report.html 4. There is an IronPython bug that manifests only on Mono due to newline difference. The symptom is that expressions are not printed in interactive console. This took some time to debug, but there is a fix now. http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html 5. Current build on my local system generally works. It imports urllib and urllib2. This is quite a stress test... Not just import, but downloading webpages work too. On the other hand, importing decimal crashes Mono in segmentation fault! I suspect this has to do with move to 2.6 standard library and its abstract base classes meta machineries, but who knows. -- Seo Sanghyeon From jb at nurv.fr Sat May 9 12:36:41 2009 From: jb at nurv.fr (Jb Evain) Date: Sat, 9 May 2009 12:36:41 +0200 Subject: [IronPython] FePy status update In-Reply-To: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> References: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> Message-ID: <69f7d8470905090336n690a393etfa544095fe414938@mail.gmail.com> Hey Seo, On 5/9/09, Seo Sanghyeon wrote: > 4. There is an IronPython bug that manifests only on Mono due to > newline difference. The symptom is that expressions are not printed in > interactive console. This took some time to debug, but there is a fix > now. > http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html Fwiw, I reported it on ironruby-core weeks ago: http://rubyforge.org/pipermail/ironruby-core/2009-March/004008.html Along with a patch. -- Jb Evain From sanxiyn at gmail.com Sat May 9 12:52:10 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 9 May 2009 19:52:10 +0900 Subject: [IronPython] FePy status update In-Reply-To: <69f7d8470905090336n690a393etfa544095fe414938@mail.gmail.com> References: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> <69f7d8470905090336n690a393etfa544095fe414938@mail.gmail.com> Message-ID: <5b0248170905090352w8e290cew5a585a7f7d11eb45@mail.gmail.com> 2009/5/9 Jb Evain : > Hey Seo, > > On 5/9/09, Seo Sanghyeon wrote: >> ?4. There is an IronPython bug that manifests only on Mono due to >> ?newline difference. The symptom is that expressions are not printed in >> ?interactive console. This took some time to debug, but there is a fix >> ?now. >> ?http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html > > Fwiw, I reported it on ironruby-core weeks ago: > > http://rubyforge.org/pipermail/ironruby-core/2009-March/004008.html > > Along with a patch. Oops, how did I miss that. Apparently this was to be fixed see http://rubyforge.org/pipermail/ironruby-core/2009-March/004089.html but somehow slipped for 2 months... -- Seo Sanghyeon From sanxiyn at gmail.com Sat May 9 13:01:18 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 9 May 2009 20:01:18 +0900 Subject: [IronPython] FePy status update In-Reply-To: <5b0248170905090352w8e290cew5a585a7f7d11eb45@mail.gmail.com> References: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> <69f7d8470905090336n690a393etfa544095fe414938@mail.gmail.com> <5b0248170905090352w8e290cew5a585a7f7d11eb45@mail.gmail.com> Message-ID: <5b0248170905090401x218b8ec7y278c042bc59975a4@mail.gmail.com> 2009/5/9 Seo Sanghyeon : > 2009/5/9 Jb Evain : >> Hey Seo, >> >> On 5/9/09, Seo Sanghyeon wrote: >>> ?4. There is an IronPython bug that manifests only on Mono due to >>> ?newline difference. The symptom is that expressions are not printed in >>> ?interactive console. This took some time to debug, but there is a fix >>> ?now. >>> ?http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html >> >> Fwiw, I reported it on ironruby-core weeks ago: >> >> http://rubyforge.org/pipermail/ironruby-core/2009-March/004008.html >> >> Along with a patch. > > Oops, how did I miss that. Apparently this was to be fixed > see http://rubyforge.org/pipermail/ironruby-core/2009-March/004089.html > but somehow slipped for 2 months... I filed an issue against DLR, please vote: http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=3010 -- Seo Sanghyeon From fuzzyman at voidspace.org.uk Sat May 9 13:30:40 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 09 May 2009 12:30:40 +0100 Subject: [IronPython] Silverlight Application Hosting IronPython Message-ID: <4A056960.1040209@voidspace.org.uk> Hello guys, I'm having problems with a C# Silverlight application that hosts IronPython. First of all, this page http://sdlsdk.codeplex.com/Wiki/View.aspx?title=Hosting implies that the following code should load assemblies for the hosted IronPython code: foreach (string name in new string[] { "mscorlib", "System", "System.Windows", "System.Windows.Browser", "System.Net" }) { runtime.Host.PlatformAdaptationLayer.LoadAssembly(name); } It doesn't - an import from System.Windows fails. The following code works as in a normal hosted environment: runtime.LoadAssembly(typeof(String).Assembly); runtime.LoadAssembly(typeof(Uri).Assembly); runtime.LoadAssembly(typeof(Canvas).Assembly); Secondly, which is much worse but may be related, imports from Python files inside the xap fail when IronPython is hosted. I am using the following code: ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); setup.HostType = typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); ScriptRuntime runtime = new ScriptRuntime(setup); ScriptEngine pe = Python.GetEngine(runtime); ScriptScope scope = pe.CreateScope(); ScriptSource source = pe.CreateScriptSourceFromString(python_source, SourceCodeKind.Statements); source.Execute(scope); How do I setup the platform adaptation layer so that it can import from inside the xap? All the best, Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Sat May 9 15:15:30 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 09 May 2009 14:15:30 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) Message-ID: <4A0581F2.6010603@voidspace.org.uk> Hello guys, I have a second use case for embedding IronPython in Silverlight. This is actually a dynamic application with a C# component that needs to programattically build a Python module. Again I have the same problem - imports in Python code fail. I would have expected that accessing the current runtime and fetching a Python engine would fetch the current Python engine, with the browser host correctly setup. Unfortunately that seems not to be the case. Can anyone spot problems with the following code: using Microsoft.Scripting.Silverlight; using IronPython; using IronPython.Hosting; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; namespace EmbeddedSLModule { public class EmbeddedSLModule { private static string source = @" import something "; public static ScriptScope GetModule(){ ScriptRuntime runtime = DynamicApplication.Current.Runtime; ScriptEngine engine = runtime.GetEngine("Python"); ScriptScope scope = engine.CreateScope(); ScriptSource script = engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); script.Execute(scope); return scope; } } } It works fine for code that doesn't import anything - but imports from within the xap file fail. Thanks Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From william at resolversystems.com Sat May 9 16:06:17 2009 From: william at resolversystems.com (William Reade) Date: Sat, 09 May 2009 15:06:17 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A0581F2.6010603@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> Message-ID: <4A058DD9.9010707@resolversystems.com> I had a similar problem in Ironclad -- needing to get the engine which called a C# method. Try adding a CodeContext parameter to GetModule (which gets automagically inserted; no need to change the call from Python), and then using PythonContext.GetContext to get a PythonContext from the CodeContext. See the constructors in http://code.google.com/p/ironclad/source/browse/trunk/src/Python25Mapper.cs ...if your goggles can stand it. Michael Foord wrote: > Hello guys, > > I have a second use case for embedding IronPython in Silverlight. This > is actually a dynamic application with a C# component that needs to > programattically build a Python module. > > Again I have the same problem - imports in Python code fail. I would > have expected that accessing the current runtime and fetching a Python > engine would fetch the current Python engine, with the browser host > correctly setup. Unfortunately that seems not to be the case. Can > anyone spot problems with the following code: > > > using Microsoft.Scripting.Silverlight; > using IronPython; > using IronPython.Hosting; > using Microsoft.Scripting; > using Microsoft.Scripting.Hosting; > > namespace EmbeddedSLModule > { > public class EmbeddedSLModule > { > private static string source = @" > import something > "; > public static ScriptScope GetModule(){ > ScriptRuntime runtime = DynamicApplication.Current.Runtime; > ScriptEngine engine = runtime.GetEngine("Python"); > ScriptScope scope = engine.CreateScope(); > ScriptSource script = > engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); > script.Execute(scope); > > return scope; > > } > } > } > > > It works fine for code that doesn't import anything - but imports from > within the xap file fail. > > Thanks > > Michael Foord > From fuzzyman at voidspace.org.uk Sat May 9 16:53:36 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 09 May 2009 15:53:36 +0100 Subject: [IronPython] FePy status update In-Reply-To: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> References: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> Message-ID: <4A0598F0.5090000@voidspace.org.uk> This is great news. Naturally we are all on tenterhooks waiting for a FePy release targeting IronPython 2.0.1 - even if it requires Mono 2.4. :-) All the best, Michael Seo Sanghyeon wrote: > FePy seems to be dead, right? Sorry about that. This is a brief status > update. And I could use it later as a changelog. How convinient. > > 1. I am now testing IronPython with CPython 2.6 standard library. FePy > used 2.4 so far. Be sure to check collections.py issue Dave mentions > here: > http://knowbody.livejournal.com/13271.html > > 2. NAnt build system has been updated to the latest source layout > change. My goal still is to do away with NAnt and improve Mono's > implementation of MSBuild to build IronPython out of the box, but that > hasn't progressed a bit, sorry. Dave wrote about the source layout > change here: > http://knowbody.livejournal.com/13980.html > > 3. ExtensionAttribute problem mentioned in the last December is gone. > Mono bug on reference equality with generic constraints mentioned in > March is still there. FePy trunk patches/latest has a workaround for > this. Net result is that latest IronPython source drops from CodePlex > compiles and runs with Mono! And no compiler warnings! (This has been > my pet peeve, you know.) And I had no problem keeping it that way for > some time. I updated "IronPython on Mono reports" page with relevant > mails. > http://fepy.sourceforge.net/doc/ironpython-mono-report.html > > 4. There is an IronPython bug that manifests only on Mono due to > newline difference. The symptom is that expressions are not printed in > interactive console. This took some time to debug, but there is a fix > now. > http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html > > 5. Current build on my local system generally works. It imports urllib > and urllib2. This is quite a stress test... Not just import, but > downloading webpages work too. On the other hand, importing decimal > crashes Mono in segmentation fault! I suspect this has to do with move > to 2.6 standard library and its abstract base classes meta > machineries, but who knows. > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Sat May 9 17:07:26 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 09 May 2009 16:07:26 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A058DD9.9010707@resolversystems.com> References: <4A0581F2.6010603@voidspace.org.uk> <4A058DD9.9010707@resolversystems.com> Message-ID: <4A059C2E.9090706@voidspace.org.uk> William Reade wrote: > I had a similar problem in Ironclad -- needing to get the engine which > called a C# method. Try adding a CodeContext parameter to GetModule > (which gets automagically inserted; no need to change the call from > Python), and then using PythonContext.GetContext to get a > PythonContext from the CodeContext. See the constructors in > http://code.google.com/p/ironclad/source/browse/trunk/src/Python25Mapper.cs > > > ...if your goggles can stand it. > I can see it - but I can't see how it helps. How do I go from there (and the LanguageContext I can extract from it) to the current engine? I'm *fairly* sure I have the current engine anyway and that it is the importing scenario that is broken. All the best, Michael > Michael Foord wrote: >> Hello guys, >> >> I have a second use case for embedding IronPython in Silverlight. >> This is actually a dynamic application with a C# component that needs >> to programattically build a Python module. >> >> Again I have the same problem - imports in Python code fail. I would >> have expected that accessing the current runtime and fetching a >> Python engine would fetch the current Python engine, with the browser >> host correctly setup. Unfortunately that seems not to be the case. >> Can anyone spot problems with the following code: >> >> >> using Microsoft.Scripting.Silverlight; >> using IronPython; >> using IronPython.Hosting; >> using Microsoft.Scripting; >> using Microsoft.Scripting.Hosting; >> >> namespace EmbeddedSLModule >> { >> public class EmbeddedSLModule >> { >> private static string source = @" >> import something >> "; >> public static ScriptScope GetModule(){ >> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >> ScriptEngine engine = runtime.GetEngine("Python"); >> ScriptScope scope = engine.CreateScope(); >> ScriptSource script = >> engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); >> script.Execute(scope); >> >> return scope; >> >> } >> } >> } >> >> >> It works fine for code that doesn't import anything - but imports >> from within the xap file fail. >> >> Thanks >> >> Michael Foord >> > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From empirebuilder at gmail.com Sun May 10 09:57:45 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 10 May 2009 10:57:45 +0300 Subject: [IronPython] Groovy on the DLR Message-ID: <8cd017b80905100057v21e69906i2295a76ac1540e19@mail.gmail.com> http://groovy.codeplex.com/ -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From daftspaniel at gmail.com Sun May 10 21:27:55 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Sun, 10 May 2009 20:27:55 +0100 Subject: [IronPython] MissingMemberException on 2.6 Message-ID: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> Hi Guys, I am on 2.6 Beta on Windows 7 7100 and getting MissingMemberException when I compile to an EXE. http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623 I've tried adding the references suggest on the mailing list: clr.AddReference('System') clr.AddReference('mscorlib') But they were already there which suggests I have hit this before. This all compiled and ran fine before I reinstalled the OS. Anything else I can look at? - - 1001 4 0 0x80000000000000 2149 Application kennel - 566025849 5 CLR20r3 Not available 0 die.exe 0.0.0.0 4a0727eb Microsoft.Scripting 0.9.0.0 49906349 812 144 System.MissingMemberException C:\Users\daftspaniel\AppData\Local\Temp\WERC11B.tmp.WERInternalMetadata.xml C:\Users\daftspaniel\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_die.exe_a64e2c7542736d65947d996e2ce5fb7d5b383d1_10b50642 0 008e52f9-3d97-11de-9bf6-0019b95c9ce7 0 Thanks, Davy From curt at hagenlocher.org Sun May 10 22:19:18 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 10 May 2009 13:19:18 -0700 Subject: [IronPython] MissingMemberException on 2.6 In-Reply-To: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> References: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> Message-ID: I don't think that this: Microsoft.Scripting 0.9.0.0 is the right AssemblyVersion for the 2.6 alpha. I would expect something like "0.9.5.1". Is it possible that you're compiling with a different version of IronPython than you think? On Sun, May 10, 2009 at 12:27 PM, Davy Mitchell wrote: > Hi Guys, > > I am on 2.6 Beta on Windows 7 7100 and getting MissingMemberException > when I compile to an EXE. > > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623 > > I've tried adding the references suggest on the mailing list: > clr.AddReference('System') > clr.AddReference('mscorlib') > But they were already there which suggests I have hit this before. > This all compiled and ran fine before I reinstalled the OS. > > Anything else I can look at? > > - > - > > 1001 > 4 > 0 > 0x80000000000000 > > 2149 > Application > kennel > > > - > 566025849 > 5 > CLR20r3 > Not available > 0 > die.exe > 0.0.0.0 > 4a0727eb > Microsoft.Scripting > 0.9.0.0 > 49906349 > 812 > 144 > System.MissingMemberException > > > C:\Users\daftspaniel\AppData\Local\Temp\WERC11B.tmp.WERInternalMetadata.xml > > C:\Users\daftspaniel\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_die.exe_a64e2c7542736d65947d996e2ce5fb7d5b383d1_10b50642 > > 0 > 008e52f9-3d97-11de-9bf6-0019b95c9ce7 > 0 > > > > Thanks, > Davy > _______________________________________________ > 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 daftspaniel at gmail.com Mon May 11 08:21:05 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Mon, 11 May 2009 07:21:05 +0100 Subject: [IronPython] MissingMemberException on 2.6 In-Reply-To: References: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> Message-ID: <20253b0c0905102321l6d96d53av5c2380ea70bd6661@mail.gmail.com> Hi Curt, Sorry reported the wrong version there. I run the 2.6 interpreter but have hard coded the build scripts to 2.01 ipy and the target folder has the 2.01 binaries. So it is all 2.01. Just tried the (same) compiled version on XP with the same result. I built a console app without issue which ran so looks like my code is doing something different :-) Seems like I need to spend time narrowing down what is new since my last build. I have introduced threading, use of dir (for autocomplete) and changed external process handling so there is potential for something to be up there. Thanks. Davy Mitchell On Sun, May 10, 2009 at 9:19 PM, Curt Hagenlocher wrote: > I don't think that this: > ? Microsoft.Scripting > ? 0.9.0.0 > is the right AssemblyVersion for the 2.6 alpha. I would expect something > like "0.9.5.1". Is it possible that you're compiling with a different > version of IronPython than you think? > > > On Sun, May 10, 2009 at 12:27 PM, Davy Mitchell > wrote: >> >> Hi Guys, >> >> I am on 2.6 Beta on Windows 7 7100 and getting MissingMemberException >> when I compile to an EXE. >> >> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623 >> >> I've tried adding the references suggest on the mailing list: >> clr.AddReference('System') >> clr.AddReference('mscorlib') >> But they were already there which suggests I have hit this before. >> This all compiled and ran fine before I reinstalled the OS. >> >> Anything else I can look at? >> >> - >> - >> ? >> ?1001 >> ?4 >> ?0 >> ?0x80000000000000 >> ? >> ?2149 >> ?Application >> ?kennel >> ? >> ? >> - >> ?566025849 >> ?5 >> ?CLR20r3 >> ?Not available >> ?0 >> ?die.exe >> ?0.0.0.0 >> ?4a0727eb >> ?Microsoft.Scripting >> ?0.9.0.0 >> ?49906349 >> ?812 >> ?144 >> ?System.MissingMemberException >> ? >> >> ?C:\Users\daftspaniel\AppData\Local\Temp\WERC11B.tmp.WERInternalMetadata.xml >> >> ?C:\Users\daftspaniel\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_die.exe_a64e2c7542736d65947d996e2ce5fb7d5b383d1_10b50642 >> ? >> ?0 >> ?008e52f9-3d97-11de-9bf6-0019b95c9ce7 >> ?0 >> ? >> ? >> >> Thanks, >> Davy >> _______________________________________________ >> 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 vernondcole at gmail.com Mon May 11 17:32:43 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Mon, 11 May 2009 09:32:43 -0600 Subject: [IronPython] adodbapi with ado.net? (on MONO?) Message-ID: Question for the group: If I were to fork a version of adodbapi which used ado.net (rather than COM ado) ... 1) would it work any better/faster than the existing code on Windows? 2) is there any chance that it would run under MONO on Linux? -- Vernon Cole From fuzzyman at voidspace.org.uk Mon May 11 17:37:11 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 11 May 2009 16:37:11 +0100 Subject: [IronPython] adodbapi with ado.net? (on MONO?) In-Reply-To: References: Message-ID: <4A084627.8010909@voidspace.org.uk> Vernon Cole wrote: > Question for the group: > If I were to fork a version of adodbapi which used ado.net (rather > than COM ado) ... > 1) would it work any better/faster than the existing code on Windows? > 2) is there any chance that it would run under MONO on Linux? > I don't know the answer to 1 but I'm pretty sure the answer to 2 is maybe. :-) By which I mean that ADO.NET is available on Mono and so does stand a chance of working. Michael > -- > Vernon Cole > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From merllab at microsoft.com Mon May 11 17:52:42 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Mon, 11 May 2009 08:52:42 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <5ccddda9-dcf5-4861-b9e8-74962f7c7d2c@tk5-exsmh-c101.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/49948. DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/BinderState.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/PointerType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtr.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Structure.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtrType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Pointer.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/ModuleOps.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/ArrayType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/StructType.cs $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/OutParams.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/dlrcomserver.py $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/msagent.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/OptionalParams.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/pytraits/method.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/paramsinretval.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/typelib.py $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/excel.py $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/word.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/InOutParams.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/DispEvents.py $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/scriptpw.py $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/SimpleErrors.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/FutureBuiltins.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightLambda.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightLambdaClosureVisitor.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightDelegateCreator.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightLambda.Generated.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/CompilerHelpers.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/Instruction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonSiteCache.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.Generated.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_collections.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonSetSliceBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonUnaryOperationBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonDeleteIndexBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetSliceBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonBinaryOperationBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetIndexBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonSetIndexBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonDeleteSliceBinder.cs $/IronPython/IronPython_Main/Src/Scripts/generate_dynamic_instructions.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/NewStringFormatter.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/cominterop_util.py $/IronPython/IronPython_Main/Lib/iptest/cominterop_util.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonDeleteMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOperationBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonInvokeBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonSetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/InstanceCreator.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/IPythonGetable.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/CreateFallbackBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/CompatibilityInvokeBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonService.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaOldInstance.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaBuiltinMethodDescriptor.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonObject.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Calls.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/BindingHelpers.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaUserObject.Members.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/Binders.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.Operations.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaBuiltinFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaUserObject.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Members.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaMethod.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/IPythonSite.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/ConversionBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaOldClass.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/SlotOrFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ScopeOps.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_functools.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonModule.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ReflectedPackageOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/UserTypeOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Converter.cs $/IronPython/IronPython_Main/Src/Tests/test_index.py $/IronPython/IronPython_Main/Src/IronPython.Modules/re.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WithStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonAst.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstGenerator.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 864959 Date: 5/8/2009 6:21:21 PM (dinov) This change is removing the binder state class and updating all Python binders to hold onto a PythonContext instead of a BinderState which holds onto a CodeContext which holds onto a PythonContext. The original idea behind BinderState was there was 1 / module and it would enable us to not have to flow context everywhere. But because sites can be shared across multiple scopes that didn?t work out so well. Now it?s a hinderance because the atomization is happening on the binderstate so we?re not sharing sites across modules. It?s also breaking Harry?s __clrtype__ experimentation. So now it?s just gone and we always use the context which is flowed in anyway. There?s lots of little changes throughout the code base but most if it?s pretty straight forward. The common theme is that we get a PythonContext and don?t need to access it?s DefaultBinderState property or we get the SharedContext off of the PythonContext instead of getting it from the DefaultBinderState. Modules lose the initialization of the binder state code and the helpers are gone from PythonOps. All of the old code in BinderState is pulled into PythonContext unchanged. In order to avoid flowing CodeContext into GetIndex sites I have also changed how generic methods work. Instead of making all methods indexable and hiding it sometime there is a new subclass of BuiltinFunction called GenericBuiltinFunction. It adds the indexing onto the BuiltinFunction. I?ve been wanting to do this for a while but this is finally a good execute to do it ? we now get the right error message on [].append[int] ? We should also do the same w/ PythonType at some point. That required an update to the restrictions in MetaBuiltinFunction to account for the type of built-in function when producing the rule. I?ve also extended the PythonGetMemberBinder fast path. It now supports NamespaceTracker objects and supports Scope more fully. (Shelveset: RemoveBinderStateFinal2;REDMOND\dinov | SNAP CheckinId: 8296) -------------------------------------------------------------------------------- Changeset Id: 864850 Date: 5/8/2009 5:14:30 PM (dfugate) When support was removed for COM typelibs, the COM interop tests were not updated accordingly. This shelveset: * removes all typelib-only paths throughout the tests * updates a number of bug IDs (Shelveset: COM_TESTS;REDMOND\dfugate | SNAP CheckinId: 8295) From dblank at brynmawr.edu Mon May 11 19:05:45 2009 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Mon, 11 May 2009 13:05:45 -0400 Subject: [IronPython] Running Ruby code from Python, which is running in Ruby Message-ID: <4A085AE9.5050608@brynmawr.edu> Perhaps you've seen this, but I ran across Tom?? Matou?ek?s blog this weekend http://blog.tomasm.net/category/ironruby/ where he describes a little interactive Ruby shell that works something like: $ irb.exe repl.rb rb> class C rb| def say_hello caller rb| puts "#{caller} says hello to Ruby" rb| end rb| end => nil Now, he switches languages on the fly: rb> #py Now, from Python he imports and runs the Ruby class in Python: py> import C py> c = C() py> c.say_hello("Python") Python says hello to Ruby I thought I'd try this in the educational DLR editor/shell that we're developing in C# (at http://pyjamaproject.org/Pyjama ) and it works! There are still some issues (running Python code in Ruby didn't seem to work), and you need the latest drop of the DLR (I used 23458): http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx which isn't stable. But, the proof of concept is fantastic to see after all of the hard work. Best of all, the same DLLs allow all this to work on Linux and Mac OSX too, thanks to Mono. This means that you can write and compile a library *once* in whatever language you want, use it from other languages, on whatever operating system you want. Wow. Thank you to all those that are making this possible! (And more on our DLR IDE soon...) -Doug -- Douglas S. Blank Director, Institute for Personal Robots in Education (IPRE) http://www.roboteducation.org Chair, and Associate Professor, Computer Science, Bryn Mawr College http://cs.brynmawr.edu/~dblank (610)526-6501 From Tomas.Matousek at microsoft.com Mon May 11 19:32:01 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 11 May 2009 10:32:01 -0700 Subject: [IronPython] Running Ruby code from Python, which is running in Ruby In-Reply-To: <4A085AE9.5050608@brynmawr.edu> References: <4A085AE9.5050608@brynmawr.edu> Message-ID: "There are still some issues (running Python code in Ruby didn't seem to work)" If you run into any issues let us know - ideally file a bug at http://ironruby.codeplex.com or http://ironpython.codeplex.com including a repro. We would like to make the language interop as smooth as possible. Thanks, Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Douglas S. Blank Sent: Monday, May 11, 2009 10:06 AM To: Discussion of IronPython Subject: [IronPython] Running Ruby code from Python, which is running in Ruby Perhaps you've seen this, but I ran across Tom?? Matou?ek's blog this weekend http://blog.tomasm.net/category/ironruby/ where he describes a little interactive Ruby shell that works something like: $ irb.exe repl.rb rb> class C rb| def say_hello caller rb| puts "#{caller} says hello to Ruby" rb| end rb| end => nil Now, he switches languages on the fly: rb> #py Now, from Python he imports and runs the Ruby class in Python: py> import C py> c = C() py> c.say_hello("Python") Python says hello to Ruby I thought I'd try this in the educational DLR editor/shell that we're developing in C# (at http://pyjamaproject.org/Pyjama ) and it works! There are still some issues (running Python code in Ruby didn't seem to work), and you need the latest drop of the DLR (I used 23458): http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx which isn't stable. But, the proof of concept is fantastic to see after all of the hard work. Best of all, the same DLLs allow all this to work on Linux and Mac OSX too, thanks to Mono. This means that you can write and compile a library *once* in whatever language you want, use it from other languages, on whatever operating system you want. Wow. Thank you to all those that are making this possible! (And more on our DLR IDE soon...) -Doug -- Douglas S. Blank Director, Institute for Personal Robots in Education (IPRE) http://www.roboteducation.org Chair, and Associate Professor, Computer Science, Bryn Mawr College http://cs.brynmawr.edu/~dblank (610)526-6501 _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From daftspaniel at gmail.com Mon May 11 21:28:40 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Mon, 11 May 2009 20:28:40 +0100 Subject: [IronPython] MissingMemberException on 2.6 In-Reply-To: <20253b0c0905102321l6d96d53av5c2380ea70bd6661@mail.gmail.com> References: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> <20253b0c0905102321l6d96d53av5c2380ea70bd6661@mail.gmail.com> Message-ID: <20253b0c0905111228x4addc399if924647a465caa83@mail.gmail.com> Right. Going a bit mad trying to fix this :-) Tried a bit of reinstalling and rebooting to no avail. Log Name: Application Source: Application Error Date: 11/05/2009 20:22:23 Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: kennel Description: Faulting application name: DIE.exe, version: 0.0.0.0, time stamp: 0x4a0878d9 Faulting module name: KERNELBASE.dll, version: 6.1.7100.0, time stamp: 0x49eea60f Exception code: 0xe0434f4d Fault offset: 0x0000b4f4 Faulting process id: 0x%9 Faulting application start time: 0x%10 Faulting application path: %11 Faulting module path: %12 Report Id: %13 Event Xml: 1000 2 100 0x80000000000000 2273 Application kennel DIE.exe 0.0.0.0 4a0878d9 KERNELBASE.dll 6.1.7100.0 49eea60f e0434f4d 0000b4f4 Interestingly if I try to ngen IronPython.dll I get: WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\M icrosoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure lo gging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus ion!EnableLog]. while resolving 0x100014e - Microsoft.Linq.Expressions.ArgumentType. Warning: System.IO.FileNotFoundException: Could not load file or assembly 'Micro soft.Scripting.Core, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad 364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Scripting.Core, Version=0.9.0.0, Culture=neutral, PublicKe yToken=31bf3856ad364e35' Any suggestions appreciated!! Carrying on... Thanks, Davy On Mon, May 11, 2009 at 7:21 AM, Davy Mitchell wrote: > Hi Curt, > > Sorry reported the wrong version there. I run the 2.6 interpreter but > have hard coded the build scripts to 2.01 ipy and the target folder > has the 2.01 binaries. > So it is all 2.01. Just tried the (same) compiled version on XP with > the same result. I built a console app without issue which ran so > looks like my code is doing something different :-) > > Seems like I need to spend time narrowing down what is new since my > last build. I have introduced threading, use of dir (for autocomplete) > and changed external process handling so there is potential for > something to be up there. > > Thanks. > Davy Mitchell > > On Sun, May 10, 2009 at 9:19 PM, Curt Hagenlocher wrote: >> I don't think that this: >> ? Microsoft.Scripting >> ? 0.9.0.0 >> is the right AssemblyVersion for the 2.6 alpha. I would expect something >> like "0.9.5.1". Is it possible that you're compiling with a different >> version of IronPython than you think? >> >> >> On Sun, May 10, 2009 at 12:27 PM, Davy Mitchell >> wrote: >>> >>> Hi Guys, >>> >>> I am on 2.6 Beta on Windows 7 7100 and getting MissingMemberException >>> when I compile to an EXE. >>> >>> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623 >>> >>> I've tried adding the references suggest on the mailing list: >>> clr.AddReference('System') >>> clr.AddReference('mscorlib') >>> But they were already there which suggests I have hit this before. >>> This all compiled and ran fine before I reinstalled the OS. >>> >>> Anything else I can look at? >>> >>> - >>> - >>> ? >>> ?1001 >>> ?4 >>> ?0 >>> ?0x80000000000000 >>> ? >>> ?2149 >>> ?Application >>> ?kennel >>> ? >>> ? >>> - >>> ?566025849 >>> ?5 >>> ?CLR20r3 >>> ?Not available >>> ?0 >>> ?die.exe >>> ?0.0.0.0 >>> ?4a0727eb >>> ?Microsoft.Scripting >>> ?0.9.0.0 >>> ?49906349 >>> ?812 >>> ?144 >>> ?System.MissingMemberException >>> ? >>> >>> ?C:\Users\daftspaniel\AppData\Local\Temp\WERC11B.tmp.WERInternalMetadata.xml >>> >>> ?C:\Users\daftspaniel\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_die.exe_a64e2c7542736d65947d996e2ce5fb7d5b383d1_10b50642 >>> ? >>> ?0 >>> ?008e52f9-3d97-11de-9bf6-0019b95c9ce7 >>> ?0 >>> ? >>> ? >>> >>> Thanks, >>> Davy >>> _______________________________________________ >>> 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 microsoft.com Mon May 11 21:50:41 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 11 May 2009 12:50:41 -0700 Subject: [IronPython] MissingMemberException on 2.6 In-Reply-To: <20253b0c0905111228x4addc399if924647a465caa83@mail.gmail.com> References: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> <20253b0c0905102321l6d96d53av5c2380ea70bd6661@mail.gmail.com>, <20253b0c0905111228x4addc399if924647a465caa83@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC23555729DA68C7@NA-EXMSG-C102.redmond.corp.microsoft.com> When you say you're running the 2.6 interpreter does that mean you're using 2.6 to compile and then run against 2.0? If so that probably won't work. Is there any chance you could attach a debugger to the dieing process and get the managed stack trace where things are blowing up? ________________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell [daftspaniel at gmail.com] Sent: Monday, May 11, 2009 2:28 PM To: Discussion of IronPython Subject: Re: [IronPython] MissingMemberException on 2.6 Right. Going a bit mad trying to fix this :-) Tried a bit of reinstalling and rebooting to no avail. Log Name: Application Source: Application Error Date: 11/05/2009 20:22:23 Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: kennel Description: Faulting application name: DIE.exe, version: 0.0.0.0, time stamp: 0x4a0878d9 Faulting module name: KERNELBASE.dll, version: 6.1.7100.0, time stamp: 0x49eea60f Exception code: 0xe0434f4d Fault offset: 0x0000b4f4 Faulting process id: 0x%9 Faulting application start time: 0x%10 Faulting application path: %11 Faulting module path: %12 Report Id: %13 Event Xml: 1000 2 100 0x80000000000000 2273 Application kennel DIE.exe 0.0.0.0 4a0878d9 KERNELBASE.dll 6.1.7100.0 49eea60f e0434f4d 0000b4f4 Interestingly if I try to ngen IronPython.dll I get: WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\M icrosoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure lo gging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus ion!EnableLog]. while resolving 0x100014e - Microsoft.Linq.Expressions.ArgumentType. Warning: System.IO.FileNotFoundException: Could not load file or assembly 'Micro soft.Scripting.Core, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad 364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Scripting.Core, Version=0.9.0.0, Culture=neutral, PublicKe yToken=31bf3856ad364e35' Any suggestions appreciated!! Carrying on... Thanks, Davy On Mon, May 11, 2009 at 7:21 AM, Davy Mitchell wrote: > Hi Curt, > > Sorry reported the wrong version there. I run the 2.6 interpreter but > have hard coded the build scripts to 2.01 ipy and the target folder > has the 2.01 binaries. > So it is all 2.01. Just tried the (same) compiled version on XP with > the same result. I built a console app without issue which ran so > looks like my code is doing something different :-) > > Seems like I need to spend time narrowing down what is new since my > last build. I have introduced threading, use of dir (for autocomplete) > and changed external process handling so there is potential for > something to be up there. > > Thanks. > Davy Mitchell > > On Sun, May 10, 2009 at 9:19 PM, Curt Hagenlocher wrote: >> I don't think that this: >> Microsoft.Scripting >> 0.9.0.0 >> is the right AssemblyVersion for the 2.6 alpha. I would expect something >> like "0.9.5.1". Is it possible that you're compiling with a different >> version of IronPython than you think? >> >> >> On Sun, May 10, 2009 at 12:27 PM, Davy Mitchell >> wrote: >>> >>> Hi Guys, >>> >>> I am on 2.6 Beta on Windows 7 7100 and getting MissingMemberException >>> when I compile to an EXE. >>> >>> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20623 >>> >>> I've tried adding the references suggest on the mailing list: >>> clr.AddReference('System') >>> clr.AddReference('mscorlib') >>> But they were already there which suggests I have hit this before. >>> This all compiled and ran fine before I reinstalled the OS. >>> >>> Anything else I can look at? >>> >>> - >>> - >>> >>> 1001 >>> 4 >>> 0 >>> 0x80000000000000 >>> >>> 2149 >>> Application >>> kennel >>> >>> >>> - >>> 566025849 >>> 5 >>> CLR20r3 >>> Not available >>> 0 >>> die.exe >>> 0.0.0.0 >>> 4a0727eb >>> Microsoft.Scripting >>> 0.9.0.0 >>> 49906349 >>> 812 >>> 144 >>> System.MissingMemberException >>> >>> >>> C:\Users\daftspaniel\AppData\Local\Temp\WERC11B.tmp.WERInternalMetadata.xml >>> >>> C:\Users\daftspaniel\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_die.exe_a64e2c7542736d65947d996e2ce5fb7d5b383d1_10b50642 >>> >>> 0 >>> 008e52f9-3d97-11de-9bf6-0019b95c9ce7 >>> 0 >>> >>> >>> >>> Thanks, >>> Davy >>> _______________________________________________ >>> 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 daftspaniel at gmail.com Mon May 11 22:13:24 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Mon, 11 May 2009 21:13:24 +0100 Subject: [IronPython] MissingMemberException on 2.6 In-Reply-To: <350E7D38B6D819428718949920EC23555729DA68C7@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <20253b0c0905101227k19902461kebc226847a0584a@mail.gmail.com> <20253b0c0905102321l6d96d53av5c2380ea70bd6661@mail.gmail.com> <20253b0c0905111228x4addc399if924647a465caa83@mail.gmail.com> <350E7D38B6D819428718949920EC23555729DA68C7@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <20253b0c0905111313x70cf882flc1ba1d7111e61db6@mail.gmail.com> Hi Dino, > When you say you're running the 2.6 interpreter does that mean you're using 2.6 to compile > and then run against 2.0? ?If so that probably won't work. No - all building is done using 2.01 and 2.01 assemblies are used in the target bin folder. I've uninstalled 2.6 now just to rule it out altogether. > Is there any chance you could attach a debugger to the dieing process > and get the managed stack trace where things are blowing up? Think I've narrowed it down partly to the use of __name__ in the main script (which is not set to '__main__' when compiled) - easy to avoid that one. This would explain why the app sometimes did nothing! As I kept getting different results when troubleshooting this with different errors I suspect something was up with this PC install also. Can't get a repro or the real thing to consistently write an error to the event log so nothing to report for now :-) Thanks for the suggestions, Davy Mitchell From fuzzyman at voidspace.org.uk Tue May 12 00:19:39 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 11 May 2009 23:19:39 +0100 Subject: [IronPython] Running Ruby code from Python, which is running in Ruby In-Reply-To: <4A085AE9.5050608@brynmawr.edu> References: <4A085AE9.5050608@brynmawr.edu> Message-ID: <4A08A47B.1020800@voidspace.org.uk> Wow - the Pyjama Project looks very impressive! Looking forward to trying it out. Michael Douglas S. Blank wrote: > Perhaps you've seen this, but I ran across Tom?? Matou?ek?s blog this > weekend http://blog.tomasm.net/category/ironruby/ where he describes a > little interactive Ruby shell that works something like: > > $ irb.exe repl.rb > rb> class C > rb| def say_hello caller > rb| puts "#{caller} says hello to Ruby" > rb| end > rb| end > => nil > > Now, he switches languages on the fly: > > rb> #py > > Now, from Python he imports and runs the Ruby class in Python: > > py> import C > py> c = C() > py> c.say_hello("Python") > Python says hello to Ruby > > I thought I'd try this in the educational DLR editor/shell that we're > developing in C# (at http://pyjamaproject.org/Pyjama ) and it works! > There are still some issues (running Python code in Ruby didn't seem > to work), and you need the latest drop of the DLR (I used 23458): > > http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx > > which isn't stable. But, the proof of concept is fantastic to see > after all of the hard work. Best of all, the same DLLs allow all this > to work on Linux and Mac OSX too, thanks to Mono. > > This means that you can write and compile a library *once* in whatever > language you want, use it from other languages, on whatever operating > system you want. Wow. > > Thank you to all those that are making this possible! (And more on our > DLR IDE soon...) > > -Doug > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From curt at hagenlocher.org Tue May 12 00:28:18 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 11 May 2009 15:28:18 -0700 Subject: [IronPython] Groovy on the DLR In-Reply-To: <8cd017b80905100057v21e69906i2295a76ac1540e19@mail.gmail.com> References: <8cd017b80905100057v21e69906i2295a76ac1540e19@mail.gmail.com> Message-ID: Interesting. But if you look at the author's blog at http://gavingrover.blogspot.com/2009/05/groovys-groovier-roadmap.html, it sounds like the DLR part is a dead-end and that he plans to move back to Java. On Sun, May 10, 2009 at 12:57 AM, Dody Gunawinata wrote: > http://groovy.codeplex.com/ > > -- > nomadlife.org > > > _______________________________________________ > 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 curt at hagenlocher.org Tue May 12 00:33:53 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 11 May 2009 15:33:53 -0700 Subject: [IronPython] adodbapi with ado.net? (on MONO?) In-Reply-To: References: Message-ID: In principle, using ADO.NET and a purely managed database driver would eliminate most native <-> managed transitions. So in particular, you shouldn't need to marshal string data back and forth any more. On the other hand, database and network I/O is still much more of a bottleneck than local operations ever could be... How well does adodbapi work as a 64-bit process? Does it just automatically use a 64-bit version of ADO? On Mon, May 11, 2009 at 8:32 AM, Vernon Cole wrote: > Question for the group: > If I were to fork a version of adodbapi which used ado.net (rather > than COM ado) ... > 1) would it work any better/faster than the existing code on Windows? > 2) is there any chance that it would run under MONO on Linux? > -- > Vernon Cole > _______________________________________________ > 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 curt at hagenlocher.org Tue May 12 00:50:29 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 11 May 2009 15:50:29 -0700 Subject: [IronPython] Silverlight Application Hosting IronPython In-Reply-To: <4A056960.1040209@voidspace.org.uk> References: <4A056960.1040209@voidspace.org.uk> Message-ID: I don't know hardly anything about Silverlight, but it might be useful to know what error message you're getting when you fail to load System.Windows. Or if I misread and you're actually failing to import something from the System.Windows namespace in Python code, then it would be good to know what symbols you're trying to import. Hopefully Jimmy will have something to say about the XAP import issue now that he's back from RailsConf :). On Sat, May 9, 2009 at 4:30 AM, Michael Foord wrote: > Hello guys, > > I'm having problems with a C# Silverlight application that hosts > IronPython. > > First of all, this page > http://sdlsdk.codeplex.com/Wiki/View.aspx?title=Hosting implies that the > following code should load assemblies for the hosted IronPython code: > > foreach (string name in new string[] { "mscorlib", "System", > "System.Windows", "System.Windows.Browser", "System.Net" }) > { > runtime.Host.PlatformAdaptationLayer.LoadAssembly(name); > } > > It doesn't - an import from System.Windows fails. The following code works > as in a normal hosted environment: > > runtime.LoadAssembly(typeof(String).Assembly); > runtime.LoadAssembly(typeof(Uri).Assembly); > runtime.LoadAssembly(typeof(Canvas).Assembly); > > Secondly, which is much worse but may be related, imports from Python files > inside the xap fail when IronPython is hosted. I am using the following > code: > > ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); > setup.HostType = > typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); > ScriptRuntime runtime = new ScriptRuntime(setup); > ScriptEngine pe = Python.GetEngine(runtime); > ScriptScope scope = pe.CreateScope(); > ScriptSource source = > pe.CreateScriptSourceFromString(python_source, SourceCodeKind.Statements); > source.Execute(scope); > > How do I setup the platform adaptation layer so that it can import from > inside the xap? > > All the best, > > > Michael > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > 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 microsoft.com Tue May 12 01:37:40 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 11 May 2009 16:37:40 -0700 Subject: [IronPython] FePy status update In-Reply-To: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> References: <5b0248170905090304i27369f59x709266f8f6dbd1ae@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC23555729CD71F2@NA-EXMSG-C102.redmond.corp.microsoft.com> On #4 I'm going to check-in the fix today - sorry for the delay! -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Seo Sanghyeon Sent: Saturday, May 09, 2009 3:05 AM To: Discussion of IronPython Subject: [IronPython] FePy status update FePy seems to be dead, right? Sorry about that. This is a brief status update. And I could use it later as a changelog. How convinient. 1. I am now testing IronPython with CPython 2.6 standard library. FePy used 2.4 so far. Be sure to check collections.py issue Dave mentions here: http://knowbody.livejournal.com/13271.html 2. NAnt build system has been updated to the latest source layout change. My goal still is to do away with NAnt and improve Mono's implementation of MSBuild to build IronPython out of the box, but that hasn't progressed a bit, sorry. Dave wrote about the source layout change here: http://knowbody.livejournal.com/13980.html 3. ExtensionAttribute problem mentioned in the last December is gone. Mono bug on reference equality with generic constraints mentioned in March is still there. FePy trunk patches/latest has a workaround for this. Net result is that latest IronPython source drops from CodePlex compiles and runs with Mono! And no compiler warnings! (This has been my pet peeve, you know.) And I had no problem keeping it that way for some time. I updated "IronPython on Mono reports" page with relevant mails. http://fepy.sourceforge.net/doc/ironpython-mono-report.html 4. There is an IronPython bug that manifests only on Mono due to newline difference. The symptom is that expressions are not printed in interactive console. This took some time to debug, but there is a fix now. http://lists.ironpython.com/pipermail/users-ironpython.com/2009-April/010140.html 5. Current build on my local system generally works. It imports urllib and urllib2. This is quite a stress test... Not just import, but downloading webpages work too. On the other hand, importing decimal crashes Mono in segmentation fault! I suspect this has to do with move to 2.6 standard library and its abstract base classes meta machineries, but who knows. -- Seo Sanghyeon _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue May 12 02:47:45 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Tue, 12 May 2009 09:47:45 +0900 Subject: [IronPython] adodbapi with ado.net? (on MONO?) In-Reply-To: References: Message-ID: <5b0248170905111747g37c65fabgd98ff69eaeb7a036@mail.gmail.com> 2009/5/12 Vernon Cole : > Question for the group: > ?If I were to fork a version of adodbapi which used ado.net (rather > than COM ado) ... > ?1) would it work any better/faster than the existing code on Windows? > ?2) is there any chance that it would run under MONO on Linux? 1. No idea. 2. Yes. -- Seo Sanghyeon From nhodge at microsoft.com Tue May 12 03:54:10 2009 From: nhodge at microsoft.com (Nick Hodge) Date: Tue, 12 May 2009 09:54:10 +0800 Subject: [IronPython] Running Ruby code from Python, which is running in Ruby In-Reply-To: References: <4A085AE9.5050608@brynmawr.edu> Message-ID: Managed to get this to work: Git pull'd latest IronRuby VS'd build Release of both IronRuby, IronPython (the sources that are supplied) Going to demo at JAOO Brisbane this afternoon :-) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tomas Matousek Sent: Tuesday, 12 May 2009 3:32 AM To: Discussion of IronPython Subject: Re: [IronPython] Running Ruby code from Python, which is running in Ruby "There are still some issues (running Python code in Ruby didn't seem to work)" If you run into any issues let us know - ideally file a bug at http://ironruby.codeplex.com or http://ironpython.codeplex.com including a repro. We would like to make the language interop as smooth as possible. Thanks, Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Douglas S. Blank Sent: Monday, May 11, 2009 10:06 AM To: Discussion of IronPython Subject: [IronPython] Running Ruby code from Python, which is running in Ruby Perhaps you've seen this, but I ran across Tom?? Matou?ek's blog this weekend http://blog.tomasm.net/category/ironruby/ where he describes a little interactive Ruby shell that works something like: $ irb.exe repl.rb rb> class C rb| def say_hello caller rb| puts "#{caller} says hello to Ruby" rb| end rb| end => nil Now, he switches languages on the fly: rb> #py Now, from Python he imports and runs the Ruby class in Python: py> import C py> c = C() py> c.say_hello("Python") Python says hello to Ruby I thought I'd try this in the educational DLR editor/shell that we're developing in C# (at http://pyjamaproject.org/Pyjama ) and it works! There are still some issues (running Python code in Ruby didn't seem to work), and you need the latest drop of the DLR (I used 23458): http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx which isn't stable. But, the proof of concept is fantastic to see after all of the hard work. Best of all, the same DLLs allow all this to work on Linux and Mac OSX too, thanks to Mono. This means that you can write and compile a library *once* in whatever language you want, use it from other languages, on whatever operating system you want. Wow. Thank you to all those that are making this possible! (And more on our DLR IDE soon...) -Doug -- Douglas S. Blank Director, Institute for Personal Robots in Education (IPRE) http://www.roboteducation.org Chair, and Associate Professor, Computer Science, Bryn Mawr College http://cs.brynmawr.edu/~dblank (610)526-6501 ______________________________________________ From fuzzyman at voidspace.org.uk Tue May 12 13:02:56 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 12 May 2009 12:02:56 +0100 Subject: [IronPython] Silverlight Application Hosting IronPython In-Reply-To: References: <4A056960.1040209@voidspace.org.uk> Message-ID: <4A095760.9040905@voidspace.org.uk> Curt Hagenlocher wrote: > I don't know hardly anything about Silverlight, but it might be useful > to know what error message you're getting when you fail to load > System.Windows. ImportError - exactly the same form of error as when you haven't added a reference to the assembly. > Or if I misread and you're actually failing to import something from > the System.Windows namespace in Python code, then it would be good to > know what symbols you're trying to import. > > Hopefully Jimmy will have something to say about the XAP import issue > now that he's back from RailsConf :). > I hope so... :-) Michael > On Sat, May 9, 2009 at 4:30 AM, Michael Foord > > wrote: > > Hello guys, > > I'm having problems with a C# Silverlight application that hosts > IronPython. > > First of all, this page > http://sdlsdk.codeplex.com/Wiki/View.aspx?title=Hosting implies > that the following code should load assemblies for the hosted > IronPython code: > > foreach (string name in new string[] { "mscorlib", > "System", "System.Windows", "System.Windows.Browser", "System.Net" }) > { > runtime.Host.PlatformAdaptationLayer.LoadAssembly(name); > } > > It doesn't - an import from System.Windows fails. The following > code works as in a normal hosted environment: > > runtime.LoadAssembly(typeof(String).Assembly); > runtime.LoadAssembly(typeof(Uri).Assembly); > runtime.LoadAssembly(typeof(Canvas).Assembly); > > Secondly, which is much worse but may be related, imports from > Python files inside the xap fail when IronPython is hosted. I am > using the following code: > > ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); > setup.HostType = > typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); > ScriptRuntime runtime = new ScriptRuntime(setup); > ScriptEngine pe = Python.GetEngine(runtime); > ScriptScope scope = pe.CreateScope(); > ScriptSource source = > pe.CreateScriptSourceFromString(python_source, > SourceCodeKind.Statements); > source.Execute(scope); > > How do I setup the platform adaptation layer so that it can import > from inside the xap? > > All the best, > > > Michael > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From mbk.lists at gmail.com Tue May 12 16:48:29 2009 From: mbk.lists at gmail.com (Mike Krell) Date: Tue, 12 May 2009 07:48:29 -0700 Subject: [IronPython] Scripting an unmanaged app with IronPython? Message-ID: I have an unmanaged app written in C++ / MFC that I'd like to script in some capacity with IronPython. I can see perhaps three broad approaches to doing this: 1. Somehow hosting IP within the app. This would be the ideal, but I don't know if it's possible. It's clear that I would need to create some wrappers that mediate between managed and unmanaged code (i.e., expose functionality as CLR objects). But on top of that I'd need to host IP in the process. I have Michael F.'s excellent "IronPython in Action" and have been reading a little bit about embedding the engine, but it starts with the premise that the hosting app is itself managed. 2. Create a new managed app that would have access to the wrappers as in #1 and embed IP in that. I think this is definitely possible, but it would have limitations that #1 would not have (e.g., in #1, the user could still do things from the app's gui) 3. Have a new managed app that runs as a separate process and communicates with the unmanaged app, e.g. like COM. The app currently does not have COM interfaces and working with COM is a major pain. Is there an alternative in the .net world that would be similar but easier to use? Thanks in advance for any guidance y'all can offer. Mike From curt at hagenlocher.org Tue May 12 16:58:33 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 12 May 2009 07:58:33 -0700 Subject: [IronPython] Scripting an unmanaged app with IronPython? In-Reply-To: References: Message-ID: Is there any reason you wouldn't just do this with CPython? In a past life, I had a lot of success embedding CPython into a C++ / MFC application. On Tue, May 12, 2009 at 7:48 AM, Mike Krell wrote: > I have an unmanaged app written in C++ / MFC that I'd like to script > in some capacity with IronPython. I can see perhaps three broad > approaches to doing this: > > 1. Somehow hosting IP within the app. This would be the ideal, but I > don't know if it's possible. It's clear that I would need to create > some wrappers that mediate between managed and unmanaged code (i.e., > expose functionality as CLR objects). But on top of that I'd need to > host IP in the process. I have Michael F.'s excellent "IronPython in > Action" and have been reading a little bit about embedding the engine, > but it starts with the premise that the hosting app is itself managed. > > 2. Create a new managed app that would have access to the wrappers as > in #1 and embed IP in that. I think this is definitely possible, but > it would have limitations that #1 would not have (e.g., in #1, the > user could still do things from the app's gui) > > 3. Have a new managed app that runs as a separate process and > communicates with the unmanaged app, e.g. like COM. The app currently > does not have COM interfaces and working with COM is a major pain. Is > there an alternative in the .net world that would be similar but > easier to use? > > Thanks in advance for any guidance y'all can offer. > > Mike > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbk.lists at gmail.com Tue May 12 17:12:43 2009 From: mbk.lists at gmail.com (Mike Krell) Date: Tue, 12 May 2009 08:12:43 -0700 Subject: [IronPython] Scripting an unmanaged app with IronPython? In-Reply-To: References: Message-ID: On Tue, May 12, 2009 at 7:58 AM, Curt Hagenlocher wrote: > Is there any reason you wouldn't just do this with CPython? In a past life, > I had a lot of success embedding CPython into a C++ / MFC application. Yes, in fact, I've done a limited version of my approach #2 before using boost.python. The big win with using IronPython scripting is access to .net libraries. Plus I like pushing the envelope -- as opposed to pushing boulders uphill :-) Mike From steve at mcneel.com Tue May 12 17:26:29 2009 From: steve at mcneel.com (Steve Baer) Date: Tue, 12 May 2009 08:26:29 -0700 Subject: [IronPython] Scripting an unmanaged app with IronPython? In-Reply-To: References: Message-ID: Hi Mike, I did this by creating a C++/CLI DLL that wraps our C++ exported classes/functions for .NET. This way there is no .NET code in our core C++/MFC executable and you get the effect of IP being hosted in the application. Thanks, -Steve ----- Original Message ----- From: "Mike Krell" To: "Discussion of IronPython" Sent: Tuesday, May 12, 2009 8:12 AM Subject: Re: [IronPython] Scripting an unmanaged app with IronPython? > On Tue, May 12, 2009 at 7:58 AM, Curt Hagenlocher > wrote: >> Is there any reason you wouldn't just do this with CPython? In a past >> life, >> I had a lot of success embedding CPython into a C++ / MFC application. > > Yes, in fact, I've done a limited version of my approach #2 before > using boost.python. The big win with using IronPython scripting is > access to .net libraries. Plus I like pushing the envelope -- as > opposed to pushing boulders uphill :-) > > Mike > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From merllab at microsoft.com Tue May 12 17:53:30 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Tue, 12 May 2009 08:53:30 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/49967. ADDED SOURCES $/IronPython/IronPython_Main/Src/Tests/Modes $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleFlags.ps1 $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.out DELETED SOURCES $/IronPython/IronPython_Main/Src/Tests/Modes.ps1 MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleFlags.ps1 $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.out $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/word.py $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/ArrayUtils.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/ValueArray.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/CollectionUtils.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/FastGetBase.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/Tests/test_interpret_sanity.py $/IronPython/IronPython_Main/Src/Tests/test_namebinding.py $/IronPython/IronPython_Main/Src/Tests/test_math.py $/IronPython/IronPython_Main/Src/Tests/test_doc.py $/IronPython/IronPython_Main/Src/Tests/test_dict.py $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 867352 Date: 5/11/2009 8:10:04 PM (dinov) DLR outer layer (just making a couple of helpers more accessible) & IronPython Implements instance binding for common instance members which we can easily support pre-compiled rules for: This EXCLUDES com objects and IDOs and any strongly typed literals other than List/string (we hit list and string during startup), types w/ GetBoundMember/GetCustomMember dynamic lookups It includes methods, events, properties (using reflected caller). Fields are always compiled still. The biggest win is obviously methods in that for say ?l = []; l.append? we no longer need to generate code. Also fixes Seo?s problem w/ interactive code vs. statements and Jeff?s problem w/ >= 14 arguments all w/ defaults. (Shelveset: FastInstanceBindingFinal2;REDMOND\dinov | SNAP CheckinId: 8310) -------------------------------------------------------------------------------- Changeset Id: 867020 Date: 5/11/2009 4:49:17 PM (dfugate) * Dev10 409920 (test_namebinding.py) - non-repro with today's bits * Dev10 148342 (test_sys.py) - partially fixed. Still missing sys.__excepthook__ * iptest.assert_util - preserve_syspath was misspelled * renamed Modes.ps1 to ConsoleFlags.ps1 and enhanced the "ipy.exe -h" test * test_dict.py - added verification for test_dict_inherit * CodePlex 20251 (test_doc.py) - added a regression test. Fixed * test_math.py - added test_log_neg * test_namebinding.py - enabled a block of code under -X:Interpret mode * interop.com.apps.word - minor refactoring plus a regression test for test_word_basic * moved/renamed test_mode_20.GenericTest (Shelveset: CP57;REDMOND\dfugate | SNAP CheckinId: 8309) From dreamwinterlb at gmail.com Wed May 13 05:05:09 2009 From: dreamwinterlb at gmail.com (=?UTF-8?B?5p2O5YW1?=) Date: Wed, 13 May 2009 11:05:09 +0800 Subject: [IronPython] unsupported operand type(s) for & operator overloading. Message-ID: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> Hi, I implemented '&' operator overloading in C# class. But When I used ScriptRuntime compile the expression that use '&' operator, I got a exception 'unsupported operand type(s) for & operator overloading'. The following is C# code. public static Group operator &(Condition left, Condition right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } Group re = new Group(left, right, LogicalOperator.And); return re; } IronPython expression like this ' A.Create("Audit") == A.Create("Test1") & A.CreateProperty("Sum") == A.Create("Test2") ' I tried to convert '&' to 'and'. Although no exception, I lost the left expression. Anyone can help me? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Wed May 13 05:26:05 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 12 May 2009 20:26:05 -0700 Subject: [IronPython] unsupported operand type(s) for & operator overloading. In-Reply-To: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> References: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC23555729E158E3@NA-EXMSG-C102.redmond.corp.microsoft.com> Can you include the hosting code which is evaluating the expression? If I do: Fooa.cs: namespace Baz { public class foo { public static void Main(string[] args) { } public static object operator &(foo left, foo right) { return 42; } } } import clr clr.AddReference('fooa') import Baz x = Baz.foo() x & x this prints 42 (on 2.0 RTM and some random 2.6 build). So either A.Create(?Test1?) or A.CreateProperty(?Sum?) is not returning a Condition or there?s something w/ the hosting APIs that?s throwing this off. I also can?t track down the specific error message ? specifically ?operator overloading? doesn?t seem to show up anywhere so I?m a little bit lost what could be causing it. I would expect something which includes the type names such as ?unsupported operand type(s) for &: 'str' and 'str'?. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of ?? Sent: Tuesday, May 12, 2009 8:05 PM To: users at lists.ironpython.com Subject: [IronPython] unsupported operand type(s) for & operator overloading. Hi, I implemented '&' operator overloading in C# class. But When I used ScriptRuntime compile the expression that use '&' operator, I got a exception 'unsupported operand type(s) for & operator overloading'. The following is C# code. public static Group operator &(Condition left, Condition right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } Group re = new Group(left, right, LogicalOperator.And); return re; } IronPython expression like this ' A.Create("Audit") == A.Create("Test1") & A.CreateProperty("Sum") == A.Create("Test2") ' I tried to convert '&' to 'and'. Although no exception, I lost the left expression. Anyone can help me? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Wed May 13 05:28:27 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 13 May 2009 12:28:27 +0900 Subject: [IronPython] unsupported operand type(s) for & operator overloading. In-Reply-To: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> References: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> Message-ID: <5b0248170905122028t37d1bd7due20de788c66e6877@mail.gmail.com> 2009/5/13 ?? : > IronPython expression like this ' A.Create("Audit") ==? A.Create("Test1") & > A.CreateProperty("Sum") == A.Create("Test2") ' This is a rare pitfall. In C (and C#), == has higher precedence than &, but in Python, & has higher precedence than ==. So IronPython is complaining that it can't process A.Create("Test1") & A.CreateProperty("Sum"). Probably you meant (A.Create("Audit") == A.Create("Test1")) & (A.CreateProperty("Sum") == A.Create("Test2"))? -- Seo Sanghyeon From daftspaniel at gmail.com Wed May 13 07:11:47 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Wed, 13 May 2009 06:11:47 +0100 Subject: [IronPython] Inspect Module Message-ID: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> Hi Folks, Is there a reason why Inspect is missing from the 2.6 msi? It is present in 2.01. Thanks, Davy Mitchell http://daftspaniel.blogspot.com From dreamwinterlb at gmail.com Wed May 13 08:29:26 2009 From: dreamwinterlb at gmail.com (=?UTF-8?B?5p2O5YW1?=) Date: Wed, 13 May 2009 14:29:26 +0800 Subject: [IronPython] unsupported operand type(s) for & operator overloading. In-Reply-To: <350E7D38B6D819428718949920EC23555729E158E3@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <9547a46f0905122005h1438dfa0yd5709c45e55b6c59@mail.gmail.com> <350E7D38B6D819428718949920EC23555729E158E3@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <9547a46f0905122329q572b219av2fe930e72e97a13d@mail.gmail.com> Thank Dino Viehland, Seo Sanghyeon. I have resolved. Code in the following: namespace TestLibrary { public class Foo { public string Value = "abc"; public static FooGroup operator &(Foo left, Foo right) { return new FooGroup(left, right); } } public class Factory { public static Foo Create() { return new Foo(); } } } public class FooGroup { public FooGroup(Foo left,Foo right) { this.Left = left; this.Right = right; } public Foo Left { get; private set; } public Foo Right { get; private set; } public override string ToString() { return Left.Value + " AND " + Right.Value; //output abcabc } } } class Program { static void Main(string[] args) { ScriptRuntime runtime = IronPython.Hosting.Python.CreateRuntime(); ScriptEngine engine = runtime.GetEngine("py"); //import runtime.LoadAssembly(typeof(Foo).Assembly); string importExpression = @"from TestLibrary import *"; ScriptSource source =engine.CreateScriptSourceFromString(importExpression, Microsoft.Scripting.SourceCodeKind.Statements); CompiledCode tempCode = source.Compile(); tempCode.Execute(runtime.GetBuiltinModule()); string script = "Factory.Create() & Factory.Create()"; //Using brackets to group mulit-conditions ScriptSource exeSource = engine.CreateScriptSourceFromString(script, Microsoft.Scripting.SourceCodeKind.Expression); CompiledCode target = exeSource.Compile(); var group = target.Execute(engine.CreateScope()); Console.WriteLine( group.ToString()); //out "abc AND abc" Console.Read(); } 2009/5/13 Dino Viehland > Can you include the hosting code which is evaluating the expression? If > I do: > > > > Fooa.cs: > > namespace Baz { > > public class foo { > > public static void Main(string[] args) { } > > public static object operator &(foo left, foo right) { > > return 42; > > } > > } > > } > > > > import clr > > clr.AddReference('fooa') > > import Baz > > x = Baz.foo() > > x & x > > > > this prints 42 (on 2.0 RTM and some random 2.6 build). So either > A.Create(?Test1?) or A.CreateProperty(?Sum?) is not returning a Condition or > there?s something w/ the hosting APIs that?s throwing this off. > > > > I also can?t track down the specific error message ? specifically ?operator > overloading? doesn?t seem to show up anywhere so I?m a little bit lost what > could be causing it. I would expect something which includes the type names > such as ?unsupported operand type(s) for &: 'str' and 'str'?. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *?? > *Sent:* Tuesday, May 12, 2009 8:05 PM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] unsupported operand type(s) for & operator > overloading. > > > > Hi, > I implemented '&' operator overloading in C# class. But When I used > ScriptRuntime compile the expression that use '&' operator, I got a > exception 'unsupported operand type(s) for & operator overloading'. > The following is C# code. > > public static Group operator &(Condition left, Condition right) { > if (left == null) { > throw new ArgumentNullException("left"); > } > if (right == null) { > throw new ArgumentNullException("right"); > } > Group re = new Group(left, right, LogicalOperator.And); > return re; > } > > IronPython expression like this ' A.Create("Audit") == A.Create("Test1") & > A.CreateProperty("Sum") == A.Create("Test2") ' > > I tried to convert '&' to 'and'. Although no exception, I lost the left > expression. > > Anyone can help me? 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 merllab at microsoft.com Wed May 13 17:52:07 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 13 May 2009 08:52:07 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <849f2598-27ac-4c81-bd7a-25b9a50511c5@tk5-exsmh-c101.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/50138. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/NamespaceTrackerOps.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ReflectedPackageOps.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/NamespaceTrackerOps.cs $/IronPython/IronPython_Main/Lib/iptest/test_env.py $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/test_env.py $/IronPython/IronPython_Main/Src/IronPython.Modules/_warnings.cs $/IronPython/IronPython_Main/Src/Tests/regressions.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonBinder.cs $/IronPython/IronPython_Main/Src/Tests/modules/_sha256.py $/IronPython/IronPython_Main/Src/Tests/modules/_sha512.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Symbols.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Importer.cs $/IronPython/IronPython_Main/Src/Tests/test_str.py $/IronPython/IronPython_Main/Src/Tests/test_set.py $/IronPython/IronPython_Main/Src/Tests/test_namebinding.py $/IronPython/IronPython_Main/Src/Tests/test_methoddispatch.py $/IronPython/IronPython_Main/Src/Tests/test_imp.py $/IronPython/IronPython_Main/Src/Tests/test_doc.py $/IronPython/IronPython_Main/Src/IronPython.Modules/imp.cs $/IronPython/IronPython_Main/Src/Tests/test_cliclass.py $/IronPython/IronPython_Main/Src/Tests/test_binascii.py $/IronPython/IronPython_Main/Src/IronPython.Modules/binascii.cs $/IronPython/IronPython_Main/Src/IronPython/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Scripts/generate_symboltable.py $/IronPython/IronPython_Main/Tutorial/Tutorial.htm $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 869226 Date: 5/12/2009 7:10:04 PM (dfugate) * CP19675 (regressions.py) - extended regression * test_cliclass.py - extended a regression * test_doc.py - small refactoring and added a regression for CP21360 * test_methoddispatch.py - improved test_security_crypto a bit * CP20956 (test_namebinding.py) - extended regression. Not fixed * test_set.py: - moved 'isPython25' definition to iptest.test_env - improved test_equality * test_str.py - improved test_subclass_ctor (Shelveset: CP58;REDMOND\dfugate | SNAP CheckinId: 8328) -------------------------------------------------------------------------------- Changeset Id: 869126 Date: 5/12/2009 6:04:15 PM (dinov) This fixes an import bug reported by Harry related to pygments ? when we do an import we currently resolve the module and then return it. We?re supposed to go back into sys.modules and lookup the module again. This enables a module to publish a new object back into sys.modules under the modules name and have that object returned from the import machinery. This change is the change in the importer where we?re tracking ?finalName? and the final import look which used to be ?now import the b.c? and is now ?now import the a.b.c?. Also adding support for __package__ (PEP 366 http://www.python.org/dev/peps/pep-0366/, codeplex work item #19541 - 2.6: add __package__ attribute to modules). This is automatically set when an explicit relative import happens and it is consulted when doing any form of a relative import. It also gets set via imp.new_module and on built-in modules. Tests in test_import are fixed as is CodePlex bug #21912 (Relative imports from functions should throw ValueError, not SyntaxError). Test_import fixes include detecting recursive reload and ?from .x import *? is now legal. We also now match the exception CPython reports when trying to import a filename ? this fixes 2.6 work item 19586 (2.6: __import__ shouldn't allow filenames). To pass a reasonable amount of the test_import bugs I had to made some tweaks to _warnings. First formatwarning/showwarning aren?t part of the C module so I?ve made these internal. We still have an implementation of these simply for when we?re running w/o CPython?s warnings.py. Today this still occurs w/ our test_warnings.py test. Then I?ve changed it to look up showwarnings in the actual warnings module. Finally I needed to make PerformModuleReload only create it?s state once ? Cpython?s test_warnings imports this multiple times and gets the same filters list. Also renaming ReflectedPackageOps -> NamespaceTrackerOps. (Shelveset: FixImportAndAddPackageFinal;REDMOND\dinov | SNAP CheckinId: 8326) From dfugate at microsoft.com Wed May 13 18:11:02 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Wed, 13 May 2009 09:11:02 -0700 Subject: [IronPython] Inspect Module In-Reply-To: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> Message-ID: It's because we strip out CPython modules that aren't importable by ipy. That is, the sys._getframe issue I talked about at http://knowbody.livejournal.com/13271.html is the underlying culprit here: C:\Program Files\IronPython 2.6>ipy.exe IronPython 2.6 Alpha 1 (2.6.0.1) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import inspect Traceback (most recent call last): File "", line 1, in File "C:\Program Files\IronPython 2.6\Lib\inspect.py", line 262, in inspect File "C:\Program Files\IronPython 2.6\Lib\collections.py", line 106, in namedtuple ValueError: _getframe is not implemented for non-zero depth >>> We should have this fixed in one form or another before the final version of 2.6 ships. Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell Sent: Tuesday, May 12, 2009 10:12 PM To: Discussion of IronPython Subject: [IronPython] Inspect Module Hi Folks, Is there a reason why Inspect is missing from the 2.6 msi? It is present in 2.01. Thanks, Davy Mitchell http://daftspaniel.blogspot.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From daftspaniel at gmail.com Wed May 13 22:58:20 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Wed, 13 May 2009 21:58:20 +0100 Subject: [IronPython] Inspect Module In-Reply-To: References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> Message-ID: <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> Thanks for the info and update Dave. Is there a page on codeplex for the 2.6 modules status? The 2.01 version of inspect seems to work ok so far in 2.6 so will do for now :-) Thanks, Davy Mitchell -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ On Wed, May 13, 2009 at 5:11 PM, Dave Fugate wrote: > It's because we strip out CPython modules that aren't importable by ipy. That is, the sys._getframe issue I talked about at http://knowbody.livejournal.com/13271.html is the underlying culprit here: > ? ?C:\Program Files\IronPython 2.6>ipy.exe > ? ?IronPython 2.6 Alpha 1 (2.6.0.1) on .NET 2.0.50727.3053 > ? ?Type "help", "copyright", "credits" or "license" for more information. > ? ?>>> import inspect > ? ?Traceback (most recent call last): > ? ? ?File "", line 1, in > ? ? ?File "C:\Program Files\IronPython 2.6\Lib\inspect.py", line 262, in inspect > ? ? ?File "C:\Program Files\IronPython 2.6\Lib\collections.py", line 106, in namedtuple > ? ?ValueError: _getframe is not implemented for non-zero depth > ? ?>>> > > We should have this fixed in one form or another before the final version of 2.6 ships. > > Dave > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell > Sent: Tuesday, May 12, 2009 10:12 PM > To: Discussion of IronPython > Subject: [IronPython] Inspect Module > > Hi Folks, > > Is there a reason why Inspect is missing from the 2.6 msi? It is > present in 2.01. > > Thanks, > Davy Mitchell > > http://daftspaniel.blogspot.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 microsoft.com Wed May 13 23:23:21 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 13 May 2009 14:23:21 -0700 Subject: [IronPython] Inspect Module In-Reply-To: <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> This will should be fixed in tomorrow's source drop. I have a check-in which removes sys._getframe unless the -X:Frames or -X:FullFrames options are passed. When one of those are passed sys._getframe works for any value and if -X:FullFrames is passed then you can get locals from the frames too. But the removal of sys._getframe by default will mean that namedtuple from collections.py no longer blows up. I don't think we have a module status page yet. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell Sent: Wednesday, May 13, 2009 1:58 PM To: Discussion of IronPython Subject: Re: [IronPython] Inspect Module Thanks for the info and update Dave. Is there a page on codeplex for the 2.6 modules status? The 2.01 version of inspect seems to work ok so far in 2.6 so will do for now :-) Thanks, Davy Mitchell -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ On Wed, May 13, 2009 at 5:11 PM, Dave Fugate wrote: > It's because we strip out CPython modules that aren't importable by ipy. That is, the sys._getframe issue I talked about at http://knowbody.livejournal.com/13271.html is the underlying culprit here: > ? ?C:\Program Files\IronPython 2.6>ipy.exe > ? ?IronPython 2.6 Alpha 1 (2.6.0.1) on .NET 2.0.50727.3053 > ? ?Type "help", "copyright", "credits" or "license" for more information. > ? ?>>> import inspect > ? ?Traceback (most recent call last): > ? ? ?File "", line 1, in > ? ? ?File "C:\Program Files\IronPython 2.6\Lib\inspect.py", line 262, in inspect > ? ? ?File "C:\Program Files\IronPython 2.6\Lib\collections.py", line 106, in namedtuple > ? ?ValueError: _getframe is not implemented for non-zero depth > ? ?>>> > > We should have this fixed in one form or another before the final version of 2.6 ships. > > Dave > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell > Sent: Tuesday, May 12, 2009 10:12 PM > To: Discussion of IronPython > Subject: [IronPython] Inspect Module > > Hi Folks, > > Is there a reason why Inspect is missing from the 2.6 msi? It is > present in 2.01. > > Thanks, > Davy Mitchell > > http://daftspaniel.blogspot.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 billchi at microsoft.com Thu May 14 02:00:24 2009 From: billchi at microsoft.com (Bill Chiles) Date: Wed, 13 May 2009 17:00:24 -0700 Subject: [IronPython] Sympl Language Sample and Walkthrough Document Message-ID: <8DD7BECAEB597D4782F7C9CEFDCA6B92AC11B8C35B@NA-EXMSG-C125.redmond.corp.microsoft.com> There's a new DLR sample to which I wanted to draw folks' attentions. There is a small language implementation sample, implemented in both IronPython and C#, with an accompanying walkthrough document. The code is now on the DLR Codeplex site under ...\Languages\Sympl, and the document is on the "Documents and Specs" page which you can get to from the list of links on the home page. Under the Sympl directory is also an examples directory with some code written in Sympl, which all runs when you execute Main in program.cs. The code and document will be in zip files we will produce to go along with the VS Beta1 release coming soon. Sympl demonstrates how to implement a very simple language using the Dynamic Language Runtime (DLR) as it ships in .NET 4.0. The goal is to make you aware of how to get started building a language on the DLR. Sympl does not show production quality rich .NET interoperability and binding logic. It does walk you through the following: * Using DLR Expression Trees (which include LINQ Expression Trees v1) for code generation * Using DLR dynamic dispatch caching * Building runtime binders * Building dynamic objects and dynamic meta-objects * Supporting dynamic language/object interoperability * Very simple hosting with application supplied global objects * Basic arithmetic and comparison operators with fast DLR dispatch caching * Control flow * Name binding within Sympl * Method and top-level function invocation with fast DLR dispatch caching * Very simple .NET interoperability for runtime method and operation binding * Using the DLR's built-in COM binding * Closures * Assignment with various left-hand-side expressions Sympl does not yet demonstrate using any Codeplex-only DLR code such as the DefaultBinder, the faster and nicer .NET reflection trackers (Sympl's is painfully slow and simple), or the common DLR hosting (yet). A few caveats on the documentation. First, the walk through document still needs some polishing, but I wanted to get it out to people. Feel free to send me comments or ask questions. Second, the document refers to a couple of other documents on our Codeplex site, but we haven't updated some of them since DEC 08. Those will be updated in the next couple of weeks. I think the sympl.doc walkthrough is very readable on its own and has all the relevant code snippets included in it as well. Lastly, while the example is overall reasonably simple, it does demonstrate all the basic concepts of building a language on the DLR with explanations, and therefore, is quite long. However, the document unfolds in the same way the Sympl language implementation evolved, so it progresses well for incrementally increasing your awareness of how to build a language on the DLR. Hope you enjoy and find this code and doc helpful! Cheers, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas.cenovsky at radiantsystems.com Thu May 14 11:36:12 2009 From: lukas.cenovsky at radiantsystems.com (Cenovsky, Lukas) Date: Thu, 14 May 2009 05:36:12 -0400 Subject: [IronPython] Execfile in IronPython 2.0 slower then 1.1 Message-ID: I was playing yesterday with something and found that execfile is about 10 times slower in Ironpython 2.0 then in 1.1. Does anyone have an idea why? Here is the snippet: from time import time f = open('test.txt', 'w') f.write('res = []\n') f.write("res.append({'1': 'one', '2': 'two'})\n"*10000) f.close() t = time() execfile('test.txt') print 'Execfile took:', time() - t Ironpython 1.1: Execfile took: 5.37503814697 Ironpython 2.0: Execfile took: 50.3440628052 PS: I know the example is stupid - I'm just wondering why such difference? -- -- Lukas From merllab at microsoft.com Thu May 14 18:11:56 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Thu, 14 May 2009 09:11:56 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <0dd6546e-e2ac-43a9-9bb0-caba7dad268f@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/50318. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/ModuleGlobalCache.cs $/IronPython/IronPython_Main/Doc/IronPython.css $/IronPython/IronPython_Main/Doc $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ExpressionWriter.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/ModuleGlobalWrapper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/ModuleGlobalCache.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/ModuleGlobalCache.cs $/IronPython/IronPython_Main/Doc/IronPython.css $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.out $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/ThreadLocal.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/NestedTypeTracker.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/LanguageContext.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/TypeGroup.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/CallSiteRule.cs $/IronPython/IronPython_Main/Src/Tests/pyc/test_pyc.ps1 $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.Generated.cs $/IronPython/IronPython_Main/Config/Unsigned/App.config $/IronPython/IronPython_Main/Config/Signed/App.config $/IronPython/IronPython_Main/Src/IronPython/Runtime/Bytes.cs $/IronPython/IronPython_Main/Src/Tests/test_bytes.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonOptions.cs $/IronPython/IronPython_Main/Src/App.config $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ScopeOps.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCallTargets.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCompilerOptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/sys.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/ConstructorFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/TypeGroupOps.cs $/IronPython/IronPython_Main/Src/Tests/test_sys.py $/IronPython/IronPython_Main/Src/AssemblyVersion.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/TraceBack.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Generator.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/Tests/test_tuple.py $/IronPython/IronPython_Main/Src/Tests/test_function.py $/IronPython/IronPython_Main/Src/Tests/test_file.py $/IronPython/IronPython_Main/Src/Tests/test_cStringIO.py $/IronPython/IronPython_Main/Src/Tests/test_builtinfunc.py $/IronPython/IronPython_Main/Src/Tests/test_buffer.py $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonOptionsParser.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SuiteStatement.cs $/IronPython/IronPython_Main/Src/Scripts/generate_calls.py $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonAst.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/FunctionDefinition.cs $/IronPython/IronPython_Main/Tutorial/Tutorial.htm $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ClassDefinition.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Tokenizer.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 870956 Date: 5/13/2009 4:39:31 PM (dinov) Adds sys._getframe support, updates our version numbers for the upcoming beta release, and adds a ?X:Python30 flag for features which should be like Python 3k (currently just bytes indexing). _getframe support is implemented as 2 command line options. The first ?X:Frames enables light-weight frames which can be used to walk the stack. The 2nd, -X:FullFrames, enables frames w/ locals also available and therefore has a much higher performance cost. The frames tracking logic it?s self gets inserted into the generated function bodies. We maintain a thread local object which tracks the frames inside a List where FunctionStack is a struct. This means the usual case of pushing a new frame will run allocation free once a thread has reached it?s normal maximum operating depth. Long term we can combine frames w/ recursion enforcement but this change does not do that. Frames get added to functions, classes, and modules. For classes and modules we currently don?t have a code object associated with the frame ? just the locals/globals. We also don?t currently track the line number in the frame (it?s a little tricky given that we are storing the frames in a struct). When the user calls _getframe we actually go ahead and create a linked list of TracebackFrame objects on-demand. _getframe is now unavailable entirely unless one of these command line options is passed ? this means the namedtuple usage of getframe no longer breaks us. We also get tons of new attributes on our traceback frame objects. A number of tests are also updated to use ?X:Frames when running because they require sys._getframe to be available. Also fixing CallTarget0 and friends so that Michael?s book will not be broken. This is just removing PythonFunction from them, killing all of them except for CallTarget0, and switching over to using Func<> for all Python call targets. (Shelveset: AddFrameSupportFinal;REDMOND\dinov | SNAP CheckinId: m9101) -------------------------------------------------------------------------------- Changeset Id: 870839 Date: 5/13/2009 3:51:19 PM (dfugate) * CP21976 (test_pyc.ps1) - fully enabled regression * CP22259 (test_buffer.py) - extended regression. Not fixed * test_builtinfunc.py (test_zip) - extended regression * CP22017 (test_cStringIO.py) - moved regression to its own test case * test_file.py (test_write_buffer) - cleaned up * test_tuple.py (test_compare_to_none) - extended regression (Shelveset: CP59;REDMOND\dfugate | SNAP CheckinId: 8354) From dinov at microsoft.com Thu May 14 18:34:19 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 14 May 2009 09:34:19 -0700 Subject: [IronPython] Sympl Language Sample and Walkthrough Document In-Reply-To: <8DD7BECAEB597D4782F7C9CEFDCA6B92AC11B8C35B@NA-EXMSG-C125.redmond.corp.microsoft.com> References: <8DD7BECAEB597D4782F7C9CEFDCA6B92AC11B8C35B@NA-EXMSG-C125.redmond.corp.microsoft.com> Message-ID: <350E7D38B6D819428718949920EC23555729E15D87@NA-EXMSG-C102.redmond.corp.microsoft.com> One of the really cool things about Sympl that I think is worth emphasizing is the version that's implemented in IronPython. Not only is it the 1st language I know if implemented in IronPython but it's able to do cool stuff like create IDynamicMetaObjectProvider implementation from Pythons objects which are already dynamic objects! Now we just need to get some interested in writing IpyIpy :) From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill Chiles Sent: Wednesday, May 13, 2009 5:00 PM To: dlr at discussions.codeplex.com Cc: users at lists.ironpython.com Subject: [IronPython] Sympl Language Sample and Walkthrough Document There's a new DLR sample to which I wanted to draw folks' attentions. There is a small language implementation sample, implemented in both IronPython and C#, with an accompanying walkthrough document. The code is now on the DLR Codeplex site under ...\Languages\Sympl, and the document is on the "Documents and Specs" page which you can get to from the list of links on the home page. Under the Sympl directory is also an examples directory with some code written in Sympl, which all runs when you execute Main in program.cs. The code and document will be in zip files we will produce to go along with the VS Beta1 release coming soon. Sympl demonstrates how to implement a very simple language using the Dynamic Language Runtime (DLR) as it ships in .NET 4.0. The goal is to make you aware of how to get started building a language on the DLR. Sympl does not show production quality rich .NET interoperability and binding logic. It does walk you through the following: * Using DLR Expression Trees (which include LINQ Expression Trees v1) for code generation * Using DLR dynamic dispatch caching * Building runtime binders * Building dynamic objects and dynamic meta-objects * Supporting dynamic language/object interoperability * Very simple hosting with application supplied global objects * Basic arithmetic and comparison operators with fast DLR dispatch caching * Control flow * Name binding within Sympl * Method and top-level function invocation with fast DLR dispatch caching * Very simple .NET interoperability for runtime method and operation binding * Using the DLR's built-in COM binding * Closures * Assignment with various left-hand-side expressions Sympl does not yet demonstrate using any Codeplex-only DLR code such as the DefaultBinder, the faster and nicer .NET reflection trackers (Sympl's is painfully slow and simple), or the common DLR hosting (yet). A few caveats on the documentation. First, the walk through document still needs some polishing, but I wanted to get it out to people. Feel free to send me comments or ask questions. Second, the document refers to a couple of other documents on our Codeplex site, but we haven't updated some of them since DEC 08. Those will be updated in the next couple of weeks. I think the sympl.doc walkthrough is very readable on its own and has all the relevant code snippets included in it as well. Lastly, while the example is overall reasonably simple, it does demonstrate all the basic concepts of building a language on the DLR with explanations, and therefore, is quite long. However, the document unfolds in the same way the Sympl language implementation evolved, so it progresses well for incrementally increasing your awareness of how to build a language on the DLR. Hope you enjoy and find this code and doc helpful! Cheers, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu May 14 19:44:09 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 14 May 2009 10:44:09 -0700 Subject: [IronPython] Execfile in IronPython 2.0 slower then 1.1 In-Reply-To: References: Message-ID: <350E7D38B6D819428718949920EC23555729E15DE5@NA-EXMSG-C102.redmond.corp.microsoft.com> I believe there's a code gen issue here w/ the DLR. In 1.x we generate 3 local variables in the gigantic method that this ends up generating. In 2.0 we generate a bigger method but more importantly we're generating 10002 local variables which causes the JIT to spend a long time analyzing those locals (nearly 60% of the time is spent in one function in the JIT doing variable analysis while over 80% of the time is spent JITing). In the 2.6 branch this issue is already mitigated because we will no longer compile modules (unless they're pre-compiled of course) - we now interpret them instead. That makes a lot more sense for top level code which only executes once but you'd still hit this problem if you put it into a method and then executed that method several times. But I'll report this issue to the DLR team as they should be able to share locals instead of creating new ones over and over again. Thanks for bringing this up it's a nice scenario we're handling quite poorly. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Cenovsky, Lukas > Sent: Thursday, May 14, 2009 2:36 AM > To: users at lists.ironpython.com > Subject: [IronPython] Execfile in IronPython 2.0 slower then 1.1 > > I was playing yesterday with something and found that execfile is about > 10 times slower in Ironpython 2.0 then in 1.1. > Does anyone have an idea why? > > Here is the snippet: > > from time import time > f = open('test.txt', 'w') > f.write('res = []\n') > f.write("res.append({'1': 'one', '2': 'two'})\n"*10000) > f.close() > t = time() > execfile('test.txt') > print 'Execfile took:', time() - t > > Ironpython 1.1: > Execfile took: 5.37503814697 > > Ironpython 2.0: > Execfile took: 50.3440628052 > > PS: I know the example is stupid - I'm just wondering why such > difference? > > -- > -- Lukas > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From andrew.canit at gmail.com Fri May 15 00:19:03 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Thu, 14 May 2009 15:19:03 -0700 Subject: [IronPython] Doing Simple Math In Silverlight Message-ID: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> Hello I am trying to perform some math operations in Silverlight inputNum1 and inputNum2 are of TextBox inputNum1 = TextBox() inputNum2 = TextBox() result0 = int(inputNum1) + int(inputNum2) res0.Text = str(result0) I get the following error TypeError: expected int, got TextBox Any ideas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri May 15 00:20:24 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 14 May 2009 15:20:24 -0700 Subject: [IronPython] Doing Simple Math In Silverlight In-Reply-To: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> References: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> Message-ID: <350E7D38B6D819428718949920EC23555729E15EF5@NA-EXMSG-C102.redmond.corp.microsoft.com> I think you want something like: result0 = int(inputNum1.Text) + int(inputNum2.Text) From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Thursday, May 14, 2009 3:19 PM To: Discussion of IronPython Subject: [IronPython] Doing Simple Math In Silverlight Hello I am trying to perform some math operations in Silverlight inputNum1 and inputNum2 are of TextBox inputNum1 = TextBox() inputNum2 = TextBox() result0 = int(inputNum1) + int(inputNum2) res0.Text = str(result0) I get the following error TypeError: expected int, got TextBox Any ideas -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri May 15 00:21:55 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 14 May 2009 23:21:55 +0100 Subject: [IronPython] Doing Simple Math In Silverlight In-Reply-To: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> References: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> Message-ID: <4A0C9983.7040107@voidspace.org.uk> Andrew Evans wrote: > Hello > > I am trying to perform some math operations in Silverlight > > inputNum1 and inputNum2 are of TextBox > > inputNum1 = TextBox() > inputNum2 = TextBox() > > result0 = int(inputNum1) + int(inputNum2) That's because you can't cast text boxes to integers! You need something like: result0 = int(inputNum1.Text) + int(inputNum2.Text) You'll probably want to strip whitespace and also handle the error case where what the user has entered is not a valid integer. HTH Michael > res0.Text = str(result0) > > I get the following error > > > TypeError: expected int, got TextBox > > Any ideas > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From andrew.canit at gmail.com Fri May 15 00:34:04 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Thu, 14 May 2009 15:34:04 -0700 Subject: [IronPython] Doing Simple Math In Silverlight In-Reply-To: <4A0C9983.7040107@voidspace.org.uk> References: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> <4A0C9983.7040107@voidspace.org.uk> Message-ID: <321b88ab0905141534v1781359ard688ead3a0901b02@mail.gmail.com> Hey guys thank you and thanks Michael will look into whitespace and error handling :-) just wanted it to work :-P On Thu, May 14, 2009 at 3:21 PM, Michael Foord wrote: > Andrew Evans wrote: > >> Hello >> >> I am trying to perform some math operations in Silverlight >> >> inputNum1 and inputNum2 are of TextBox >> >> inputNum1 = TextBox() >> inputNum2 = TextBox() >> >> result0 = int(inputNum1) + int(inputNum2) >> > That's because you can't cast text boxes to integers! > > You need something like: > > result0 = int(inputNum1.Text) + int(inputNum2.Text) > > You'll probably want to strip whitespace and also handle the error case > where what the user has entered is not a valid integer. > > HTH > > Michael > >> res0.Text = str(result0) >> >> I get the following error >> >> TypeError: expected int, >> got TextBox >> >> Any ideas >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > 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 andrew.canit at gmail.com Fri May 15 00:58:42 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Thu, 14 May 2009 15:58:42 -0700 Subject: [IronPython] Doing Simple Math In Silverlight In-Reply-To: <321b88ab0905141534v1781359ard688ead3a0901b02@mail.gmail.com> References: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> <4A0C9983.7040107@voidspace.org.uk> <321b88ab0905141534v1781359ard688ead3a0901b02@mail.gmail.com> Message-ID: <321b88ab0905141558w5950b7bdyc9d99e9ad9372f7e@mail.gmail.com> Just a quick question also is it possible to connect to a mysql database through silverlight and Iron Python And if so anyone have an example *cheers On Thu, May 14, 2009 at 3:34 PM, Andrew Evans wrote: > Hey guys thank you > > and thanks Michael will look into whitespace and error handling :-) > > just wanted it to work :-P > > > > > On Thu, May 14, 2009 at 3:21 PM, Michael Foord wrote: > >> Andrew Evans wrote: >> >>> Hello >>> >>> I am trying to perform some math operations in Silverlight >>> >>> inputNum1 and inputNum2 are of TextBox >>> >>> inputNum1 = TextBox() >>> inputNum2 = TextBox() >>> >>> result0 = int(inputNum1) + int(inputNum2) >>> >> That's because you can't cast text boxes to integers! >> >> You need something like: >> >> result0 = int(inputNum1.Text) + int(inputNum2.Text) >> >> You'll probably want to strip whitespace and also handle the error case >> where what the user has entered is not a valid integer. >> >> HTH >> >> Michael >> >>> res0.Text = str(result0) >>> >>> I get the following error >>> >>> TypeError: expected int, >>> got TextBox >>> >>> Any ideas >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> 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 Jimmy.Schementi at microsoft.com Fri May 15 01:01:06 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 14 May 2009 23:01:06 +0000 Subject: [IronPython] Doing Simple Math In Silverlight In-Reply-To: <321b88ab0905141558w5950b7bdyc9d99e9ad9372f7e@mail.gmail.com> References: <321b88ab0905141519t1741a000hf198190a1a31a0ce@mail.gmail.com> <4A0C9983.7040107@voidspace.org.uk> <321b88ab0905141534v1781359ard688ead3a0901b02@mail.gmail.com> <321b88ab0905141558w5950b7bdyc9d99e9ad9372f7e@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC06F6C3A1@tk5ex14mbxc105.redmond.corp.microsoft.com> Not directly, you can use Silverlight to connect to a web service which uses a database. db40 got my attention a while ago for somehow hearing that it worked in SL, and stores everything in IsolatedStorage, but I never investigated it. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans Sent: Thursday, May 14, 2009 3:59 PM To: Discussion of IronPython Subject: Re: [IronPython] Doing Simple Math In Silverlight Just a quick question also is it possible to connect to a mysql database through silverlight and Iron Python And if so anyone have an example *cheers On Thu, May 14, 2009 at 3:34 PM, Andrew Evans > wrote: Hey guys thank you and thanks Michael will look into whitespace and error handling :-) just wanted it to work :-P On Thu, May 14, 2009 at 3:21 PM, Michael Foord > wrote: Andrew Evans wrote: Hello I am trying to perform some math operations in Silverlight inputNum1 and inputNum2 are of TextBox inputNum1 = TextBox() inputNum2 = TextBox() result0 = int(inputNum1) + int(inputNum2) That's because you can't cast text boxes to integers! You need something like: result0 = int(inputNum1.Text) + int(inputNum2.Text) You'll probably want to strip whitespace and also handle the error case where what the user has entered is not a valid integer. HTH Michael res0.Text = str(result0) I get the following error TypeError: expected int, got TextBox Any ideas ------------------------------------------------------------------------ _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ 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 vkhaskel at hotmail.com Fri May 15 01:13:47 2009 From: vkhaskel at hotmail.com (Vadim Khaskel) Date: Thu, 14 May 2009 23:13:47 +0000 Subject: [IronPython] adding image to simple GUI Message-ID: It should take a second or two, but I see this message: Value cannot be null. Parameter name docData it happens when I select BackgroundImage control for any gui component in IronPython Visual Studio. What do I do wrong? thanks for help, V. _________________________________________________________________ Hotmail? goes with you. http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.canit at gmail.com Fri May 15 01:30:05 2009 From: andrew.canit at gmail.com (Andrew Evans) Date: Thu, 14 May 2009 16:30:05 -0700 Subject: [IronPython] Add Image to Button Silverlight Message-ID: <321b88ab0905141630l69ea53b5wc46a33ef89416cfc@mail.gmail.com> Hi I am wondering how I can add an image to my button with out using a xaml File also before I go further I notice there are two different ways for doing things using xaml files and Loading them or using pure Python which one would you recommend *cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri May 15 19:44:50 2009 From: dinov at microsoft.com (dinov at microsoft.com) Date: Fri, 15 May 2009 10:44:50 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/50535. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/NativeFunctions.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/PointerType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtr.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Field.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtrType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Array.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/INativeType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Pointer.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CData.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/ArrayType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/MemoryHolder.cs $/IronPython/IronPython_Main/Readme.html $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/UnionType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleCData.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/ModuleOps.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes_test.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/StructType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/array.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/binascii.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Bytes.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 870956 Date: 5/13/2009 4:39:31 PM (dinov) Adds sys._getframe support, updates our version numbers for the upcoming beta release, and adds a ?X:Python30 flag for features which should be like Python 3k (currently just bytes indexing). _getframe support is implemented as 2 command line options. The first ?X:Frames enables light-weight frames which can be used to walk the stack. The 2nd, -X:FullFrames, enables frames w/ locals also available and therefore has a much higher performance cost. The frames tracking logic it?s self gets inserted into the generated function bodies. We maintain a thread local object which tracks the frames inside a List where FunctionStack is a struct. This means the usual case of pushing a new frame will run allocation free once a thread has reached it?s normal maximum operating depth. Long term we can combine frames w/ recursion enforcement but this change does not do that. Frames get added to functions, classes, and modules. For classes and modules we currently don?t have a code object associated with the frame ? just the locals/globals. We also don?t currently track the line number in the frame (it?s a little tricky given that we are storing the frames in a struct). When the user calls _getframe we actually go ahead and create a linked list of TracebackFrame objects on-demand. _getframe is now unavailable entirely unless one of these command line options is passed ? this means the namedtuple usage of getframe no longer breaks us. We also get tons of new attributes on our traceback frame objects. A number of tests are also updated to use ?X:Frames when running because they require sys._getframe to be available. Also fixing CallTarget0 and friends so that Michael?s book will not be broken. This is just removing PythonFunction from them, killing all of them except for CallTarget0, and switching over to using Func<> for all Python call targets. (Shelveset: AddFrameSupportFinal;REDMOND\dinov | SNAP CheckinId: m9101) -------------------------------------------------------------------------------- Changeset Id: 870839 Date: 5/13/2009 3:51:19 PM (dfugate) * CP21976 (test_pyc.ps1) - fully enabled regression * CP22259 (test_buffer.py) - extended regression. Not fixed * test_builtinfunc.py (test_zip) - extended regression * CP22017 (test_cStringIO.py) - moved regression to its own test case * test_file.py (test_write_buffer) - cleaned up * test_tuple.py (test_compare_to_none) - extended regression (Shelveset: CP59;REDMOND\dfugate | SNAP CheckinId: 8354) -------------------------------------------------------------------------------- Changeset Id: 869226 Date: 5/12/2009 7:10:04 PM (dfugate) * CP19675 (regressions.py) - extended regression * test_cliclass.py - extended a regression * test_doc.py - small refactoring and added a regression for CP21360 * test_methoddispatch.py - improved test_security_crypto a bit * CP20956 (test_namebinding.py) - extended regression. Not fixed * test_set.py: - moved 'isPython25' definition to iptest.test_env - improved test_equality * test_str.py - improved test_subclass_ctor (Shelveset: CP58;REDMOND\dfugate | SNAP CheckinId: 8328) -------------------------------------------------------------------------------- Changeset Id: 869126 Date: 5/12/2009 6:04:15 PM (dinov) This fixes an import bug reported by Harry related to pygments ? when we do an import we currently resolve the module and then return it. We?re supposed to go back into sys.modules and lookup the module again. This enables a module to publish a new object back into sys.modules under the modules name and have that object returned from the import machinery. This change is the change in the importer where we?re tracking ?finalName? and the final import look which used to be ?now import the b.c? and is now ?now import the a.b.c?. Also adding support for __package__ (PEP 366 http://www.python.org/dev/peps/pep-0366/, codeplex work item #19541 - 2.6: add __package__ attribute to modules). This is automatically set when an explicit relative import happens and it is consulted when doing any form of a relative import. It also gets set via imp.new_module and on built-in modules. Tests in test_import are fixed as is CodePlex bug #21912 (Relative imports from functions should throw ValueError, not SyntaxError). Test_import fixes include detecting recursive reload and ?from .x import *? is now legal. We also now match the exception CPython reports when trying to import a filename ? this fixes 2.6 work item 19586 (2.6: __import__ shouldn't allow filenames). To pass a reasonable amount of the test_import bugs I had to made some tweaks to _warnings. First formatwarning/showwarning aren?t part of the C module so I?ve made these internal. We still have an implementation of these simply for when we?re running w/o CPython?s warnings.py. Today this still occurs w/ our test_warnings.py test. Then I?ve changed it to look up showwarnings in the actual warnings module. Finally I needed to make PerformModuleReload only create it?s state once ? Cpython?s test_warnings imports this multiple times and gets the same filters list. Also renaming ReflectedPackageOps -> NamespaceTrackerOps. (Shelveset: FixImportAndAddPackageFinal;REDMOND\dinov | SNAP CheckinId: 8326) -------------------------------------------------------------------------------- Changeset Id: 867352 Date: 5/11/2009 8:10:04 PM (dinov) DLR outer layer (just making a couple of helpers more accessible) & IronPython Implements instance binding for common instance members which we can easily support pre-compiled rules for: This EXCLUDES com objects and IDOs and any strongly typed literals other than List/string (we hit list and string during startup), types w/ GetBoundMember/GetCustomMember dynamic lookups It includes methods, events, properties (using reflected caller). Fields are always compiled still. The biggest win is obviously methods in that for say ?l = []; l.append? we no longer need to generate code. Also fixes Seo?s problem w/ interactive code vs. statements and Jeff?s problem w/ >= 14 arguments all w/ defaults. (Shelveset: FastInstanceBindingFinal2;REDMOND\dinov | SNAP CheckinId: 8310) -------------------------------------------------------------------------------- Changeset Id: 867020 Date: 5/11/2009 4:49:17 PM (dfugate) * Dev10 409920 (test_namebinding.py) - non-repro with today's bits * Dev10 148342 (test_sys.py) - partially fixed. Still missing sys.__excepthook__ * iptest.assert_util - preserve_syspath was misspelled * renamed Modes.ps1 to ConsoleFlags.ps1 and enhanced the "ipy.exe -h" test * test_dict.py - added verification for test_dict_inherit * CodePlex 20251 (test_doc.py) - added a regression test. Fixed * test_math.py - added test_log_neg * test_namebinding.py - enabled a block of code under -X:Interpret mode * interop.com.apps.word - minor refactoring plus a regression test for test_word_basic * moved/renamed test_mode_20.GenericTest (Shelveset: CP57;REDMOND\dfugate | SNAP CheckinId: 8309) From dinov at microsoft.com Fri May 15 19:50:41 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 15 May 2009 17:50:41 +0000 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: References: Message-ID: <1A472770E042064698CB5ADC83A12ACD072CE0@TK5EX14MBXC120.redmond.corp.microsoft.com> This should probably look more like the CTypes changes below but because I just ran the push script on a machine it doesn't usually run on there's a bunch of extra noise. Fixes a bunch of issues w/ ctypes and makes a module that?s available by default. We now pass 318 out of 366 tests (86%). Also fixing __debug__ from being wrong as reported by Curt. CTypes test changes: As we drive towards ctypes being passing all tests I?ve started updating tests that we are unlikely to ever pass. These are the get ref count tests, tests that depend on Python26.dll, and I?ve also changed tests to be like their 3.0 versions when bytes/Unicode differences are hitting us. CTypes changes: Add support for marshaling Bytes objects Fix calling convention on cast/string_at functions/memmove/memset Fix pointer casting LoadLibrary should throw if it fails Implement more top-level ctypes functions (call_function, call_cdeclfunction, check_hresult, resize, make sizeof work w/ resize) Implement keepRefs support ? SetValue now returns a value if the object should be kept alive, array, Field, and other assigners save the value in the MemoryHolder dictionary Implement from_buffer/from_buffer_copy on various types Add IPythonBufferable interface so buffers can be created from cdata objects Add arg # checks on functions, add support for validating the return values in all the ways ctypes supports Fix getting values of arrays and function pointers ? we need to return CType instances Support negative slices on pointers Add anonymous field support Array module: Implement array.buffer_info(). Needed to switch over to managing the array data ourselves instead of using a List. Then when anyone requests the address of the buffer we simply pin it and use a GC handle to get it?s address until the ArrayData gets collected. Binascii: implemented hexlify for bytes -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of dinov at microsoft.com Sent: Friday, May 15, 2009 10:45 AM To: users at lists.ironpython.com Subject: [IronPython] IronPython 2.6 CodePlex Source Update This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/50535. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/NativeFunctions.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/PointerType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtr.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Field.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtrType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Array.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/INativeType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Pointer.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CData.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/ArrayType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/MemoryHolder.cs $/IronPython/IronPython_Main/Readme.html $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/UnionType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleCData.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/ModuleOps.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes_test.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/StructType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/array.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/binascii.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Bytes.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 870956 Date: 5/13/2009 4:39:31 PM (dinov) Adds sys._getframe support, updates our version numbers for the upcoming beta release, and adds a ?X:Python30 flag for features which should be like Python 3k (currently just bytes indexing). _getframe support is implemented as 2 command line options. The first ?X:Frames enables light-weight frames which can be used to walk the stack. The 2nd, -X:FullFrames, enables frames w/ locals also available and therefore has a much higher performance cost. The frames tracking logic it?s self gets inserted into the generated function bodies. We maintain a thread local object which tracks the frames inside a List where FunctionStack is a struct. This means the usual case of pushing a new frame will run allocation free once a thread has reached it?s normal maximum operating depth. Long term we can combine frames w/ recursion enforcement but this change does not do that. Frames get added to functions, classes, and modules. For classes and modules we currently don?t have a code object associated with the frame ? just the locals/globals. We also don?t currently track the line number in the frame (it?s a little tricky given that we are storing the frames in a struct). When the user calls _getframe we actually go ahead and create a linked list of TracebackFrame objects on-demand. _getframe is now unavailable entirely unless one of these command line options is passed ? this means the namedtuple usage of getframe no longer breaks us. We also get tons of new attributes on our traceback frame objects. A number of tests are also updated to use ?X:Frames when running because they require sys._getframe to be available. Also fixing CallTarget0 and friends so that Michael?s book will not be broken. This is just removing PythonFunction from them, killing all of them except for CallTarget0, and switching over to using Func<> for all Python call targets. (Shelveset: AddFrameSupportFinal;REDMOND\dinov | SNAP CheckinId: m9101) -------------------------------------------------------------------------------- Changeset Id: 870839 Date: 5/13/2009 3:51:19 PM (dfugate) * CP21976 (test_pyc.ps1) - fully enabled regression * CP22259 (test_buffer.py) - extended regression. Not fixed * test_builtinfunc.py (test_zip) - extended regression * CP22017 (test_cStringIO.py) - moved regression to its own test case * test_file.py (test_write_buffer) - cleaned up * test_tuple.py (test_compare_to_none) - extended regression (Shelveset: CP59;REDMOND\dfugate | SNAP CheckinId: 8354) -------------------------------------------------------------------------------- Changeset Id: 869226 Date: 5/12/2009 7:10:04 PM (dfugate) * CP19675 (regressions.py) - extended regression * test_cliclass.py - extended a regression * test_doc.py - small refactoring and added a regression for CP21360 * test_methoddispatch.py - improved test_security_crypto a bit * CP20956 (test_namebinding.py) - extended regression. Not fixed * test_set.py: - moved 'isPython25' definition to iptest.test_env - improved test_equality * test_str.py - improved test_subclass_ctor (Shelveset: CP58;REDMOND\dfugate | SNAP CheckinId: 8328) -------------------------------------------------------------------------------- Changeset Id: 869126 Date: 5/12/2009 6:04:15 PM (dinov) This fixes an import bug reported by Harry related to pygments ? when we do an import we currently resolve the module and then return it. We?re supposed to go back into sys.modules and lookup the module again. This enables a module to publish a new object back into sys.modules under the modules name and have that object returned from the import machinery. This change is the change in the importer where we?re tracking ?finalName? and the final import look which used to be ?now import the b.c? and is now ?now import the a.b.c?. Also adding support for __package__ (PEP 366 http://www.python.org/dev/peps/pep-0366/, codeplex work item #19541 - 2.6: add __package__ attribute to modules). This is automatically set when an explicit relative import happens and it is consulted when doing any form of a relative import. It also gets set via imp.new_module and on built-in modules. Tests in test_import are fixed as is CodePlex bug #21912 (Relative imports from functions should throw ValueError, not SyntaxError). Test_import fixes include detecting recursive reload and ?from .x import *? is now legal. We also now match the exception CPython reports when trying to import a filename ? this fixes 2.6 work item 19586 (2.6: __import__ shouldn't allow filenames). To pass a reasonable amount of the test_import bugs I had to made some tweaks to _warnings. First formatwarning/showwarning aren?t part of the C module so I?ve made these internal. We still have an implementation of these simply for when we?re running w/o CPython?s warnings.py. Today this still occurs w/ our test_warnings.py test. Then I?ve changed it to look up showwarnings in the actual warnings module. Finally I needed to make PerformModuleReload only create it?s state once ? Cpython?s test_warnings imports this multiple times and gets the same filters list. Also renaming ReflectedPackageOps -> NamespaceTrackerOps. (Shelveset: FixImportAndAddPackageFinal;REDMOND\dinov | SNAP CheckinId: 8326) -------------------------------------------------------------------------------- Changeset Id: 867352 Date: 5/11/2009 8:10:04 PM (dinov) DLR outer layer (just making a couple of helpers more accessible) & IronPython Implements instance binding for common instance members which we can easily support pre-compiled rules for: This EXCLUDES com objects and IDOs and any strongly typed literals other than List/string (we hit list and string during startup), types w/ GetBoundMember/GetCustomMember dynamic lookups It includes methods, events, properties (using reflected caller). Fields are always compiled still. The biggest win is obviously methods in that for say ?l = []; l.append? we no longer need to generate code. Also fixes Seo?s problem w/ interactive code vs. statements and Jeff?s problem w/ >= 14 arguments all w/ defaults. (Shelveset: FastInstanceBindingFinal2;REDMOND\dinov | SNAP CheckinId: 8310) -------------------------------------------------------------------------------- Changeset Id: 867020 Date: 5/11/2009 4:49:17 PM (dfugate) * Dev10 409920 (test_namebinding.py) - non-repro with today's bits * Dev10 148342 (test_sys.py) - partially fixed. Still missing sys.__excepthook__ * iptest.assert_util - preserve_syspath was misspelled * renamed Modes.ps1 to ConsoleFlags.ps1 and enhanced the "ipy.exe -h" test * test_dict.py - added verification for test_dict_inherit * CodePlex 20251 (test_doc.py) - added a regression test. Fixed * test_math.py - added test_log_neg * test_namebinding.py - enabled a block of code under -X:Interpret mode * interop.com.apps.word - minor refactoring plus a regression test for test_word_basic * moved/renamed test_mode_20.GenericTest (Shelveset: CP57;REDMOND\dfugate | SNAP CheckinId: 8309) _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Jimmy.Schementi at microsoft.com Fri May 15 20:04:59 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 15 May 2009 18:04:59 +0000 Subject: [IronPython] Silverlight Application Hosting IronPython In-Reply-To: <4A095760.9040905@voidspace.org.uk> References: <4A056960.1040209@voidspace.org.uk> <4A095760.9040905@voidspace.org.uk> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC06F72D89@tk5ex14mbxc105.redmond.corp.microsoft.com> > > On Sat, May 9, 2009 at 4:30 AM, Michael Foord > > > > wrote: > > > > Hello guys, > > > > I'm having problems with a C# Silverlight application that hosts > > IronPython. > > > > First of all, this page > > http://sdlsdk.codeplex.com/Wiki/View.aspx?title=Hosting implies > > that the following code should load assemblies for the hosted > > IronPython code: > > > > foreach (string name in new string[] { "mscorlib", > > "System", "System.Windows", "System.Windows.Browser", > "System.Net" }) > > { > > runtime.Host.PlatformAdaptationLayer.LoadAssembly(name); > > } > > > > It doesn't - an import from System.Windows fails. The following > > code works as in a normal hosted environment: > > > > runtime.LoadAssembly(typeof(String).Assembly); > > runtime.LoadAssembly(typeof(Uri).Assembly); > > runtime.LoadAssembly(typeof(Canvas).Assembly); The documentation is wrong; always trust what the code in Microsoft.Scripting.Silverlight.DynamicApplication does the equivalent of: foreach (string name in new string[] { "mscorlib", "System", "System.Windows", "System.Windows.Browser", "System.Net" }) { runtime.LoadAssembly(runtime.Host.PlatformAdaptationLayer.LoadAssembly(name)); } The PAL.LoadAssembly is able to find assemblies in the XAP or platform and loads them, but you always need to call runtime.LoadAssembly to have it loaded on the runtime. FYI, "Hosted" IronPython code is pretty much the same as "non-hosted" ... just that the "non-hosted" scenario does the hosting for you (with the DynamicApplication type). So as long as you're mimicking how DynamicApplication does things, you should be fine. > > Secondly, which is much worse but may be related, imports from > > Python files inside the xap fail when IronPython is hosted. I am > > using the following code: > > > > ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); > > setup.HostType = > > typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); > > ScriptRuntime runtime = new ScriptRuntime(setup); > > ScriptEngine pe = Python.GetEngine(runtime); > > ScriptScope scope = pe.CreateScope(); > > ScriptSource source = > > pe.CreateScriptSourceFromString(python_source, > > SourceCodeKind.Statements); > > source.Execute(scope); > > > > How do I setup the platform adaptation layer so that it can import > > from inside the xap? Again, doing exactly what DynamicApplication does is key =) I believe you need to set the SearchPaths option so it knows where to look for source files. In Silverlight, "" is the root of the XAP file, so this should do the trick: setup.Options["SearchPaths"] = new string[] { String.Empty }; > > All the best, > > > > > > Michael Let me know if this doesn't work for you, and I can send you an app that does. =) From killarny at gmail.com Fri May 15 23:39:58 2009 From: killarny at gmail.com (Luke Graybill) Date: Fri, 15 May 2009 15:39:58 -0600 Subject: [IronPython] can anyone help me with COM access in ironpython? Message-ID: <83c6838b0905151439p73eb1606k441b0f5f2034e5e7@mail.gmail.com> I've got a working example using the pywin32 extensions, which I am trying to duplicate in IronPython, but I'm encountering quite a number of strange situations. I can't seem to find any real documentation for IronPython, either, so I figure this list is my last place to go before I ditch IronPython and just use pywin32 instead. Anyway, here is the pywin32 code: http://dpaste.org/aZpE/ The crucial part there is where the COM object (QBXMLRP2.RequestProcessor) is used. IronPython does seem to allow me to use the same object for some reason, forcing me to select a different one, as you'll see here: http://dpaste.org/rIzF/ What am I missing here? Specifically, 1) Why does the exact same COM object function differently (and ultimately fail) when used through IronPython? 2) Why are different methods exposed on the COM object through IronPython's clr module, than when the COM object is used through pywin32's client dispatch? 3) Why do I need to refer the the COM object as Interop.QBXMLRP2 in IronPython, but simply as QBXMLRP2 in pywin32? I'm missing something fundamental here, please enlighten me! :) Thanks! -- Visit me @ http://killarny.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Sat May 16 01:34:50 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 15 May 2009 23:34:50 +0000 Subject: [IronPython] can anyone help me with COM access in ironpython? In-Reply-To: <83c6838b0905151439p73eb1606k441b0f5f2034e5e7@mail.gmail.com> References: <83c6838b0905151439p73eb1606k441b0f5f2034e5e7@mail.gmail.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0749E4@TK5EX14MBXC120.redmond.corp.microsoft.com> [note my knowledge of this area is fuzzy at best but this is my understanding. Maybe someone from the team can explain this better or give more accurate information if I get anything wrong]. The reason why these are so different is to date IronPython has basically gotten it's COM interop support "for free" from one of two locations: 1) The CLR providing interop assemblies to talk to COM objects (in 1.x) 2) DLR IDispatch support in IronPython 2.0 In 2.0 there's a command line option which gives you a hybrid of these options: -X:PreferComInteropAssembly. Ok, so that gives us two different modes... In 1.x, or when you use this option, you generally get the normal .NET COM interop - so if you want documentation on it you can go and look at normal .NET COM interop docs. In mode 2 we're using the DLR which is directly talking to COM objects which implement IDispatch. This is like class VB or VBA COM interop. It's a little bit more limited in what it can do because the objects need to implement IDispatch. So again if you wanted documentation you'd generally look at how to use these objects from classic VB/VBA and just follow those instructions. Obviously we weren't very confident about the DLR IDispatch support when we shipped 2.0 which is the reason why we added the -X:PreferComInteropAssembly command line option. The DLR team has spent more time improving the COM interop support and validating that it's compatible w/ old VB/VBA semantics since then and we're more confident that it'll be quite usable for 2.6. But neither option is really designed to be code compatible w/ pywin32. This is something we could certainly push on in the future and I'd encourage you to open a bug on IronPython.CodePlex.com (and others to vote on it) if COM compat w/ CPython is important. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luke Graybill Sent: Friday, May 15, 2009 2:40 PM To: users at lists.ironpython.com Subject: [IronPython] can anyone help me with COM access in ironpython? I've got a working example using the pywin32 extensions, which I am trying to duplicate in IronPython, but I'm encountering quite a number of strange situations. I can't seem to find any real documentation for IronPython, either, so I figure this list is my last place to go before I ditch IronPython and just use pywin32 instead. Anyway, here is the pywin32 code: http://dpaste.org/aZpE/ The crucial part there is where the COM object (QBXMLRP2.RequestProcessor) is used. IronPython does seem to allow me to use the same object for some reason, forcing me to select a different one, as you'll see here: http://dpaste.org/rIzF/ What am I missing here? Specifically, 1) Why does the exact same COM object function differently (and ultimately fail) when used through IronPython? 2) Why are different methods exposed on the COM object through IronPython's clr module, than when the COM object is used through pywin32's client dispatch? 3) Why do I need to refer the the COM object as Interop.QBXMLRP2 in IronPython, but simply as QBXMLRP2 in pywin32? I'm missing something fundamental here, please enlighten me! :) Thanks! -- Visit me @ http://killarny.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Sat May 16 08:42:17 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 15 May 2009 23:42:17 -0700 Subject: [IronPython] can anyone help me with COM access in ironpython? In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0749E4@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <83c6838b0905151439p73eb1606k441b0f5f2034e5e7@mail.gmail.com> <1A472770E042064698CB5ADC83A12ACD0749E4@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1C3C2A86@NA-EXMSG-C104.redmond.corp.microsoft.com> Have you tried "import System" followed by System.Activator.CreateInstance(System.Type.GetTypeFromProgID("QBXMLRP2.RequestProcessor")? This should more closely resemble the behavior of the pywin32 code of win32com.client.Dispatch("QBXMLRP2.RequestProcessor"). See http://blogs.msdn.com/shrib/archive/2008/07/30/idispatch-support-on-in-ironpython-beta-4.aspx for some info. Thanks, Shri From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Friday, May 15, 2009 4:35 PM To: Discussion of IronPython Subject: Re: [IronPython] can anyone help me with COM access in ironpython? [note my knowledge of this area is fuzzy at best but this is my understanding. Maybe someone from the team can explain this better or give more accurate information if I get anything wrong]. The reason why these are so different is to date IronPython has basically gotten it's COM interop support "for free" from one of two locations: 1) The CLR providing interop assemblies to talk to COM objects (in 1.x) 2) DLR IDispatch support in IronPython 2.0 In 2.0 there's a command line option which gives you a hybrid of these options: -X:PreferComInteropAssembly. Ok, so that gives us two different modes... In 1.x, or when you use this option, you generally get the normal .NET COM interop - so if you want documentation on it you can go and look at normal .NET COM interop docs. In mode 2 we're using the DLR which is directly talking to COM objects which implement IDispatch. This is like class VB or VBA COM interop. It's a little bit more limited in what it can do because the objects need to implement IDispatch. So again if you wanted documentation you'd generally look at how to use these objects from classic VB/VBA and just follow those instructions. Obviously we weren't very confident about the DLR IDispatch support when we shipped 2.0 which is the reason why we added the -X:PreferComInteropAssembly command line option. The DLR team has spent more time improving the COM interop support and validating that it's compatible w/ old VB/VBA semantics since then and we're more confident that it'll be quite usable for 2.6. But neither option is really designed to be code compatible w/ pywin32. This is something we could certainly push on in the future and I'd encourage you to open a bug on IronPython.CodePlex.com (and others to vote on it) if COM compat w/ CPython is important. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luke Graybill Sent: Friday, May 15, 2009 2:40 PM To: users at lists.ironpython.com Subject: [IronPython] can anyone help me with COM access in ironpython? I've got a working example using the pywin32 extensions, which I am trying to duplicate in IronPython, but I'm encountering quite a number of strange situations. I can't seem to find any real documentation for IronPython, either, so I figure this list is my last place to go before I ditch IronPython and just use pywin32 instead. Anyway, here is the pywin32 code: http://dpaste.org/aZpE/ The crucial part there is where the COM object (QBXMLRP2.RequestProcessor) is used. IronPython does seem to allow me to use the same object for some reason, forcing me to select a different one, as you'll see here: http://dpaste.org/rIzF/ What am I missing here? Specifically, 1) Why does the exact same COM object function differently (and ultimately fail) when used through IronPython? 2) Why are different methods exposed on the COM object through IronPython's clr module, than when the COM object is used through pywin32's client dispatch? 3) Why do I need to refer the the COM object as Interop.QBXMLRP2 in IronPython, but simply as QBXMLRP2 in pywin32? I'm missing something fundamental here, please enlighten me! :) Thanks! -- Visit me @ http://killarny.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From rb2.net at gmail.com Sat May 16 23:45:16 2009 From: rb2.net at gmail.com (Rene Bourgoin) Date: Sat, 16 May 2009 17:45:16 -0400 Subject: [IronPython] deployment question from newbie Message-ID: <1e6b7e620905161445x79d822a3n9179b73bc3842ab6@mail.gmail.com> If i want to install an Ironpython app on multiple PCs do i have to install Ironpython on each pc or will the app run as long as the target PCs have .net installed??I know Jython has a way to package an app so java is the only requirement on the target computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Sun May 17 00:22:51 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sat, 16 May 2009 15:22:51 -0700 Subject: [IronPython] deployment question from newbie In-Reply-To: <1e6b7e620905161445x79d822a3n9179b73bc3842ab6@mail.gmail.com> References: <1e6b7e620905161445x79d822a3n9179b73bc3842ab6@mail.gmail.com> Message-ID: You do need the IronPython assemblies on each machine, but they can be xcopy-deployed and don't need any kind of official installation step. On Sat, May 16, 2009 at 2:45 PM, Rene Bourgoin wrote: > If i want to install an Ironpython app on multiple PCs do i have to install > Ironpython on each pc or will the app run as long as the target PCs have > .net installed??I know Jython has a way to package an app so java is the > only requirement on the target computer. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Sun May 17 00:40:45 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 16 May 2009 23:40:45 +0100 Subject: [IronPython] Autocomplete for .NET Types from IronPython with Wing IDE (update - better return type and parameter name handling) Message-ID: <4A0F40ED.20401@voidspace.org.uk> Hello all, Attached is an updated of the generate_pi.py script used to generate Python interface files for the Wing IDE. Since I last worked on it John (from Wingware) merged my changes back into their main script so this one is *not* specific to IronPython. On top of this I have added a couple of improvements: * Reflection is now used to get parameter names of methods * Return types are properly annotated with their namespaces, so Wing understands methods that return objects from different namespaces For details on how the reflection is done, I wrote it up on the IronPython cookbook: http://www.ironpython.info/index.php/Introspecting_.NET_Types_and_Methods_from_IronPython To run the script, create a new directory and add this to the 'Interface File Path' (File menu -> Preferences -> Source Analysis -> Advanced -> Insert). Then from the command line switch to this directory (if you are on Vista you will need to run cmd with admin privileges due to a defect explained below). Execute the command: ipy generate_pi_for_net.py --ironpython This generates the pi files. It doesn't work *as well* on 64 bit windows because the .NET XML help files (or whatever they are called) are in a different location so the docstrings are not always available. It currently generates pi files for the following assemblies and namespaces (and all contained namespaces): 'System', 'System.Data', 'System.Windows.Forms', 'System.Drawing', 'System.Xml', 'Microsoft', 'clr' These are hardcoded in lines 969-971 of the script. You can easily add new ones but eventually we'll enable this from command line arguments. Warning - it is slow! It takes about ten minutes or so and generates pi files for 105 namespaces taking up about 30mb. Using these doesn't result in a slowdown in Wing which is impressive. There are several limitations / caveats. Some of these can be fixed by improving the script and some by improving Wing! When you do "import System." you aren't offered a list of sub-namespaces to import from. pi files as packages doesn't yet work but will be implemented soon apparently. Methods called None are valid in IronPython (and common as enumeration fields) but are invalid syntax in Python / PI files. These are renamed to None_. The following member types are not recognised by the script and are set to None in the PI files. This means that some potentially useful information is lost but it isn't immediately obvious how best to represent this information for some of these member types: * field descriptors (enumerations) In .NET enumerations behave much more like instances than classes. The field descriptor docstrings are usually not helpful but I'm also sure that None is not helpful as a value. It should really be a property returning an instance of the enumeration. The enumaration fireld has an underlying value (accessed as .value__) but I don't think setting it to that would be useful. * events (very common and there may be multiple types of events) * indexers (Item) * attributes that are classes or enumerations. The docstrings can sometimes be useful. e.g. System.ActivationContext.ContextForm: >>> ActivationContext.__dict__['ContextForm'].__doc__ '\r\n\r\nenum ContextForm, values: Loose (0), StoreBounded (1)\r\n\r\n' Return type inferencing from properties would be very useful. (Feature request!!) :-) For .NET types with public constructors an __init__ method could be constructed from the type docstring. Currently they all show in the source assistant as *args. Properties are created with docstrings - but these docstrings aren't shown in the source assistant which is a limitation. :-( Cross namespace return types now work. They appear in the pi files as: import System.Drawing return System.Drawing.Point() Something similar will need to be done with base-classes. Many classes inherit from types in different namespaces - so in the PI file the class they inherit from will probably need to be imported (and preferably also excluded from completion). For most .NET methods the parameter names are determined using reflection. This doesn't work for some - particularly methods like ReferenceEquals, ToObject and so on. (Are these inherited methods? Needs investigating.) For these we fallback to __GetCallableSignature which doesn't get the argument names from .NET methods (not really a big deal). This is because they are of the form: int Add(self, CodeCatchClause value) __GetCallableSignature also fails to handle indexing in type signature for methods (use of square brackets) is interpreted as optional arguments. E.g.: System.ModuleHandle.ResolveFieldHandle(self, arg0, arg1=None, arg2=None) from: RuntimeFieldHandle ResolveFieldHandle(self, int fieldToken, Array[RuntimeTypeHandle] typeInstantiationContext, Array[RuntimeTypeHandle] methodInstantiationContext) I still intend to write this all up in a HOWTO... All the best, Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: generate_pi.py URL: From fuzzyman at voidspace.org.uk Sun May 17 13:40:53 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 17 May 2009 12:40:53 +0100 Subject: [IronPython] Silverlight Application Hosting IronPython In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC06F72D89@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <4A056960.1040209@voidspace.org.uk> <4A095760.9040905@voidspace.org.uk> <0047ECBFA2E0DF4A834AA369282A5AFC06F72D89@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <4A0FF7C5.9040604@voidspace.org.uk> Jimmy Schementi wrote: >>> On Sat, May 9, 2009 at 4:30 AM, Michael Foord >>> > >>> >> wrote: >> >>> Hello guys, >>> >>> I'm having problems with a C# Silverlight application that hosts >>> IronPython. >>> >>> First of all, this page >>> http://sdlsdk.codeplex.com/Wiki/View.aspx?title=Hosting implies >>> that the following code should load assemblies for the hosted >>> IronPython code: >>> >>> foreach (string name in new string[] { "mscorlib", >>> "System", "System.Windows", "System.Windows.Browser", >>> >> "System.Net" }) >> >>> { >>> runtime.Host.PlatformAdaptationLayer.LoadAssembly(name); >>> } >>> >>> It doesn't - an import from System.Windows fails. The following >>> code works as in a normal hosted environment: >>> >>> runtime.LoadAssembly(typeof(String).Assembly); >>> runtime.LoadAssembly(typeof(Uri).Assembly); >>> runtime.LoadAssembly(typeof(Canvas).Assembly); >>> > > The documentation is wrong; always trust what the code in Microsoft.Scripting.Silverlight.DynamicApplication does the equivalent of: > > foreach (string name in new string[] { "mscorlib", "System", "System.Windows", "System.Windows.Browser", "System.Net" }) { > runtime.LoadAssembly(runtime.Host.PlatformAdaptationLayer.LoadAssembly(name)); > } > > The PAL.LoadAssembly is able to find assemblies in the XAP or platform and loads them, but you always need to call runtime.LoadAssembly to have it loaded on the runtime. > Why not just do this: runtime.LoadAssembly(typeof(String).Assembly); runtime.LoadAssembly(typeof(Uri).Assembly); runtime.LoadAssembly(typeof(Canvas).Assembly); It works fine, so why use the PlatformAdaptationLayer? > FYI, "Hosted" IronPython code is pretty much the same as "non-hosted" ... just that the "non-hosted" scenario does the hosting for you (with the DynamicApplication type). So as long as you're mimicking how DynamicApplication does things, you should be fine. > I did try reading DynamicApplication, but it is much more general and so it is hard to follow the specific code path for the case when you are creating an IronPython application. I should probably have tried for longer before giving up... > >>> Secondly, which is much worse but may be related, imports from >>> Python files inside the xap fail when IronPython is hosted. I am >>> using the following code: >>> >>> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); >>> setup.HostType = >>> typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); >>> ScriptRuntime runtime = new ScriptRuntime(setup); >>> ScriptEngine pe = Python.GetEngine(runtime); >>> ScriptScope scope = pe.CreateScope(); >>> ScriptSource source = >>> pe.CreateScriptSourceFromString(python_source, >>> SourceCodeKind.Statements); >>> source.Execute(scope); >>> >>> How do I setup the platform adaptation layer so that it can import >>> from inside the xap? >>> > > Again, doing exactly what DynamicApplication does is key =) > > I believe you need to set the SearchPaths option so it knows where to look for source files. In Silverlight, "" is the root of the XAP file, so this should do the trick: > > setup.Options["SearchPaths"] = new string[] { String.Empty }; > This works. Thank you very much. :-) All the best, Michael Foord > >>> All the best, >>> >>> >>> Michael >>> > > Let me know if this doesn't work for you, and I can send you an app that does. =) > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Sun May 17 15:50:43 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 17 May 2009 14:50:43 +0100 Subject: [IronPython] HOWTO: Using the Wing Python IDE with IronPython Message-ID: <4A101633.1020108@voidspace.org.uk> Hello all, I've written up some notes on using the Wing Python IDE with IronPython. http://www.voidspace.org.uk/ironpython/wing-how-to.shtml It includes the details of setting up autocomplete for .NET types and using the scripting API to execute files with IronPython. All the best, Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Sun May 17 17:27:14 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 17 May 2009 16:27:14 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A0581F2.6010603@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> Message-ID: <4A102CD2.40108@voidspace.org.uk> Jimmy - did you get a chance to look at this? If the code shown below *genuinely* gets a reference to the current engine then shouldn't the search path be setup already? Can you see what is wrong with the code below? Thanks Michael Michael Foord wrote: > Hello guys, > > I have a second use case for embedding IronPython in Silverlight. This > is actually a dynamic application with a C# component that needs to > programattically build a Python module. > > Again I have the same problem - imports in Python code fail. I would > have expected that accessing the current runtime and fetching a Python > engine would fetch the current Python engine, with the browser host > correctly setup. Unfortunately that seems not to be the case. Can > anyone spot problems with the following code: > > > using Microsoft.Scripting.Silverlight; > using IronPython; > using IronPython.Hosting; > using Microsoft.Scripting; > using Microsoft.Scripting.Hosting; > > namespace EmbeddedSLModule > { > public class EmbeddedSLModule > { > private static string source = @" > import something > "; > public static ScriptScope GetModule(){ > ScriptRuntime runtime = DynamicApplication.Current.Runtime; > ScriptEngine engine = runtime.GetEngine("Python"); > ScriptScope scope = engine.CreateScope(); > ScriptSource script = > engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); > script.Execute(scope); > > return scope; > > } > } > } > > > It works fine for code that doesn't import anything - but imports from > within the xap file fail. > > Thanks > > Michael Foord > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From daftspaniel at gmail.com Sun May 17 19:40:51 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Sun, 17 May 2009 18:40:51 +0100 Subject: [IronPython] Autocomplete for .NET Types from IronPython with Wing IDE (update - better return type and parameter name handling) In-Reply-To: <4A0F40ED.20401@voidspace.org.uk> References: <4A0F40ED.20401@voidspace.org.uk> Message-ID: <20253b0c0905171040o3079fb4fn61bc3b05325288e2@mail.gmail.com> Thanks Michael - looks really good and useful as I have started to look into this for autocomplete in DIE. 30mb eh? That will be interesting :-) Cheers, Davy -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From fuzzyman at voidspace.org.uk Sun May 17 19:48:03 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 17 May 2009 18:48:03 +0100 Subject: [IronPython] Autocomplete for .NET Types from IronPython with Wing IDE (update - better return type and parameter name handling) In-Reply-To: <20253b0c0905171040o3079fb4fn61bc3b05325288e2@mail.gmail.com> References: <4A0F40ED.20401@voidspace.org.uk> <20253b0c0905171040o3079fb4fn61bc3b05325288e2@mail.gmail.com> Message-ID: <4A104DD3.5070807@voidspace.org.uk> Davy Mitchell wrote: > Thanks Michael - looks really good and useful as I have started to > look into this for autocomplete in DIE. > > 30mb eh? That will be interesting :-) > What the PI generator script in particular does is generate skeleton Python files representing the .NET APIs. If your autocomplete is capable of understanding Python code, then it will be able to use the same PI files (the generator script is open source). It's a pretty big task. I would look at using and contributing to something like PySmell. The really hard job (as opposed to the merely very hard) is being able to analyse 'broken' files with invalid Python syntax. Invariably when the user is in the *middle* of editing a file it is in a state where you can't parse it. You can tokenize it though and there are all sorts of tricks to get round this. This is where Wing does a good job. They haven't implemented the 'reverse duck typing' suggested by Orestis (PySmell creator) which would allow you to infer ambiguous types from the way they are used. Michael > Cheers, > Davy > > -- > Davy Stuff - http://daftspaniel.blogspot.com > Geeky Stuff - http://daftpython.blogspot.com > Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Mon May 18 17:39:09 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 18 May 2009 16:39:09 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A102CD2.40108@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> Message-ID: <4A11811D.7010406@voidspace.org.uk> Thanks to some help from William Reade, this code *seems* to work fine. I need to try it from Silverlight and check the Python code it contains is able to import: using System; using System.Collections.Generic; using System.Text; using IronPython.Hosting; using IronPython.Runtime; using IronPython.Runtime.Types; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using Microsoft.Scripting.Runtime; namespace ExecutePython { public class ExecutePython { static string code = @" class Foo(object): attribute = 'weeeee' "; public static Scope CreateModule(CodeContext context) { PythonContext python = PythonContext.GetContext(context); PythonDictionary globals = new PythonDictionary(); globals["__name__"] = "AModule"; Scope module = new Scope(globals); SourceUnit script = python.CreateSnippet(code, SourceCodeKind.Statements); script.Execute(module); return module; } } } All the best, Michael Michael Foord wrote: > Jimmy - did you get a chance to look at this? > > If the code shown below *genuinely* gets a reference to the current > engine then shouldn't the search path be setup already? > > Can you see what is wrong with the code below? > > Thanks > > Michael > > Michael Foord wrote: >> Hello guys, >> >> I have a second use case for embedding IronPython in Silverlight. >> This is actually a dynamic application with a C# component that needs >> to programattically build a Python module. >> >> Again I have the same problem - imports in Python code fail. I would >> have expected that accessing the current runtime and fetching a >> Python engine would fetch the current Python engine, with the browser >> host correctly setup. Unfortunately that seems not to be the case. >> Can anyone spot problems with the following code: >> >> >> using Microsoft.Scripting.Silverlight; >> using IronPython; >> using IronPython.Hosting; >> using Microsoft.Scripting; >> using Microsoft.Scripting.Hosting; >> >> namespace EmbeddedSLModule >> { >> public class EmbeddedSLModule >> { >> private static string source = @" >> import something >> "; >> public static ScriptScope GetModule(){ >> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >> ScriptEngine engine = runtime.GetEngine("Python"); >> ScriptScope scope = engine.CreateScope(); >> ScriptSource script = >> engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); >> script.Execute(scope); >> >> return scope; >> >> } >> } >> } >> >> >> It works fine for code that doesn't import anything - but imports >> from within the xap file fail. >> >> Thanks >> >> Michael Foord >> > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From merllab at microsoft.com Mon May 18 17:52:59 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Mon, 18 May 2009 08:52:59 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <61f1c633-2eee-4708-b564-9ee3a34fd2ba@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/50943. MODIFIED SOURCES $/IronPython/IronPython_Main/Readme.html $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs From fuzzyman at voidspace.org.uk Mon May 18 18:27:01 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 18 May 2009 17:27:01 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A11811D.7010406@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> Message-ID: <4A118C55.8020502@voidspace.org.uk> Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code executed from C# like this tries to import from the xap file. :-( Michael Michael Foord wrote: > Thanks to some help from William Reade, this code *seems* to work > fine. I need to try it from Silverlight and check the Python code it > contains is able to import: > > using System; > using System.Collections.Generic; > using System.Text; > > > using IronPython.Hosting; > using IronPython.Runtime; > using IronPython.Runtime.Types; > > using Microsoft.Scripting; > using Microsoft.Scripting.Hosting; > using Microsoft.Scripting.Runtime; > > > namespace ExecutePython > { > public class ExecutePython > { > static string code = @" > class Foo(object): > attribute = 'weeeee' > > "; > public static Scope CreateModule(CodeContext context) > { > PythonContext python = PythonContext.GetContext(context); > > PythonDictionary globals = new PythonDictionary(); > globals["__name__"] = "AModule"; > Scope module = new Scope(globals); > SourceUnit script = python.CreateSnippet(code, > SourceCodeKind.Statements); > script.Execute(module); > return module; > } > } > } > > > All the best, > > > Michael > > > Michael Foord wrote: >> Jimmy - did you get a chance to look at this? >> >> If the code shown below *genuinely* gets a reference to the current >> engine then shouldn't the search path be setup already? >> >> Can you see what is wrong with the code below? >> >> Thanks >> >> Michael >> >> Michael Foord wrote: >>> Hello guys, >>> >>> I have a second use case for embedding IronPython in Silverlight. >>> This is actually a dynamic application with a C# component that >>> needs to programattically build a Python module. >>> >>> Again I have the same problem - imports in Python code fail. I would >>> have expected that accessing the current runtime and fetching a >>> Python engine would fetch the current Python engine, with the >>> browser host correctly setup. Unfortunately that seems not to be the >>> case. Can anyone spot problems with the following code: >>> >>> >>> using Microsoft.Scripting.Silverlight; >>> using IronPython; >>> using IronPython.Hosting; >>> using Microsoft.Scripting; >>> using Microsoft.Scripting.Hosting; >>> >>> namespace EmbeddedSLModule >>> { >>> public class EmbeddedSLModule >>> { >>> private static string source = @" >>> import something >>> "; >>> public static ScriptScope GetModule(){ >>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>> ScriptEngine engine = runtime.GetEngine("Python"); >>> ScriptScope scope = engine.CreateScope(); >>> ScriptSource script = >>> engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); >>> script.Execute(scope); >>> >>> return scope; >>> >>> } >>> } >>> } >>> >>> >>> It works fine for code that doesn't import anything - but imports >>> from within the xap file fail. >>> >>> Thanks >>> >>> Michael Foord >>> >> >> > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Mon May 18 18:29:06 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 18 May 2009 16:29:06 +0000 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A118C55.8020502@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD027E27FF@TK5EX14MBXC120.redmond.corp.microsoft.com> Are you seeing any web requests to get the .py file from the server instead of the XAP? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, May 18, 2009 9:27 AM To: Discussion of IronPython Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code executed from C# like this tries to import from the xap file. :-( Michael Michael Foord wrote: > Thanks to some help from William Reade, this code *seems* to work > fine. I need to try it from Silverlight and check the Python code it > contains is able to import: > > using System; > using System.Collections.Generic; > using System.Text; > > > using IronPython.Hosting; > using IronPython.Runtime; > using IronPython.Runtime.Types; > > using Microsoft.Scripting; > using Microsoft.Scripting.Hosting; > using Microsoft.Scripting.Runtime; > > > namespace ExecutePython > { > public class ExecutePython > { > static string code = @" > class Foo(object): > attribute = 'weeeee' > > "; > public static Scope CreateModule(CodeContext context) > { > PythonContext python = PythonContext.GetContext(context); > > PythonDictionary globals = new PythonDictionary(); > globals["__name__"] = "AModule"; > Scope module = new Scope(globals); > SourceUnit script = python.CreateSnippet(code, > SourceCodeKind.Statements); > script.Execute(module); > return module; > } > } > } > > > All the best, > > > Michael > > > Michael Foord wrote: >> Jimmy - did you get a chance to look at this? >> >> If the code shown below *genuinely* gets a reference to the current >> engine then shouldn't the search path be setup already? >> >> Can you see what is wrong with the code below? >> >> Thanks >> >> Michael >> >> Michael Foord wrote: >>> Hello guys, >>> >>> I have a second use case for embedding IronPython in Silverlight. >>> This is actually a dynamic application with a C# component that >>> needs to programattically build a Python module. >>> >>> Again I have the same problem - imports in Python code fail. I would >>> have expected that accessing the current runtime and fetching a >>> Python engine would fetch the current Python engine, with the >>> browser host correctly setup. Unfortunately that seems not to be the >>> case. Can anyone spot problems with the following code: >>> >>> >>> using Microsoft.Scripting.Silverlight; >>> using IronPython; >>> using IronPython.Hosting; >>> using Microsoft.Scripting; >>> using Microsoft.Scripting.Hosting; >>> >>> namespace EmbeddedSLModule >>> { >>> public class EmbeddedSLModule >>> { >>> private static string source = @" >>> import something >>> "; >>> public static ScriptScope GetModule(){ >>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>> ScriptEngine engine = runtime.GetEngine("Python"); >>> ScriptScope scope = engine.CreateScope(); >>> ScriptSource script = >>> engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); >>> script.Execute(scope); >>> >>> return scope; >>> >>> } >>> } >>> } >>> >>> >>> It works fine for code that doesn't import anything - but imports >>> from within the xap file fail. >>> >>> Thanks >>> >>> Michael Foord >>> >> >> > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Mon May 18 18:32:07 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 18 May 2009 17:32:07 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <1A472770E042064698CB5ADC83A12ACD027E27FF@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> <1A472770E042064698CB5ADC83A12ACD027E27FF@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A118D87.7080602@voidspace.org.uk> Dino Viehland wrote: > Are you seeing any web requests to get the .py file from the server instead of the XAP? > No - just fetches for the xap and html etc The same import from pure Python succeeds. Interestingly the import from the C# assembly fails even if the Python code has already imported the module. Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, May 18, 2009 9:27 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) > > Ha - dammit, no. > > With Silverlight this still throws an ImportError when embedded Python > code executed from C# like this tries to import from the xap file. :-( > > Michael > > Michael Foord wrote: > >> Thanks to some help from William Reade, this code *seems* to work >> fine. I need to try it from Silverlight and check the Python code it >> contains is able to import: >> >> using System; >> using System.Collections.Generic; >> using System.Text; >> >> >> using IronPython.Hosting; >> using IronPython.Runtime; >> using IronPython.Runtime.Types; >> >> using Microsoft.Scripting; >> using Microsoft.Scripting.Hosting; >> using Microsoft.Scripting.Runtime; >> >> >> namespace ExecutePython >> { >> public class ExecutePython >> { >> static string code = @" >> class Foo(object): >> attribute = 'weeeee' >> >> "; >> public static Scope CreateModule(CodeContext context) >> { >> PythonContext python = PythonContext.GetContext(context); >> >> PythonDictionary globals = new PythonDictionary(); >> globals["__name__"] = "AModule"; >> Scope module = new Scope(globals); >> SourceUnit script = python.CreateSnippet(code, >> SourceCodeKind.Statements); >> script.Execute(module); >> return module; >> } >> } >> } >> >> >> All the best, >> >> >> Michael >> >> >> Michael Foord wrote: >> >>> Jimmy - did you get a chance to look at this? >>> >>> If the code shown below *genuinely* gets a reference to the current >>> engine then shouldn't the search path be setup already? >>> >>> Can you see what is wrong with the code below? >>> >>> Thanks >>> >>> Michael >>> >>> Michael Foord wrote: >>> >>>> Hello guys, >>>> >>>> I have a second use case for embedding IronPython in Silverlight. >>>> This is actually a dynamic application with a C# component that >>>> needs to programattically build a Python module. >>>> >>>> Again I have the same problem - imports in Python code fail. I would >>>> have expected that accessing the current runtime and fetching a >>>> Python engine would fetch the current Python engine, with the >>>> browser host correctly setup. Unfortunately that seems not to be the >>>> case. Can anyone spot problems with the following code: >>>> >>>> >>>> using Microsoft.Scripting.Silverlight; >>>> using IronPython; >>>> using IronPython.Hosting; >>>> using Microsoft.Scripting; >>>> using Microsoft.Scripting.Hosting; >>>> >>>> namespace EmbeddedSLModule >>>> { >>>> public class EmbeddedSLModule >>>> { >>>> private static string source = @" >>>> import something >>>> "; >>>> public static ScriptScope GetModule(){ >>>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>>> ScriptEngine engine = runtime.GetEngine("Python"); >>>> ScriptScope scope = engine.CreateScope(); >>>> ScriptSource script = >>>> engine.CreateScriptSourceFromString(source, SourceCodeKind.Statements); >>>> script.Execute(scope); >>>> >>>> return scope; >>>> >>>> } >>>> } >>>> } >>>> >>>> >>>> It works fine for code that doesn't import anything - but imports >>>> from within the xap file fail. >>>> >>>> Thanks >>>> >>>> Michael Foord >>>> >>>> >>> >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From william at resolversystems.com Tue May 19 11:36:56 2009 From: william at resolversystems.com (William Reade) Date: Tue, 19 May 2009 10:36:56 +0100 Subject: [IronPython] mmap, csv, others Message-ID: <4A127DB8.9040001@resolversystems.com> Hi all Life permitting, the next version of Ironclad should have a few of the built-in C extensions included in it. I have vague plans that the first two will be mmap and _csv (because I've had to fake both of those out for numpy); however, I just wanted to check whether anybody else was doing the same thing. Cheers william From daftspaniel at gmail.com Tue May 19 13:05:18 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Tue, 19 May 2009 12:05:18 +0100 Subject: [IronPython] Inspect Module In-Reply-To: <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: <20253b0c0905190405t3f5fb706n3d2331ae8eadf122@mail.gmail.com> On Wed, May 13, 2009 at 10:23 PM, Dino Viehland wrote: > This will should be fixed in tomorrow's source drop. I have a check-in which removes sys._getframe unless the > -X:Frames or -X:FullFrames options are passed. Thanks Dino - sounds good. One question, (how) can the -X options be used in a pyc compiled EXE? >I don't think we have a module status page yet. Would be nice to have module changes in the read me :-) Take care, Davy Mitchell -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From i-ellang at microsoft.com Tue May 19 15:29:10 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Tue, 19 May 2009 14:29:10 +0100 Subject: [IronPython] with_statement in IronPython 2.6 Alpha Message-ID: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> Can anyone explain to me how to use the with_statement in IronPython 2.6 ? It is totally unrecognised as a keyword I've tried the Iron Python 2.5 solution: from __future__ import with_statement which gives the error future feature is not defined:with_statement can anyone help me ? thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Tue May 19 15:35:30 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 19 May 2009 06:35:30 -0700 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: The with statement is available by default in IronPython 2.6 -- you don't need any "from __future__ import" to use it (though that line should not give an error). I don't remember when we turned it on; it may not have been in Alpha 1 but it's certainly in the current source. On Tue, May 19, 2009 at 6:29 AM, Elise Langham (Elanit) < i-ellang at microsoft.com> wrote: > Can anyone explain to me how to use the with_statement in IronPython 2.6 > ? > > It is totally unrecognised as a keyword > > > > I?ve tried the Iron Python 2.5 solution: > > > > from __future__ import with_statement which gives the error future feature > is not defined:with_statement > > > > can anyone help me ? > > > > thanks, > > > > Elise > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue May 19 15:54:04 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 May 2009 14:54:04 +0100 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <4A12B9FC.8040505@voidspace.org.uk> Elise Langham (Elanit) wrote: > > Can anyone explain to me how to use the with_statement in IronPython 2.6 ? > > It is totally unrecognised as a keyword > > I?ve tried the Iron Python 2.5 solution: > > from __future__ import with_statement which gives the error future > feature is not defined:with_statement > > can anyone help me ? > This should still work however (future imports are guaranteed to work in all future versions even if not needed any more). The specific error you get implies that you have the Python 2.4 version of __future__.py somewhere on sys.path. All the best, Michael Foord > thanks, > > Elise > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From i-ellang at microsoft.com Tue May 19 16:00:36 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Tue, 19 May 2009 15:00:36 +0100 Subject: [IronPython] with_statement in IronPython 2.6x Message-ID: <361073EA5313C84E95A847FF752AD96536C8FACF5C@EA-EXMSG-C334.europe.corp.microsoft.com> I'm confused - I downloaded Iron Python 2.6 alpha 1 on 23rd April 2009- and the current most recent download On CodePlex is dated March 26th 2009 .... where is there a more recent version that would have the with_statement turned on ? Thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Tue May 19 17:07:01 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 19 May 2009 15:07:01 +0000 Subject: [IronPython] mmap, csv, others In-Reply-To: <4A127DB8.9040001@resolversystems.com> References: <4A127DB8.9040001@resolversystems.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD02841838@TK5EX14MBXC120.redmond.corp.microsoft.com> Harry had started implementing _csv but I think he's stalled out on playing w/ __clrtype__. No one here has touched mmap - I believe .NET 4.0 will have a managed wrapper around memory mapped files which would give us a chance to do it in the future but until then we wouldn't even think about it. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Tuesday, May 19, 2009 2:37 AM To: Discussion of IronPython Subject: [IronPython] mmap, csv, others Hi all Life permitting, the next version of Ironclad should have a few of the built-in C extensions included in it. I have vague plans that the first two will be mmap and _csv (because I've had to fake both of those out for numpy); however, I just wanted to check whether anybody else was doing the same thing. Cheers william _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Tue May 19 17:09:36 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 19 May 2009 15:09:36 +0000 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0284188C@TK5EX14MBXC120.redmond.corp.microsoft.com> I think you need to pass the -X:Python26 command line option in the alpha to enable this. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Elise Langham (Elanit) Sent: Tuesday, May 19, 2009 6:29 AM To: users at lists.ironpython.com Subject: [IronPython] with_statement in IronPython 2.6 Alpha Can anyone explain to me how to use the with_statement in IronPython 2.6 ? It is totally unrecognised as a keyword I've tried the Iron Python 2.5 solution: from __future__ import with_statement which gives the error future feature is not defined:with_statement can anyone help me ? thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Tue May 19 17:10:49 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 19 May 2009 15:10:49 +0000 Subject: [IronPython] with_statement in IronPython 2.6x In-Reply-To: <361073EA5313C84E95A847FF752AD96536C8FACF5C@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C8FACF5C@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD028418C4@TK5EX14MBXC120.redmond.corp.microsoft.com> There's regular source drops which you can build your self but there hasn't been a new binary release. We are trying to get beta 1 out this week though. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Elise Langham (Elanit) Sent: Tuesday, May 19, 2009 7:01 AM To: users at lists.ironpython.com Subject: [IronPython] with_statement in IronPython 2.6x I'm confused - I downloaded Iron Python 2.6 alpha 1 on 23rd April 2009- and the current most recent download On CodePlex is dated March 26th 2009 .... where is there a more recent version that would have the with_statement turned on ? Thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Tue May 19 17:15:10 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 19 May 2009 15:15:10 +0000 Subject: [IronPython] Inspect Module In-Reply-To: <20253b0c0905190405t3f5fb706n3d2331ae8eadf122@mail.gmail.com> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> <20253b0c0905190405t3f5fb706n3d2331ae8eadf122@mail.gmail.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD02841BD9@TK5EX14MBXC120.redmond.corp.microsoft.com> Good question! There's currently no way to set the options but we can certainly add one. I've created a work item: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22475 -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell Sent: Tuesday, May 19, 2009 4:05 AM To: Discussion of IronPython Subject: Re: [IronPython] Inspect Module On Wed, May 13, 2009 at 10:23 PM, Dino Viehland wrote: > This will should be fixed in tomorrow's source drop. I have a check-in which removes sys._getframe unless the > -X:Frames or -X:FullFrames options are passed. Thanks Dino - sounds good. One question, (how) can the -X options be used in a pyc compiled EXE? >I don't think we have a module status page yet. Would be nice to have module changes in the read me :-) Take care, Davy Mitchell -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue May 19 17:26:52 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 19 May 2009 16:26:52 +0100 Subject: [IronPython] Inspect Module In-Reply-To: <1A472770E042064698CB5ADC83A12ACD02841BD9@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> <20253b0c0905190405t3f5fb706n3d2331ae8eadf122@mail.gmail.com> <1A472770E042064698CB5ADC83A12ACD02841BD9@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A12CFBC.2070802@voidspace.org.uk> Davy, What you might find helpful is to use a similar technique for compilation that we do for Resolver One. All our libraries are compiled with Pyc but not our main executable. The main executable is in C# and it is a thin wrapper over the IronPython hosting API. It basically has a small snippet of Python code embedded in it that starts the application. This allows you to set engine options (you'll need to setup sys.argv yourself and possibly set the search path - which sets up sys.path) and also have an icon etc. We then have an automated build which compiled the main executable and also compiles the Python packages with Pyc (we have a version of Pyc which we can use as a library rather than calling it as a script). As well as being flexible this overcomes some of the reported limitations / defects in Pyc. All the best, Michael Dino Viehland wrote: > Good question! There's currently no way to set the options but we can certainly > add one. > > I've created a work item: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22475 > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell > Sent: Tuesday, May 19, 2009 4:05 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Inspect Module > > On Wed, May 13, 2009 at 10:23 PM, Dino Viehland wrote: > >> This will should be fixed in tomorrow's source drop. I have a check-in which removes sys._getframe unless the >> -X:Frames or -X:FullFrames options are passed. >> > > Thanks Dino - sounds good. One question, (how) can the -X options be > used in a pyc compiled EXE? > > >> I don't think we have a module status page yet. >> > > Would be nice to have module changes in the read me :-) > > Take care, > Davy Mitchell > > -- > Davy Stuff - http://daftspaniel.blogspot.com > Geeky Stuff - http://daftpython.blogspot.com > Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From dfugate at microsoft.com Tue May 19 17:30:20 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 19 May 2009 08:30:20 -0700 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0284188C@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C8FACED2@EA-EXMSG-C334.europe.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0284188C@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: -X:Python26 was removed before 2.6A1 was shipped. This should work "out of the box" with 2.6A1: C:\Users\dfugate.REDMOND>"C:\Program Files\IronPython 2.6\ipy.exe" IronPython 2.6 Alpha 1 (2.6.0.1) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> with file("test.log", "w") as f: ... pass ... >>> ^Z C:\Users\dfugate.REDMOND>"C:\Program Files\IronPython 2.6\ipy.exe" IronPython 2.6 Alpha 1 (2.6.0.1) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> from __future__ import with_statement >>> ^Z Elise, can you give a few more details about your setup? Are you running an IronPython that was installed via IronPython.msi or are you using the zip file full of binaries directly? Also, are you utilizing ipy.exe or perhaps using the DLR to host Python from C#? Last but not least, what does %PYTHONPATH% look like on your machine? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Tuesday, May 19, 2009 8:10 AM To: Discussion of IronPython Subject: Re: [IronPython] with_statement in IronPython 2.6 Alpha I think you need to pass the -X:Python26 command line option in the alpha to enable this. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Elise Langham (Elanit) Sent: Tuesday, May 19, 2009 6:29 AM To: users at lists.ironpython.com Subject: [IronPython] with_statement in IronPython 2.6 Alpha Can anyone explain to me how to use the with_statement in IronPython 2.6 ? It is totally unrecognised as a keyword I've tried the Iron Python 2.5 solution: from __future__ import with_statement which gives the error future feature is not defined:with_statement can anyone help me ? thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From william at resolversystems.com Tue May 19 17:48:01 2009 From: william at resolversystems.com (William Reade) Date: Tue, 19 May 2009 16:48:01 +0100 Subject: [IronPython] mmap, csv, others In-Reply-To: <1A472770E042064698CB5ADC83A12ACD02841838@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <4A127DB8.9040001@resolversystems.com> <1A472770E042064698CB5ADC83A12ACD02841838@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A12D4B1.4090902@resolversystems.com> Thanks Dino. Incidentally, for some reason, mmap objects are constructed with filenos rather than files, which may complicate matters for you... in Ironclad I'm planning to get around this by forcing users to use real PyFileObjects if they want to mmap them. In the general case it'll be an annoying departure from the intended transparency, but at least I can patch known-mmaping modules like numpy.core.memmap so that they, at least, silently use the correct file type. (Yes, it's evil, but it seems to be the least evil option; if anyone has a better suggestion (or is writing code which assumes uniqueness of ipy filenos), please let me know.) Dino Viehland wrote: > Harry had started implementing _csv but I think he's stalled out on > playing w/ __clrtype__. No one here has touched mmap - I believe > .NET 4.0 will have a managed wrapper around memory mapped files > which would give us a chance to do it in the future but until then > we wouldn't even think about it. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade > Sent: Tuesday, May 19, 2009 2:37 AM > To: Discussion of IronPython > Subject: [IronPython] mmap, csv, others > > Hi all > > Life permitting, the next version of Ironclad should have a few of the > built-in C extensions included in it. I have vague plans that the first > two will be mmap and _csv (because I've had to fake both of those out > for numpy); however, I just wanted to check whether anybody else was > doing the same thing. > > 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 merllab at microsoft.com Tue May 19 17:53:13 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Tue, 19 May 2009 08:53:13 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <3af925d8-f423-45f9-b561-fd972ae1a70a@tk5-exsmh-c101.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/51129. MODIFIED SOURCES $/IronPython/IronPython_Main/Config/Signed/App.config $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs $/IronPython/IronPython_Main/Config/Unsigned/App.config $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs $/IronPython/IronPython_Main/Src/Scripts/generate_dynsites.py From daftspaniel at gmail.com Tue May 19 23:04:22 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Tue, 19 May 2009 22:04:22 +0100 Subject: [IronPython] Inspect Module In-Reply-To: <4A12CFBC.2070802@voidspace.org.uk> References: <20253b0c0905122211q7e7c9d6bg71a456879ad4ced7@mail.gmail.com> <20253b0c0905131358p777e4054mf7b7cec15e36a93a@mail.gmail.com> <350E7D38B6D819428718949920EC23555729E15BB0@NA-EXMSG-C102.redmond.corp.microsoft.com> <20253b0c0905190405t3f5fb706n3d2331ae8eadf122@mail.gmail.com> <1A472770E042064698CB5ADC83A12ACD02841BD9@TK5EX14MBXC120.redmond.corp.microsoft.com> <4A12CFBC.2070802@voidspace.org.uk> Message-ID: <20253b0c0905191404o53ebc81aq7460e8d69e95ceb@mail.gmail.com> Thanks Dino + Michael. On Tue, May 19, 2009 at 4:26 PM, Michael Foord wrote: > What you might find helpful is to use a similar technique for compilation > that we do for Resolver One. Sounds like a good approach especially for getting a splash screen up early :-). For DIE, it doesn't use the py stdlib so some stuff sys.path is less important right now. I do like pyc and may eventually form part of a 'build' feature in DIE. Definitely consider the hosting technique it as the project grows though. Cheers, Davy -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From daftspaniel at gmail.com Tue May 19 23:13:51 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Tue, 19 May 2009 22:13:51 +0100 Subject: [IronPython] Autocomplete for .NET Types from IronPython with Wing IDE (update - better return type and parameter name handling) In-Reply-To: <4A104DD3.5070807@voidspace.org.uk> References: <4A0F40ED.20401@voidspace.org.uk> <20253b0c0905171040o3079fb4fn61bc3b05325288e2@mail.gmail.com> <4A104DD3.5070807@voidspace.org.uk> Message-ID: <20253b0c0905191413m6bad71a2r8121fe437de044c@mail.gmail.com> Sorry for slow reply on this :-) Yes looks like I would be mad to reimplement something like Pysmell + PI for Wing. The next version of DIE *may* have very simple autocomplete enabled for strings, dictionaries and lists. It is more of a GUI exercise. Personally, I find an object browser more useful than autocomplete so I more likely to add write that first but, as the recent discussion on this list showed, it is a non-starter for many if an editor does not have autocomplete. Cheers, Davy -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From merllab at microsoft.com Wed May 20 17:52:29 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 20 May 2009 08:52:29 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/51333. ADDED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/InstanceBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/RestrictedArguments.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/NullArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/RestrictionInfo.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOverloadResolver.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/SiteLocalStorageBuilder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/ContextArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/InstanceBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ByRefReturnBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/DefaultOverloadResolver.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/OutArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/KeywordConstructorReturnBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/OverloadResolver.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/ActionBinder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/DefaultArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParameterMapping.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/MethodCandidate.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ConversionResult.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/BindingTarget.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/KeywordArgBuilder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/RestrictedArguments.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParamsArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/SimpleArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ReturnBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ReturnReferenceArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ReferenceArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParamsDictArgBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.MethodCalls.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.Operations.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/TypeTracker.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/CompilerHelpers.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/MetaObjectExtensions.cs From dfugate at microsoft.com Wed May 20 19:24:47 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Wed, 20 May 2009 10:24:47 -0700 Subject: [IronPython] Announcing IronPython 2.6 CTP for .NET 4.0 Beta 1 In-Reply-To: <6B5AE3B08809CC47A81ACBF99E2690F506FB060D@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <6B5AE3B08809CC47A81ACBF99E2690F506FB060D@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: Hello Python Community, We're quite pleased to announce the release of "IronPython 2.6 CTP for .NET 4.0 Beta 1". This is our second preview of IronPython running under the Dynamic Language Runtime that is built directly into a .NET 4.0 release! As before, this release allows you to use IronPython objects and types as .NET 4.0 dynamic objects from within C# and Visual Basic code. While this release does share a bit in common with the upcoming IronPython 2.6 Beta 1 release (e.g., a number of MSI improvements), the core functionality is essentially that of IronPython 2.6 Alpha 1. Please also note that "IronPython 2.6 CTP for .NET 4.0 Beta 1" will run only under .NET 4.0 Beta 1. Here's a small example showing just how powerful the new dynamic feature is for taking advantage of dynamic language functionality in statically typed languages: import random, math class Mock(object): def __getattr__(self, key): """Mock objects of this type will dynamically implement any requested member""" return random.choice(["hello world", math.pi]) using System; using IronPython.Hosting; using Microsoft.Scripting.Hosting; public class dynamic_demo { static void Main() { var ipy = Python.CreateRuntime(); dynamic mock = ipy.UseFile("mock.py"); dynamic m = mock.Mock(); //The Python Mock type dynamically implements any member that is requested of it System.Console.WriteLine(m.the_csharp_compiler_cannot_possbily_know_this_member_exists_at_compile_time); } } To try out this preview release: 1. Install some variant of .NET 4.0 Beta 1 or Visual Studio 2010 Beta 1. E.g., http://www.microsoft.com/downloads/details.aspx?FamilyID=ee2118cc-51cd-46ad-ab17-af6fff7538c9&displaylang=en 2. Install IronPython.msi from http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27320 3. Follow any of the many dynamic walkthroughs online. http://blogs.msdn.com/vbteam/archive/2008/12/17/walkthrough-dynamic-programming-in-visual-basic-10-0-and-c-4-0-lisa-feigenbaum.aspx would be a good start Have fun! The IronPython Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Wed May 20 22:21:56 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 20 May 2009 23:21:56 +0300 Subject: [IronPython] IronPython for ASP.Net Message-ID: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper ( http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Wed May 20 22:45:40 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 20 May 2009 20:45:40 +0000 Subject: [IronPython] IronPython 2.6 Beta 1 Released Message-ID: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> Hello Python Community, We're pleased to announce the release of IronPython 2.6 Beta 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP 3101), etc and as such includes nearly all of the new Python 2.6 features. The small number of remaining features will be implemented for Beta 2. The minimum .NET version required for this release is the same as IronPython 2.0; namely .NET 2.0 Service Pack 1. There've also been several new features added: ctypes, sys._getframe, pyc for pre-compilation, and improved help. Ctypes provides access to C-based APIs and provides a way for Python developers to optimize performance or access libraries that would otherwise be unavailable. sys._getframe is commonly used by Python programs to introspect the call stack and can now be enabled with the -X:Frames and -X:FullFrames command line options; for better compatibility with programs that check for the presence of sys._getframe it is now not available unless these options are provided. The pyc.py pre-compiler is now shipped with IronPython and is available in the Tools\Scripts directory. Finally the help of many builtin functions and types has been improved by including IronPython.xml and IronPython.Modules.xml. Another focus has been on improving startup time of large applications. This release accomplishes that through the adaptive compilation feature announced with 2.6 Alpha 1 and also includes many other enhancements to reduce the amount of code generation required to start applications. But only do these improvements help large applications but they also significantly speed up basic hello worlds startup time. As usual we've also fixed a large number of bugs for this release. We'd like to thank everyone who took the time to report them: atifaziz, Anders M. Mikkelsen, cjacobs, Dan Eloff, davec, fwereade, gjones, hhonisch, jdhardy, Kevin Chu, Kyle Howland-Rose, leppie, Mark Rees, orestis, RuiDC, Seo Sanghyeon, soulfry, tatwright, ufechner, and wilberforce. There's also a few minor changes since IronPython 2.0.1 that are worth calling out here: * Binaries are ngen'd for both 32-bit and 64-bit platforms on install by default * IronPython.msi now offers a little more selection with respect to what you'd like to install. For example, Silverlight templates are optional * The default installation location of IronPython.msi no longer indicates whether the 2.6 release is an Alpha, Beta, or a patched release. Future IronPython 2.6 installations will replace previous 2.6 releases which will be uninstalled automatically * The -X:PreferComInteropAssembly flag has been removed. All COM interop is now done through normal COM dispatch You can download IronPython 2.6 Beta 1 at: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25126 The IronPython Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From timh at avacta.com Wed May 20 22:58:24 2009 From: timh at avacta.com (men8th) Date: Wed, 20 May 2009 13:58:24 -0700 (PDT) Subject: [IronPython] How to return dynamic length array from c# method In-Reply-To: <23634241.post@talk.nabble.com> References: <23634241.post@talk.nabble.com> Message-ID: <23643417.post@talk.nabble.com> OK, I can answer my own question... forgot the brackets after the method call: intensity_current_array = capture.getY should be intensity_current_array = capture.getY() doh! -- View this message in context: http://www.nabble.com/How-to-return-dynamic-length-array-from-c--method-tp23634241p23643417.html Sent from the IronPython mailing list archive at Nabble.com. From hydonlee at gmail.com Thu May 21 03:59:11 2009 From: hydonlee at gmail.com (=?GB2312?B?tqvX0w==?=) Date: Thu, 21 May 2009 09:59:11 +0800 Subject: [IronPython] Where can i find IronPython 2.0.1 Document? Message-ID: <3bc65bab0905201859j40eb945fj6786e0c695cda104@mail.gmail.com> Hi guys! When IronPython 2.0 alpha1 be used, I downloaded the source and found a Microsoft.script API document("Microsoft.scripts.chm"). But Now, I CANNOT find API document in Ironpython 2.0.1 stable binary and source. Where can i find it ? thanks a lot. Hydon Lee at SH ERP/Retail/Python -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu May 21 04:09:11 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 21 May 2009 02:09:11 +0000 Subject: [IronPython] Where can i find IronPython 2.0.1 Document? In-Reply-To: <3bc65bab0905201859j40eb945fj6786e0c695cda104@mail.gmail.com> References: <3bc65bab0905201859j40eb945fj6786e0c695cda104@mail.gmail.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD02899AD5@TK5EX14MBXC120.redmond.corp.microsoft.com> If you go to the DLR site (http://dlr.codeplex.com) there are docs/specs there (http://dlr.codeplex.com/Wiki/View.aspx?title=Docs%20and%20specs). They're not in CHM form but you might find they're actually much better than the CHM. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of ?? Sent: Wednesday, May 20, 2009 6:59 PM To: Discussion of IronPython Subject: [IronPython] Where can i find IronPython 2.0.1 Document? Hi guys! When IronPython 2.0 alpha1 be used, I downloaded the source and found a Microsoft.script API document("Microsoft.scripts.chm"). But Now, I CANNOT find API document in Ironpython 2.0.1 stable binary and source. Where can i find it ? thanks a lot. Hydon Lee at SH ERP/Retail/Python -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu May 21 05:17:20 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 21 May 2009 03:17:20 +0000 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack (http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu May 21 05:25:55 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 20 May 2009 21:25:55 -0600 Subject: [IronPython] IronPython 2.6 Beta 1 Released In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: Good work, guys! Speaking of installers, are there any plans to have an option for putting the 2.6 assemblies in the GAC? On Wed, May 20, 2009 at 2:45 PM, Dino Viehland wrote: > Hello Python Community, > ... From adamb at silverkeytech.com Thu May 21 05:28:19 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Wed, 20 May 2009 20:28:19 -0700 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <002701c9d9c4$30a69250$91f3b6f0$@com> Hi Jimmy, Until we're able to get the source code fully released, do you think it would be possible to maybe get four or five volunteers NDA'd source code access to update the build? Regardless of when the source code is released, that work would need to get done.so maybe this way we could get a headstart? Thanks, Adam From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Wednesday, May 20, 2009 8:17 PM To: dody at nomadlife.org; Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/00 8497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack (http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From hydonlee at gmail.com Thu May 21 06:54:59 2009 From: hydonlee at gmail.com (=?GB2312?B?tqvX0w==?=) Date: Thu, 21 May 2009 12:54:59 +0800 Subject: [IronPython] Where can i find IronPython 2.0.1 Document? In-Reply-To: <1A472770E042064698CB5ADC83A12ACD02899AD5@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <3bc65bab0905201859j40eb945fj6786e0c695cda104@mail.gmail.com> <1A472770E042064698CB5ADC83A12ACD02899AD5@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <3bc65bab0905202154v500ea8c7w9b3e8605631d8ae4@mail.gmail.com> OK! Thanks Dino. I got it . Hydon Lee at SH ERP/Retail/Python 2009/5/21 Dino Viehland > If you go to the DLR site (http://dlr.codeplex.com) there are docs/specs > there (http://dlr.codeplex.com/Wiki/View.aspx?title=Docs%20and%20specs). > > > > They?re not in CHM form but you might find they?re actually much better > than the CHM. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *?? > *Sent:* Wednesday, May 20, 2009 6:59 PM > *To:* Discussion of IronPython > *Subject:* [IronPython] Where can i find IronPython 2.0.1 Document? > > > > Hi guys! > > When IronPython 2.0 alpha1 be used, I downloaded the source and found a > Microsoft.script API document("Microsoft.scripts.chm"). > But Now, I CANNOT find API document in Ironpython 2.0.1 stable binary and > source. > > Where can i find it ? thanks a lot. > > Hydon Lee at SH > ERP/Retail/Python > > > > _______________________________________________ > 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 daftspaniel at gmail.com Thu May 21 08:30:56 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Thu, 21 May 2009 07:30:56 +0100 Subject: [IronPython] IronPython 2.6 Beta 1 Released In-Reply-To: References: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <20253b0c0905202330j6c1504dfy6a1f7b30a1c0e17b@mail.gmail.com> Good release guys - thanks. Start up performance is awesome :-) So people know, you have to uninstall the alpha before you run the MSI (well happened for me on XP and Win7). Cheers, Davy -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From empirebuilder at gmail.com Thu May 21 13:22:56 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Thu, 21 May 2009 13:22:56 +0200 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> The refresh was unusable because it contained the version of IronPyton that is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 Beta 3/4); I'm griping about this issue in this list because I don't think this is a completely separate issue from the DLR programming languages. Maybe it is not a direct responsibility of this team, but the impact is direct for the following reasons: - Nobody adopts a language as is. The libraries matters. The existing community of Python and Ruby are not going to move to Windows platform just because IronPython and IronRuby are being worked on and released. They have had a multi platform runtimes with de facto standards that are capable of doing wonderful things for more than a decade. - There is much bigger market for language adoption for existing .Net/Windows based developers (and new developers) and these guys/gals are using mostly standard Microsoft stacks. And they are using .Net via mainly C# and VB.Net. If the DLR languages do not have proper support at least for the major technology stacks (I would consider ASP.Net/Silverlight as major stacks), many people will not consider using the DLR based language for their production systems. - I know ASP.Net MVC is open source and it's free to be extended etc, but ASP.Net WebForm have be en deployed massively and that's not going to change anytime soon. And theres is already a support, albeit poor and not up to date, for ASP.Net webform stacks in IronPython. Not having it fully updated is a waste of opportunity. - .Net 4.0 and C# vNext contains dynamic language support but really, what is good for if the DLR languages can only be used in much more limited scenarios because some major technology stacks are not supported. - You raised correctly that Django and RoR are being used to validate the languages. But I would argue that the existing technology stack support validates the DLR platform, not just the languages. So yes, I'm not happy with the level of investment being put on supporting the technology stacks because I think it is pretty short sighted. No, I don't blame this team for this but at least if I complain on this list, it might have a chance being forwarded internally because this is one of the best community mailing list for Microsoft technologies. Dody Gunawinata On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > First off, it hasn?t been three years: a refresh was released 8 months ago, > and sent to this very list: > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html > > > > Secondly, rather than just producing these one off releases (where are very > taxing on the team), we?re doing it right and getting the source code > released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and > nightly builds. Then it can be included in each IronPython release, just > like Silverlight binaries are. > > > > Lastly, IronRuby and IronPython are programming languages, made by > programming language teams. We?re very interested in running as many > existing Ruby and Python programs as possible. It just so happens that > Django and Rails are popular, complex pieces of software that help find > bugs, and give the languages street cred for running them. If those web > frameworks didn?t run, theirs probably something wrong with our language. > > > > Running in ASP.NET and MVC require a significant amount of work *outside*of the language, so it really isn?t a language team?s purpose to build that. > Sure they provide good demos as conferences or blog posts, but they?ll only > be toys. We?ve invested in those technologies before, which is why the > ASP.NET and Silverlight integration exists, but no one is working on > enabling web-technologies full-time (though I have spurts of diving back > into Silverlight from time to time). If you don?t like the level of > investment in dynamic languages for Microsoft web technologies, that?s > something that you should communicate to the ASP.NET team; Phil Haack ( > http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) > are good people to address. > > > > ~Jimmy > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Wednesday, May 20, 2009 1:22 PM > *To:* Discussion of IronPython > *Subject:* [IronPython] IronPython for ASP.Net > > > > Is there any update for IronPython for ASP.Net? > > > > It has been three years since IronPython support for ASP.Net introduced > with the release of the whitepaper ( > http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. > Since then I think we've had Katrina, a Beijing Olympic, a new President, a > financial collapse and two James Bond movies - yet until now there is still > no up to date support for the technology. I know that the legal team, etc > are working on the source release, but I think it is pretty galling that > Microsoft's own web framework stack is barely supported by its own dynamic > language technology, both on the 'classic' ASP.Net and MVC stack. I mean > there is more energy put into having IronPython and IronRuby to run Django > and RubyOnRails web framework instead of ASP.Net stack. This just doesn't > make sense to me. > > -- > nomadlife.org > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From i-ellang at microsoft.com Thu May 21 13:23:03 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Thu, 21 May 2009 12:23:03 +0100 Subject: [IronPython] with_statement in IronPython 2.6 Alpha Message-ID: <361073EA5313C84E95A847FF752AD96536C906B05D@EA-EXMSG-C334.europe.corp.microsoft.com> Hi Dave, Thanks for the reply- I'm running in the Visual Studio under debug. I don't know how to set pythonpath on a windows machine Most of the info is for C shell and linux. I find that the with statement works fine when just using the command line ipy.exe but it can't pick up The references to imported modules. The references work fine when running in Visual Studio though ???? import System from System import Console from System import Array from System import IO import clr import sys sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") clr.AddReferenceToFile("Infer.Compiler.dll") clr.AddReferenceToFile("Infer.Runtime.dll") think this only works when the .dlls are in the IronPython ipy.exe directory though. 'C:\\Users\\i-ellang\\IronPython 2.6' Hope you can help, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From Larry.Jones at aspentech.com Thu May 21 14:25:28 2009 From: Larry.Jones at aspentech.com (Jones, Larry) Date: Thu, 21 May 2009 08:25:28 -0400 Subject: [IronPython] IronPython 2.6 Beta 1 Released In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: Great work, guys, although I was suprised at the error message when I attempted to install over the 2.6 Alpha. The message was: "A later version of Python 2.6 is already installed." Although I realized that I needed to uninstall the Alpha version, the message was surprising. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, May 20, 2009 3:46 PM To: Discussion of IronPython Subject: [IronPython] IronPython 2.6 Beta 1 Released Hello Python Community, We're pleased to announce the release of IronPython 2.6 Beta 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP 3101), etc and as such includes nearly all of the new Python 2.6 features. The small number of remaining features will be implemented for Beta 2. The minimum .NET version required for this release is the same as IronPython 2.0; namely .NET 2.0 Service Pack 1. There've also been several new features added: ctypes, sys._getframe, pyc for pre-compilation, and improved help. Ctypes provides access to C-based APIs and provides a way for Python developers to optimize performance or access libraries that would otherwise be unavailable. sys._getframe is commonly used by Python programs to introspect the call stack and can now be enabled with the -X:Frames and -X:FullFrames command line options; for better compatibility with programs that check for the presence of sys._getframe it is now not available unless these options are provided. The pyc.py pre-compiler is now shipped with IronPython and is available in the Tools\Scripts directory. Finally the help of many builtin functions and types has been improved by including IronPython.xml and IronPython.Modules.xml. Another focus has been on improving startup time of large applications. This release accomplishes that through the adaptive compilation feature announced with 2.6 Alpha 1 and also includes many other enhancements to reduce the amount of code generation required to start applications. But only do these improvements help large applications but they also significantly speed up basic hello worlds startup time. As usual we've also fixed a large number of bugs for this release. We'd like to thank everyone who took the time to report them: atifaziz, Anders M. Mikkelsen, cjacobs, Dan Eloff, davec, fwereade, gjones, hhonisch, jdhardy, Kevin Chu, Kyle Howland-Rose, leppie, Mark Rees, orestis, RuiDC, Seo Sanghyeon, soulfry, tatwright, ufechner, and wilberforce. There's also a few minor changes since IronPython 2.0.1 that are worth calling out here: * Binaries are ngen'd for both 32-bit and 64-bit platforms on install by default * IronPython.msi now offers a little more selection with respect to what you'd like to install. For example, Silverlight templates are optional * The default installation location of IronPython.msi no longer indicates whether the 2.6 release is an Alpha, Beta, or a patched release. Future IronPython 2.6 installations will replace previous 2.6 releases which will be uninstalled automatically * The -X:PreferComInteropAssembly flag has been removed. All COM interop is now done through normal COM dispatch You can download IronPython 2.6 Beta 1 at: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25 126 The IronPython Team This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.p.lepisto at intel.com Thu May 21 16:04:51 2009 From: stephen.p.lepisto at intel.com (Lepisto, Stephen P) Date: Thu, 21 May 2009 07:04:51 -0700 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <361073EA5313C84E95A847FF752AD96536C906B05D@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C906B05D@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <6AF28EB9F93A354894F2F3916DF6F96E0C756C7DE6@orsmsx510.amr.corp.intel.com> Elise, PYTHONPATH is an environment variable and can be set on Windows by going to Control Panel --> System. Select the Advanced tab then click on the Environment Variables button. In the lower pane, click the New button and enter PYTHONPATH for the Variable name and enter the path or paths you want in the Variable value. Use semi-colons to separate multiple paths. Click OK, click OK, and click OK to exit. Note: Visual Studio needs to be closed then reopened for it to recognize the new environment variable (this is true for Visual Studio 2005 and earlier, I actually haven't tested Visual Studio 2008 to see if it properly responds to a change in environment variables). As for adding a reference to an assembly from IronPython, I found good success with using AddReference() with sys.path.append() instead of AddReferenceToFile(). For example, sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") clr.AddReference("Infer.Compiler") clr.AddReference("Infer.Runtime") From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Elise Langham (Elanit) Sent: Thursday, May 21, 2009 4:23 AM To: users at lists.ironpython.com Subject: Re: [IronPython] with_statement in IronPython 2.6 Alpha Hi Dave, Thanks for the reply- I'm running in the Visual Studio under debug. I don't know how to set pythonpath on a windows machine Most of the info is for C shell and linux. I find that the with statement works fine when just using the command line ipy.exe but it can't pick up The references to imported modules. The references work fine when running in Visual Studio though ???? import System from System import Console from System import Array from System import IO import clr import sys sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") clr.AddReferenceToFile("Infer.Compiler.dll") clr.AddReferenceToFile("Infer.Runtime.dll") think this only works when the .dlls are in the IronPython ipy.exe directory though. 'C:\\Users\\i-ellang\\IronPython 2.6' Hope you can help, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From JDM at MarchRay.net Thu May 21 16:12:49 2009 From: JDM at MarchRay.net (Jonathan March) Date: Thu, 21 May 2009 09:12:49 -0500 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: <6AF28EB9F93A354894F2F3916DF6F96E0C756C7DE6@orsmsx510.amr.corp.intel.com> References: <361073EA5313C84E95A847FF752AD96536C906B05D@EA-EXMSG-C334.europe.corp.microsoft.com> <6AF28EB9F93A354894F2F3916DF6F96E0C756C7DE6@orsmsx510.amr.corp.intel.com> Message-ID: Why are we discussing the environment variable PYTHONPATH rather than IRONPYTHONPATH? Does IronPython even look at the former? On Thu, May 21, 2009 at 9:04 AM, Lepisto, Stephen P < stephen.p.lepisto at intel.com> wrote: > Elise, > > > > PYTHONPATH is an environment variable and can be set on Windows by going to > Control Panel ? System. Select the Advanced tab then click on the > Environment Variables button. In the lower pane, click the New button and > enter PYTHONPATH for the Variable name and enter the path or paths you want > in the Variable value. Use semi-colons to separate multiple paths. Click > OK, click OK, and click OK to exit. > > > > Note: Visual Studio needs to be closed then reopened for it to recognize > the new environment variable (this is true for Visual Studio 2005 and > earlier, I actually haven?t tested Visual Studio 2008 to see if it properly > responds to a change in environment variables). > > > > As for adding a reference to an assembly from IronPython, I found good > success with using AddReference() with sys.path.append() instead of > AddReferenceToFile(). For example, > > > > sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") > > clr.AddReference("Infer.Compiler") > > clr.AddReference("Infer.Runtime") > > > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Elise Langham (Elanit) > *Sent:* Thursday, May 21, 2009 4:23 AM > *To:* users at lists.ironpython.com > *Subject:* Re: [IronPython] with_statement in IronPython 2.6 Alpha > > > > Hi Dave, > > Thanks for the reply- I?m running in the Visual Studio > under debug. I don?t know how to set pythonpath on a windows machine > > Most of the info is for C shell and linux. I find that the with statement > works fine when just using the command line ipy.exe but it can?t pick up > > The references to imported modules. The references work fine when running > in Visual Studio though ???? > > > > import System > > from System import Console > > from System import Array > > from System import IO > > import clr > > import sys > > sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") > > clr.AddReferenceToFile("Infer.Compiler.dll") > > clr.AddReferenceToFile("Infer.Runtime.dll") > > > > think this only works when the .dlls are in the IronPython ipy.exe > directory though. > > 'C:\\Users\\i-ellang\\IronPython 2.6? > > > > Hope you can help, > > > > Elise > > _______________________________________________ > 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 curt at hagenlocher.org Thu May 21 16:54:54 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 21 May 2009 07:54:54 -0700 Subject: [IronPython] with_statement in IronPython 2.6 Alpha In-Reply-To: References: <361073EA5313C84E95A847FF752AD96536C906B05D@EA-EXMSG-C334.europe.corp.microsoft.com> <6AF28EB9F93A354894F2F3916DF6F96E0C756C7DE6@orsmsx510.amr.corp.intel.com> Message-ID: Nope. IronPython looks at only IRONPYTHONPATH. (This is easy to test for yourself! :P) On Thu, May 21, 2009 at 7:12 AM, Jonathan March wrote: > Why are we discussing the environment variable PYTHONPATH rather than > IRONPYTHONPATH? Does IronPython even look at the former? > > On Thu, May 21, 2009 at 9:04 AM, Lepisto, Stephen P < > stephen.p.lepisto at intel.com> wrote: > >> Elise, >> >> >> >> PYTHONPATH is an environment variable and can be set on Windows by going >> to Control Panel ? System. Select the Advanced tab then click on the >> Environment Variables button. In the lower pane, click the New button and >> enter PYTHONPATH for the Variable name and enter the path or paths you want >> in the Variable value. Use semi-colons to separate multiple paths. Click >> OK, click OK, and click OK to exit. >> >> >> >> Note: Visual Studio needs to be closed then reopened for it to recognize >> the new environment variable (this is true for Visual Studio 2005 and >> earlier, I actually haven?t tested Visual Studio 2008 to see if it properly >> responds to a change in environment variables). >> >> >> >> As for adding a reference to an assembly from IronPython, I found good >> success with using AddReference() with sys.path.append() instead of >> AddReferenceToFile(). For example, >> >> >> >> sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") >> >> clr.AddReference("Infer.Compiler") >> >> clr.AddReference("Infer.Runtime") >> >> >> >> >> >> *From:* users-bounces at lists.ironpython.com [mailto: >> users-bounces at lists.ironpython.com] *On Behalf Of *Elise Langham (Elanit) >> *Sent:* Thursday, May 21, 2009 4:23 AM >> *To:* users at lists.ironpython.com >> *Subject:* Re: [IronPython] with_statement in IronPython 2.6 Alpha >> >> >> >> Hi Dave, >> >> Thanks for the reply- I?m running in the Visual Studio >> under debug. I don?t know how to set pythonpath on a windows machine >> >> Most of the info is for C shell and linux. I find that the with statement >> works fine when just using the command line ipy.exe but it can?t pick up >> >> The references to imported modules. The references work fine when running >> in Visual Studio though ???? >> >> >> >> import System >> >> from System import Console >> >> from System import Array >> >> from System import IO >> >> import clr >> >> import sys >> >> sys.path.append(r"C:\Users\i-ellang\Documents\Infer.NET2.2\bin\Debug") >> >> clr.AddReferenceToFile("Infer.Compiler.dll") >> >> clr.AddReferenceToFile("Infer.Runtime.dll") >> >> >> >> think this only works when the .dlls are in the IronPython ipy.exe >> directory though. >> >> 'C:\\Users\\i-ellang\\IronPython 2.6? >> >> >> >> Hope you can help, >> >> >> >> Elise >> >> _______________________________________________ >> 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 dfugate at microsoft.com Thu May 21 17:24:28 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Thu, 21 May 2009 08:24:28 -0700 Subject: [IronPython] IronPython 2.6 Beta 1 Released In-Reply-To: References: <1A472770E042064698CB5ADC83A12ACD0288DC31@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: Unfortunately we forgot to mention this in the release notes. Quite late in 2.6 Beta 1 testing we discovered the MSI upgrade code wasn't updated for this release. The net effect of this being that the Windows Installer acts like 2.6 Beta 1 is actually 2.6 Alpha 1. The workaround as you've discovered is to simply uninstall 2.6 Alpha 1 from "Add/Remove Programs" in the Control Panel before attempting to install 2.6 Beta 1. This didn't quite meet the bar for generating a new build, but we definitely should have called this out in the release notes. Sorry for the confusion, and I'll update the release page now. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jones, Larry Sent: Thursday, May 21, 2009 5:25 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 2.6 Beta 1 Released Great work, guys, although I was suprised at the error message when I attempted to install over the 2.6 Alpha. The message was: "A later version of Python 2.6 is already installed." Although I realized that I needed to uninstall the Alpha version, the message was surprising. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, May 20, 2009 3:46 PM To: Discussion of IronPython Subject: [IronPython] IronPython 2.6 Beta 1 Released Hello Python Community, We're pleased to announce the release of IronPython 2.6 Beta 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP 3101), etc and as such includes nearly all of the new Python 2.6 features. The small number of remaining features will be implemented for Beta 2. The minimum .NET version required for this release is the same as IronPython 2.0; namely .NET 2.0 Service Pack 1. There've also been several new features added: ctypes, sys._getframe, pyc for pre-compilation, and improved help. Ctypes provides access to C-based APIs and provides a way for Python developers to optimize performance or access libraries that would otherwise be unavailable. sys._getframe is commonly used by Python programs to introspect the call stack and can now be enabled with the -X:Frames and -X:FullFrames command line options; for better compatibility with programs that check for the presence of sys._getframe it is now not available unless these options are provided. The pyc.py pre-compiler is now shipped with IronPython and is available in the Tools\Scripts directory. Finally the help of many builtin functions and types has been improved by including IronPython.xml and IronPython.Modules.xml. Another focus has been on improving startup time of large applications. This release accomplishes that through the adaptive compilation feature announced with 2.6 Alpha 1 and also includes many other enhancements to reduce the amount of code generation required to start applications. But only do these improvements help large applications but they also significantly speed up basic hello worlds startup time. As usual we've also fixed a large number of bugs for this release. We'd like to thank everyone who took the time to report them: atifaziz, Anders M. Mikkelsen, cjacobs, Dan Eloff, davec, fwereade, gjones, hhonisch, jdhardy, Kevin Chu, Kyle Howland-Rose, leppie, Mark Rees, orestis, RuiDC, Seo Sanghyeon, soulfry, tatwright, ufechner, and wilberforce. There's also a few minor changes since IronPython 2.0.1 that are worth calling out here: * Binaries are ngen'd for both 32-bit and 64-bit platforms on install by default * IronPython.msi now offers a little more selection with respect to what you'd like to install. For example, Silverlight templates are optional * The default installation location of IronPython.msi no longer indicates whether the 2.6 release is an Alpha, Beta, or a patched release. Future IronPython 2.6 installations will replace previous 2.6 releases which will be uninstalled automatically * The -X:PreferComInteropAssembly flag has been removed. All COM interop is now done through normal COM dispatch You can download IronPython 2.6 Beta 1 at: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25126 The IronPython Team This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Thu May 21 17:54:17 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Thu, 21 May 2009 08:54:17 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/51538. DELETED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/ArgumentPrepender.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj From jeanmarc.pouchoulon at gmail.com Thu May 21 18:35:48 2009 From: jeanmarc.pouchoulon at gmail.com (jean-marc pouchoulon) Date: Thu, 21 May 2009 18:35:48 +0200 Subject: [IronPython] SystemError: A specified parameter was not correct (vmware api soap call) Message-ID: <4A1582E4.3000108@gmail.com> hello ironpythonlist, I'm using IronPython 2.0.1 with Vmware API et got an error on a soap call. the code at http://www.ronnie-midnight-oil.net/2008_06_01_archive.html is working , but I want to use also VimApi.TraversalSpec() object in my code and got an error. File "VimService2005", line unknown, in RetrieveProperties File "System.Web.Services", line unknown, in Invoke File "System.Web.Services", line unknown, in ReadResponse SystemError: A specified parameter was not correct. -X:ExceptionDetail ReadResponse at offset 431678 in file:line:column :0:0 Invoke at offset 204 in file:line:column :0:0 RetrieveProperties at offset 65 in file:line:column :0:0 ? Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.CallWithInstance(Object[] args, Boolean& shouldOptimize) ? IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`3.Call2(CallSite site, CodeContext context, TFuncType func, T0 arg0, T1 rg1) ? Microsoft.Scripting.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) ? __main__(Closure ) ? IronPython.Compiler.RuntimeScriptCode.InvokeTarget(LambdaExpression code, Scope scope) ? IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) ? IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName) ? IronPython.Hosting.PythonCommandLine.RunFile(String fileName) SystemError: A specified parameter was not correct. thanks for yours suggestions jean-marc From Jimmy.Schementi at microsoft.com Fri May 22 00:11:21 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 21 May 2009 22:11:21 +0000 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> I completely agree with your points; we have a finite amount of resources and choose to focus on language compatibility over .NET web-stack integration. Though IronPython has done that web-work in the past, we're purely focused on compat. I've forwarded on the previous mail to the ASP.NET team; I want to see IronPython and IronRuby be used on the web more too. =) That being said, I've just finished packaging up Microsoft.Web.Scripting.dll that works against the released IronPython 2 Beta 1, and I'll be releasing it either today to tomorrow ... so end of conversation? =P Na, I this is a good conversation to have, but in short you'll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. Hopefully the next beta of IronPython 2.6 will include the DLL and source, otherwise I'll make this package again. ~js From: Dody Gunawinata [mailto:empirebuilder at gmail.com] Sent: Thursday, May 21, 2009 4:23 AM To: Jimmy Schementi Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net The refresh was unusable because it contained the version of IronPyton that is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 Beta 3/4); I'm griping about this issue in this list because I don't think this is a completely separate issue from the DLR programming languages. Maybe it is not a direct responsibility of this team, but the impact is direct for the following reasons: * Nobody adopts a language as is. The libraries matters. The existing community of Python and Ruby are not going to move to Windows platform just because IronPython and IronRuby are being worked on and released. They have had a multi platform runtimes with de facto standards that are capable of doing wonderful things for more than a decade. * There is much bigger market for language adoption for existing .Net/Windows based developers (and new developers) and these guys/gals are using mostly standard Microsoft stacks. And they are using .Net via mainly C# and VB.Net. If the DLR languages do not have proper support at least for the major technology stacks (I would consider ASP.Net/Silverlight as major stacks), many people will not consider using the DLR based language for their production systems. * I know ASP.Net MVC is open source and it's free to be extended etc, but ASP.Net WebForm have be en deployed massively and that's not going to change anytime soon. And theres is already a support, albeit poor and not up to date, for ASP.Net webform stacks in IronPython. Not having it fully updated is a waste of opportunity. * .Net 4.0 and C# vNext contains dynamic language support but really, what is good for if the DLR languages can only be used in much more limited scenarios because some major technology stacks are not supported. * You raised correctly that Django and RoR are being used to validate the languages. But I would argue that the existing technology stack support validates the DLR platform, not just the languages. So yes, I'm not happy with the level of investment being put on supporting the technology stacks because I think it is pretty short sighted. No, I don't blame this team for this but at least if I complain on this list, it might have a chance being forwarded internally because this is one of the best community mailing list for Microsoft technologies. Dody Gunawinata On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi > wrote: First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack (http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamb at silverkeytech.com Fri May 22 00:29:31 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Thu, 21 May 2009 15:29:31 -0700 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <0b6301c9da63$9d1ed1f0$d75c75d0$@com> w00t! J Thank you so much! Adam Brand SilverKey Technologies From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Thursday, May 21, 2009 3:11 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net I completely agree with your points; we have a finite amount of resources and choose to focus on language compatibility over .NET web-stack integration. Though IronPython has done that web-work in the past, we're purely focused on compat. I've forwarded on the previous mail to the ASP.NET team; I want to see IronPython and IronRuby be used on the web more too. =) That being said, I've just finished packaging up Microsoft.Web.Scripting.dll that works against the released IronPython 2 Beta 1, and I'll be releasing it either today to tomorrow . so end of conversation? =P Na, I this is a good conversation to have, but in short you'll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. Hopefully the next beta of IronPython 2.6 will include the DLL and source, otherwise I'll make this package again. ~js From: Dody Gunawinata [mailto:empirebuilder at gmail.com] Sent: Thursday, May 21, 2009 4:23 AM To: Jimmy Schementi Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net The refresh was unusable because it contained the version of IronPyton that is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 Beta 3/4); I'm griping about this issue in this list because I don't think this is a completely separate issue from the DLR programming languages. Maybe it is not a direct responsibility of this team, but the impact is direct for the following reasons: * Nobody adopts a language as is. The libraries matters. The existing community of Python and Ruby are not going to move to Windows platform just because IronPython and IronRuby are being worked on and released. They have had a multi platform runtimes with de facto standards that are capable of doing wonderful things for more than a decade. * There is much bigger market for language adoption for existing .Net/Windows based developers (and new developers) and these guys/gals are using mostly standard Microsoft stacks. And they are using .Net via mainly C# and VB.Net. If the DLR languages do not have proper support at least for the major technology stacks (I would consider ASP.Net/Silverlight as major stacks), many people will not consider using the DLR based language for their production systems. * I know ASP.Net MVC is open source and it's free to be extended etc, but ASP.Net WebForm have be en deployed massively and that's not going to change anytime soon. And theres is already a support, albeit poor and not up to date, for ASP.Net webform stacks in IronPython. Not having it fully updated is a waste of opportunity. * .Net 4.0 and C# vNext contains dynamic language support but really, what is good for if the DLR languages can only be used in much more limited scenarios because some major technology stacks are not supported. * You raised correctly that Django and RoR are being used to validate the languages. But I would argue that the existing technology stack support validates the DLR platform, not just the languages. So yes, I'm not happy with the level of investment being put on supporting the technology stacks because I think it is pretty short sighted. No, I don't blame this team for this but at least if I complain on this list, it might have a chance being forwarded internally because this is one of the best community mailing list for Microsoft technologies. Dody Gunawinata On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi wrote: First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/00 8497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack ( http://www.haacked.com) or Dmitry Robsman ( http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Fri May 22 17:53:15 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 22 May 2009 08:53:15 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/51753. ADDED SOURCES $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/dynamic_runner.bat $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/dynamic_sanity.cs $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/mock.py $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Debug.out $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Release.out DELETED SOURCES $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.out MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/LanguageSetup.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/CompiledCode.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ObjectOperations.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonOptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPythonTest/EngineTest.cs $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/dynamic_runner.bat $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/dynamic_sanity.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/Shell/OptionsParser.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ScriptScope.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/LanguageOptions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ScriptEngine.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ScriptSource.cs $/IronPython/IronPython_Main/Src/Tests/dynamic_sanity/mock.py $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Debug.out $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleFlags.ps1 $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Release.out $/IronPython/IronPython_Main/Src/Tests/test_memory.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 903837 Date: 5/21/2009 4:25:28 PM Added trivial 'dynamic' test to help us validate CTP releases of IronPython under .NET 4.0. This test is quite intentionally not being hooked into SNAP. -------------------------------------------------------------------------------- Changeset Id: 902916 Date: 5/21/2009 12:44:49 PM (dfugate) - increased the GenericTest timeout for test_array_cpy. This test timed out under x64 Vista during 2.6B1 signoff - "ipy -h" output is different depending upon whether we're using Release or Debug binaries. Adjusted ConsoleFlags.ps1 accordingly - increased the maximum expected memory usage by a case in test_memory.py under x64 - try to force a CLR garbage collection in CPython's test_tarfile.py before exiting the process. Detected a number of sporadic failures of this test during 2.6B1 signoff (Shelveset: CP60;REDMOND\dfugate | SNAP CheckinId: m9187) From empirebuilder at gmail.com Fri May 22 20:38:51 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 22 May 2009 21:38:51 +0300 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> IronPython 2 Beta 1 ? On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > I completely agree with your points; we have a finite amount of resources > and choose to focus on language compatibility over .NET web-stack > integration. Though IronPython has done that web-work in the past, we?re > purely focused on compat. I?ve forwarded on the previous mail to the > ASP.NET team; I want to see IronPython and IronRuby be used on the web > more too. =) > > > > That being said, *I?ve just finished packaging up > Microsoft.Web.Scripting.dll that works against the released IronPython 2 > Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of > conversation? =P Na, I this is a good conversation to have, but in short > you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. > Hopefully the next beta of IronPython 2.6 will include the DLL and source, > otherwise I?ll make this package again. > > > > ~js > > > > *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] > *Sent:* Thursday, May 21, 2009 4:23 AM > *To:* Jimmy Schementi > *Cc:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython for ASP.Net > > > > The refresh was unusable because it contained the version of IronPyton that > is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 > Beta 3/4); > > I'm griping about this issue in this list because I don't think this is a > completely separate issue from the DLR programming languages. Maybe it is > not a direct responsibility of this team, but the impact is direct for the > following reasons: > > - Nobody adopts a language as is. The libraries matters. The existing > community of Python and Ruby are not going to move to Windows platform just > because IronPython and IronRuby are being worked on and released. They have > had a multi platform runtimes with de facto standards that are capable of > doing wonderful things for more than a decade. > - There is much bigger market for language adoption for existing > .Net/Windows based developers (and new developers) and these guys/gals are > using mostly standard Microsoft stacks. And they are using .Net via mainly > C# and VB.Net. If the DLR languages do not have proper support at least for > the major technology stacks (I would consider ASP.Net/Silverlight as major > stacks), many people will not consider using the DLR based language for > their production systems. > - I know ASP.Net MVC is open source and it's free to be extended etc, > but ASP.Net WebForm have be en deployed massively and that's not going to > change anytime soon. And theres is already a support, albeit poor and not up > to date, for ASP.Net webform stacks in IronPython. Not having it fully > updated is a waste of opportunity. > - .Net 4.0 and C# vNext contains dynamic language support but really, > what is good for if the DLR languages can only be used in much more limited > scenarios because some major technology stacks are not supported. > - You raised correctly that Django and RoR are being used to validate > the languages. But I would argue that the existing technology stack support > validates the DLR platform, not just the languages. > > So yes, I'm not happy with the level of investment being put on supporting > the technology stacks because I think it is pretty short sighted. No, I > don't blame this team for this but at least if I complain on this list, it > might have a chance being forwarded internally because this is one of the > best community mailing list for Microsoft technologies. > > Dody Gunawinata > > On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > First off, it hasn?t been three years: a refresh was released 8 months ago, > and sent to this very list: > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html > > > > Secondly, rather than just producing these one off releases (where are very > taxing on the team), we?re doing it right and getting the source code > released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and > nightly builds. Then it can be included in each IronPython release, just > like Silverlight binaries are. > > > > Lastly, IronRuby and IronPython are programming languages, made by > programming language teams. We?re very interested in running as many > existing Ruby and Python programs as possible. It just so happens that > Django and Rails are popular, complex pieces of software that help find > bugs, and give the languages street cred for running them. If those web > frameworks didn?t run, theirs probably something wrong with our language. > > > > Running in ASP.NET and MVC require a significant amount of work *outside*of the language, so it really isn?t a language team?s purpose to build that. > Sure they provide good demos as conferences or blog posts, but they?ll only > be toys. We?ve invested in those technologies before, which is why the > ASP.NET and Silverlight integration exists, but no one is working on > enabling web-technologies full-time (though I have spurts of diving back > into Silverlight from time to time). If you don?t like the level of > investment in dynamic languages for Microsoft web technologies, that?s > something that you should communicate to the ASP.NET team; Phil Haack ( > http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) > are good people to address. > > > > ~Jimmy > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Wednesday, May 20, 2009 1:22 PM > *To:* Discussion of IronPython > *Subject:* [IronPython] IronPython for ASP.Net > > > > Is there any update for IronPython for ASP.Net? > > > > It has been three years since IronPython support for ASP.Net introduced > with the release of the whitepaper ( > http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. > Since then I think we've had Katrina, a Beijing Olympic, a new President, a > financial collapse and two James Bond movies - yet until now there is still > no up to date support for the technology. I know that the legal team, etc > are working on the source release, but I think it is pretty galling that > Microsoft's own web framework stack is barely supported by its own dynamic > language technology, both on the 'classic' ASP.Net and MVC stack. I mean > there is more energy put into having IronPython and IronRuby to run Django > and RubyOnRails web framework instead of ASP.Net stack. This just doesn't > make sense to me. > > -- > nomadlife.org > > > > > -- > nomadlife.org > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Fri May 22 21:11:00 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Fri, 22 May 2009 22:11:00 +0300 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <8cd017b80905221211n229f755bn5f2e68757342f6c0@mail.gmail.com> I have another wish list :) 1. I hope the M/Oslo team are talking to the DLR team especially for M-Grammar for the "virtual machine" facilities to make those generated AST to become actual functioning DSLs. The "sympl" language implementation (in a message a couple of days ago) is very interesting. 2. What happened to Managed JScript? 3. What is missing from IronPython for Asp.Net is a pure interpreted mode. Right now every asp.net page is converted to an assembly and cached there. The only way to simulate an interpreted mode is to lie to asp.net that the dll doesn't exist using virtual path provider. The neat thing about interpreted mode is that you can inject additional code on the fly depending on the http request for asp.net to process. When the source code is available, I think it will be possible to add this feature in a short time. On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > I completely agree with your points; we have a finite amount of resources > and choose to focus on language compatibility over .NET web-stack > integration. Though IronPython has done that web-work in the past, we?re > purely focused on compat. I?ve forwarded on the previous mail to the > ASP.NET team; I want to see IronPython and IronRuby be used on the web > more too. =) > > > > That being said, *I?ve just finished packaging up > Microsoft.Web.Scripting.dll that works against the released IronPython 2 > Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of > conversation? =P Na, I this is a good conversation to have, but in short > you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. > Hopefully the next beta of IronPython 2.6 will include the DLL and source, > otherwise I?ll make this package again. > > > > ~js > > > > *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] > *Sent:* Thursday, May 21, 2009 4:23 AM > *To:* Jimmy Schementi > *Cc:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython for ASP.Net > > > > The refresh was unusable because it contained the version of IronPyton that > is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 > Beta 3/4); > > I'm griping about this issue in this list because I don't think this is a > completely separate issue from the DLR programming languages. Maybe it is > not a direct responsibility of this team, but the impact is direct for the > following reasons: > > - Nobody adopts a language as is. The libraries matters. The existing > community of Python and Ruby are not going to move to Windows platform just > because IronPython and IronRuby are being worked on and released. They have > had a multi platform runtimes with de facto standards that are capable of > doing wonderful things for more than a decade. > - There is much bigger market for language adoption for existing > .Net/Windows based developers (and new developers) and these guys/gals are > using mostly standard Microsoft stacks. And they are using .Net via mainly > C# and VB.Net. If the DLR languages do not have proper support at least for > the major technology stacks (I would consider ASP.Net/Silverlight as major > stacks), many people will not consider using the DLR based language for > their production systems. > - I know ASP.Net MVC is open source and it's free to be extended etc, > but ASP.Net WebForm have be en deployed massively and that's not going to > change anytime soon. And theres is already a support, albeit poor and not up > to date, for ASP.Net webform stacks in IronPython. Not having it fully > updated is a waste of opportunity. > - .Net 4.0 and C# vNext contains dynamic language support but really, > what is good for if the DLR languages can only be used in much more limited > scenarios because some major technology stacks are not supported. > - You raised correctly that Django and RoR are being used to validate > the languages. But I would argue that the existing technology stack support > validates the DLR platform, not just the languages. > > So yes, I'm not happy with the level of investment being put on supporting > the technology stacks because I think it is pretty short sighted. No, I > don't blame this team for this but at least if I complain on this list, it > might have a chance being forwarded internally because this is one of the > best community mailing list for Microsoft technologies. > > Dody Gunawinata > > On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > First off, it hasn?t been three years: a refresh was released 8 months ago, > and sent to this very list: > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html > > > > Secondly, rather than just producing these one off releases (where are very > taxing on the team), we?re doing it right and getting the source code > released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and > nightly builds. Then it can be included in each IronPython release, just > like Silverlight binaries are. > > > > Lastly, IronRuby and IronPython are programming languages, made by > programming language teams. We?re very interested in running as many > existing Ruby and Python programs as possible. It just so happens that > Django and Rails are popular, complex pieces of software that help find > bugs, and give the languages street cred for running them. If those web > frameworks didn?t run, theirs probably something wrong with our language. > > > > Running in ASP.NET and MVC require a significant amount of work *outside*of the language, so it really isn?t a language team?s purpose to build that. > Sure they provide good demos as conferences or blog posts, but they?ll only > be toys. We?ve invested in those technologies before, which is why the > ASP.NET and Silverlight integration exists, but no one is working on > enabling web-technologies full-time (though I have spurts of diving back > into Silverlight from time to time). If you don?t like the level of > investment in dynamic languages for Microsoft web technologies, that?s > something that you should communicate to the ASP.NET team; Phil Haack ( > http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) > are good people to address. > > > > ~Jimmy > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Wednesday, May 20, 2009 1:22 PM > *To:* Discussion of IronPython > *Subject:* [IronPython] IronPython for ASP.Net > > > > Is there any update for IronPython for ASP.Net? > > > > It has been three years since IronPython support for ASP.Net introduced > with the release of the whitepaper ( > http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. > Since then I think we've had Katrina, a Beijing Olympic, a new President, a > financial collapse and two James Bond movies - yet until now there is still > no up to date support for the technology. I know that the legal team, etc > are working on the source release, but I think it is pretty galling that > Microsoft's own web framework stack is barely supported by its own dynamic > language technology, both on the 'classic' ASP.Net and MVC stack. I mean > there is more energy put into having IronPython and IronRuby to run Django > and RubyOnRails web framework instead of ASP.Net stack. This just doesn't > make sense to me. > > -- > nomadlife.org > > > > > -- > nomadlife.org > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Fri May 22 21:21:35 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 22 May 2009 19:21:35 +0000 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> Woops, I meant 2.6. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Friday, May 22, 2009 11:39 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net IronPython 2 Beta 1 ? On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi > wrote: I completely agree with your points; we have a finite amount of resources and choose to focus on language compatibility over .NET web-stack integration. Though IronPython has done that web-work in the past, we're purely focused on compat. I've forwarded on the previous mail to the ASP.NET team; I want to see IronPython and IronRuby be used on the web more too. =) That being said, I've just finished packaging up Microsoft.Web.Scripting.dll that works against the released IronPython 2 Beta 1, and I'll be releasing it either today to tomorrow ... so end of conversation? =P Na, I this is a good conversation to have, but in short you'll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. Hopefully the next beta of IronPython 2.6 will include the DLL and source, otherwise I'll make this package again. ~js From: Dody Gunawinata [mailto:empirebuilder at gmail.com] Sent: Thursday, May 21, 2009 4:23 AM To: Jimmy Schementi Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net The refresh was unusable because it contained the version of IronPyton that is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 Beta 3/4); I'm griping about this issue in this list because I don't think this is a completely separate issue from the DLR programming languages. Maybe it is not a direct responsibility of this team, but the impact is direct for the following reasons: * Nobody adopts a language as is. The libraries matters. The existing community of Python and Ruby are not going to move to Windows platform just because IronPython and IronRuby are being worked on and released. They have had a multi platform runtimes with de facto standards that are capable of doing wonderful things for more than a decade. * There is much bigger market for language adoption for existing .Net/Windows based developers (and new developers) and these guys/gals are using mostly standard Microsoft stacks. And they are using .Net via mainly C# and VB.Net. If the DLR languages do not have proper support at least for the major technology stacks (I would consider ASP.Net/Silverlight as major stacks), many people will not consider using the DLR based language for their production systems. * I know ASP.Net MVC is open source and it's free to be extended etc, but ASP.Net WebForm have be en deployed massively and that's not going to change anytime soon. And theres is already a support, albeit poor and not up to date, for ASP.Net webform stacks in IronPython. Not having it fully updated is a waste of opportunity. * .Net 4.0 and C# vNext contains dynamic language support but really, what is good for if the DLR languages can only be used in much more limited scenarios because some major technology stacks are not supported. * You raised correctly that Django and RoR are being used to validate the languages. But I would argue that the existing technology stack support validates the DLR platform, not just the languages. So yes, I'm not happy with the level of investment being put on supporting the technology stacks because I think it is pretty short sighted. No, I don't blame this team for this but at least if I complain on this list, it might have a chance being forwarded internally because this is one of the best community mailing list for Microsoft technologies. Dody Gunawinata On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi > wrote: First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack (http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Fri May 22 22:29:56 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 22 May 2009 13:29:56 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <52e8dff1-0601-4b81-b39a-4d022fd264d6@tk5-exsmh-c101.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/51820. DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeValueSlot.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaUserObject.Members.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/SlotOrFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonTypeOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/CustomTypeDescHelpers.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeUserDescriptorSlot.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/DictProxy.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.GetMember.cs $/IronPython/IronPython_Main/Src/Tests/test_class.py From mbk.lists at gmail.com Sat May 23 19:29:34 2009 From: mbk.lists at gmail.com (Mike Krell) Date: Sat, 23 May 2009 10:29:34 -0700 Subject: [IronPython] 2.6 Beta 1 Bug: help() requires _getframe support which is now optional Message-ID: With 2.6 beta 1 and without -X:frames: >>> help() Traceback (most recent call last): File "", line 1, in File "C:\Program Files\IronPython 2.6\Lib\site.py", line 428, in __call__ File "C:\Program Files\IronPython 2.6\Lib\pydoc.py", line 53, in C:\Program Files\IronPython 2.6\Lib\pydoc.py File "C:\Program Files\IronPython 2.6\Lib\inspect.py", line 950, in C:\Program Files\IronPython 2.6\Lib\inspect.py AttributeError: 'module' object has no attribute '_getframe' This is now item 22640 on CodePlex. Mike From fuzzyman at voidspace.org.uk Sun May 24 01:43:38 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 24 May 2009 00:43:38 +0100 Subject: [IronPython] Performance of dir Message-ID: <4A188A2A.5040301@voidspace.org.uk> Hello all, On IronPython 2.0.1 the last line of this code takes ~4 seconds the first time it is executed: >>> import clr >>> clr.AddReference('System.Windows.Forms') >>> from System.Windows.Forms import * >>> dir(Form) Form.__dict__.keys() (which for a .NET type is equivalent) takes ~1 second or less. What extra work is dir doing? (Is it pulling in the xml docstrings?) Thanks Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Sun May 24 01:47:39 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 24 May 2009 00:47:39 +0100 Subject: [IronPython] Performance of dir In-Reply-To: <4A188A2A.5040301@voidspace.org.uk> References: <4A188A2A.5040301@voidspace.org.uk> Message-ID: <4A188B1B.3090307@voidspace.org.uk> Michael Foord wrote: > Hello all, > > On IronPython 2.0.1 the last line of this code takes ~4 seconds the > first time it is executed: > > >>> import clr > >>> clr.AddReference('System.Windows.Forms') > >>> from System.Windows.Forms import * > >>> dir(Form) > > Form.__dict__.keys() (which for a .NET type is equivalent) takes ~1 > second or less. What extra work is dir doing? (Is it pulling in the > xml docstrings?) > Actually they're not equivalent, my bad: >>> len(Form.__dict__) 287 >>> len(dir(Form)) 540 Michael > Thanks > > Michael > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From empirebuilder at gmail.com Sun May 24 11:56:28 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 24 May 2009 12:56:28 +0300 Subject: [IronPython] Another LISP implementation on .Net Message-ID: <8cd017b80905240256h4c55d53eieee02335b88e43b@mail.gmail.com> http://yarr.codeplex.com/ This comes with a pretty good documentation and a continuation of the LSHarp project. It's not based on DLR. -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronnie.maor at gmail.com Sun May 24 13:58:46 2009 From: ronnie.maor at gmail.com (Ronnie Maor) Date: Sun, 24 May 2009 14:58:46 +0300 Subject: [IronPython] SystemError: A specified parameter was not correct (vmware api soap call) In-Reply-To: <4A1582E4.3000108@gmail.com> References: <4A1582E4.3000108@gmail.com> Message-ID: <2fd6b9d0905240458o1f8e9f1eh826b6e6b3a6a136c@mail.gmail.com> I think it's a VMware problem, not IronPython - I used to get those during development. Usually it's something silly like trying to retrieve a non-existent property.I'm using TraversalSpec, so if you send the code you're using I can try to help you. On Thu, May 21, 2009 at 7:35 PM, jean-marc pouchoulon < jeanmarc.pouchoulon at gmail.com> wrote: > hello ironpythonlist, > > I'm using IronPython 2.0.1 with Vmware API et got an error on a soap call. > the code at http://www.ronnie-midnight-oil.net/2008_06_01_archive.html is > working , but I want to use also VimApi.TraversalSpec() object in my code > and got an error. > > File "VimService2005", line unknown, in RetrieveProperties > File "System.Web.Services", line unknown, in Invoke > File "System.Web.Services", line unknown, in ReadResponse > SystemError: A specified parameter was not correct. > > -X:ExceptionDetail > > ReadResponse at offset 431678 in file:line:column :0:0 > Invoke at offset 204 in file:line:column :0:0 > > RetrieveProperties at offset 65 in file:line:column :0:0 > > ? > Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.CallWithInstance(Object[] > args, Boolean& shouldOptimize) > ? > IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`3.Call2(CallSite > site, CodeContext context, TFuncType func, T0 arg0, T1 > rg1) > ? > Microsoft.Scripting.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) > ? __main__(Closure ) > ? IronPython.Compiler.RuntimeScriptCode.InvokeTarget(LambdaExpression > code, Scope scope) > ? IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) > ? IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName) > ? IronPython.Hosting.PythonCommandLine.RunFile(String fileName) > SystemError: A specified parameter was not correct. > > thanks for yours suggestions > > jean-marc > > > > > _______________________________________________ > 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 Sun May 24 14:15:48 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sun, 24 May 2009 21:15:48 +0900 Subject: [IronPython] 2.6 Beta 1 Bug: help() requires _getframe support which is now optional In-Reply-To: References: Message-ID: <5b0248170905240515k409eb0ebve355483e3773a277@mail.gmail.com> 2009/5/24 Mike Krell : > With 2.6 beta 1 and without -X:frames: >>>> help() > Traceback (most recent call last): > File "", line 1, in > File "C:\Program Files\IronPython 2.6\Lib\site.py", line 428, in __call__ > File "C:\Program Files\IronPython 2.6\Lib\pydoc.py", line 53, in > C:\Program Files\IronPython 2.6\Lib\pydoc.py > File "C:\Program Files\IronPython 2.6\Lib\inspect.py", line 950, in > C:\Program Files\IronPython 2.6\Lib\inspect.py > AttributeError: 'module' object has no attribute '_getframe' Temporary workaround: run reload(__builtins__) at the beginning of interactive sessions. -- Seo Sanghyeon From empirebuilder at gmail.com Sun May 24 14:25:56 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 24 May 2009 15:25:56 +0300 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> Is there any chance for this to come up today? I know it's weekend and the summer. On Fri, May 22, 2009 at 10:21 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Woops, I meant 2.6. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Friday, May 22, 2009 11:39 AM > *To:* Discussion of IronPython > > *Subject:* Re: [IronPython] IronPython for ASP.Net > > > > IronPython 2 Beta 1 ? > > On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > I completely agree with your points; we have a finite amount of resources > and choose to focus on language compatibility over .NET web-stack > integration. Though IronPython has done that web-work in the past, we?re > purely focused on compat. I?ve forwarded on the previous mail to the > ASP.NET team; I want to see IronPython and IronRuby be used on the web > more too. =) > > > > That being said, *I?ve just finished packaging up > Microsoft.Web.Scripting.dll that works against the released IronPython 2 > Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of > conversation? =P Na, I this is a good conversation to have, but in short > you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. > Hopefully the next beta of IronPython 2.6 will include the DLL and source, > otherwise I?ll make this package again. > > > > ~js > > > > *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] > *Sent:* Thursday, May 21, 2009 4:23 AM > *To:* Jimmy Schementi > *Cc:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython for ASP.Net > > > > The refresh was unusable because it contained the version of IronPyton that > is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 > Beta 3/4); > > I'm griping about this issue in this list because I don't think this is a > completely separate issue from the DLR programming languages. Maybe it is > not a direct responsibility of this team, but the impact is direct for the > following reasons: > > - Nobody adopts a language as is. The libraries matters. The existing > community of Python and Ruby are not going to move to Windows platform just > because IronPython and IronRuby are being worked on and released. They have > had a multi platform runtimes with de facto standards that are capable of > doing wonderful things for more than a decade. > - There is much bigger market for language adoption for existing > .Net/Windows based developers (and new developers) and these guys/gals are > using mostly standard Microsoft stacks. And they are using .Net via mainly > C# and VB.Net. If the DLR languages do not have proper support at least for > the major technology stacks (I would consider ASP.Net/Silverlight as major > stacks), many people will not consider using the DLR based language for > their production systems. > - I know ASP.Net MVC is open source and it's free to be extended etc, > but ASP.Net WebForm have be en deployed massively and that's not going to > change anytime soon. And theres is already a support, albeit poor and not up > to date, for ASP.Net webform stacks in IronPython. Not having it fully > updated is a waste of opportunity. > - .Net 4.0 and C# vNext contains dynamic language support but really, > what is good for if the DLR languages can only be used in much more limited > scenarios because some major technology stacks are not supported. > - You raised correctly that Django and RoR are being used to validate > the languages. But I would argue that the existing technology stack support > validates the DLR platform, not just the languages. > > So yes, I'm not happy with the level of investment being put on supporting > the technology stacks because I think it is pretty short sighted. No, I > don't blame this team for this but at least if I complain on this list, it > might have a chance being forwarded internally because this is one of the > best community mailing list for Microsoft technologies. > > Dody Gunawinata > > On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > First off, it hasn?t been three years: a refresh was released 8 months ago, > and sent to this very list: > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html > > > > Secondly, rather than just producing these one off releases (where are very > taxing on the team), we?re doing it right and getting the source code > released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and > nightly builds. Then it can be included in each IronPython release, just > like Silverlight binaries are. > > > > Lastly, IronRuby and IronPython are programming languages, made by > programming language teams. We?re very interested in running as many > existing Ruby and Python programs as possible. It just so happens that > Django and Rails are popular, complex pieces of software that help find > bugs, and give the languages street cred for running them. If those web > frameworks didn?t run, theirs probably something wrong with our language. > > > > Running in ASP.NET and MVC require a significant amount of work *outside*of the language, so it really isn?t a language team?s purpose to build that. > Sure they provide good demos as conferences or blog posts, but they?ll only > be toys. We?ve invested in those technologies before, which is why the > ASP.NET and Silverlight integration exists, but no one is working on > enabling web-technologies full-time (though I have spurts of diving back > into Silverlight from time to time). If you don?t like the level of > investment in dynamic languages for Microsoft web technologies, that?s > something that you should communicate to the ASP.NET team; Phil Haack ( > http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) > are good people to address. > > > > ~Jimmy > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata > *Sent:* Wednesday, May 20, 2009 1:22 PM > *To:* Discussion of IronPython > *Subject:* [IronPython] IronPython for ASP.Net > > > > Is there any update for IronPython for ASP.Net? > > > > It has been three years since IronPython support for ASP.Net introduced > with the release of the whitepaper ( > http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. > Since then I think we've had Katrina, a Beijing Olympic, a new President, a > financial collapse and two James Bond movies - yet until now there is still > no up to date support for the technology. I know that the legal team, etc > are working on the source release, but I think it is pretty galling that > Microsoft's own web framework stack is barely supported by its own dynamic > language technology, both on the 'classic' ASP.Net and MVC stack. I mean > there is more energy put into having IronPython and IronRuby to run Django > and RubyOnRails web framework instead of ASP.Net stack. This just doesn't > make sense to me. > > -- > nomadlife.org > > > > > -- > nomadlife.org > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > nomadlife.org > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Sun May 24 14:43:23 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 24 May 2009 05:43:23 -0700 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> Message-ID: Judging by the last internal email I saw about this on Friday, I'd guess not... :( On Sun, May 24, 2009 at 5:25 AM, Dody Gunawinata wrote: > Is there any chance for this to come up today? I know it's weekend and the > summer. > > On Fri, May 22, 2009 at 10:21 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > >> Woops, I meant 2.6. >> >> >> >> *From:* users-bounces at lists.ironpython.com [mailto: >> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >> *Sent:* Friday, May 22, 2009 11:39 AM >> *To:* Discussion of IronPython >> >> *Subject:* Re: [IronPython] IronPython for ASP.Net >> >> >> >> IronPython 2 Beta 1 ? >> >> On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < >> Jimmy.Schementi at microsoft.com> wrote: >> >> I completely agree with your points; we have a finite amount of resources >> and choose to focus on language compatibility over .NET web-stack >> integration. Though IronPython has done that web-work in the past, we?re >> purely focused on compat. I?ve forwarded on the previous mail to the >> ASP.NET team; I want to see IronPython and IronRuby be used on the web >> more too. =) >> >> >> >> That being said, *I?ve just finished packaging up >> Microsoft.Web.Scripting.dll that works against the released IronPython 2 >> Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of >> conversation? =P Na, I this is a good conversation to have, but in short >> you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. >> Hopefully the next beta of IronPython 2.6 will include the DLL and source, >> otherwise I?ll make this package again. >> >> >> >> ~js >> >> >> >> *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] >> *Sent:* Thursday, May 21, 2009 4:23 AM >> *To:* Jimmy Schementi >> *Cc:* Discussion of IronPython >> *Subject:* Re: [IronPython] IronPython for ASP.Net >> >> >> >> The refresh was unusable because it contained the version of IronPyton >> that is not compatible with .Net 3.5 framework (I think it was built on IP >> 2.0 Beta 3/4); >> >> I'm griping about this issue in this list because I don't think this is a >> completely separate issue from the DLR programming languages. Maybe it is >> not a direct responsibility of this team, but the impact is direct for the >> following reasons: >> >> - Nobody adopts a language as is. The libraries matters. The existing >> community of Python and Ruby are not going to move to Windows platform just >> because IronPython and IronRuby are being worked on and released. They have >> had a multi platform runtimes with de facto standards that are capable of >> doing wonderful things for more than a decade. >> - There is much bigger market for language adoption for existing >> .Net/Windows based developers (and new developers) and these guys/gals are >> using mostly standard Microsoft stacks. And they are using .Net via mainly >> C# and VB.Net. If the DLR languages do not have proper support at least for >> the major technology stacks (I would consider ASP.Net/Silverlight as major >> stacks), many people will not consider using the DLR based language for >> their production systems. >> - I know ASP.Net MVC is open source and it's free to be extended etc, >> but ASP.Net WebForm have be en deployed massively and that's not going to >> change anytime soon. And theres is already a support, albeit poor and not up >> to date, for ASP.Net webform stacks in IronPython. Not having it fully >> updated is a waste of opportunity. >> - .Net 4.0 and C# vNext contains dynamic language support but really, >> what is good for if the DLR languages can only be used in much more limited >> scenarios because some major technology stacks are not supported. >> - You raised correctly that Django and RoR are being used to validate >> the languages. But I would argue that the existing technology stack support >> validates the DLR platform, not just the languages. >> >> So yes, I'm not happy with the level of investment being put on supporting >> the technology stacks because I think it is pretty short sighted. No, I >> don't blame this team for this but at least if I complain on this list, it >> might have a chance being forwarded internally because this is one of the >> best community mailing list for Microsoft technologies. >> >> Dody Gunawinata >> >> On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < >> Jimmy.Schementi at microsoft.com> wrote: >> >> First off, it hasn?t been three years: a refresh was released 8 months >> ago, and sent to this very list: >> >> >> http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html >> >> >> >> Secondly, rather than just producing these one off releases (where are >> very taxing on the team), we?re doing it right and getting the source code >> released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and >> nightly builds. Then it can be included in each IronPython release, just >> like Silverlight binaries are. >> >> >> >> Lastly, IronRuby and IronPython are programming languages, made by >> programming language teams. We?re very interested in running as many >> existing Ruby and Python programs as possible. It just so happens that >> Django and Rails are popular, complex pieces of software that help find >> bugs, and give the languages street cred for running them. If those web >> frameworks didn?t run, theirs probably something wrong with our language. >> >> >> >> Running in ASP.NET and MVC require a significant amount of work *outside*of the language, so it really isn?t a language team?s purpose to build that. >> Sure they provide good demos as conferences or blog posts, but they?ll only >> be toys. We?ve invested in those technologies before, which is why the >> ASP.NET and Silverlight integration exists, but no one is working on >> enabling web-technologies full-time (though I have spurts of diving back >> into Silverlight from time to time). If you don?t like the level of >> investment in dynamic languages for Microsoft web technologies, that?s >> something that you should communicate to the ASP.NET team; Phil Haack ( >> http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) >> are good people to address. >> >> >> >> ~Jimmy >> >> >> >> *From:* users-bounces at lists.ironpython.com [mailto: >> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >> *Sent:* Wednesday, May 20, 2009 1:22 PM >> *To:* Discussion of IronPython >> *Subject:* [IronPython] IronPython for ASP.Net >> >> >> >> Is there any update for IronPython for ASP.Net? >> >> >> >> It has been three years since IronPython support for ASP.Net introduced >> with the release of the whitepaper ( >> http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. >> Since then I think we've had Katrina, a Beijing Olympic, a new President, a >> financial collapse and two James Bond movies - yet until now there is still >> no up to date support for the technology. I know that the legal team, etc >> are working on the source release, but I think it is pretty galling that >> Microsoft's own web framework stack is barely supported by its own dynamic >> language technology, both on the 'classic' ASP.Net and MVC stack. I mean >> there is more energy put into having IronPython and IronRuby to run Django >> and RubyOnRails web framework instead of ASP.Net stack. This just doesn't >> make sense to me. >> >> -- >> nomadlife.org >> >> >> >> >> -- >> nomadlife.org >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> >> -- >> nomadlife.org >> > > > > -- > nomadlife.org > > > _______________________________________________ > 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 curt at hagenlocher.org Sun May 24 14:59:48 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 24 May 2009 05:59:48 -0700 Subject: [IronPython] Performance of dir In-Reply-To: <4A188B1B.3090307@voidspace.org.uk> References: <4A188A2A.5040301@voidspace.org.uk> <4A188B1B.3090307@voidspace.org.uk> Message-ID: The first time you do a dir() of Form, we have to use Reflection to introspect - every member on Form - every member on ContainerControl - every member on ScrollableControl - every member on Control - every member on Component (aka the inheritance hierarchy of Form :D ) After that, the members are all cached and subsequent access should be quite fast. On Sat, May 23, 2009 at 4:47 PM, Michael Foord wrote: > Michael Foord wrote: > >> Hello all, >> >> On IronPython 2.0.1 the last line of this code takes ~4 seconds the first >> time it is executed: >> >> >>> import clr >> >>> clr.AddReference('System.Windows.Forms') >> >>> from System.Windows.Forms import * >> >>> dir(Form) >> >> Form.__dict__.keys() (which for a .NET type is equivalent) takes ~1 second >> or less. What extra work is dir doing? (Is it pulling in the xml >> docstrings?) >> >> > Actually they're not equivalent, my bad: > > >>> len(Form.__dict__) > 287 > >>> len(dir(Form)) > 540 > > Michael > > > Thanks >> >> Michael >> >> > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > 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 empirebuilder at gmail.com Sun May 24 15:05:24 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 24 May 2009 16:05:24 +0300 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> Message-ID: <8cd017b80905240605n25761768wd22f7ab28236ec77@mail.gmail.com> Bummer. Thanks for the info. On Sun, May 24, 2009 at 3:43 PM, Curt Hagenlocher wrote: > Judging by the last internal email I saw about this on Friday, I'd guess > not... :( > > > On Sun, May 24, 2009 at 5:25 AM, Dody Gunawinata wrote: > >> Is there any chance for this to come up today? I know it's weekend and the >> summer. >> >> On Fri, May 22, 2009 at 10:21 PM, Jimmy Schementi < >> Jimmy.Schementi at microsoft.com> wrote: >> >>> Woops, I meant 2.6. >>> >>> >>> >>> *From:* users-bounces at lists.ironpython.com [mailto: >>> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >>> *Sent:* Friday, May 22, 2009 11:39 AM >>> *To:* Discussion of IronPython >>> >>> *Subject:* Re: [IronPython] IronPython for ASP.Net >>> >>> >>> >>> IronPython 2 Beta 1 ? >>> >>> On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < >>> Jimmy.Schementi at microsoft.com> wrote: >>> >>> I completely agree with your points; we have a finite amount of resources >>> and choose to focus on language compatibility over .NET web-stack >>> integration. Though IronPython has done that web-work in the past, we?re >>> purely focused on compat. I?ve forwarded on the previous mail to the >>> ASP.NET team; I want to see IronPython and IronRuby be used on the web >>> more too. =) >>> >>> >>> >>> That being said, *I?ve just finished packaging up >>> Microsoft.Web.Scripting.dll that works against the released IronPython 2 >>> Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of >>> conversation? =P Na, I this is a good conversation to have, but in short >>> you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. >>> Hopefully the next beta of IronPython 2.6 will include the DLL and source, >>> otherwise I?ll make this package again. >>> >>> >>> >>> ~js >>> >>> >>> >>> *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] >>> *Sent:* Thursday, May 21, 2009 4:23 AM >>> *To:* Jimmy Schementi >>> *Cc:* Discussion of IronPython >>> *Subject:* Re: [IronPython] IronPython for ASP.Net >>> >>> >>> >>> The refresh was unusable because it contained the version of IronPyton >>> that is not compatible with .Net 3.5 framework (I think it was built on IP >>> 2.0 Beta 3/4); >>> >>> I'm griping about this issue in this list because I don't think this is a >>> completely separate issue from the DLR programming languages. Maybe it is >>> not a direct responsibility of this team, but the impact is direct for the >>> following reasons: >>> >>> - Nobody adopts a language as is. The libraries matters. The existing >>> community of Python and Ruby are not going to move to Windows platform just >>> because IronPython and IronRuby are being worked on and released. They have >>> had a multi platform runtimes with de facto standards that are capable of >>> doing wonderful things for more than a decade. >>> - There is much bigger market for language adoption for existing >>> .Net/Windows based developers (and new developers) and these guys/gals are >>> using mostly standard Microsoft stacks. And they are using .Net via mainly >>> C# and VB.Net. If the DLR languages do not have proper support at least for >>> the major technology stacks (I would consider ASP.Net/Silverlight as major >>> stacks), many people will not consider using the DLR based language for >>> their production systems. >>> - I know ASP.Net MVC is open source and it's free to be extended etc, >>> but ASP.Net WebForm have be en deployed massively and that's not going to >>> change anytime soon. And theres is already a support, albeit poor and not up >>> to date, for ASP.Net webform stacks in IronPython. Not having it fully >>> updated is a waste of opportunity. >>> - .Net 4.0 and C# vNext contains dynamic language support but really, >>> what is good for if the DLR languages can only be used in much more limited >>> scenarios because some major technology stacks are not supported. >>> - You raised correctly that Django and RoR are being used to >>> validate the languages. But I would argue that the existing technology >>> stack support validates the DLR platform, not just the languages. >>> >>> So yes, I'm not happy with the level of investment being put on >>> supporting the technology stacks because I think it is pretty short sighted. >>> No, I don't blame this team for this but at least if I complain on this >>> list, it might have a chance being forwarded internally because this is one >>> of the best community mailing list for Microsoft technologies. >>> >>> Dody Gunawinata >>> >>> On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < >>> Jimmy.Schementi at microsoft.com> wrote: >>> >>> First off, it hasn?t been three years: a refresh was released 8 months >>> ago, and sent to this very list: >>> >>> >>> http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html >>> >>> >>> >>> Secondly, rather than just producing these one off releases (where are >>> very taxing on the team), we?re doing it right and getting the source code >>> released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and >>> nightly builds. Then it can be included in each IronPython release, just >>> like Silverlight binaries are. >>> >>> >>> >>> Lastly, IronRuby and IronPython are programming languages, made by >>> programming language teams. We?re very interested in running as many >>> existing Ruby and Python programs as possible. It just so happens that >>> Django and Rails are popular, complex pieces of software that help find >>> bugs, and give the languages street cred for running them. If those web >>> frameworks didn?t run, theirs probably something wrong with our language. >>> >>> >>> >>> Running in ASP.NET and MVC require a significant amount of work *outside >>> * of the language, so it really isn?t a language team?s purpose to build >>> that. Sure they provide good demos as conferences or blog posts, but they?ll >>> only be toys. We?ve invested in those technologies before, which is why the >>> ASP.NET and Silverlight integration exists, but no one is working on >>> enabling web-technologies full-time (though I have spurts of diving back >>> into Silverlight from time to time). If you don?t like the level of >>> investment in dynamic languages for Microsoft web technologies, that?s >>> something that you should communicate to the ASP.NET team; Phil Haack ( >>> http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) >>> are good people to address. >>> >>> >>> >>> ~Jimmy >>> >>> >>> >>> *From:* users-bounces at lists.ironpython.com [mailto: >>> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >>> *Sent:* Wednesday, May 20, 2009 1:22 PM >>> *To:* Discussion of IronPython >>> *Subject:* [IronPython] IronPython for ASP.Net >>> >>> >>> >>> Is there any update for IronPython for ASP.Net? >>> >>> >>> >>> It has been three years since IronPython support for ASP.Net introduced >>> with the release of the whitepaper ( >>> http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. >>> Since then I think we've had Katrina, a Beijing Olympic, a new President, a >>> financial collapse and two James Bond movies - yet until now there is still >>> no up to date support for the technology. I know that the legal team, etc >>> are working on the source release, but I think it is pretty galling that >>> Microsoft's own web framework stack is barely supported by its own dynamic >>> language technology, both on the 'classic' ASP.Net and MVC stack. I mean >>> there is more energy put into having IronPython and IronRuby to run Django >>> and RubyOnRails web framework instead of ASP.Net stack. This just doesn't >>> make sense to me. >>> >>> -- >>> nomadlife.org >>> >>> >>> >>> >>> -- >>> nomadlife.org >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >>> >>> >>> -- >>> nomadlife.org >>> >> >> >> >> -- >> nomadlife.org >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Sun May 24 15:20:45 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 24 May 2009 14:20:45 +0100 Subject: [IronPython] Performance of dir In-Reply-To: References: <4A188A2A.5040301@voidspace.org.uk> <4A188B1B.3090307@voidspace.org.uk> Message-ID: <4A1949AD.8050306@voidspace.org.uk> Curt Hagenlocher wrote: > The first time you do a dir() of Form, we have to use Reflection to > introspect > - every member on Form > - every member on ContainerControl > - every member on ScrollableControl > - every member on Control > - every member on Component > (aka the inheritance hierarchy of Form :D ) > > After that, the members are all cached and subsequent access should be > quite fast. Yes, the second access is much faster. Thanks. I was hoping it was doing extra work and we could build a faster equivalent that only did the reflection, but oh well. :-) Michael > > On Sat, May 23, 2009 at 4:47 PM, Michael Foord > > wrote: > > Michael Foord wrote: > > Hello all, > > On IronPython 2.0.1 the last line of this code takes ~4 > seconds the first time it is executed: > > >>> import clr > >>> clr.AddReference('System.Windows.Forms') > >>> from System.Windows.Forms import * > >>> dir(Form) > > Form.__dict__.keys() (which for a .NET type is equivalent) > takes ~1 second or less. What extra work is dir doing? (Is it > pulling in the xml docstrings?) > > > Actually they're not equivalent, my bad: > > >>> len(Form.__dict__) > 287 > >>> len(dir(Form)) > 540 > > Michael > > > Thanks > > Michael > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Sun May 24 19:31:54 2009 From: dinov at microsoft.com (Dino Viehland) Date: Sun, 24 May 2009 17:31:54 +0000 Subject: [IronPython] Performance of dir In-Reply-To: <4A1949AD.8050306@voidspace.org.uk> References: <4A188A2A.5040301@voidspace.org.uk> <4A188B1B.3090307@voidspace.org.uk> <4A1949AD.8050306@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD028D7333@TK5EX14MBXC120.redmond.corp.microsoft.com> You probably can - dir is currently not optimized at all. Instead it's designed to ensure consistent results with member access. Due to that it does do more reflection than is strictly necessary. So you can do reflection and translate operator methods to __add__ and friends and it may be faster - but getting it 100% correct will be more challenging :) And then keeping it consistent going forward will be even more difficult. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Sunday, May 24, 2009 6:21 AM To: Discussion of IronPython Subject: Re: [IronPython] Performance of dir Curt Hagenlocher wrote: > The first time you do a dir() of Form, we have to use Reflection to > introspect > - every member on Form > - every member on ContainerControl > - every member on ScrollableControl > - every member on Control > - every member on Component > (aka the inheritance hierarchy of Form :D ) > > After that, the members are all cached and subsequent access should be > quite fast. Yes, the second access is much faster. Thanks. I was hoping it was doing extra work and we could build a faster equivalent that only did the reflection, but oh well. :-) Michael > > On Sat, May 23, 2009 at 4:47 PM, Michael Foord > > wrote: > > Michael Foord wrote: > > Hello all, > > On IronPython 2.0.1 the last line of this code takes ~4 > seconds the first time it is executed: > > >>> import clr > >>> clr.AddReference('System.Windows.Forms') > >>> from System.Windows.Forms import * > >>> dir(Form) > > Form.__dict__.keys() (which for a .NET type is equivalent) > takes ~1 second or less. What extra work is dir doing? (Is it > pulling in the xml docstrings?) > > > Actually they're not equivalent, my bad: > > >>> len(Form.__dict__) > 287 > >>> len(dir(Form)) > 540 > > Michael > > > Thanks > > Michael > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Sun May 24 19:35:25 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 24 May 2009 18:35:25 +0100 Subject: [IronPython] Performance of dir In-Reply-To: <1A472770E042064698CB5ADC83A12ACD028D7333@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <4A188A2A.5040301@voidspace.org.uk> <4A188B1B.3090307@voidspace.org.uk> <4A1949AD.8050306@voidspace.org.uk> <1A472770E042064698CB5ADC83A12ACD028D7333@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A19855D.30804@voidspace.org.uk> Dino Viehland wrote: > You probably can - dir is currently not optimized at all. Instead it's > designed to ensure consistent results with member access. Due to that > it does do more reflection than is strictly necessary. So you can do > reflection and translate operator methods to __add__ and friends and it > may be faster - but getting it 100% correct will be more challenging :) And > then keeping it consistent going forward will be even more difficult. > It doesn't sound like there is enough in it to make it worth it. Now of course if we could pre-cache that would be a different matter... Maybe retask the Wing PI file generator to do the job... Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Sunday, May 24, 2009 6:21 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Performance of dir > > Curt Hagenlocher wrote: > >> The first time you do a dir() of Form, we have to use Reflection to >> introspect >> - every member on Form >> - every member on ContainerControl >> - every member on ScrollableControl >> - every member on Control >> - every member on Component >> (aka the inheritance hierarchy of Form :D ) >> >> After that, the members are all cached and subsequent access should be >> quite fast. >> > > Yes, the second access is much faster. Thanks. I was hoping it was doing > extra work and we could build a faster equivalent that only did the > reflection, but oh well. :-) > > Michael > > >> On Sat, May 23, 2009 at 4:47 PM, Michael Foord >> > wrote: >> >> Michael Foord wrote: >> >> Hello all, >> >> On IronPython 2.0.1 the last line of this code takes ~4 >> seconds the first time it is executed: >> >> >>> import clr >> >>> clr.AddReference('System.Windows.Forms') >> >>> from System.Windows.Forms import * >> >>> dir(Form) >> >> Form.__dict__.keys() (which for a .NET type is equivalent) >> takes ~1 second or less. What extra work is dir doing? (Is it >> pulling in the xml docstrings?) >> >> >> Actually they're not equivalent, my bad: >> >> >>> len(Form.__dict__) >> 287 >> >>> len(dir(Form)) >> 540 >> >> Michael >> >> >> Thanks >> >> Michael >> >> >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From empirebuilder at gmail.com Mon May 25 16:35:30 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Mon, 25 May 2009 17:35:30 +0300 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905240605n25761768wd22f7ab28236ec77@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> <8cd017b80905240605n25761768wd22f7ab28236ec77@mail.gmail.com> Message-ID: <8cd017b80905250735o7f220e3eq2cc02d6e4146bebc@mail.gmail.com> So is there any new timeline for this right now or is it in the "beats me" territory? Dody G. On Sun, May 24, 2009 at 4:05 PM, Dody Gunawinata wrote: > Bummer. Thanks for the info. > > > On Sun, May 24, 2009 at 3:43 PM, Curt Hagenlocher wrote: > >> Judging by the last internal email I saw about this on Friday, I'd guess >> not... :( >> >> >> On Sun, May 24, 2009 at 5:25 AM, Dody Gunawinata > > wrote: >> >>> Is there any chance for this to come up today? I know it's weekend and >>> the summer. >>> >>> On Fri, May 22, 2009 at 10:21 PM, Jimmy Schementi < >>> Jimmy.Schementi at microsoft.com> wrote: >>> >>>> Woops, I meant 2.6. >>>> >>>> >>>> >>>> *From:* users-bounces at lists.ironpython.com [mailto: >>>> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >>>> *Sent:* Friday, May 22, 2009 11:39 AM >>>> *To:* Discussion of IronPython >>>> >>>> *Subject:* Re: [IronPython] IronPython for ASP.Net >>>> >>>> >>>> >>>> IronPython 2 Beta 1 ? >>>> >>>> On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi < >>>> Jimmy.Schementi at microsoft.com> wrote: >>>> >>>> I completely agree with your points; we have a finite amount of >>>> resources and choose to focus on language compatibility over .NET web-stack >>>> integration. Though IronPython has done that web-work in the past, we?re >>>> purely focused on compat. I?ve forwarded on the previous mail to the >>>> ASP.NET team; I want to see IronPython and IronRuby be used on the web >>>> more too. =) >>>> >>>> >>>> >>>> That being said, *I?ve just finished packaging up >>>> Microsoft.Web.Scripting.dll that works against the released IronPython 2 >>>> Beta 1, and I?ll be releasing it either today to tomorrow* ? so end of >>>> conversation? =P Na, I this is a good conversation to have, but in short >>>> you?ll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. >>>> Hopefully the next beta of IronPython 2.6 will include the DLL and source, >>>> otherwise I?ll make this package again. >>>> >>>> >>>> >>>> ~js >>>> >>>> >>>> >>>> *From:* Dody Gunawinata [mailto:empirebuilder at gmail.com] >>>> *Sent:* Thursday, May 21, 2009 4:23 AM >>>> *To:* Jimmy Schementi >>>> *Cc:* Discussion of IronPython >>>> *Subject:* Re: [IronPython] IronPython for ASP.Net >>>> >>>> >>>> >>>> The refresh was unusable because it contained the version of IronPyton >>>> that is not compatible with .Net 3.5 framework (I think it was built on IP >>>> 2.0 Beta 3/4); >>>> >>>> I'm griping about this issue in this list because I don't think this is >>>> a completely separate issue from the DLR programming languages. Maybe it is >>>> not a direct responsibility of this team, but the impact is direct for the >>>> following reasons: >>>> >>>> - Nobody adopts a language as is. The libraries matters. The >>>> existing community of Python and Ruby are not going to move to Windows >>>> platform just because IronPython and IronRuby are being worked on and >>>> released. They have had a multi platform runtimes with de facto standards >>>> that are capable of doing wonderful things for more than a decade. >>>> - There is much bigger market for language adoption for existing >>>> .Net/Windows based developers (and new developers) and these guys/gals are >>>> using mostly standard Microsoft stacks. And they are using .Net via mainly >>>> C# and VB.Net. If the DLR languages do not have proper support at least for >>>> the major technology stacks (I would consider ASP.Net/Silverlight as major >>>> stacks), many people will not consider using the DLR based language for >>>> their production systems. >>>> - I know ASP.Net MVC is open source and it's free to be extended >>>> etc, but ASP.Net WebForm have be en deployed massively and that's not going >>>> to change anytime soon. And theres is already a support, albeit poor and not >>>> up to date, for ASP.Net webform stacks in IronPython. Not having it fully >>>> updated is a waste of opportunity. >>>> - .Net 4.0 and C# vNext contains dynamic language support but >>>> really, what is good for if the DLR languages can only be used in much more >>>> limited scenarios because some major technology stacks are not supported. >>>> - You raised correctly that Django and RoR are being used to >>>> validate the languages. But I would argue that the existing technology >>>> stack support validates the DLR platform, not just the languages. >>>> >>>> So yes, I'm not happy with the level of investment being put on >>>> supporting the technology stacks because I think it is pretty short sighted. >>>> No, I don't blame this team for this but at least if I complain on this >>>> list, it might have a chance being forwarded internally because this is one >>>> of the best community mailing list for Microsoft technologies. >>>> >>>> Dody Gunawinata >>>> >>>> On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi < >>>> Jimmy.Schementi at microsoft.com> wrote: >>>> >>>> First off, it hasn?t been three years: a refresh was released 8 months >>>> ago, and sent to this very list: >>>> >>>> >>>> http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html >>>> >>>> >>>> >>>> Secondly, rather than just producing these one off releases (where are >>>> very taxing on the team), we?re doing it right and getting the source code >>>> released and Ms-Pl?d, so we can include it on Codeplex sources, builds, and >>>> nightly builds. Then it can be included in each IronPython release, just >>>> like Silverlight binaries are. >>>> >>>> >>>> >>>> Lastly, IronRuby and IronPython are programming languages, made by >>>> programming language teams. We?re very interested in running as many >>>> existing Ruby and Python programs as possible. It just so happens that >>>> Django and Rails are popular, complex pieces of software that help find >>>> bugs, and give the languages street cred for running them. If those web >>>> frameworks didn?t run, theirs probably something wrong with our language. >>>> >>>> >>>> >>>> Running in ASP.NET and MVC require a significant amount of work * >>>> outside* of the language, so it really isn?t a language team?s purpose >>>> to build that. Sure they provide good demos as conferences or blog posts, >>>> but they?ll only be toys. We?ve invested in those technologies before, which >>>> is why the ASP.NET and Silverlight integration exists, but no one is >>>> working on enabling web-technologies full-time (though I have spurts of >>>> diving back into Silverlight from time to time). If you don?t like the level >>>> of investment in dynamic languages for Microsoft web technologies, that?s >>>> something that you should communicate to the ASP.NET team; Phil Haack ( >>>> http://www.haacked.com) or Dmitry Robsman ( >>>> http://blogs.msdn.com/dmitryr) are good people to address. >>>> >>>> >>>> >>>> ~Jimmy >>>> >>>> >>>> >>>> *From:* users-bounces at lists.ironpython.com [mailto: >>>> users-bounces at lists.ironpython.com] *On Behalf Of *Dody Gunawinata >>>> *Sent:* Wednesday, May 20, 2009 1:22 PM >>>> *To:* Discussion of IronPython >>>> *Subject:* [IronPython] IronPython for ASP.Net >>>> >>>> >>>> >>>> Is there any update for IronPython for ASP.Net? >>>> >>>> >>>> >>>> It has been three years since IronPython support for ASP.Net introduced >>>> with the release of the whitepaper ( >>>> http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. >>>> Since then I think we've had Katrina, a Beijing Olympic, a new President, a >>>> financial collapse and two James Bond movies - yet until now there is still >>>> no up to date support for the technology. I know that the legal team, etc >>>> are working on the source release, but I think it is pretty galling that >>>> Microsoft's own web framework stack is barely supported by its own dynamic >>>> language technology, both on the 'classic' ASP.Net and MVC stack. I mean >>>> there is more energy put into having IronPython and IronRuby to run Django >>>> and RubyOnRails web framework instead of ASP.Net stack. This just doesn't >>>> make sense to me. >>>> >>>> -- >>>> nomadlife.org >>>> >>>> >>>> >>>> >>>> -- >>>> nomadlife.org >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.ironpython.com >>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> >>>> >>>> >>>> >>>> -- >>>> nomadlife.org >>>> >>> >>> >>> >>> -- >>> nomadlife.org >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> > > > -- > nomadlife.org > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Mon May 25 18:01:56 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 25 May 2009 16:01:56 +0000 Subject: [IronPython] IronPython for ASP.Net In-Reply-To: <8cd017b80905250735o7f220e3eq2cc02d6e4146bebc@mail.gmail.com> References: <8cd017b80905201321t3cf2c033x62353cb484a8905b@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0CBCB@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905210422p1aa999ddh16591ce13a63bfe2@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0DEB0@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905221138t381b6a85y7e9767221f2894b6@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC07C0F9CD@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905240525p7be62e55p66ddfb64f390d834@mail.gmail.com> <8cd017b80905240605n25761768wd22f7ab28236ec77@mail.gmail.com> <8cd017b80905250735o7f220e3eq2cc02d6e4146bebc@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C11CD5@tk5ex14mbxc106.redmond.corp.microsoft.com> The Dynamic Language Support page on the ASP.NET Codeplex site (http://aspnet.codeplex.com) will be updated with a IronPython 2.6 Beta 1 compatible version this week; once the ASP.NET updates things I'll let you know. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Monday, May 25, 2009 7:36 AM To: Curt Hagenlocher Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net So is there any new timeline for this right now or is it in the "beats me" territory? Dody G. On Sun, May 24, 2009 at 4:05 PM, Dody Gunawinata > wrote: Bummer. Thanks for the info. On Sun, May 24, 2009 at 3:43 PM, Curt Hagenlocher > wrote: Judging by the last internal email I saw about this on Friday, I'd guess not... :( On Sun, May 24, 2009 at 5:25 AM, Dody Gunawinata > wrote: Is there any chance for this to come up today? I know it's weekend and the summer. On Fri, May 22, 2009 at 10:21 PM, Jimmy Schementi > wrote: Woops, I meant 2.6. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Friday, May 22, 2009 11:39 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net IronPython 2 Beta 1 ? On Fri, May 22, 2009 at 1:11 AM, Jimmy Schementi > wrote: I completely agree with your points; we have a finite amount of resources and choose to focus on language compatibility over .NET web-stack integration. Though IronPython has done that web-work in the past, we're purely focused on compat. I've forwarded on the previous mail to the ASP.NET team; I want to see IronPython and IronRuby be used on the web more too. =) That being said, I've just finished packaging up Microsoft.Web.Scripting.dll that works against the released IronPython 2 Beta 1, and I'll be releasing it either today to tomorrow ... so end of conversation? =P Na, I this is a good conversation to have, but in short you'll be able to use IronPython 2 Beta 1 in ASP.NET very soon again. Hopefully the next beta of IronPython 2.6 will include the DLL and source, otherwise I'll make this package again. ~js From: Dody Gunawinata [mailto:empirebuilder at gmail.com] Sent: Thursday, May 21, 2009 4:23 AM To: Jimmy Schementi Cc: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.Net The refresh was unusable because it contained the version of IronPyton that is not compatible with .Net 3.5 framework (I think it was built on IP 2.0 Beta 3/4); I'm griping about this issue in this list because I don't think this is a completely separate issue from the DLR programming languages. Maybe it is not a direct responsibility of this team, but the impact is direct for the following reasons: * Nobody adopts a language as is. The libraries matters. The existing community of Python and Ruby are not going to move to Windows platform just because IronPython and IronRuby are being worked on and released. They have had a multi platform runtimes with de facto standards that are capable of doing wonderful things for more than a decade. * There is much bigger market for language adoption for existing .Net/Windows based developers (and new developers) and these guys/gals are using mostly standard Microsoft stacks. And they are using .Net via mainly C# and VB.Net. If the DLR languages do not have proper support at least for the major technology stacks (I would consider ASP.Net/Silverlight as major stacks), many people will not consider using the DLR based language for their production systems. * I know ASP.Net MVC is open source and it's free to be extended etc, but ASP.Net WebForm have be en deployed massively and that's not going to change anytime soon. And theres is already a support, albeit poor and not up to date, for ASP.Net webform stacks in IronPython. Not having it fully updated is a waste of opportunity. * .Net 4.0 and C# vNext contains dynamic language support but really, what is good for if the DLR languages can only be used in much more limited scenarios because some major technology stacks are not supported. * You raised correctly that Django and RoR are being used to validate the languages. But I would argue that the existing technology stack support validates the DLR platform, not just the languages. So yes, I'm not happy with the level of investment being put on supporting the technology stacks because I think it is pretty short sighted. No, I don't blame this team for this but at least if I complain on this list, it might have a chance being forwarded internally because this is one of the best community mailing list for Microsoft technologies. Dody Gunawinata On Thu, May 21, 2009 at 5:17 AM, Jimmy Schementi > wrote: First off, it hasn't been three years: a refresh was released 8 months ago, and sent to this very list: http://lists.ironpython.com/pipermail/users-ironpython.com/2008-September/008497.html Secondly, rather than just producing these one off releases (where are very taxing on the team), we're doing it right and getting the source code released and Ms-Pl'd, so we can include it on Codeplex sources, builds, and nightly builds. Then it can be included in each IronPython release, just like Silverlight binaries are. Lastly, IronRuby and IronPython are programming languages, made by programming language teams. We're very interested in running as many existing Ruby and Python programs as possible. It just so happens that Django and Rails are popular, complex pieces of software that help find bugs, and give the languages street cred for running them. If those web frameworks didn't run, theirs probably something wrong with our language. Running in ASP.NET and MVC require a significant amount of work outside of the language, so it really isn't a language team's purpose to build that. Sure they provide good demos as conferences or blog posts, but they'll only be toys. We've invested in those technologies before, which is why the ASP.NET and Silverlight integration exists, but no one is working on enabling web-technologies full-time (though I have spurts of diving back into Silverlight from time to time). If you don't like the level of investment in dynamic languages for Microsoft web technologies, that's something that you should communicate to the ASP.NET team; Phil Haack (http://www.haacked.com) or Dmitry Robsman (http://blogs.msdn.com/dmitryr) are good people to address. ~Jimmy From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Wednesday, May 20, 2009 1:22 PM To: Discussion of IronPython Subject: [IronPython] IronPython for ASP.Net Is there any update for IronPython for ASP.Net? It has been three years since IronPython support for ASP.Net introduced with the release of the whitepaper (http://www.asp.net/DynamicLanguages/whitepaper/) and the first binary. Since then I think we've had Katrina, a Beijing Olympic, a new President, a financial collapse and two James Bond movies - yet until now there is still no up to date support for the technology. I know that the legal team, etc are working on the source release, but I think it is pretty galling that Microsoft's own web framework stack is barely supported by its own dynamic language technology, both on the 'classic' ASP.Net and MVC stack. I mean there is more energy put into having IronPython and IronRuby to run Django and RubyOnRails web framework instead of ASP.Net stack. This just doesn't make sense to me. -- nomadlife.org -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -- nomadlife.org _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbk.lists at gmail.com Mon May 25 19:00:08 2009 From: mbk.lists at gmail.com (Mike Krell) Date: Mon, 25 May 2009 10:00:08 -0700 Subject: [IronPython] IPython is breathing but there's a compile() problem Message-ID: Now that 2.6B1 has frames support, I've started playing with IronPython under IPython again. I've managed to get a command prompt up (some modules are missing, but the only crucial one is codeop, which I stole from the standard distribution). However, there's a problem with entering multiline code snippets interactively. With CPython, this looks like: In [21]: if 1: ....: if 1: ....: (The indentation looks wrong without a fixed-width font, but you get the idea.) With IronPython, the second "if 1:" line blows up with a syntax error. This boils down to a difference in the way the compile() builtin works as used by the codeop module. I've written this up as a bug at codeplex. Please vote for the bug here: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22692 It would be awesome if we could have a good IronPython + IPython story before 2.6 is released! Below are more details about the problem as described in the bug description. Mike -------------------------------------------------------------------------------- bug description at codeplex follows compile() behaves differently than in CPython in the presence of incomplete multiline code snippets. Fixing this incompatiblity is necessary for running IronPython under IPython. Here is a sample program illustrating the problem. The program is a modification of the code used in the standard codeop module by IPython to determine when to provide a continuation prompt for a multiline snippet. -------------------------------------------------------------------------------- def testcompile(source, flags): err = err1 = err2 = None code = code1 = code2 = None try: code = compile(source, "dummy", "single", flags, 1) except SyntaxError, err: pass try: code1 = compile(source + "\n", "dummy", "single", flags, 1) except SyntaxError, err1: pass try: code2 = compile(source + "\n\n", "dummy", "single", flags, 1) except SyntaxError, err2: pass print "for source = '%s' and flags = %d" % (source, flags), if code: print "Syntax valid" elif not code1 and repr(err1) == repr(err2): print "Syntax error!" print print "err1:", repr(err1) print "err2:", repr(err2) else: print "Continue on next line" print print "err1:", repr(err1) print "err2:", repr(err2) print # 0x200 is PyCF_DONT_IMPLY_DEDENT testcompile("if 1:", 0x200) testcompile("if 1:", 0) testcompile("if 1:\n if 1:", 0x200) testcompile("if 1:\n if 1:", 0) -------------------------------------------------------------------------------- Under CPython (2.6.1) the output is: -------------------------------------------------------------------------------- for source = 'if 1:' and flags = 512 Continue on next line err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 2, 1, '\n')) for source = 'if 1:' and flags = 0 Continue on next line err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 2, 1, '\n')) for source = 'if 1: if 1:' and flags = 512 Continue on next line err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 3, 1, '\n')) for source = 'if 1: if 1:' and flags = 0 Continue on next line err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 3, 1, '\n')) -------------------------------------------------------------------------------- In all cases the code correctly outputs "Continue on next line" since both snippets are incomplete but otherwise valid python. For IronPython 2.6 Beta 1 the output is: -------------------------------------------------------------------------------- for source = 'if 1:' and flags = 512 Continue on next line err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) for source = 'if 1:' and flags = 0 Continue on next line err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) for source = 'if 1: if 1:' and flags = 512 Syntax error! err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) for source = 'if 1: if 1:' and flags = 0 Syntax error! err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) -------------------------------------------------------------------------------- The second snippet is misinterpreted as being a syntax error instead of merely incomplete. This is very similar to the issue described here: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_09_22.shtml#e834 But it apparently doesn't have to do with PyCF_DONT_IMPLY_DEDENT per se because the CPython output is the same whether this flag is passed or not. -------------- next part -------------- An HTML attachment was scrubbed... URL: From users at ironpython.com Tue May 26 12:33:49 2009 From: users at ironpython.com (VIAGRA Inc.) Date: Tue, 26 May 2009 12:33:49 +0200 Subject: [IronPython] Pharmacy Online Sale 83% OFF! Message-ID: <20090526143349.4900.qmail@bug-4817c960354> An HTML attachment was scrubbed... URL: -------------- next part -------------- New from WebMD: Dear users at ironpython.com!. Sign-up today! You are subscribed as users at ironpython.com. View and manage your WebMD newsletter preferences. Subscribe to more newsletters. Change/update your email address. WebMD Privacy Policy WebMD Office of Privacy 1175 Peachtree Street, Suite 2400, Atlanta, GA 30361 ? 2009 WebMD, LLC. All rights reserved. From khazad1 at gmail.com Tue May 26 15:58:13 2009 From: khazad1 at gmail.com (jocke khazad) Date: Tue, 26 May 2009 15:58:13 +0200 Subject: [IronPython] ironpython compared to powershell Message-ID: Hi everyone! I would like you ask this question that I seem not to get an answer for anywhere. What is the advantage of using ironpython compared to using only powershell? Or is it just a personal choice which one you like the best? Best Regards, Joakim -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Tue May 26 17:36:37 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Tue, 26 May 2009 18:36:37 +0300 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: <8cd017b80905260836q72b58a45j2f94584b3cc552a9@mail.gmail.com> Nicer syntax On Tue, May 26, 2009 at 4:58 PM, jocke khazad wrote: > Hi everyone! > > I would like you ask this question that I seem not to get an answer for > anywhere. > > What is the advantage of using ironpython compared to using only > powershell? Or is it just a personal choice which one you like the best? > > > Best Regards, > > Joakim > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Tue May 26 19:00:01 2009 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 26 May 2009 17:00:01 +0000 Subject: [IronPython] IPython is breathing but there's a compile() problem In-Reply-To: References: Message-ID: <1A472770E042064698CB5ADC83A12ACD028E352B@TK5EX14MBXC120.redmond.corp.microsoft.com> This is probably a dup of 12907 http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=12907 That being said the more test cases for this the better - this option isn't really documented. Also if anyone can provide insight into exactly how this is supposed to behave that'd be great. But my guess is that we'll have a tail of bugs around this until we can nail down the behavior and get it right. Anyway, I'll take a look at fixing the existing issues here. Wanting to implement a REPL from Python seems like it's the thing everyone likes to try :) From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mike Krell Sent: Monday, May 25, 2009 10:00 AM To: Discussion of IronPython Subject: [IronPython] IPython is breathing but there's a compile() problem Now that 2.6B1 has frames support, I've started playing with IronPython under IPython again. I've managed to get a command prompt up (some modules are missing, but the only crucial one is codeop, which I stole from the standard distribution). However, there's a problem with entering multiline code snippets interactively. With CPython, this looks like: In [21]: if 1: ....: if 1: ....: (The indentation looks wrong without a fixed-width font, but you get the idea.) With IronPython, the second "if 1:" line blows up with a syntax error. This boils down to a difference in the way the compile() builtin works as used by the codeop module. I've written this up as a bug at codeplex. Please vote for the bug here: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22692 It would be awesome if we could have a good IronPython + IPython story before 2.6 is released! Below are more details about the problem as described in the bug description. Mike -------------------------------------------------------------------------------- bug description at codeplex follows compile() behaves differently than in CPython in the presence of incomplete multiline code snippets. Fixing this incompatiblity is necessary for running IronPython under IPython. Here is a sample program illustrating the problem. The program is a modification of the code used in the standard codeop module by IPython to determine when to provide a continuation prompt for a multiline snippet. -------------------------------------------------------------------------------- def testcompile(source, flags): err = err1 = err2 = None code = code1 = code2 = None try: code = compile(source, "dummy", "single", flags, 1) except SyntaxError, err: pass try: code1 = compile(source + "\n", "dummy", "single", flags, 1) except SyntaxError, err1: pass try: code2 = compile(source + "\n\n", "dummy", "single", flags, 1) except SyntaxError, err2: pass print "for source = '%s' and flags = %d" % (source, flags), if code: print "Syntax valid" elif not code1 and repr(err1) == repr(err2): print "Syntax error!" print print "err1:", repr(err1) print "err2:", repr(err2) else: print "Continue on next line" print print "err1:", repr(err1) print "err2:", repr(err2) print # 0x200 is PyCF_DONT_IMPLY_DEDENT testcompile("if 1:", 0x200) testcompile("if 1:", 0) testcompile("if 1:\n if 1:", 0x200) testcompile("if 1:\n if 1:", 0) -------------------------------------------------------------------------------- Under CPython (2.6.1) the output is: -------------------------------------------------------------------------------- for source = 'if 1:' and flags = 512 Continue on next line err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 2, 1, '\n')) for source = 'if 1:' and flags = 0 Continue on next line err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 2, 1, '\n')) for source = 'if 1: if 1:' and flags = 512 Continue on next line err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 3, 1, '\n')) for source = 'if 1: if 1:' and flags = 0 Continue on next line err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError('expected an indented block', ('dummy', 3, 1, '\n')) -------------------------------------------------------------------------------- In all cases the code correctly outputs "Continue on next line" since both snippets are incomplete but otherwise valid python. For IronPython 2.6 Beta 1 the output is: -------------------------------------------------------------------------------- for source = 'if 1:' and flags = 512 Continue on next line err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) for source = 'if 1:' and flags = 0 Continue on next line err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) for source = 'if 1: if 1:' and flags = 512 Syntax error! err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) for source = 'if 1: if 1:' and flags = 0 Syntax error! err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' if 1:\n')) -------------------------------------------------------------------------------- The second snippet is misinterpreted as being a syntax error instead of merely incomplete. This is very similar to the issue described here: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_09_22.shtml#e834 But it apparently doesn't have to do with PyCF_DONT_IMPLY_DEDENT per se because the CPython output is the same whether this flag is passed or not. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue May 26 19:50:48 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 26 May 2009 18:50:48 +0100 Subject: [IronPython] IPython is breathing but there's a compile() problem In-Reply-To: <1A472770E042064698CB5ADC83A12ACD028E352B@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD028E352B@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A1C2BF8.5080301@voidspace.org.uk> Dino Viehland wrote: > > This is probably a dup of 12907 > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=12907 > > That being said the more test cases for this the better ? this option > isn?t really documented. Also if anyone can provide insight into > exactly how this is supposed to behave that?d be great. But my guess > is that we?ll have a tail of bugs around this until we can nail down > the behavior and get it right. Anyway, I?ll take a look at fixing the > existing issues here. Wanting to implement a REPL from Python seems > like it?s the thing everyone likes to try J > I wonder if it isn't in fact caused by the fact that the repr of an IronPython syntax error doesn't change if the you add new lines to the source code you are compiling. As you can see the code below is actually comparing the error repr with newline added to see what *kind* of SyntaxError it is (horrible I know but this is what the code module does). There is a codeplex issue for this specifically but I can't find it. Michael > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Mike Krell > *Sent:* Monday, May 25, 2009 10:00 AM > *To:* Discussion of IronPython > *Subject:* [IronPython] IPython is breathing but there's a compile() > problem > > Now that 2.6B1 has frames support, I've started playing with > IronPython under IPython again. I've managed to get a command prompt > up (some modules are missing, but the only crucial one is codeop, > which I stole from the standard distribution). > > However, there's a problem with entering multiline code snippets > interactively. With CPython, this looks like: > > In [21]: if 1: > ....: if 1: > ....: > > (The indentation looks wrong without a fixed-width font, but you get > the idea.) > > With IronPython, the second "if 1:" line blows up with a syntax error. > This boils down to a difference in the way the compile() builtin works > as used by the codeop module. > > I've written this up as a bug at codeplex. Please vote for the bug here: > > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22692 > > It would be awesome if we could have a good IronPython + IPython story > before 2.6 is released! > > Below are more details about the problem as described in the bug > description. > > Mike > > -------------------------------------------------------------------------------- > > bug description at codeplex follows > > compile() behaves differently than in CPython in the presence of > incomplete multiline code snippets. Fixing this incompatiblity is > necessary for running IronPython under IPython. > > Here is a sample program illustrating the problem. The program is a > modification of the code used in the standard codeop module by IPython > to determine when to provide a continuation prompt for a multiline > snippet. > > -------------------------------------------------------------------------------- > > def testcompile(source, flags): > > err = err1 = err2 = None > code = code1 = code2 = None > > try: > code = compile(source, "dummy", "single", flags, 1) > except SyntaxError, err: > pass > > try: > code1 = compile(source + "\n", "dummy", "single", flags, 1) > except SyntaxError, err1: > pass > > try: > code2 = compile(source + "\n\n", "dummy", "single", flags, 1) > except SyntaxError, err2: > pass > > print "for source = '%s' and flags = %d" % (source, flags), > > if code: > print "Syntax valid" > elif not code1 and repr(err1) == repr(err2): > print "Syntax error!" > print > print "err1:", repr(err1) > print "err2:", repr(err2) > else: > print "Continue on next line" > print > print "err1:", repr(err1) > print "err2:", repr(err2) > > print > > # 0x200 is PyCF_DONT_IMPLY_DEDENT > > testcompile("if 1:", 0x200) > testcompile("if 1:", 0) > > testcompile("if 1:\n if 1:", 0x200) > testcompile("if 1:\n if 1:", 0) > > -------------------------------------------------------------------------------- > > Under CPython (2.6.1) the output is: > > -------------------------------------------------------------------------------- > > for source = 'if 1:' and flags = 512 Continue on next line > > err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if > 1:\n')) > err2: IndentationError('expected an indented block', ('dummy', 2, 1, > '\n')) > > for source = 'if 1:' and flags = 0 Continue on next line > > err1: SyntaxError('unexpected EOF while parsing', ('dummy', 1, 6, 'if > 1:\n')) > err2: IndentationError('expected an indented block', ('dummy', 2, 1, > '\n')) > > for source = 'if 1: > if 1:' and flags = 512 Continue on next line > > err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' > if 1:\n')) > err2: IndentationError('expected an indented block', ('dummy', 3, 1, > '\n')) > > for source = 'if 1: > if 1:' and flags = 0 Continue on next line > > err1: IndentationError('expected an indented block', ('dummy', 2, 8, ' > if 1:\n')) > err2: IndentationError('expected an indented block', ('dummy', 3, 1, > '\n')) > > -------------------------------------------------------------------------------- > > > In all cases the code correctly outputs "Continue on next line" since > both snippets are incomplete but otherwise valid python. > > For IronPython 2.6 Beta 1 the output is: > > -------------------------------------------------------------------------------- > > for source = 'if 1:' and flags = 512 Continue on next line > > err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) > err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) > > for source = 'if 1:' and flags = 0 Continue on next line > > err1: IndentationError("unexpected token ''", ('dummy', 2, 1, '')) > err2: IndentationError("unexpected token ''", ('dummy', 3, 1, '')) > > for source = 'if 1: > if 1:' and flags = 512 Syntax error! > > err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' > if 1:\n')) > err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' > if 1:\n')) > > for source = 'if 1: > if 1:' and flags = 0 Syntax error! > > err1: IndentationError("unexpected token ''", ('dummy', 2, 8, ' > if 1:\n')) > err2: IndentationError("unexpected token ''", ('dummy', 2, 8, ' > if 1:\n')) > > -------------------------------------------------------------------------------- > > The second snippet is misinterpreted as being a syntax error instead > of merely incomplete. > > This is very similar to the issue described here: > > http://www.voidspace.org.uk/python/weblog/arch_d7_2007_09_22.shtml#e834 > > But it apparently doesn't have to do with PyCF_DONT_IMPLY_DEDENT per > se because the CPython output is the same whether this flag is passed > or not. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From mbk.lists at gmail.com Tue May 26 20:01:49 2009 From: mbk.lists at gmail.com (Mike Krell) Date: Tue, 26 May 2009 11:01:49 -0700 Subject: [IronPython] IPython is breathing but there's a compile() problem In-Reply-To: <4A1C2BF8.5080301@voidspace.org.uk> References: <1A472770E042064698CB5ADC83A12ACD028E352B@TK5EX14MBXC120.redmond.corp.microsoft.com> <4A1C2BF8.5080301@voidspace.org.uk> Message-ID: On Tue, May 26, 2009 at 10:50 AM, Michael Foord wrote > I wonder if it isn't in fact caused by the fact that the repr of an > IronPython syntax error doesn't change if the you add new lines to the > source code you are compiling. Yes, in this case that is the crux of the issue. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Tue May 26 21:02:45 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Tue, 26 May 2009 13:02:45 -0600 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: I am prejudiced. Several years ago, I was looking for a copy of perl which would run on Windows, because I needed a better scripting language than a .BAT file could give. (This was using Windows 2000.) While searching the Internet, I tripped across a comment something like: "Why would anyone learn perl when python is available?" That was the first time I had ever heard of python. I looked it up... I have made very little use of any other language since that day. Python has IMHO the best syntax of any programming language I have ever used -- and I have used plenty. Python is also one of the most versatile languages I have seen. For example... I was given the task of keeping several users from attempting to update the same drawing (autocad file) simultaneously, so I needed a lightweight version control system for non-text files. I wrote it in Python. It was too hard for computer illiterate users, so I added a GUI front end with one of the GUI tool kits available (wyPython). I had need of a similar system for another application, so I changed the file structure it used (easy with the os.path module). I needed it to work across the Internet, so I changed the Windows copy commands to ftp using a standard Python module. I needed to share the data with some Linux systems, so copied the Python source to Ubuntu and ran it. I had to make about three changes in the source to make it work on either operating system. (Note: this was CPython, not IronPython. IronPython is catching up.) So you can learn a scripting language which is limited in scope and is supported by the richest company in the world (this week at least), and which therefore will have lots of job openings. or... You can learn a scripting language which is easy and fun and open source and has an active development community worldwide and can also be used for HUGE projects and web services, but you will have a hard time selling it in some cases. -- Vernon Cole On Tue, May 26, 2009 at 7:58 AM, jocke khazad wrote: > Hi everyone! > > I would like you ask this question that I seem not to get an answer for > anywhere. > > What is the advantage of using ironpython compared to using only powershell? > Or is it just a personal choice which one you like the best? > > > Best Regards, > > Joakim > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From khazad1 at gmail.com Tue May 26 21:16:09 2009 From: khazad1 at gmail.com (jocke khazad) Date: Tue, 26 May 2009 21:16:09 +0200 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: So pretty much, there is no real advantage of using python more then in a religious point of view? Can you code powershell to control/automatise linux servers for example? An advantage could be to work with a language that works on any platform. On Tue, May 26, 2009 at 9:02 PM, Vernon Cole wrote: > I am prejudiced. > > Several years ago, I was looking for a copy of perl which would run on > Windows, because I needed a better scripting language than a .BAT file > could give. (This was using Windows 2000.) > While searching the Internet, I tripped across a comment something > like: "Why would anyone learn perl when python is available?" That was > the first time I had ever heard of python. I looked it up... > > I have made very little use of any other language since that day. > > Python has IMHO the best syntax of any programming language I have > ever used -- and I have used plenty. > > Python is also one of the most versatile languages I have seen. For > example... > I was given the task of keeping several users from attempting to > update the same drawing (autocad file) simultaneously, so I needed a > lightweight version control system for non-text files. I wrote it in > Python. > It was too hard for computer illiterate users, so I added a GUI front > end with one of the GUI tool kits available (wyPython). > I had need of a similar system for another application, so I changed > the file structure it used (easy with the os.path module). > I needed it to work across the Internet, so I changed the Windows copy > commands to ftp using a standard Python module. > I needed to share the data with some Linux systems, so copied the > Python source to Ubuntu and ran it. I had to make about three changes > in the source to make it work on either operating system. > (Note: this was CPython, not IronPython. IronPython is catching up.) > > So you can learn a scripting language which is limited in scope and is > supported by the richest company in the world (this week at least), > and which therefore will have lots of job openings. > or... > You can learn a scripting language which is easy and fun and open > source and has an active development community worldwide and can also > be used for HUGE projects and web services, but you will have a hard > time selling it in some cases. > -- > Vernon Cole > > On Tue, May 26, 2009 at 7:58 AM, jocke khazad wrote: > > Hi everyone! > > > > I would like you ask this question that I seem not to get an answer for > > anywhere. > > > > What is the advantage of using ironpython compared to using only > powershell? > > Or is it just a personal choice which one you like the best? > > > > > > Best Regards, > > > > Joakim > > > > _______________________________________________ > > 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 brian.curtin at gmail.com Tue May 26 21:28:41 2009 From: brian.curtin at gmail.com (curtin@acm.org) Date: Tue, 26 May 2009 14:28:41 -0500 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: On Tue, May 26, 2009 at 14:16, jocke khazad wrote: > So pretty much, there is no real advantage of using python more then in a > religious point of view? > > Can you code powershell to control/automatise linux servers for example? An > advantage could be to work with a language that works on any platform. > Python/IronPython is a multi-paradigm programming language. Powershell is a scripting language to work inside the Powershell command line shell. They both serve their purpose, but there are innumerable advantages to using a programming language like Python/IronPython depending on what you want to do. Controlling a Linux server is a very vague usage so I can't speak to that specific topic, so this doesn't really answer much. As far as working on any platform, IronPython works on Windows along with platforms which run Mono (Linux included), which may suit you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From daftspaniel at gmail.com Tue May 26 21:29:40 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Tue, 26 May 2009 20:29:40 +0100 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: <20253b0c0905261229ubd226dcw45a83a92ca486108@mail.gmail.com> Ironpython is a general purpose programming language whereas Powershell is primarily to replace the 'command prompt', batch file and vbscript within Windows system administration, though it appears in SQL Server 2008. Both have good .Net integration so you you could administer a network with either. Ironically IronPython is far more easy to deploy (xcopy) than Powershell which is a key factor in big tightly controlled networks. Cheers, Davy Mitchell -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From Jimmy.Schementi at microsoft.com Tue May 26 21:39:03 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 26 May 2009 19:39:03 +0000 Subject: [IronPython] [ATTN] ASP.NET and IronPython 2.6 Beta 1 Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> Download Now http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613#DownloadId=69511 This release is compatible with IronPython 2.6 Beta 1. Currently it does not include Language Services Support and project templates. To create a new IronPython ASP.NET WebForms project, simply copy the "examples\hello-webforms" to a new directory and rename the directory to your liking. A redistributed copy of IronPython 2.6 Beta 1 can be found in the "bin" directory; all files except Microsoft.Web.Scripting.dll, the IronPython ASP.NET integration, are from the IronPython 2.6 Beta 1 release. Included in this release are two WebForms examples that are written in IronPython: "hello-webforms" and "album-handler", which can be found in the "examples" directory. "hello-webforms" is a simple web application that shows PostBack handling, and "album-handler" is a larger web application that creates a photo album from a directory of images and generates thumbnails for them on the fly. Release notes: http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Language%20Support Release page: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamb at silverkeytech.com Tue May 26 21:42:59 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Tue, 26 May 2009 12:42:59 -0700 Subject: [IronPython] [ATTN] ASP.NET and IronPython 2.6 Beta 1 In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <100101c9de3a$2db054d0$8910fe70$@com> NICE! Just a thought, but maybe on the download page you should put a link that says "IronPython for ASP.Net Binaries" or something. Right now the link to "sample" is kind of confusing. The way I read "sample" is that it will just contain source code, not actual binaries. Thanks, Adam Adam Brand SilverKey Technologies From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Tuesday, May 26, 2009 12:39 PM To: Discussion of IronPython Subject: [IronPython] [ATTN] ASP.NET and IronPython 2.6 Beta 1 Download Now http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613#Down loadId=69511 This release is compatible with IronPython 2.6 Beta 1. Currently it does not include Language Services Support and project templates. To create a new IronPython ASP.NET WebForms project, simply copy the "examples\hello-webforms" to a new directory and rename the directory to your liking. A redistributed copy of IronPython 2.6 Beta 1 can be found in the "bin" directory; all files except Microsoft.Web.Scripting.dll, the IronPython ASP.NET integration, are from the IronPython 2.6 Beta 1 release. Included in this release are two WebForms examples that are written in IronPython: "hello-webforms" and "album-handler", which can be found in the "examples" directory. "hello-webforms" is a simple web application that shows PostBack handling, and "album-handler" is a larger web application that creates a photo album from a directory of images and generates thumbnails for them on the fly. Release notes: http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Language%20Support Release page: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Tue May 26 22:25:28 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Tue, 26 May 2009 23:25:28 +0300 Subject: [IronPython] [ATTN] ASP.NET and IronPython 2.6 Beta 1 In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <8cd017b80905261325ub16de8bx1f6caae9b7c0d533@mail.gmail.com> Yay ! I had planned to sleep early :) (It's 11 PM Cairo time) This is awesome, thank you so much. Finally I can say goodbye to Microsoft.Scripting.Vestigial and remove my custom built IP 2.0. Dody G. On Tue, May 26, 2009 at 10:39 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > *Download Now* > > > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613#DownloadId=69511 > > > > This release is compatible with IronPython 2.6 Beta 1. > Currently it does not include Language Services Support and project > templates. To create a new IronPython ASP.NET WebForms project, simply > copy the ?examples\hello-webforms? to a new directory and rename the > directory to your liking. A redistributed copy of IronPython 2.6 Beta 1 can > be found in the ?bin? directory; all files except > Microsoft.Web.Scripting.dll, the IronPython ASP.NET integration, are from > the IronPython 2.6 Beta 1 release. > > Included in this release are two WebForms examples that are written in > IronPython: ?hello-webforms? and ?album-handler?, which can be found in the > ?examples? directory. ?hello-webforms? is a simple web application that > shows PostBack handling, and ?album-handler? is a larger web application > that creates a photo album from a directory of images and generates > thumbnails for them on the fly. > > > > Release notes: > http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Language%20Support > > Release page: > http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jregele23 at gmail.com Tue May 26 22:47:01 2009 From: jregele23 at gmail.com (Justin Regele) Date: Tue, 26 May 2009 13:47:01 -0700 Subject: [IronPython] 'Python' does not exist in current context Message-ID: <8429660905261347i6d2576a0u9d515a1d19d62c1c@mail.gmail.com> Trying to embed IPy in C#, and after digging all over the web and the archives of this list, I can't figure out why the Python object won't load. Here is the basic line where it goes wrong: ScriptEngine eng = Python.CreateEngine(); All the other typical Objects are loading fine, just not the Python object. I've tried a handful of different assemblies, and still nothing works. The embedding example from Iron Python in Action DOES work though, and I added assembly reflection code and can see that those assemblies were locale to that solutions folder. EZ quick fix, I thought was to copy those older assemblies over into the Iron Python assemblies (after backing them up). But still no luck. Pretty new to .NET and Visual Studio, but been dealing with CPython for years. Anyone have any ideas on what I could be doing wrong? Running Vis Studio 2008, Iron Python Studio Integrated, .NET 3.5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Tue May 26 23:00:21 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 27 May 2009 00:00:21 +0300 Subject: [IronPython] 'Python' does not exist in current context In-Reply-To: <8429660905261347i6d2576a0u9d515a1d19d62c1c@mail.gmail.com> References: <8429660905261347i6d2576a0u9d515a1d19d62c1c@mail.gmail.com> Message-ID: <8cd017b80905261400if9c5da7yd546c605815c2d97@mail.gmail.com> Make sure you refer to the following assemblies. Microsoft.Scripting.dllMicrosoft.Scripting.Core.dll IronPython.dll IronPython.Modules.dll On Tue, May 26, 2009 at 11:47 PM, Justin Regele wrote: > Trying to embed IPy in C#, and after digging all over the web and the > archives of this list, I can't figure out why the Python object won't load. > Here is the basic line where it goes wrong: > > ScriptEngine eng = Python.CreateEngine(); > > All the other typical Objects are loading fine, just not the Python object. > > I've tried a handful of different assemblies, and still nothing works. The > embedding example from Iron Python in Action DOES work though, and I added > assembly reflection code and can see that those assemblies were locale to > that solutions folder. > > EZ quick fix, I thought was to copy those older assemblies over into the > Iron Python assemblies (after backing them up). But still no luck. > > Pretty new to .NET and Visual Studio, but been dealing with CPython for > years. Anyone have any ideas on what I could be doing wrong? Running Vis > Studio 2008, Iron Python Studio Integrated, .NET 3.5 > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Wed May 27 00:02:09 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 27 May 2009 01:02:09 +0300 Subject: [IronPython] [ATTN] ASP.NET and IronPython 2.6 Beta 1 In-Reply-To: <8cd017b80905261325ub16de8bx1f6caae9b7c0d533@mail.gmail.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC07C13216@tk5ex14mbxc106.redmond.corp.microsoft.com> <8cd017b80905261325ub16de8bx1f6caae9b7c0d533@mail.gmail.com> Message-ID: <8cd017b80905261502p29472ca5tf6fc9cbe6ea7519c@mail.gmail.com> Alright, time to file bug report :) ViewState in user control fails to work. This is how to reproduce it 1. I run the example hello-webforms example. 2. I added a user control called test.ascx 3. The content of test.ascx.py as follows: def Page_Load(sender, e): lblWarning.Text = "Hello World" Response.Write("From Response") ViewState["test"] = "xx" 4. It will produce the following error (cannot access protected member ViewState without a python subclass of ScriptUserControl) *Parser Error Message: *cannot access protected member ViewState without a python subclass of ScriptUserControl *Source Error:* Line 2: lblWarning.Text = "Hello World" Line 3: Response.Write("From Response")Line 4: ViewState["test"] = "xx"Line 5: *Source File: */test.ascx.py* Line: *4 On Tue, May 26, 2009 at 11:25 PM, Dody Gunawinata wrote: > Yay ! I had planned to sleep early :) (It's 11 PM Cairo time) > > This is awesome, thank you so much. Finally I can say goodbye > to Microsoft.Scripting.Vestigial and remove my custom built IP 2.0. > > Dody G. > > On Tue, May 26, 2009 at 10:39 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > >> *Download Now* >> >> >> http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613#DownloadId=69511 >> >> >> >> This release is compatible with IronPython 2.6 Beta 1. >> Currently it does not include Language Services Support and project >> templates. To create a new IronPython ASP.NET WebForms project, simply >> copy the ?examples\hello-webforms? to a new directory and rename the >> directory to your liking. A redistributed copy of IronPython 2.6 Beta 1 can >> be found in the ?bin? directory; all files except >> Microsoft.Web.Scripting.dll, the IronPython ASP.NET integration, are from >> the IronPython 2.6 Beta 1 release. >> >> Included in this release are two WebForms examples that are written in >> IronPython: ?hello-webforms? and ?album-handler?, which can be found in the >> ?examples? directory. ?hello-webforms? is a simple web application that >> shows PostBack handling, and ?album-handler? is a larger web application >> that creates a photo album from a directory of images and generates >> thumbnails for them on the fly. >> >> >> >> Release notes: >> http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Language%20Support >> >> Release page: >> http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- > nomadlife.org > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jregele23 at gmail.com Wed May 27 03:45:10 2009 From: jregele23 at gmail.com (Justin Regele) Date: Tue, 26 May 2009 18:45:10 -0700 Subject: [IronPython] 'Python' does not exist in current context In-Reply-To: <8cd017b80905261400if9c5da7yd546c605815c2d97@mail.gmail.com> References: <8429660905261347i6d2576a0u9d515a1d19d62c1c@mail.gmail.com> <8cd017b80905261400if9c5da7yd546c605815c2d97@mail.gmail.com> Message-ID: <8429660905261845v64f37887nccde4a7a7ebc3044@mail.gmail.com> thanks. that did the trick. it was the one I assumed wasn't needed, since modules sounded like it would be, well, just python modules. On Tue, May 26, 2009 at 2:00 PM, Dody Gunawinata wrote: > Make sure you refer to the following assemblies. > > Microsoft.Scripting.dllMicrosoft.Scripting.Core.dll > IronPython.dll > IronPython.Modules.dll > > On Tue, May 26, 2009 at 11:47 PM, Justin Regele wrote: > >> Trying to embed IPy in C#, and after digging all over the web and the >> archives of this list, I can't figure out why the Python object won't load. >> Here is the basic line where it goes wrong: >> >> ScriptEngine eng = Python.CreateEngine(); >> >> All the other typical Objects are loading fine, just not the Python >> object. >> >> I've tried a handful of different assemblies, and still nothing works. The >> embedding example from Iron Python in Action DOES work though, and I added >> assembly reflection code and can see that those assemblies were locale to >> that solutions folder. >> >> EZ quick fix, I thought was to copy those older assemblies over into the >> Iron Python assemblies (after backing them up). But still no luck. >> >> Pretty new to .NET and Visual Studio, but been dealing with CPython for >> years. Anyone have any ideas on what I could be doing wrong? Running Vis >> Studio 2008, Iron Python Studio Integrated, .NET 3.5 >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- > nomadlife.org > > > _______________________________________________ > 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 empirebuilder at gmail.com Wed May 27 08:35:29 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 27 May 2009 09:35:29 +0300 Subject: [IronPython] Tips for IronPython for ASP.Net (IronPython 2.6 Beta 1) Message-ID: <8cd017b80905262335k36f993b2i3d49befbd0d69d2f@mail.gmail.com> 1. ViewState property is not available in UserControl (this is a bug) but this is easily rectified. Just create an assembly that inherits from Microsoft.Web.Scripting.UI.ScriptUserControl public class ScriptUserControlBase : Microsoft.Web.Scripting.UI.ScriptUserControl { public StateBag ViewState { get { return base.ViewState; } } } and then modify your web.config and replace the userControlBaseType from the standard to ScriptUserControlBase. It will then work normally. ViewState is available up in the hierarchy in System.Web.UI.Control, but since it is protected, it is not available for the code behind code. This brings us to the second tip. 2. The page behind can only access *public *methods/members from the parent class container. This is a change of behavior from the previous version of IP for asp.net. Other than that, everything else looks dandy. Enjoy. Dody Gunawinata -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Wed May 27 09:13:18 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 27 May 2009 07:13:18 +0000 Subject: [IronPython] Tips for IronPython for ASP.Net (IronPython 2.6 Beta 1) In-Reply-To: <8cd017b80905262335k36f993b2i3d49befbd0d69d2f@mail.gmail.com> References: <8cd017b80905262335k36f993b2i3d49befbd0d69d2f@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC07C140A6@tk5ex14mbxc106.redmond.corp.microsoft.com> Thanks for the feedback Dody. I'll take a look and see if there are quick fixes to these. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata Sent: Tuesday, May 26, 2009 11:35 PM To: Discussion of IronPython Subject: [IronPython] Tips for IronPython for ASP.Net (IronPython 2.6 Beta 1) 1. ViewState property is not available in UserControl (this is a bug) but this is easily rectified. Just create an assembly that inherits from Microsoft.Web.Scripting.UI.ScriptUserControl public class ScriptUserControlBase : Microsoft.Web.Scripting.UI.ScriptUserControl { public StateBag ViewState { get { return base.ViewState; } } } and then modify your web.config and replace the userControlBaseType from the standard to ScriptUserControlBase. It will then work normally. ViewState is available up in the hierarchy in System.Web.UI.Control, but since it is protected, it is not available for the code behind code. This brings us to the second tip. 2. The page behind can only access public methods/members from the parent class container. This is a change of behavior from the previous version of IP for asp.net. Other than that, everything else looks dandy. Enjoy. Dody Gunawinata -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamil at dworakowski.name Wed May 27 12:44:36 2009 From: kamil at dworakowski.name (Kamil Dworakowski) Date: Wed, 27 May 2009 03:44:36 -0700 (PDT) Subject: [IronPython] doc strings for .NET objects Message-ID: <010d7563-4989-4460-9ae5-ce8b661acc60@o20g2000vbh.googlegroups.com> Most of the members of the Form have some docstring, almost always it is a signature like: bool Contains(self, Control control) Some have multiple signatures, and many have duplicate signatures, like Form.AutoSizeMode which has about 7 duplicated lines. And yet there are some pearls, like Form.GetLifetimeServices, which below the signature contains some useful comments about the method. What is the matter? Could all the docstring be more usefull like Form.GetLifetimeServices? From m_tayseer82 at yahoo.com Wed May 27 13:46:20 2009 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Wed, 27 May 2009 04:46:20 -0700 (PDT) Subject: [IronPython] ironpython compared to powershell In-Reply-To: <8cd017b80905260836q72b58a45j2f94584b3cc552a9@mail.gmail.com> References: <8cd017b80905260836q72b58a45j2f94584b3cc552a9@mail.gmail.com> Message-ID: <174867.53691.qm@web31108.mail.mud.yahoo.com> 1. Much nicer syntax 2. Access to a lot of libraries for almost everything 3. A nice, helpful and bigger community Mohammad Tayseer http://spellcoder.com/blogs/tayseer ________________________________ From: Dody Gunawinata To: Discussion of IronPython Sent: Tuesday, May 26, 2009 5:36:37 PM Subject: Re: [IronPython] ironpython compared to powershell Nicer syntax On Tue, May 26, 2009 at 4:58 PM, jocke khazad wrote: Hi everyone! I would like you ask this question that I seem not to get an answer for anywhere. What is the advantage of using ironpython compared to using only powershell? Or is it just a personal choice which one you like the best? Best Regards, Joakim _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From i-ellang at microsoft.com Wed May 27 16:30:36 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Wed, 27 May 2009 15:30:36 +0100 Subject: [IronPython] jagged arrays Message-ID: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> How do i create a jagged array in IronPython ? I've tried various methods: jagArray = Array[Array[int]]( ( (1,2), (1,2), (1,2,3), (1,2,3,4) )) giving the error message: TypeError: expected Array[int], got tuple> also jaggedLengths = Array[int]((1,2,3,4)) cinit = System.Array.CreateInstance(int, jaggedLengths) cinit[0][0] = 3 giving the error message: IndexError: index out of range: 0 Is there another method for creating arrays? Many thanks, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed May 27 16:32:57 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 27 May 2009 15:32:57 +0100 Subject: [IronPython] jagged arrays In-Reply-To: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <4A1D4F19.5030105@voidspace.org.uk> Elise Langham (Elanit) wrote: > > How do i create a jagged array in IronPython ? > > I?ve tried various methods: > > jagArray = Array[Array[int]]( ( (1,2), (1,2), (1,2,3), (1,2,3,4) )) > > giving the error message: TypeError: expected Array[int], got tuple> > Yep - you created an array of arrays but passed in tuples (although it would be nice if that worked). Try: jagArray = Array[Array[int]]( ( Array[int](1,2), Array[int](1,2), Array[int](1,2,3), Array[int](1,2,3,4) )) Michael > > also > > jaggedLengths = Array[int]((1,2,3,4)) > > cinit = System.Array.CreateInstance(int, jaggedLengths) > > cinit[0][0] = 3 > > giving the error message: IndexError: index out of range: 0 > > Is there another method for creating arrays? > > Many thanks, > > Elise > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From i-ellang at microsoft.com Wed May 27 16:42:14 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Wed, 27 May 2009 15:42:14 +0100 Subject: [IronPython] jagged arrays Message-ID: <361073EA5313C84E95A847FF752AD96536C920FF67@EA-EXMSG-C334.europe.corp.microsoft.com> Thanks for the swift reply (: Unfortunately jagArray = Array[Array[int]]( ( Array[int](1,2), Array[int](1,2), Array[int](1,2,3), Array[int](1,2,3,4) )) Gives another error message: TypeError: Array 1 () takes exactly 1 argument, (2 given) Any idea what the problem is ? Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed May 27 16:44:12 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 27 May 2009 15:44:12 +0100 Subject: [IronPython] jagged arrays In-Reply-To: <361073EA5313C84E95A847FF752AD96536C920FF67@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C920FF67@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: <4A1D51BC.5020503@voidspace.org.uk> Elise Langham (Elanit) wrote: > > Thanks for the swift reply (: > > Unfortunately > > > > jagArray = Array[Array[int]]( ( Array[int](1,2), Array[int](1,2), > > Array[int](1,2,3), Array[int](1,2,3,4) )) > > > > Gives another error message: TypeError: Array 1 () takes exactly 1 argument, (2 given) > > Any idea what the problem is ? My mistake, sorry: jagArray = Array[Array[int]]( ( Array[int]((1,2)), Array[int]((1,2)), ...) The argument to the constructor must be a tuple. Michael > > Elise > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From i-ellang at microsoft.com Wed May 27 16:51:19 2009 From: i-ellang at microsoft.com (Elise Langham (Elanit)) Date: Wed, 27 May 2009 15:51:19 +0100 Subject: [IronPython] jagged arrays Message-ID: <361073EA5313C84E95A847FF752AD96536C920FF84@EA-EXMSG-C334.europe.corp.microsoft.com> Aaah ... found that more brackets help (: jiArray = Array[Array[int]]( ( Array[int]((1,2)), Array[int]((1,2)), Array[int]((1,2,3)), Array[int]((1,2,3,4)) )) cheers, Elise -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Wed May 27 16:52:11 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 27 May 2009 07:52:11 -0700 Subject: [IronPython] jagged arrays In-Reply-To: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> References: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: On Wed, May 27, 2009 at 7:30 AM, Elise Langham (Elanit) wrote: > How do i create a jagged array in IronPython ? > > I?ve tried various methods: > jagArray = Array[Array[int]]( ( (1,2), (1,2), (1,2,3), (1,2,3,4) )) I'd write a helper method: def make_jagged(T, v): return Array[Array[T]]([Array[T](x) for x in v]) And then say "make_jagged(int, ((1, 2), (1, 2, 3), (1,)))" -- Curt Hagenlocher curt at hagenlocher.org From curt at hagenlocher.org Wed May 27 16:54:39 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 27 May 2009 07:54:39 -0700 Subject: [IronPython] jagged arrays In-Reply-To: References: <361073EA5313C84E95A847FF752AD96536C920FF41@EA-EXMSG-C334.europe.corp.microsoft.com> Message-ID: On Wed, May 27, 2009 at 7:52 AM, Curt Hagenlocher wrote: > > def make_jagged(T, v): > ? ?return Array[Array[T]]([Array[T](x) for x in v]) Or maybe this: def make_jagged(T): def inner(*v): return Array[Array[T]]([Array[T](x) for x in v]) return inner make_jagged(int)((1, 2), (1, ), (1, 2, 3)) -- Curt Hagenlocher curt at hagenlocher.org From merllab at microsoft.com Wed May 27 17:53:39 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 27 May 2009 08:53:39 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <95552f67-d495-4cf3-b6bf-f61f05e90d39@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/52819. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/InstanceBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParameterMapping.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/NewTypeMaker.cs $/IronPython/IronPython_Main/Src/IronPythonWindow/IronPythonWindow.cs $/IronPython/IronPython_Main/Src/IronPythonConsole/Console.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.Operations.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/AssemblyGen.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/MethodSignatureInfo.cs $/IronPython/IronPython_Main/Src/Tests/regressions.py $/IronPython/IronPython_Main/Src/Tests/test_gc.py $/IronPython/IronPython_Main/Src/Tests/test_cStringIO.py $/IronPython/IronPython_Main/Src/Tests/test_codecs.py $/IronPython/IronPython_Main/Src/Tests/test_binascii.py $/IronPython/IronPython_Main/Src/Tests/test_nt.py $/IronPython/IronPython_Main/Src/Tests/test_socket.py $/IronPython/IronPython_Main/Src/Tests/test_ipye.py $/IronPython/IronPython_Main/Src/Tests/test_imp.py $/IronPython/IronPython_Main/Src/Tests/test_stdconsole.py $/IronPython/IronPython_Main/Src/Tests/test_thread.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 917406 Date: 5/26/2009 10:05:15 PM (dfugate) - enabled nzmath's testFactorEcm. No clue why this was ever disabled... - adjusted prior changes to test_ctypes.py. Turns out these didn't quite work under 32-bit XP - added misc. test cases to regressions.py after examining the latest code coverage report - test_nt.py. Two new bugs on waitpid. One new bug on system - test_stdconsole.py. Added a (disabled) regression for nt.abort => need a better way to automate this test case. Added a test for nt._exit(...) (Shelveset: COV01;REDMOND\dfugate | SNAP CheckinId: 8487) From rbear at rbear.net Thu May 28 04:54:42 2009 From: rbear at rbear.net (R. Bear Smith) Date: Wed, 27 May 2009 22:54:42 -0400 Subject: [IronPython] C# 4.0 DynamicObject in IronPython Message-ID: Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in the dlr for net 4.0 release with ironpython. I am just basically trying to emulate the simple example from the pdc of using one of these classes from ironpython at this stage. The problem is the class seems to be exposed as just a normal class with all its members like trygetmember,trysetmember exposed. Any member access that should go to trygetmember and the other override methods returns with AttributeError - object has no attribute foo. The class functions properly from within c#. Just wondering if there is a known issue with this or if I am missing some extra step that has been introduced since earlier demos of this functionality. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Thu May 28 04:56:41 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 27 May 2009 19:56:41 -0700 Subject: [IronPython] C# 4.0 DynamicObject in IronPython In-Reply-To: References: Message-ID: Have you cast the variable to type "dynamic"? that is, class MyDynamicObject : DynamicObject { ... } dynamic obj = new MyDynamicObject(); dynamic memberval = obj.SomeMember; On Wed, May 27, 2009 at 7:54 PM, R. Bear Smith wrote: > Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in > the dlr for net 4.0 release with ironpython. I am just basically trying to > emulate the simple example from the pdc of using one of these classes from > ironpython at this stage. The problem is the class seems to be exposed as > just a normal class with all its members like trygetmember,trysetmember > exposed. Any member access that should go to trygetmember and the other > override methods returns with AttributeError - object has no attribute foo. > The class functions properly from within c#. Just wondering if there is a > known issue with this or if I am missing some extra step that has been > introduced since earlier demos of this functionality. > > 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 curt at hagenlocher.org Thu May 28 04:57:42 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 27 May 2009 19:57:42 -0700 Subject: [IronPython] C# 4.0 DynamicObject in IronPython In-Reply-To: References: Message-ID: Oops! Apparently I haven't quite read your message correctly. :( On Wed, May 27, 2009 at 7:56 PM, Curt Hagenlocher wrote: > Have you cast the variable to type "dynamic"? that is, > > class MyDynamicObject : DynamicObject { ... } > > dynamic obj = new MyDynamicObject(); > dynamic memberval = obj.SomeMember; > > On Wed, May 27, 2009 at 7:54 PM, R. Bear Smith wrote: > >> Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in >> the dlr for net 4.0 release with ironpython. I am just basically trying to >> emulate the simple example from the pdc of using one of these classes from >> ironpython at this stage. The problem is the class seems to be exposed as >> just a normal class with all its members like trygetmember,trysetmember >> exposed. Any member access that should go to trygetmember and the other >> override methods returns with AttributeError - object has no attribute foo. >> The class functions properly from within c#. Just wondering if there is a >> known issue with this or if I am missing some extra step that has been >> introduced since earlier demos of this functionality. >> >> 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 rbear at rbear.net Thu May 28 04:58:32 2009 From: rbear at rbear.net (R. Bear Smith) Date: Wed, 27 May 2009 22:58:32 -0400 Subject: [IronPython] C# 4.0 DynamicObject in IronPython In-Reply-To: References: Message-ID: yea works fine inside c# From: Curt Hagenlocher Sent: Wednesday, May 27, 2009 10:57 PM To: Discussion of IronPython Subject: Re: [IronPython] C# 4.0 DynamicObject in IronPython Oops! Apparently I haven't quite read your message correctly. :( On Wed, May 27, 2009 at 7:56 PM, Curt Hagenlocher wrote: Have you cast the variable to type "dynamic"? that is, class MyDynamicObject : DynamicObject { ... } dynamic obj = new MyDynamicObject(); dynamic memberval = obj.SomeMember; On Wed, May 27, 2009 at 7:54 PM, R. Bear Smith wrote: Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in the dlr for net 4.0 release with ironpython. I am just basically trying to emulate the simple example from the pdc of using one of these classes from ironpython at this stage. The problem is the class seems to be exposed as just a normal class with all its members like trygetmember,trysetmember exposed. Any member access that should go to trygetmember and the other override methods returns with AttributeError - object has no attribute foo. The class functions properly from within c#. Just wondering if there is a known issue with this or if I am missing some extra step that has been introduced since earlier demos of this functionality. Thanks _______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Emoticon1.gif Type: image/gif Size: 257 bytes Desc: not available URL: From dinov at microsoft.com Thu May 28 04:59:11 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 28 May 2009 02:59:11 +0000 Subject: [IronPython] C# 4.0 DynamicObject in IronPython In-Reply-To: References: Message-ID: <1A472770E042064698CB5ADC83A12ACD028EF1D1@TK5EX14MBXC120.redmond.corp.microsoft.com> We actually discovered there's a bug in IronPython that prevents DynamicObject from working right. Member access is fixed in the current IronPython builds but those probably aren't compatible w/ Beta 1 due to some DLR breaking changes. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of R. Bear Smith Sent: Wednesday, May 27, 2009 7:55 PM To: users at lists.ironpython.com Subject: [IronPython] C# 4.0 DynamicObject in IronPython Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in the dlr for net 4.0 release with ironpython. I am just basically trying to emulate the simple example from the pdc of using one of these classes from ironpython at this stage. The problem is the class seems to be exposed as just a normal class with all its members like trygetmember,trysetmember exposed. Any member access that should go to trygetmember and the other override methods returns with AttributeError - object has no attribute foo. The class functions properly from within c#. Just wondering if there is a known issue with this or if I am missing some extra step that has been introduced since earlier demos of this functionality. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From rbear at rbear.net Thu May 28 05:03:25 2009 From: rbear at rbear.net (R. Bear Smith) Date: Wed, 27 May 2009 23:03:25 -0400 Subject: [IronPython] C# 4.0 DynamicObject in IronPython In-Reply-To: <1A472770E042064698CB5ADC83A12ACD028EF1D1@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD028EF1D1@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: Thanks. That was the next thing I was gonna try was using a later dlr and see if I could get it working, Guess it will be beta2 before they are in sync again From: Dino Viehland Sent: Wednesday, May 27, 2009 10:59 PM To: Discussion of IronPython Subject: Re: [IronPython] C# 4.0 DynamicObject in IronPython We actually discovered there's a bug in IronPython that prevents DynamicObject from working right. Member access is fixed in the current IronPython builds but those probably aren't compatible w/ Beta 1 due to some DLR breaking changes. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of R. Bear Smith Sent: Wednesday, May 27, 2009 7:55 PM To: users at lists.ironpython.com Subject: [IronPython] C# 4.0 DynamicObject in IronPython Hi, I am trying to use a c# 4.0 class that derives from dynamicobject in the dlr for net 4.0 release with ironpython. I am just basically trying to emulate the simple example from the pdc of using one of these classes from ironpython at this stage. The problem is the class seems to be exposed as just a normal class with all its members like trygetmember,trysetmember exposed. Any member access that should go to trygetmember and the other override methods returns with AttributeError - object has no attribute foo. The class functions properly from within c#. Just wondering if there is a known issue with this or if I am missing some extra step that has been introduced since earlier demos of this functionality. 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Emoticon10.gif Type: image/gif Size: 253 bytes Desc: not available URL: From shreyas_waghmare at yahoo.com Thu May 28 16:54:18 2009 From: shreyas_waghmare at yahoo.com (shreyas waghmare) Date: Thu, 28 May 2009 20:24:18 +0530 (IST) Subject: [IronPython] ImportError: No module named clr Message-ID: <585937.14615.qm@web94816.mail.in2.yahoo.com> i recently installed mono and iron python on my Linux machine. on iron python interactive prompt (using command ipy)? i typed "import clr" and it gave me an error "ImportError: No module named clr" I just installed mono on my machine and iron python (ipy) got installed on it ( may because it is a part of mono 2.2 package) I think the error is coming as it is not able to find clr module. I was not able to find it after doing grep in that directory. Am i doing the things correctly? or missing something? Please help Thanks in advance Shreyas From Chandigarh to Chennai - find friends all over India. Go to http://in.promos.yahoo.com/groups/citygroups/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Thu May 28 17:03:21 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 28 May 2009 16:03:21 +0100 Subject: [IronPython] ImportError: No module named clr In-Reply-To: <585937.14615.qm@web94816.mail.in2.yahoo.com> References: <585937.14615.qm@web94816.mail.in2.yahoo.com> Message-ID: <4A1EA7B9.70108@voidspace.org.uk> shreyas waghmare wrote: > i recently installed mono and iron python on my Linux machine. > > on iron python interactive prompt (using command ipy) i typed "import > clr" and it gave me an error > "ImportError: No module named clr" > Can you do "which ipy" to make sure that is really starting IronPython (and not IPython for example) - clr is a builtin module in IronPython and should always be available. Michael > > I just installed mono on my machine and iron python (ipy) got > installed on it ( may because it is a part of mono 2.2 package) > > I think the error is coming as it is not able to find clr module. I > was not able to find it after doing grep in that directory. > > Am i doing the things correctly? or missing something? > > Please help > > Thanks in advance > > Shreyas > > > ------------------------------------------------------------------------ > Explore and discover exciting holidays and getaways with Yahoo! India > Travel Click here! > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From merllab at microsoft.com Thu May 28 17:53:35 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Thu, 28 May 2009 08:53:35 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <8ddbc424-bd8b-442d-94fc-21ca216003e8@tk5-exsmh-c101.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/53083. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/PointerType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/MemoryHolder.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_struct.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Calls.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/nt.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/gc.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/codecs.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonOptionsParser.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WithStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/TypeTracker.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/TypeGroup.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/CompilerHelpers.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/Instruction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonInvokeBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonSetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/LiteralParser.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleFlags.ps1 $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/excel.py $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/ExceptionHelpers.cs $/IronPython/IronPython_Main/Src/Tests/regressions.py $/IronPython/IronPython_Main/Src/Tests/specialcontext/Consoleless.ps1 $/IronPython/IronPython_Main/Src/Tests/test_cliclass.py $/IronPython/IronPython_Main/Src/Tests/test_buffer.py $/IronPython/IronPython_Main/Src/Scripts/generate_calls.py $/IronPython/IronPython_Main/Src/Tests/test_nt.py $/IronPython/IronPython_Main/Src/Tests/test_stdconsole.py $/IronPython/IronPython_Main/Src/Tests/test_gc.py $/IronPython/IronPython_Main/Src/Tests/test_codecs.py $/IronPython/IronPython_Main/Src/Tests/test_superconsole.py $/IronPython/IronPython_Main/Src/Tests/test_traceback.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 918179 Date: 5/27/2009 10:36:35 AM (dfugate) Renamed "IPY_OPTIONS" environment variable to "TEST_OPTIONS" which is a bit more IronRuby friendly. (Shelveset: TEST_OPTIONS;REDMOND\dfugate | SNAP CheckinId: m9247) -------------------------------------------------------------------------------- Changeset Id: 918178 Date: 5/27/2009 10:35:23 AM (dinov) Tfpt review /shelveset:LotsOfPythonBugs;dinov Python + 1 DLR Interpreter Change First the DLR interpreter change ? this is fixing a stack trace issue reported by Curt. When we have a mixed interpreted/compiled stack we?re getting the wrong result. This is because of few reasons: 1. We need to clear the stack back trace we?ve calculated for Python when we re-throw the exception otherwise we?ll re-use it. I?ve made the rethrow in WithStatement now throw through our helper and updated the interpreter to do nothing special w/ repros making it closer to the compiled code path. 2. Over in ExceptionHelpers we are combining the saved stacks + the new stacks in the incorrect order when reverse frames is true. This causes us to get confused and lose frames. 20634 hex_codec needs to be imported before hex decode can happen 15428 ".". does not generate a SyntaxError in interactive sessions 15348 TypeError thrown for IronPython.Compiler.Ast.ErrorExpression cast failure in interactive sessions 20302 codecs.lookup errors with uppercase encoding names 20051 Re-raising exception causes loss of traceback 22259 len(buffer) is incorrect 4565 Support all encodings CPython does for _codecs.encode and _codecs.decode 21929 os.listdir does not accept empty path 20603 Trivial: os.walk(??) doesn?t work 2169 test_isinstance incompatibilities with CPython 17235 dir(System.ArgIterator) broken 20039 struct.pack('L', -1) is stricter than in CPython 19484 Error with timeit.py module 19005 Strange issues with BOM? 10816 -X:MaxRecursion N<=1 broken 19278 Confusing Error Message when using in operator 13912 TypeError: Could not create instance of Improve the error message ? we now include that the type is abstract Also assigning to MemoryHolder?s size as caught in code review, fixing build.bat to run w/ frames enabled. (Shelveset: LotsOfPythonBugsFinal2;REDMOND\dinov | SNAP CheckinId: m9247) From daftspaniel at gmail.com Thu May 28 19:27:46 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Thu, 28 May 2009 18:27:46 +0100 Subject: [IronPython] ANN - DIE 00.01.71 Released Message-ID: <20253b0c0905281027j2bdee304xf02d895019c66479@mail.gmail.com> DIE 00.01.71 Released Davy's Ironpython Editor (DIE) is a clutter free IronPython editor written in IronPython with some basic IDE features. http://code.google.com/p/davysironpythoneditor/ Here's the detail in what has changed in 00.01.71: + Mobile Version which stores options in same dir. + Installed version stores in User Profile. (Existing Settings files don't transfer over - sorry). + 'Find in Files' feature added. + Much much Improved Capture of output from running Python scripts. + Click on error output now opens file and goes to line. + Resources - MSDN links area now low bandwith versions, Python links and Powershell launch menu. + Added CheckBox and Listbox control to gen_GUI. + Syntax Box -Exposed new property to get Caret Screen position. + Autocomplete option added - default to OFF. Experimental parsing for strings, lists and dictionaries. + Bug fixes and performance updates. Thanks Davy M -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From fuzzyman at voidspace.org.uk Thu May 28 21:13:26 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 28 May 2009 20:13:26 +0100 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: <8ddbc424-bd8b-442d-94fc-21ca216003e8@tk5-exsmh-c101.redmond.corp.microsoft.com> References: <8ddbc424-bd8b-442d-94fc-21ca216003e8@tk5-exsmh-c101.redmond.corp.microsoft.com> Message-ID: <4A1EE256.5020806@voidspace.org.uk> merllab at microsoft.com wrote: > [snip...] > > CHECKIN COMMENTS > -------------------------------------------------------------------------------- > Changeset Id: 918179 > Date: 5/27/2009 10:36:35 AM > > (dfugate) Renamed "IPY_OPTIONS" environment variable to "TEST_OPTIONS" which is a bit more IronRuby friendly. > > > (Shelveset: TEST_OPTIONS;REDMOND\dfugate | SNAP CheckinId: m9247) > -------------------------------------------------------------------------------- > Changeset Id: 918178 > Date: 5/27/2009 10:35:23 AM > > (dinov) Tfpt review /shelveset:LotsOfPythonBugs;dinov > > Python + 1 DLR Interpreter Change > > First the DLR interpreter change ? this is fixing a stack trace issue reported by Curt. When we have a mixed interpreted/compiled stack we?re getting the wrong result. This is because of few reasons: > 1. We need to clear the stack back trace we?ve calculated for Python when we re-throw the exception otherwise we?ll re-use it. I?ve made the rethrow in WithStatement now throw through our helper and updated the interpreter to do nothing special w/ repros making it closer to the compiled code path. > 2. Over in ExceptionHelpers we are combining the saved stacks + the new stacks in the incorrect order when reverse frames is true. This causes us to get confused and lose frames. > > 20634 hex_codec needs to be imported before hex decode can happen > 15428 ".". does not generate a SyntaxError in interactive sessions > 15348 TypeError thrown for IronPython.Compiler.Ast.ErrorExpression cast failure in interactive sessions > 20302 codecs.lookup errors with uppercase encoding names > 20051 Re-raising exception causes loss of traceback > 22259 len(buffer) is incorrect > 4565 Support all encodings CPython does for _codecs.encode and _codecs.decode > 21929 os.listdir does not accept empty path > 20603 Trivial: os.walk(??) doesn?t work > 2169 test_isinstance incompatibilities with CPython > 17235 dir(System.ArgIterator) broken > 20039 struct.pack('L', -1) is stricter than in CPython > 19484 Error with timeit.py module > 19005 Strange issues with BOM? > 10816 -X:MaxRecursion N<=1 broken > 19278 Confusing Error Message when using in operator > 13912 TypeError: Could not create instance of Improve the error message ? we now include that the type is abstract > > Also assigning to MemoryHolder?s size as caught in code review, fixing build.bat to run w/ frames enabled. > > Nice checkin Message! Not to mention impressive, lots of good stuff there. 20634, 15428, 20051, 4565, 21929, 17235, 20039, 19278, 19005 (and possibly others) all look like good candidates for backporting to 2.02. Any idea when 2.0.2 might be done? Michael > (Shelveset: LotsOfPythonBugsFinal2;REDMOND\dinov | SNAP CheckinId: m9247) > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From fuzzyman at voidspace.org.uk Thu May 28 21:14:09 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 28 May 2009 20:14:09 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A118C55.8020502@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> Message-ID: <4A1EE281.20703@voidspace.org.uk> Ping? Jimmy - had a chance to look at this yet? I'd really like to know if it is a bug or just something I'm doing wrong / not doing. Thanks Michael Michael Foord wrote: > Ha - dammit, no. > > With Silverlight this still throws an ImportError when embedded Python > code executed from C# like this tries to import from the xap file. :-( > > Michael > > Michael Foord wrote: >> Thanks to some help from William Reade, this code *seems* to work >> fine. I need to try it from Silverlight and check the Python code it >> contains is able to import: >> >> using System; >> using System.Collections.Generic; >> using System.Text; >> >> >> using IronPython.Hosting; >> using IronPython.Runtime; >> using IronPython.Runtime.Types; >> >> using Microsoft.Scripting; >> using Microsoft.Scripting.Hosting; >> using Microsoft.Scripting.Runtime; >> >> >> namespace ExecutePython >> { >> public class ExecutePython >> { >> static string code = @" >> class Foo(object): >> attribute = 'weeeee' >> >> "; >> public static Scope CreateModule(CodeContext context) >> { >> PythonContext python = PythonContext.GetContext(context); >> >> PythonDictionary globals = new PythonDictionary(); >> globals["__name__"] = "AModule"; >> Scope module = new Scope(globals); >> SourceUnit script = python.CreateSnippet(code, >> SourceCodeKind.Statements); >> script.Execute(module); >> return module; >> } >> } >> } >> >> >> All the best, >> >> >> Michael >> >> >> Michael Foord wrote: >>> Jimmy - did you get a chance to look at this? >>> >>> If the code shown below *genuinely* gets a reference to the current >>> engine then shouldn't the search path be setup already? >>> >>> Can you see what is wrong with the code below? >>> >>> Thanks >>> >>> Michael >>> >>> Michael Foord wrote: >>>> Hello guys, >>>> >>>> I have a second use case for embedding IronPython in Silverlight. >>>> This is actually a dynamic application with a C# component that >>>> needs to programattically build a Python module. >>>> >>>> Again I have the same problem - imports in Python code fail. I >>>> would have expected that accessing the current runtime and fetching >>>> a Python engine would fetch the current Python engine, with the >>>> browser host correctly setup. Unfortunately that seems not to be >>>> the case. Can anyone spot problems with the following code: >>>> >>>> >>>> using Microsoft.Scripting.Silverlight; >>>> using IronPython; >>>> using IronPython.Hosting; >>>> using Microsoft.Scripting; >>>> using Microsoft.Scripting.Hosting; >>>> >>>> namespace EmbeddedSLModule >>>> { >>>> public class EmbeddedSLModule >>>> { >>>> private static string source = @" >>>> import something >>>> "; >>>> public static ScriptScope GetModule(){ >>>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>>> ScriptEngine engine = runtime.GetEngine("Python"); >>>> ScriptScope scope = engine.CreateScope(); >>>> ScriptSource script = >>>> engine.CreateScriptSourceFromString(source, >>>> SourceCodeKind.Statements); >>>> script.Execute(scope); >>>> >>>> return scope; >>>> >>>> } >>>> } >>>> } >>>> >>>> >>>> It works fine for code that doesn't import anything - but imports >>>> from within the xap file fail. >>>> >>>> Thanks >>>> >>>> Michael Foord >>>> >>> >>> >> >> > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Thu May 28 21:17:18 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 28 May 2009 19:17:18 +0000 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: <4A1EE256.5020806@voidspace.org.uk> References: <8ddbc424-bd8b-442d-94fc-21ca216003e8@tk5-exsmh-c101.redmond.corp.microsoft.com> <4A1EE256.5020806@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD028F3137@TK5EX14MBXC120.redmond.corp.microsoft.com> With all the other releases it's been tough to find the time to work on 2.0.2. My current plan is to finish it up in about 2 weeks (it would be sooner but I'm taking most of next week off). > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Thursday, May 28, 2009 12:13 PM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython 2.6 CodePlex Source Update > > merllab at microsoft.com wrote: > > [snip...] > > > > CHECKIN COMMENTS > > --------------------------------------------------------------------- > ----------- > > Changeset Id: 918179 > > Date: 5/27/2009 10:36:35 AM > > > > (dfugate) Renamed "IPY_OPTIONS" environment variable to > "TEST_OPTIONS" which is a bit more IronRuby friendly. > > > > > > (Shelveset: TEST_OPTIONS;REDMOND\dfugate | SNAP CheckinId: m9247) > > --------------------------------------------------------------------- > ----------- > > Changeset Id: 918178 > > Date: 5/27/2009 10:35:23 AM > > > > (dinov) Tfpt review /shelveset:LotsOfPythonBugs;dinov > > > > Python + 1 DLR Interpreter Change > > > > First the DLR interpreter change ? this is fixing a stack trace issue > reported by Curt. When we have a mixed interpreted/compiled stack > we?re getting the wrong result. This is because of few reasons: > > 1. We need to clear the stack back trace we?ve calculated for > Python when we re-throw the exception otherwise we?ll re-use it. I?ve > made the rethrow in WithStatement now throw through our helper and > updated the interpreter to do nothing special w/ repros making it > closer to the compiled code path. > > 2. Over in ExceptionHelpers we are combining the saved stacks + > the new stacks in the incorrect order when reverse frames is true. > This causes us to get confused and lose frames. > > > > 20634 hex_codec needs to be imported before hex decode can happen > > 15428 ".". does not generate a SyntaxError in interactive sessions > > 15348 TypeError thrown for IronPython.Compiler.Ast.ErrorExpression > cast failure in interactive sessions > > 20302 codecs.lookup errors with uppercase encoding names > > 20051 Re-raising exception causes loss of traceback > > 22259 len(buffer) is incorrect > > 4565 Support all encodings CPython does for _codecs.encode and > _codecs.decode > > 21929 os.listdir does not accept empty path > > 20603 Trivial: os.walk(??) doesn?t work > > 2169 test_isinstance incompatibilities with CPython > > 17235 dir(System.ArgIterator) broken > > 20039 struct.pack('L', -1) is stricter than in CPython > > 19484 Error with timeit.py module > > 19005 Strange issues with BOM? > > 10816 -X:MaxRecursion N<=1 broken > > 19278 Confusing Error Message when using in operator > > 13912 TypeError: Could not create instance of Improve > the error message ? we now include that the type is abstract > > > > Also assigning to MemoryHolder?s size as caught in code review, > fixing build.bat to run w/ frames enabled. > > > > > > Nice checkin Message! Not to mention impressive, lots of good stuff > there. > > 20634, 15428, 20051, 4565, 21929, 17235, 20039, 19278, 19005 (and > possibly others) all look like good candidates for backporting to 2.02. > > Any idea when 2.0.2 might be done? > > Michael > > > (Shelveset: LotsOfPythonBugsFinal2;REDMOND\dinov | SNAP CheckinId: > m9247) > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Thu May 28 21:18:32 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 28 May 2009 20:18:32 +0100 Subject: [IronPython] IronPython 2.6 CodePlex Source Update In-Reply-To: <1A472770E042064698CB5ADC83A12ACD028F3137@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <8ddbc424-bd8b-442d-94fc-21ca216003e8@tk5-exsmh-c101.redmond.corp.microsoft.com> <4A1EE256.5020806@voidspace.org.uk> <1A472770E042064698CB5ADC83A12ACD028F3137@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A1EE388.703@voidspace.org.uk> Dino Viehland wrote: > With all the other releases it's been tough to find the time to work on > 2.0.2. My current plan is to finish it up in about 2 weeks (it would be > sooner but I'm taking most of next week off). > > Time off! You can't do that. ;-) Anyway, cool that's great news. Thanks Michael >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Michael Foord >> Sent: Thursday, May 28, 2009 12:13 PM >> To: Discussion of IronPython >> Subject: Re: [IronPython] IronPython 2.6 CodePlex Source Update >> >> merllab at microsoft.com wrote: >> >>> [snip...] >>> >>> CHECKIN COMMENTS >>> --------------------------------------------------------------------- >>> >> ----------- >> >>> Changeset Id: 918179 >>> Date: 5/27/2009 10:36:35 AM >>> >>> (dfugate) Renamed "IPY_OPTIONS" environment variable to >>> >> "TEST_OPTIONS" which is a bit more IronRuby friendly. >> >>> (Shelveset: TEST_OPTIONS;REDMOND\dfugate | SNAP CheckinId: m9247) >>> --------------------------------------------------------------------- >>> >> ----------- >> >>> Changeset Id: 918178 >>> Date: 5/27/2009 10:35:23 AM >>> >>> (dinov) Tfpt review /shelveset:LotsOfPythonBugs;dinov >>> >>> Python + 1 DLR Interpreter Change >>> >>> First the DLR interpreter change ? this is fixing a stack trace issue >>> >> reported by Curt. When we have a mixed interpreted/compiled stack >> we?re getting the wrong result. This is because of few reasons: >> >>> 1. We need to clear the stack back trace we?ve calculated for >>> >> Python when we re-throw the exception otherwise we?ll re-use it. I?ve >> made the rethrow in WithStatement now throw through our helper and >> updated the interpreter to do nothing special w/ repros making it >> closer to the compiled code path. >> >>> 2. Over in ExceptionHelpers we are combining the saved stacks + >>> >> the new stacks in the incorrect order when reverse frames is true. >> This causes us to get confused and lose frames. >> >>> 20634 hex_codec needs to be imported before hex decode can happen >>> 15428 ".". does not generate a SyntaxError in interactive sessions >>> 15348 TypeError thrown for IronPython.Compiler.Ast.ErrorExpression >>> >> cast failure in interactive sessions >> >>> 20302 codecs.lookup errors with uppercase encoding names >>> 20051 Re-raising exception causes loss of traceback >>> 22259 len(buffer) is incorrect >>> 4565 Support all encodings CPython does for _codecs.encode and >>> >> _codecs.decode >> >>> 21929 os.listdir does not accept empty path >>> 20603 Trivial: os.walk(??) doesn?t work >>> 2169 test_isinstance incompatibilities with CPython >>> 17235 dir(System.ArgIterator) broken >>> 20039 struct.pack('L', -1) is stricter than in CPython >>> 19484 Error with timeit.py module >>> 19005 Strange issues with BOM? >>> 10816 -X:MaxRecursion N<=1 broken >>> 19278 Confusing Error Message when using in operator >>> 13912 TypeError: Could not create instance of Improve >>> >> the error message ? we now include that the type is abstract >> >>> Also assigning to MemoryHolder?s size as caught in code review, >>> >> fixing build.bat to run w/ frames enabled. >> >>> >> Nice checkin Message! Not to mention impressive, lots of good stuff >> there. >> >> 20634, 15428, 20051, 4565, 21929, 17235, 20039, 19278, 19005 (and >> possibly others) all look like good candidates for backporting to 2.02. >> >> Any idea when 2.0.2 might be done? >> >> Michael >> >> >>> (Shelveset: LotsOfPythonBugsFinal2;REDMOND\dinov | SNAP CheckinId: >>> >> m9247) >> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From robert at smallshire.org.uk Fri May 29 08:38:07 2009 From: robert at smallshire.org.uk (Robert Smallshire) Date: Fri, 29 May 2009 08:38:07 +0200 Subject: [IronPython] Portable use of pickle.dumps() Message-ID: <000001c9e028$074d2620$1300000a@LITTONDALE> Hello, I'm trying to get some commercial code for a simple object database we have written for Python 2.6 to work with IronPython 2.6. In Python 2.6 the return type of pickle.dumps() is str, which is of course a byte string. In IronPython 2.6 it is also str, which is of course a unicode string. This 'compatibility' is fine until I put those strings into a database, at which point my interoperability between CPython and IronPython goes off the rails. I notice that in Python 3.0 the return type of pickle.dumps() is now 'bytes', which is much better. I don't imagine you're about to change the return type in IronPython 2.x to bytes even though that would arguably be the right thing to do. I intend to provide a compatibility wrapper around pickle that returns a bytes instance on CPython 2.6, IronPython 2.6 and Python 3.0. What is the preferred way to transform my unicode 'str' in IronPython into a 'bytes' instance in IronPython that will be byte-compatible with what I'm getting from CPython? Many thanks, Rob Robert Smallshire from home on behalf of Roxar Software Solutions Currently in Norway (UTC +1 hours) From fuzzyman at voidspace.org.uk Fri May 29 13:29:03 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 12:29:03 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <000001c9e028$074d2620$1300000a@LITTONDALE> References: <000001c9e028$074d2620$1300000a@LITTONDALE> Message-ID: <4A1FC6FF.40705@voidspace.org.uk> Robert Smallshire wrote: > Hello, > > I'm trying to get some commercial code for a simple object database we have > written for Python 2.6 to work with IronPython 2.6. In Python 2.6 the return > type of pickle.dumps() is str, which is of course a byte string. In > IronPython 2.6 it is also str, which is of course a unicode string. This > 'compatibility' is fine until I put those strings into a database, at which > point my interoperability between CPython and IronPython goes off the rails. > > How is this actually a problem? I mean, can you provide a specific example of where a string in IronPython doesn't behave as a byte string in CPython. I'm sure there are such examples, but those may be bugs that the IPy team can fix. In practise I've encountered these problems very rarely. For example "data = [ord(c) for c in some_string]" has behaved as expected many times for me in IronPython (and could help you turn strings into bytes). Is this a theoretical problem at this stage or an actual problem? Michael > I notice that in Python 3.0 the return type of pickle.dumps() is now > 'bytes', which is much better. I don't imagine you're about to change the > return type in IronPython 2.x to bytes even though that would arguably be > the right thing to do. I intend to provide a compatibility wrapper around > pickle that returns a bytes instance on CPython 2.6, IronPython 2.6 and > Python 3.0. > > What is the preferred way to transform my unicode 'str' in IronPython into a > 'bytes' instance in IronPython that will be byte-compatible with what I'm > getting from CPython? > > Many thanks, > > Rob > > Robert Smallshire > from home on behalf of > Roxar Software Solutions > Currently in Norway (UTC +1 hours) > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From fuzzyman at voidspace.org.uk Fri May 29 15:58:48 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 14:58:48 +0100 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: <4A1FEA18.7040100@voidspace.org.uk> jocke khazad wrote: > Hi everyone! > > I would like you ask this question that I seem not to get an answer > for anywhere. > > What is the advantage of using ironpython compared to using only > powershell? Or is it just a personal choice which one you like the best? Taste comes into it a lot. For example I abhor dynamic scoping (Powershell) and much prefer lexical scoping (Python). IronPython tends to be faster than Powershell (at least in the embedded situation in which I compared them) and has more libraries (Python libraries as well as .NET) and a larger user community (if you include the whole Python community). All the best, Michael Foord > > > Best Regards, > > Joakim > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ From robert at smallshire.org.uk Fri May 29 16:44:00 2009 From: robert at smallshire.org.uk (Robert Smallshire) Date: Fri, 29 May 2009 16:44:00 +0200 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <4A1FC6FF.40705@voidspace.org.uk> Message-ID: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> Hi Michael, > > I'm trying to get some commercial code for a simple object > database we > > have written for Python 2.6 to work with IronPython 2.6. In > Python 2.6 > > the return type of pickle.dumps() is str, which is of course a byte > > string. In IronPython 2.6 it is also str, which is of course a > > unicode string. This 'compatibility' is fine until I put those > > strings into a database, at which point my interoperability between > > CPython and IronPython goes off the rails. > > > How is this actually a problem? > > I mean, can you provide a specific example of where a string in > IronPython doesn't behave as a byte string in CPython. I'm sure there > are such examples, but those may be bugs that the IPy team > can fix. In > practise I've encountered these problems very rarely. My opening paragraph may be ambiguously worded - by 'interoperability' I didn't mean the ability to run the same code unchanged on CPython and IronPython (I have to change the code anyway to use a different database adapter) - I meant interoperability between pickles persisted into a database from both IronPython and CPython. My basic issue is that the 'str' unavoidably implies certain semantics when calling .NET APIs from IronPython. These APIs interpret str as text rather than just bytes, which therefore gets transformed by various text encodings, such as UTF-8 to UTF-16. Such encodings are undesirable for my pickled data since the result is no longer necessarily a valid pickle. I suppose the intention in Python 3.0 is that 'bytes' doesn't carry any semantics with it, its just data, which is why pickle.dumps() in Python 3.0 returns bytes rather than str. I want to push plain old byte arrays into the database from both CPython and IronPython, so I can avoid any head-scratching confusion with database adapters and/or databases inappropriately encoding or decoding my data. > For example "data = [ord(c) for c in some_string]" has behaved as > expected many times for me in IronPython (and could help you turn > strings into bytes). Thanks. I'll try something based on that. > Is this a theoretical problem at this stage or an actual problem? Its an actual problem with SQLiteParameter.Value from the SQLite ADO.NET provider. I think our original CPython code is a bit sloppy with respect to the distinction between text strings and byte arrays, so I'll probably need to tighten things up on both sides. Would you agree tha using unicode() and bytes() everywhere and avoiding str() gives code that has the same meaning in Python 2.6, IronPython 2.6 and Python 3.0? Do you think this would be a good guideline to follow until we can leave Python 2.x behind? Many thanks, Rob From fuzzyman at voidspace.org.uk Fri May 29 17:10:43 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 16:10:43 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> Message-ID: <4A1FFAF3.5040607@voidspace.org.uk> Robert Smallshire wrote: > Hi Michael, > > >>> I'm trying to get some commercial code for a simple object >>> >> database we >> >>> have written for Python 2.6 to work with IronPython 2.6. In >>> >> Python 2.6 >> >>> the return type of pickle.dumps() is str, which is of course a byte >>> string. In IronPython 2.6 it is also str, which is of course a >>> unicode string. This 'compatibility' is fine until I put those >>> strings into a database, at which point my interoperability between >>> CPython and IronPython goes off the rails. >>> >>> >> How is this actually a problem? >> >> I mean, can you provide a specific example of where a string in >> IronPython doesn't behave as a byte string in CPython. I'm sure there >> are such examples, but those may be bugs that the IPy team >> can fix. In >> practise I've encountered these problems very rarely. >> > > My opening paragraph may be ambiguously worded - by 'interoperability' I > didn't mean the ability to run the same code unchanged on CPython and > IronPython (I have to change the code anyway to use a different database > adapter) - I meant interoperability between pickles persisted into a > database from both IronPython and CPython. > So are you telling the database that it is binary data or text? Is the question how do I go from a pickle string in IronPython to a byte array that I can pass to the database adaptor without going through an explicit encode (which will transform the data)? (One technique would be to explicitly use pickle protocol 0 which is less efficient but only creates ascii characters - this is actually the default. Another alternative would be to use JSON or YAML instead of pickle.) Here is an example of getting a byte array from a binary pickle in IronPython: >>> import pickle >>> class A(object): ... b = 'hello' ... c = (None, 'fish', 7.2, 7j) ... a = {1: 2} ... >>> p = pickle.dumps(A(), protocol=2) >>> p u'\x80\x02c__main__\nA\nq\x00)\x81q\x01}q\x02b.' >>> from System import Array, Byte >>> a = Array[Byte](tuple(Byte(ord(c)) for c in p)) >>> a Array[Byte]((, My basic issue is that the 'str' unavoidably implies certain semantics when > calling .NET APIs from IronPython. These APIs interpret str as text rather > than just bytes, which therefore gets transformed by various text encodings, > such as UTF-8 to UTF-16. Such encodings are undesirable for my pickled data > since the result is no longer necessarily a valid pickle. I suppose the > intention in Python 3.0 is that 'bytes' doesn't carry any semantics with it, > its just data, which is why pickle.dumps() in Python 3.0 returns bytes > rather than str. > > I want to push plain old byte arrays into the database from both CPython and > IronPython, so I can avoid any head-scratching confusion with database > adapters and/or databases inappropriately encoding or decoding my data. > > >> For example "data = [ord(c) for c in some_string]" has behaved as >> expected many times for me in IronPython (and could help you turn >> strings into bytes). >> > > Thanks. I'll try something based on that. > > >> Is this a theoretical problem at this stage or an actual problem? >> > > Its an actual problem with SQLiteParameter.Value from the SQLite ADO.NET > provider. I think our original CPython code is a bit sloppy with respect to > the distinction between text strings and byte arrays, so I'll probably need > to tighten things up on both sides. > > Would you agree tha using unicode() and bytes() everywhere and avoiding > str() gives code that has the same meaning in Python 2.6, IronPython 2.6 and > Python 3.0? Do you think this would be a good guideline to follow until we > can leave Python 2.x behind? > > Many thanks, > > Rob > > > > -- http://www.ironpythoninaction.com/ From fuzzyman at voidspace.org.uk Fri May 29 17:13:14 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 16:13:14 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> Message-ID: <4A1FFB8A.1000407@voidspace.org.uk> Robert Smallshire wrote: > [snip...] > >> Is this a theoretical problem at this stage or an actual problem? >> > > Its an actual problem with SQLiteParameter.Value from the SQLite ADO.NET > provider. I think our original CPython code is a bit sloppy with respect to > the distinction between text strings and byte arrays, so I'll probably need > to tighten things up on both sides. > > Would you agree tha using unicode() and bytes() everywhere and avoiding > str() gives code that has the same meaning in Python 2.6, IronPython 2.6 and > Python 3.0? Do you think this would be a good guideline to follow until we > can leave Python 2.x behind? > > In Python 2.6 isn't bytes just an alias for str? IronPython 2.6 may treat it slightly differently however... On the CPython side I would definitely store text as Unicode as any problems you have treating strings as binary data (or vice versa) should become obvious a lot sooner. All the best, Michael > Many thanks, > > Rob > > > > -- http://www.ironpythoninaction.com/ From fuzzyman at voidspace.org.uk Fri May 29 17:16:46 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 16:16:46 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <4A1FFAF3.5040607@voidspace.org.uk> References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> Message-ID: <4A1FFC5E.1030004@voidspace.org.uk> Michael Foord wrote: > [snip...] > Here is an example of getting a byte array from a binary pickle in > IronPython: > > >>> import pickle > >>> class A(object): > ... b = 'hello' > ... c = (None, 'fish', 7.2, 7j) > ... a = {1: 2} > ... > >>> p = pickle.dumps(A(), protocol=2) > >>> p > u'\x80\x02c__main__\nA\nq\x00)\x81q\x01}q\x02b.' > >>> from System import Array, Byte > >>> a = Array[Byte](tuple(Byte(ord(c)) for c in p)) > >>> a > Array[Byte]((, > And the converse: >>> p2 = ''.join(chr(c) for c in a) >>> a2 = pickle.loads(p2) >>> a2 >>> a2.a {1: 2} >>> a2.b 'hello' >>> a2.c (None, 'fish', 7.2, 7j) Michael > I hope this is at least slightly helpful. :-) > > Michael > > > >> My basic issue is that the 'str' unavoidably implies certain >> semantics when >> calling .NET APIs from IronPython. These APIs interpret str as text >> rather >> than just bytes, which therefore gets transformed by various text >> encodings, >> such as UTF-8 to UTF-16. Such encodings are undesirable for my >> pickled data >> since the result is no longer necessarily a valid pickle. I suppose >> the >> intention in Python 3.0 is that 'bytes' doesn't carry any semantics >> with it, >> its just data, which is why pickle.dumps() in Python 3.0 returns bytes >> rather than str. >> >> I want to push plain old byte arrays into the database from both >> CPython and >> IronPython, so I can avoid any head-scratching confusion with database >> adapters and/or databases inappropriately encoding or decoding my data. >> >> >>> For example "data = [ord(c) for c in some_string]" has behaved as >>> expected many times for me in IronPython (and could help you turn >>> strings into bytes). >>> >> >> Thanks. I'll try something based on that. >> >> >>> Is this a theoretical problem at this stage or an actual problem? >>> >> >> Its an actual problem with SQLiteParameter.Value from the SQLite ADO.NET >> provider. I think our original CPython code is a bit sloppy with >> respect to >> the distinction between text strings and byte arrays, so I'll >> probably need >> to tighten things up on both sides. >> >> Would you agree tha using unicode() and bytes() everywhere and avoiding >> str() gives code that has the same meaning in Python 2.6, IronPython >> 2.6 and >> Python 3.0? Do you think this would be a good guideline to follow >> until we >> can leave Python 2.x behind? >> >> Many thanks, >> >> Rob >> >> >> >> > > -- http://www.ironpythoninaction.com/ From merllab at microsoft.com Fri May 29 17:52:54 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 29 May 2009 08:52:54 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/53173. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/BytesConversionAttribute.cs $/IronPython/IronPython_Main/Src/Tests/plans $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_ctor_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_event_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_method_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_method_signature.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_property_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_simplederive.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_special_method.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.test_delegate.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.test_event.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.test_field_misc.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.test_fields_inside_enum.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.insert_csharp.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_arguments.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_op_explicit.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_op_implicit.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_operators.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_returnvalue.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_indexercs.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_indexervb.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_property.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_accessibility.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_dynamicobjectmodel.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_loadorder.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_assembly.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_clr_array.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_ctor.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_defaultmember.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_reachtype.html DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/ProhibitGenericListConversion.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/BytesConversionAttribute.cs $/IronPython/IronPython_Main/Src/Tests/interop/com/dlrcomlib/pytraits/method.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOverloadResolver.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightLambda.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightDelegateCreator.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightLambda.Generated.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonGlobal.cs $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_initonly_fields.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_fields_inside_enum.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_field_misc.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_literal_fields.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_instance_fields.py $/IronPython/IronPython_Main/Src/Tests/interop/net/field/test_static_fields.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_ctor_override.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_event_override.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_special_method.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_method_override.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_method_signature.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_property_override.py $/IronPython/IronPython_Main/Src/Tests/interop/net/derivation/test_simplederive.py $/IronPython/IronPython_Main/Src/Tests/interop/net/event/test_delegate.py $/IronPython/IronPython_Main/Src/Tests/interop/net/event/test_event.py $/IronPython/IronPython_Main/Src/Tests/interop/net/event/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/property/test_indexervb.py $/IronPython/IronPython_Main/Src/Tests/interop/net/property/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/property/test_indexercs.py $/IronPython/IronPython_Main/Src/Tests/interop/net/property/test_property.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/test_operators.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/test_op_explicit.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/test_returnvalue.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/test_op_implicit.py $/IronPython/IronPython_Main/Src/Tests/interop/net/method/test_arguments.py $/IronPython/IronPython_Main/Src/Tests/interop/net/test_dynamicobjectmodel.py $/IronPython/IronPython_Main/Src/Tests/interop/net/test_accessibility.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/ByteArray.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/StringFormatSpec.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Bytes.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/__init__.py $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/runner.py $/IronPython/IronPython_Main/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Lib/iptest/__init__.py $/IronPython/IronPython_Main/Lib/iptest/runner.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/ConversionBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/NewTypeMaker.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionCode.cs $/IronPython/IronPython_Main/Src/Scripts/ipcom.ps1 $/IronPython/IronPython_Main/Src/IronPython.Modules/array.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/IntOps.cs $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_ctor_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_event_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_method_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_method_signature.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_property_override.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_simplederive.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.derivation.test_special_method.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.test_delegate.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.event.test_event.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.test_field_misc.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.field.test_fields_inside_enum.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.insert_csharp.html $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_clr_array.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_assembly.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/__init__.py $/IronPython/IronPython_Main/Src/Tests/interop/net/test_loadorder.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_ctor.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_defaultmember.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_reachtype.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/FloatOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/LongOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Slice.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/List.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/locale.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_arguments.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_op_explicit.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_op_implicit.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_operators.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.method.test_returnvalue.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_indexercs.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_indexervb.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.property.test_property.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_accessibility.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_dynamicobjectmodel.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.test_loadorder.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_assembly.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_clr_array.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_ctor.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_defaultmember.html $/IronPython/IronPython_Main/Src/Tests/plans/interop.net.type.test_reachtype.html $/IronPython/IronPython_Main/Src/Tests/regressions.py $/IronPython/IronPython_Main/Src/Tests/test_locale.py $/IronPython/IronPython_Main/Src/Tests/test_list.py $/IronPython/IronPython_Main/Src/Tests/test_imp.py $/IronPython/IronPython_Main/Src/Tests/test_dict.py $/IronPython/IronPython_Main/Src/Tests/test_superconsole.py $/IronPython/IronPython_Main/Src/Tests/test_str.py $/IronPython/IronPython_Main/Src/Tests/test_slice.py $/IronPython/IronPython_Main/Src/Tests/test_namebinding.py $/IronPython/IronPython_Main/Src/Tests/versions/python26.py $/IronPython/IronPython_Main/Tutorial/Tutorial.htm CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 921161 Date: 5/28/2009 5:26:52 PM (dinov) 21947 1 High None + '' IronPython\2.6 Beta 2 Add [NotNull] attribute to string addition operators 19561 Medium _MCLWEB dfugate_cp IronPython\2.6 2.6: str.translate can accept None and do identity translation 21919 Medium _MCLWEB IronPython\2.6 Beta 1 "...".translate(None) should work Accept null for translation value and only perform deletions 19656 1 High Module Name Lookup Broken IronPython\2.6 Beta 2 dinov_cp Fixed, just adding test case to regressions.py 20956 1 High Scoping inside classes is broken IronPython\2.6 Beta 2 Fixing the error message so when a global lookup fails we report the same error as CPython 8736 1 Medium array.array does not support slice assignment properly IronPython\2.6 Neither does list ? fixed both of them. 16519 1 Medium Setting attribute "Dict" on a Python module fails Fixing the test so that it works under silverlight where we don?t have a __main__ module. 21379 1 Medium b'...'.find/rfind/index/rindex should accept "None" for start/end integer parameters Allow passing a string wherever we prohibit passing a List for IList 20845 1 Medium Recent checkin seems to have introduced slice indexing site bug Appears to be fixed, enabling the test 22007 1 Medium Number formatting IronPython\2.6 Just a partial fix, floating point still needs some work (Shelveset: MoreBeta2BugsFinal;REDMOND\dinov | SNAP CheckinId: 8518) -------------------------------------------------------------------------------- Changeset Id: 920821 Date: 5/28/2009 2:43:36 PM (dfugate) Keep a copy of the .NET interop test plan stored in IronPython\Tests\plans\. (Shelveset: NETPLAN02;REDMOND\dfugate | SNAP CheckinId: 8515) -------------------------------------------------------------------------------- Changeset Id: 920424 Date: 5/28/2009 11:36:28 AM (dfugate) Moved IronPython .NET Interop test plan from a Word doc directly into the pydoc strings of the interop.net test package. iptest: - now has a logger, l, available to the rest of the iptest modules. Changes to a number of test files were necessary as a result (e.g., method.py) - supports "--help", "--plan", and "--no_testing" flags. --plan is a new feature used to generate test plans based on pydoc found in the tests. --no_testing does what its name implies and is useful with --plan iptest.assert_util: support the new --no_testing flag iptest.runner: added changes necessary to support the --plan flag interop.net: moved the most recent IronPython .NET Interop Test Plan directly into this test package as pydoc comments (Shelveset: NETPLAN;REDMOND\dfugate | SNAP CheckinId: 8511) From robert at smallshire.org.uk Fri May 29 19:20:19 2009 From: robert at smallshire.org.uk (Robert Smallshire) Date: Fri, 29 May 2009 19:20:19 +0200 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <4A1FFAF3.5040607@voidspace.org.uk> Message-ID: <000001c9e081$be3f9210$1300000a@LITTONDALE> Hi Michael, [snip] > > My opening paragraph may be ambiguously worded - by > 'interoperability' > > I didn't mean the ability to run the same code unchanged on CPython > > and IronPython (I have to change the code anyway to use a different > > database > > adapter) - I meant interoperability between pickles persisted into a > > database from both IronPython and CPython. > > > > So are you telling the database that it is binary data or text? Binary - the column is a BLOB, but SQLite is dynamically typed, and indeed weakly typed, and so seems to store pretty much whatever you give it! > > Is the question how do I go from a pickle string in > IronPython to a byte > array that I can pass to the database adaptor without going > through an > explicit encode (which will transform the data)? Yes. > > (One technique would be to explicitly use pickle protocol 0 which is > less efficient but only creates ascii characters - this is > actually the > default. Another alternative would be to use JSON or YAML instead of > pickle.) I'm pickling data in the hundreds of megabytes to multi-gigabyte range, so the binary pickling format is essential for performance and compactness reasons. This much we know from our experience with the CPython end of things. > > Here is an example of getting a byte array from a binary pickle in > IronPython: > > >>> import pickle > >>> class A(object): > ... b = 'hello' > ... c = (None, 'fish', 7.2, 7j) > ... a = {1: 2} > ... > >>> p = pickle.dumps(A(), protocol=2) > >>> p > u'\x80\x02c__main__\nA\nq\x00)\x81q\x01}q\x02b.' > >>> from System import Array, Byte > >>> a = Array[Byte](tuple(Byte(ord(c)) for c in p)) > >>> a > Array[Byte]((, > > I hope this is at least slightly helpful. :-) Its definitely helpful. The Array[Byte] syntax is new to me, but now I've looked it up, something along these lines looks to what I need. I'll also be investigating how the 'bytes' type works in IronPython since it seems to be a distict type from 'str' and close to what I need. The database is actually giving me Array[Byte] back in IronPython when I extract data that's been inserted by CPython. In fact 'bytes' appears to be constructable from IList[Byte] in IronPython. Thanks again for you help, Rob P.S. I've just ordered IronPython in Action. :-) From robert at smallshire.org.uk Fri May 29 19:29:28 2009 From: robert at smallshire.org.uk (Robert Smallshire) Date: Fri, 29 May 2009 19:29:28 +0200 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <000001c9e028$074d2620$1300000a@LITTONDALE> Message-ID: <000101c9e083$05a50c10$1300000a@LITTONDALE> Hello, Lets create a bytes instance from a str, and convert it back to a str. >>> a = bytes(ord(c) for c in "Hello World") >>> a b'Hello World' >>> str(a) "b'Hello World'" As you can see, the leading b and the quotes become part of the string, which is unexpected. I guess the conversion is using __repr__ where it should use __str__. Cheers, Rob From vernondcole at gmail.com Fri May 29 19:38:37 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Fri, 29 May 2009 11:38:37 -0600 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <4A1FFC5E.1030004@voidspace.org.uk> References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: I would humbly suggest that if you were to use adodbapi for your database access, the adapter would take care of all of this for you, and will also work in Python 3.0. Unfortunatly, the last remaining bug in adodbapi (caused by a bug in the IronPython COM interface) is in this exact area -- binary buffers. If you are actually using only string (or unicode) data, passed as such, it would work perfectly for you. I was hoping to provide you with examples from the adodbapi source code of how to work around this problem (since your application is doing basically the same thing.) On reviewing the code, though, I find that I there are no longer any visible examples of str vs. unicode incompatibily fixes. Iron Python does that good a job at masking the difference! Nevertheless, I can point to a code fragment which handles the difference between python 2 and python 3, which may be instructive. The method I used is to create a local object which is used as if it were a type. That definition is done once, at import time, and then freely used in the classes below. You could use a similar construct based on whether IronPython or CPython were in use. The following snippet runs in CPython versions 2.3 thru 2.6 and IronPython, and, after being processed by 2to3.py runs on Python 3.0. Both CPython 2.x and IronPython use the "else" branch for their object definitions in this case. # --- define objects to smooth out Python3000 <-> Python 2.x differences unicodeType = unicode #this line will be altered by 2to3.py to '= str' longType = long #thil line will be altered by 2to3.py to '= int' memoryViewType = types.BufferType #will be altered to '= memoryview' if sys.version[0] == '3': StringTypes = [str] makeByteBuffer = bytes else: makeByteBuffer = buffer bytes = str StringTypes = types.StringTypes # will be messed up by 2to3 but never used So the code to create a binary blob (as required by PEP 249) becomes: def Binary(aString): """This function constructs an object capable of holding a binary (long) string value. """ return makeByteBuffer(aString) Hope this helps some. -- Vernon Cole -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Fri May 29 20:05:38 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Fri, 29 May 2009 12:05:38 -0600 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: Follow up to my own comment... On Fri, May 29, 2009 at 11:38 AM, Vernon Cole wrote: > . You could use a similar construct based on whether IronPython or CPython > were in use. > I note that effort is now going forward to port pywin32 to IronPython. When that happens, my code will break, because it uses: try: import win32com.client onIronPython = False except ImportError: # implies running on IronPython onIronPython = True in order to detect which environment it is on. I should change this for the next version of adodbapi. Question for the group: What is a better/best way to test for IronPython vs CPython? -- Vernon P.S. Robert: Thanks for documenting this. I am contemplating a new fork of adodbapi based on ADO.NET rather than COM (my target is Linux/mono so COM is out of the question.) I will very likely run into this problem when/if I make that jump. -- VC -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri May 29 20:24:37 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 19:24:37 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: <4A202865.6070105@voidspace.org.uk> Vernon Cole wrote: > Follow up to my own comment... > > On Fri, May 29, 2009 at 11:38 AM, Vernon Cole > wrote: > > . You could use a similar construct based on whether IronPython or > CPython were in use. > > > I note that effort is now going forward to port pywin32 to IronPython. > When that happens, my code will break, because it uses: > > try: > import win32com.client > onIronPython = False > except ImportError: # implies running on IronPython > onIronPython = True > > in order to detect which environment it is on. > > I should change this for the next version of adodbapi. > > Question for the group: > What is a better/best way to test for IronPython vs CPython? sys.platform == 'cli' Michael > -- > Vernon > > P.S. > Robert: > Thanks for documenting this. I am contemplating a new fork of > adodbapi based on ADO.NET rather than COM (my target > is Linux/mono so COM is out of the question.) I will very likely run > into this problem when/if I make that jump. > -- > VC > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Fri May 29 20:25:14 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 29 May 2009 18:25:14 +0000 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <000101c9e083$05a50c10$1300000a@LITTONDALE> References: <000001c9e028$074d2620$1300000a@LITTONDALE> <000101c9e083$05a50c10$1300000a@LITTONDALE> Message-ID: <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> Unfortunately there's probably going to continue to be a bunch of corner cases related to bytes/str/unicode until we move to 3.0. But hopefully we can come up w/ reasonable workarounds for most of them. In this case it seems like we should define __str__ on bytes and make it return a Unicode string w/o the b''. We can keep repr in there so that an explicit repr still gives you the b'' representation... Ahh, I can't wait until Ipy 3.0! -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Robert Smallshire Sent: Friday, May 29, 2009 10:29 AM To: 'Discussion of IronPython' Subject: [IronPython] Minor bug in conversion of str to bytes? Hello, Lets create a bytes instance from a str, and convert it back to a str. >>> a = bytes(ord(c) for c in "Hello World") >>> a b'Hello World' >>> str(a) "b'Hello World'" As you can see, the leading b and the quotes become part of the string, which is unexpected. I guess the conversion is using __repr__ where it should use __str__. Cheers, Rob _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Fri May 29 20:33:32 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 19:33:32 +0100 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> References: <000001c9e028$074d2620$1300000a@LITTONDALE> <000101c9e083$05a50c10$1300000a@LITTONDALE> <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> Message-ID: <4A202A7C.9050209@voidspace.org.uk> Dino Viehland wrote: > Unfortunately there's probably going to continue to be a bunch of corner > cases related to bytes/str/unicode until we move to 3.0. But hopefully > we can come up w/ reasonable workarounds for most of them. > > In this case it seems like we should define __str__ on bytes and make > it return a Unicode string w/o the b''. We can keep repr in there so > that an explicit repr still gives you the b'' representation... > > Ahh, I can't wait until Ipy 3.0! > In Python 2.6 the bytes type is just an alias for str I believe, am I incorrect? If I am correct why is IronPython 2.6 taking a different approach? Michael > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Robert Smallshire > Sent: Friday, May 29, 2009 10:29 AM > To: 'Discussion of IronPython' > Subject: [IronPython] Minor bug in conversion of str to bytes? > > Hello, > > Lets create a bytes instance from a str, and convert it back to a str. > > >>>> a = bytes(ord(c) for c in "Hello World") >>>> a >>>> > b'Hello World' > >>>> str(a) >>>> > "b'Hello World'" > > As you can see, the leading b and the quotes become part of the string, > which is unexpected. I guess the conversion is using __repr__ where it > should use __str__. > > Cheers, > > Rob > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From brian.curtin at gmail.com Fri May 29 20:57:18 2009 From: brian.curtin at gmail.com (curtin@acm.org) Date: Fri, 29 May 2009 13:57:18 -0500 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <4A202A7C.9050209@voidspace.org.uk> References: <000001c9e028$074d2620$1300000a@LITTONDALE> <000101c9e083$05a50c10$1300000a@LITTONDALE> <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> <4A202A7C.9050209@voidspace.org.uk> Message-ID: On Fri, May 29, 2009 at 13:33, Michael Foord wrote: > Dino Viehland wrote: > >> Unfortunately there's probably going to continue to be a bunch of corner >> cases related to bytes/str/unicode until we move to 3.0. But hopefully >> we can come up w/ reasonable workarounds for most of them. >> >> In this case it seems like we should define __str__ on bytes and make >> it return a Unicode string w/o the b''. We can keep repr in there so >> that an explicit repr still gives you the b'' representation... >> >> Ahh, I can't wait until Ipy 3.0! >> >> > > In Python 2.6 the bytes type is just an alias for str I believe, am I > incorrect? If I am correct why is IronPython 2.6 taking a different > approach? > > Michael Correct. Include\bytesobject.h in CPython 2.6 source is just #defines to make the PyBytes* names available and pointing to PyString* names. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert at smallshire.org.uk Fri May 29 23:00:18 2009 From: robert at smallshire.org.uk (Robert Smallshire) Date: Fri, 29 May 2009 23:00:18 +0200 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: <000001c9e0a0$79d12a70$1300000a@LITTONDALE> Michael, > Michael Foord wrote: > > [snip...] > > Here is an example of getting a byte array from a binary pickle in > > IronPython: > > > > >>> import pickle > > >>> class A(object): > > ... b = 'hello' > > ... c = (None, 'fish', 7.2, 7j) > > ... a = {1: 2} > > ... > > >>> p = pickle.dumps(A(), protocol=2) > > >>> p > > u'\x80\x02c__main__\nA\nq\x00)\x81q\x01}q\x02b.' > > >>> from System import Array, Byte > > >>> a = Array[Byte](tuple(Byte(ord(c)) for c in p)) > > >>> a > > Array[Byte]((, > > > > > And the converse: > > >>> p2 = ''.join(chr(c) for c in a) > >>> a2 = pickle.loads(p2) > >>> a2 > > >>> a2.a > {1: 2} > >>> a2.b > 'hello' > >>> a2.c > (None, 'fish', 7.2, 7j) As a result of applying your str <--> Array[Byte] transformations to my code, the persistence of pickles into SQLite BLOBs is now working as planned. :-) You'll also no doubt be pleased to hear that even with these extra transformations, the IronPython version is around twice as fast as CPython 2.6 on a benchmark performed under completely unscientific conditions - although there are many factors at play here... Thanks again, Rob From fuzzyman at voidspace.org.uk Fri May 29 23:18:57 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 22:18:57 +0100 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: <000001c9e0a0$79d12a70$1300000a@LITTONDALE> References: <000001c9e0a0$79d12a70$1300000a@LITTONDALE> Message-ID: <4A205141.5060700@voidspace.org.uk> Robert Smallshire wrote: > Michael, > > >> Michael Foord wrote: >> >>> [snip...] >>> Here is an example of getting a byte array from a binary pickle in >>> IronPython: >>> >>> >>>>>> import pickle >>>>>> class A(object): >>>>>> >>> ... b = 'hello' >>> ... c = (None, 'fish', 7.2, 7j) >>> ... a = {1: 2} >>> ... >>> >>>>>> p = pickle.dumps(A(), protocol=2) >>>>>> p >>>>>> >>> u'\x80\x02c__main__\nA\nq\x00)\x81q\x01}q\x02b.' >>> >>>>>> from System import Array, Byte >>>>>> a = Array[Byte](tuple(Byte(ord(c)) for c in p)) >>>>>> a >>>>>> >>> Array[Byte]((, >>> >> >>> >> And the converse: >> >> >>> p2 = ''.join(chr(c) for c in a) >> >>> a2 = pickle.loads(p2) >> >>> a2 >> >> >>> a2.a >> {1: 2} >> >>> a2.b >> 'hello' >> >>> a2.c >> (None, 'fish', 7.2, 7j) >> > > As a result of applying your str <--> Array[Byte] transformations to my > code, the persistence of pickles into SQLite BLOBs is now working as > planned. :-) > > You'll also no doubt be pleased to hear that even with these extra > transformations, the IronPython version is around twice as fast as CPython > 2.6 on a benchmark performed under completely unscientific conditions - > although there are many factors at play here... > > Cool. :-) Michael > Thanks again, > > Rob > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Sat May 30 00:13:00 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 29 May 2009 22:13:00 +0000 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <4A202A7C.9050209@voidspace.org.uk> References: <000001c9e028$074d2620$1300000a@LITTONDALE> <000101c9e083$05a50c10$1300000a@LITTONDALE> <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> <4A202A7C.9050209@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD029043E5@TK5EX14MBXC118.redmond.corp.microsoft.com> Because in IronPython str is just an alias for Unicode. I think it would be extremely broken for us to alias all 3 to unicode especially when bytes clearly has a different meaning. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, May 29, 2009 11:34 AM To: Discussion of IronPython Subject: Re: [IronPython] Minor bug in conversion of str to bytes? Dino Viehland wrote: > Unfortunately there's probably going to continue to be a bunch of corner > cases related to bytes/str/unicode until we move to 3.0. But hopefully > we can come up w/ reasonable workarounds for most of them. > > In this case it seems like we should define __str__ on bytes and make > it return a Unicode string w/o the b''. We can keep repr in there so > that an explicit repr still gives you the b'' representation... > > Ahh, I can't wait until Ipy 3.0! > In Python 2.6 the bytes type is just an alias for str I believe, am I incorrect? If I am correct why is IronPython 2.6 taking a different approach? Michael > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Robert Smallshire > Sent: Friday, May 29, 2009 10:29 AM > To: 'Discussion of IronPython' > Subject: [IronPython] Minor bug in conversion of str to bytes? > > Hello, > > Lets create a bytes instance from a str, and convert it back to a str. > > >>>> a = bytes(ord(c) for c in "Hello World") >>>> a >>>> > b'Hello World' > >>>> str(a) >>>> > "b'Hello World'" > > As you can see, the leading b and the quotes become part of the string, > which is unexpected. I guess the conversion is using __repr__ where it > should use __str__. > > Cheers, > > Rob > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Sat May 30 00:14:19 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 29 May 2009 23:14:19 +0100 Subject: [IronPython] Minor bug in conversion of str to bytes? In-Reply-To: <1A472770E042064698CB5ADC83A12ACD029043E5@TK5EX14MBXC118.redmond.corp.microsoft.com> References: <000001c9e028$074d2620$1300000a@LITTONDALE> <000101c9e083$05a50c10$1300000a@LITTONDALE> <1A472770E042064698CB5ADC83A12ACD028FB47E@TK5EX14MBXC120.redmond.corp.microsoft.com> <4A202A7C.9050209@voidspace.org.uk> <1A472770E042064698CB5ADC83A12ACD029043E5@TK5EX14MBXC118.redmond.corp.microsoft.com> Message-ID: <4A205E3B.8050603@voidspace.org.uk> Dino Viehland wrote: > Because in IronPython str is just an alias for Unicode. I think it would > be extremely broken for us to alias all 3 to unicode especially when bytes > clearly has a different meaning. > > Hmm... interesting. :-) Michael > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Friday, May 29, 2009 11:34 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Minor bug in conversion of str to bytes? > > Dino Viehland wrote: > >> Unfortunately there's probably going to continue to be a bunch of corner >> cases related to bytes/str/unicode until we move to 3.0. But hopefully >> we can come up w/ reasonable workarounds for most of them. >> >> In this case it seems like we should define __str__ on bytes and make >> it return a Unicode string w/o the b''. We can keep repr in there so >> that an explicit repr still gives you the b'' representation... >> >> Ahh, I can't wait until Ipy 3.0! >> >> > > In Python 2.6 the bytes type is just an alias for str I believe, am I > incorrect? If I am correct why is IronPython 2.6 taking a different > approach? > > Michael > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Robert Smallshire >> Sent: Friday, May 29, 2009 10:29 AM >> To: 'Discussion of IronPython' >> Subject: [IronPython] Minor bug in conversion of str to bytes? >> >> Hello, >> >> Lets create a bytes instance from a str, and convert it back to a str. >> >> >> >>>>> a = bytes(ord(c) for c in "Hello World") >>>>> a >>>>> >>>>> >> b'Hello World' >> >> >>>>> str(a) >>>>> >>>>> >> "b'Hello World'" >> >> As you can see, the leading b and the quotes become part of the string, >> which is unexpected. I guess the conversion is using __repr__ where it >> should use __str__. >> >> Cheers, >> >> Rob >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From jdhardy at gmail.com Sat May 30 02:25:38 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 29 May 2009 18:25:38 -0600 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: On Fri, May 29, 2009 at 12:05 PM, Vernon Cole wrote: > P.S. > ?Robert: > ?Thanks for documenting this. I am contemplating a new fork of adodbapi > based on ADO.NET rather than COM (my target is Linux/mono so COM is out of > the question.) I will very likely run into this problem when/if I make that > jump. Hi Vernon, Check out http://bitbucket.org/jdhardy/adonet-dbapi/. I'm not sure it's what you're looking for, but it may be of use. It's a fork of the same code from FePy. - Jeff From jdhardy at gmail.com Sat May 30 02:30:37 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 29 May 2009 18:30:37 -0600 Subject: [IronPython] ironpython compared to powershell In-Reply-To: References: Message-ID: I prefer to use powershell if I'm dealing with files, registry entries, AD, and (especially!) external programs - your classic shell scripting tasks, essentially. It's what it was designed for. Python, on the other hand, is a fantastic language for building and extending applications. - Jeff On Tue, May 26, 2009 at 7:58 AM, jocke khazad wrote: > Hi everyone! > > I would like you ask this question that I seem not to get an answer for > anywhere. > > What is the advantage of using ironpython compared to using only powershell? > Or is it just a personal choice which one you like the best? > > > Best Regards, > > Joakim > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From vkhaskel at hotmail.com Sat May 30 06:56:38 2009 From: vkhaskel at hotmail.com (Vadim Khaskel) Date: Sat, 30 May 2009 04:56:38 +0000 Subject: [IronPython] how to work with delegates in IronPython Message-ID: Hello everybody, Could somebody help to setup simple delegate in IronPython. I just need to generate event when list structure gets filled with data, and update GUI element. thanks a lot, V. _________________________________________________________________ Hotmail? has a new way to see what's up with your friends. http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Sat May 30 07:43:10 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 29 May 2009 23:43:10 -0600 Subject: [IronPython] IronPython 2.6 and .NET 4.0 (and the GAC) Message-ID: Hi all, Are there plans to release versions of 2.6 for both .NET 2.0 & .NET 4.0, or are the 4.0 previews just for demonstration? Also, (as nobody noticed my earlier mail :)), are there plans to support adding 2.6 to the GAC? When I asked for 2.0, it was mentioned that there are more stringent requirements for the GAC; I'm just wondering if those are being targetted. - Jeff From chella at terra.com.br Sat May 30 13:49:53 2009 From: chella at terra.com.br (chella at terra.com.br) Date: Sat, 30 May 2009 11:49:53 +0000 Subject: [IronPython] Expose C# in Embedded Ironpython Message-ID: <1512.1243684193@terra.com.br> Hi i?m developing a application with Winforms with a scriptable Ironpython and i want expose to use in script with Ironpython my C# Classes. For example: I have a c# class coded in my form namespace public int Add(int arg1, int arg2) { return arg1 + arg2; } In IronPython i need do this: add_result = Add(2,5) I see that i can generate a DLL and import, but i think that this is no the only way. How to code this? Thank you Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From chella at terra.com.br Sat May 30 13:54:18 2009 From: chella at terra.com.br (chella at terra.com.br) Date: Sat, 30 May 2009 11:54:18 +0000 Subject: [IronPython] Expose C# Class to Script Ironpython Message-ID: <1555.1243684458@terra.com.br> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; } i?m developing a application with Winforms with a scriptable Ironpython and i want expose to use in script with Ironpython my C# Classes. For example: I have a c# class coded in my form namespace public int Add(int arg1, int arg2) { return arg1 + arg2; } In IronPython i need do this: add_result = Add(2,5) I see that i can generate a DLL and import, but i think that this is no the only way. How to code this? Thank you Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Sat May 30 13:58:01 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sat, 30 May 2009 14:58:01 +0300 Subject: [IronPython] Expose C# Class to Script Ironpython In-Reply-To: <1555.1243684458@terra.com.br> References: <1555.1243684458@terra.com.br> Message-ID: <8cd017b80905300458v5d5653eeoc23480bf585c7006@mail.gmail.com> Check out http://www.ironpython.info/index.php/Main_Page. It will have the information you are looking for. On Sat, May 30, 2009 at 2:54 PM, wrote: > i?m developing a application with Winforms with a scriptable Ironpython > and i want expose to use in script with Ironpython my C# Classes. > For example: > > I have a c# class coded in my form namespace > > public int Add(int arg1, int arg2) > { > return arg1 + arg2; > } > > In IronPython i need do this: > > add_result = Add(2,5) > > I see that i can generate a DLL and import, but i think that this is no the > only way. > How to code this? > Thank you > Mark > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From daftspaniel at gmail.com Sat May 30 14:52:51 2009 From: daftspaniel at gmail.com (Davy Mitchell) Date: Sat, 30 May 2009 13:52:51 +0100 Subject: [IronPython] PYC Bug in 2.6 Message-ID: <20253b0c0905300552l45e6037dsc21cb69020f98710@mail.gmail.com> Thanks for the new PYC - much appreciated. There's a bug in there that affects anyone building a winexe. I've raised a while ago it on a comment on another bug (not a good idea): http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=19409 Just comment out the line shown below. if arg.startswith("/main:"): main_name = main = arg[6:] #target = System.Reflection.Emit.PEFileKinds.ConsoleApplication Cheers, Davy -- Davy Stuff - http://daftspaniel.blogspot.com Geeky Stuff - http://daftpython.blogspot.com Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/ From adamb at silverkeytech.com Sun May 31 16:52:50 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Sun, 31 May 2009 07:52:50 -0700 Subject: [IronPython] App_Script Problem in latest IronPython for ASP.Net Message-ID: <005b01c9e1ff$7904fd50$6b0ef7f0$@com> I've noticed that with the latest bits for IronPython for ASP.Net, files in app_script only seem to be revisited when the app pool is restarted. For example, if I have a file called hello_world.py in App_Script, and delete that file, the app still executes code in that file as if it were there. If I change a line in the file, that line is not shown as changed until I restart the app pool. Is this by design, a bug, or something I'm doing wrong? Thanks, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamb at silverkeytech.com Sun May 31 17:08:05 2009 From: adamb at silverkeytech.com (Adam Brand) Date: Sun, 31 May 2009 08:08:05 -0700 Subject: [IronPython] IronPython for ASP.Net file locations Message-ID: <006301c9e201$9aafffc0$d00fff40$@com> I noticed that if I google "IronPython for ASP.Net", none of the first results get you easily to a link to actually download the bits. I know there is the broad category of "ASP.Net Dynamic Languages Support," but I think a more useful name for the IronPython support would be IronPython for ASP.Net. Unless many other languages are forthcoming, I was thinking the following changes could be made to the CodePlex project: 1. Rename it to be IronPython for ASP.Net 2. Change the H1 title on http://www.codeplex.com/aspnet/Wiki/View.aspx?title=Dynamic%20Language%20Sup port &referringTitle=Home to be "IronPython for ASP.Net" 3. Change the "Downloads" on the right site to show the IronPython for ASP.Net release. Also, if you could change the outdated Microsoft Downloads page (#1 in the Google search results) to have a pointer to the new files, that would be ideal. Similarly with any other blog entries. Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Sun May 31 19:25:09 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Sun, 31 May 2009 11:25:09 -0600 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: Thanks, Jeff! Have you asked Seo to add you as a FePy developer? Or does your fork have a unique situation? -- Vernon On Fri, May 29, 2009 at 6:25 PM, Jeff Hardy wrote: > On Fri, May 29, 2009 at 12:05 PM, Vernon Cole > wrote: > > P.S. > > Robert: > > Thanks for documenting this. I am contemplating a new fork of adodbapi > > based on ADO.NET rather than COM (my target is Linux/mono so COM is out > of > > the question.) I will very likely run into this problem when/if I make > that > > jump. > > Hi Vernon, > Check out http://bitbucket.org/jdhardy/adonet-dbapi/. I'm not sure > it's what you're looking for, but it may be of use. It's a fork of the > same code from FePy. > > - Jeff > _______________________________________________ > 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 jdhardy at gmail.com Sun May 31 20:25:09 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 31 May 2009 12:25:09 -0600 Subject: [IronPython] Portable use of pickle.dumps() In-Reply-To: References: <000001c9e06b$e80bcde0$1300000a@LITTONDALE> <4A1FFAF3.5040607@voidspace.org.uk> <4A1FFC5E.1030004@voidspace.org.uk> Message-ID: On Sun, May 31, 2009 at 11:25 AM, Vernon Cole wrote: > Thanks, Jeff! > ?? Have you asked Seo to add you as a FePy developer? Or does your fork have > a unique situation? I am an FePy developer :). I forked (really, it's more like a development branch) because subversion is starting to annoy me and I wanted to work with mercurial instead. I'm going to push the changes back to FePy periodically. - Jeff From fuzzyman at voidspace.org.uk Sun May 31 23:51:54 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 31 May 2009 22:51:54 +0100 Subject: [IronPython] how to work with delegates in IronPython In-Reply-To: References: Message-ID: <4A22FBFA.3010407@voidspace.org.uk> Vadim Khaskel wrote: > Hello everybody, > > Could somebody help to setup simple delegate in IronPython. > > I just need to generate event when list structure gets filled with data, The standard technique is: # check delegate signature def function(sender, event): # do something instance.Event += function What is the list event you want to hook up to? Thanks Michael Foord > > and update GUI element. > > thanks a lot, > > V. > > ------------------------------------------------------------------------ > Hotmail? has a new way to see what's up with your friends. Check it > out. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog