From dinov at microsoft.com Thu Sep 1 05:28:42 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 1 Sep 2011 03:28:42 +0000 Subject: [Ironpython-users] Here's a fun one... Message-ID: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> This came up on an internal discussion, I thought it was fun, especially given that we all behave differently: Paste this into the REPL: class PS1(object): def __init__(self): self.count = 0 def __str__(self): self.count += 1 return "%d >>>" % self.count import sys sys.ps1 = PS1() CPython - calls __str__ Jython - calls __repr__ IronPython - ignores ps1 PyPy - unsupported operand type for unary buffer: 'PS1' (note I don't necessarily have the latest versions for everyone) -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.brejc at gmail.com Thu Sep 1 11:04:10 2011 From: igor.brejc at gmail.com (Igor Brejc) Date: Thu, 1 Sep 2011 11:04:10 +0200 Subject: [Ironpython-users] Code docs generation for Python-exposed .NET API Message-ID: Hi, I plan to write a wrapper API in C# that will be used by IronPython scripts. The API will adhere to Python's coding & design style etc. My question: what would be the best approach for generating code documentation in HTML that would look & feel like it's for native Python API? Sandcastle seems a bit too .NETish, is there something that would resemble sphinx's generated documentation? Thanks for any hints, Igor Brejc -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Sep 1 13:47:40 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 1 Sep 2011 04:47:40 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/31/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] xml.sax.make_parser() exception 2. [New comment] Implement pyexpat module ---------------------------------------------- ISSUES 1. [Status update] xml.sax.make_parser() exception http://ironpython.codeplex.com/workitem/31361 User jdhardy has updated the issue: Status has changed from Proposed to Closed with the following comment, "Fixing this requires pyexpat, which is tracked in http://ironpython.codeplex.com/workitem/20023. Hopefully the workaround there will help you out."----------------- 2. [New comment] Implement pyexpat module http://ironpython.codeplex.com/workitem/20023 User jdhardy has commented on the issue: "I've attached the partial implementation from FePy for anyone who wants to use it." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at voidspace.org.uk Thu Sep 1 14:08:02 2011 From: michael at voidspace.org.uk (Michael Foord) Date: Thu, 01 Sep 2011 13:08:02 +0100 Subject: [Ironpython-users] Code docs generation for Python-exposed .NET API In-Reply-To: References: Message-ID: <4E5F75A2.8090802@voidspace.org.uk> On 01/09/2011 10:04, Igor Brejc wrote: > Hi, > > I plan to write a wrapper API in C# that will be used by IronPython > scripts. The API will adhere to Python's coding & design style etc. > > My question: what would be the best approach for generating code > documentation in HTML that would look & feel like it's for native > Python API? Sandcastle seems a bit too .NETish, is there something > that would resemble sphinx's generated documentation? You could use reflection to pull out the types / call signatures from the assembly and use that to generate a restructured text skeleton for pulling into sphinx. There's a script here that generates skeleton python files (just containing the api) from .net assemblies. This script is used by the Wing IDE for providing code completion for .NET, but it should be possible to "repurpose" it: http://www.voidspace.org.uk/ironpython/wing-how-to.shtml#generating-pi-files All the best, Michael Foord > > Thanks for any hints, > Igor Brejc > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessinghttp://www.sqlite.org/different.html -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From anto.cuni at gmail.com Thu Sep 1 09:58:14 2011 From: anto.cuni at gmail.com (Antonio Cuni) Date: Thu, 01 Sep 2011 09:58:14 +0200 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <4E5F3B16.3080605@gmail.com> On 01/09/11 05:28, Dino Viehland wrote: > This came up on an internal discussion, I thought it was fun, especially given > that we all behave differently: > > Paste this into the REPL: [cut] it seems to work fine with pypy 1.6. Note that str() is called twice for each line, so we get 1, 3, 5, 7..., but this happens only on cpython. >>>> class PS1(object): .... def __init__(self): .... self.count = 0 .... def __str__(self): .... self.count += 1 .... return "%d >>>" % self.count .... >>>> import sys >>>> sys.ps1 = PS1() 1 >>> 3 >>> 5 >>> 7 >>> 9 >>> ciao, Anto From arigo at tunes.org Thu Sep 1 10:57:13 2011 From: arigo at tunes.org (Armin Rigo) Date: Thu, 1 Sep 2011 10:57:13 +0200 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: <4E5F3B16.3080605@gmail.com> References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> <4E5F3B16.3080605@gmail.com> Message-ID: Hi, On Thu, Sep 1, 2011 at 9:58 AM, Antonio Cuni wrote: > it seems to work fine with pypy 1.6. ?Note that str() is called twice for > each line, so we get 1, 3, 5, 7..., but this happens only on cpython. ...but this happens only on PyPy, you mean. It works as expected on CPython 2.7. Is it a bug? :-) A bient?t, Armin. From anto.cuni at gmail.com Thu Sep 1 11:02:14 2011 From: anto.cuni at gmail.com (Antonio Cuni) Date: Thu, 01 Sep 2011 11:02:14 +0200 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> <4E5F3B16.3080605@gmail.com> Message-ID: <4E5F4A16.5000504@gmail.com> On 01/09/11 10:57, Armin Rigo wrote: > Hi, > > On Thu, Sep 1, 2011 at 9:58 AM, Antonio Cuni wrote: >> it seems to work fine with pypy 1.6. Note that str() is called twice for >> each line, so we get 1, 3, 5, 7..., but this happens only on cpython. > > ...but this happens only on PyPy, you mean. It works as expected on > CPython 2.7. Is it a bug? :-) no, I wanted to write "it happens *also* on cpython". Note that I use pyrepl both on pypy and cpython, so it's probably pyrepl's "fault" (assuming it's a fault, I'm happy to ignore it :-)) From arigo at tunes.org Thu Sep 1 11:12:14 2011 From: arigo at tunes.org (Armin Rigo) Date: Thu, 1 Sep 2011 11:12:14 +0200 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> <4E5F3B16.3080605@gmail.com> Message-ID: Hi, On Thu, Sep 1, 2011 at 10:57 AM, Armin Rigo wrote: > It works as expected on CPython 2.7. ?Is it a bug? :-) Fixed in 414bb2d98b0c. Armin From igor.brejc at gmail.com Thu Sep 1 18:25:31 2011 From: igor.brejc at gmail.com (Igor Brejc) Date: Thu, 1 Sep 2011 18:25:31 +0200 Subject: [Ironpython-users] Code docs generation for Python-exposed .NET API In-Reply-To: <4E5F753D.5040702@python.org> References: <4E5F753D.5040702@python.org> Message-ID: Great, thanks for the hint. If I manage to produce something, I'll try to publish it as a reusable tool. Igor On Thu, Sep 1, 2011 at 2:06 PM, Michael Foord wrote: > On 01/09/2011 10:04, Igor Brejc wrote: > > Hi, > > I plan to write a wrapper API in C# that will be used by IronPython > scripts. The API will adhere to Python's coding & design style etc. > > My question: what would be the best approach for generating code > documentation in HTML that would look & feel like it's for native Python > API? Sandcastle seems a bit too .NETish, is there something that would > resemble sphinx's generated documentation? > > > You could use reflection to pull out the types / call signatures from the > assembly and use that to generate a restructured text skeleton for pulling > into sphinx. > > There's a script here that generates skeleton python files (just containing > the api) from .net assemblies. This script is used by the Wing IDE for > providing code completion for .NET, but it should be possible to "repurpose" > it: > > > http://www.voidspace.org.uk/ironpython/wing-how-to.shtml#generating-pi-files > > All the best, > > Michael Foord > > > Thanks for any hints, > Igor Brejc > > > _______________________________________________ > Ironpython-users mailing listIronpython-users at python.orghttp://mail.python.org/mailman/listinfo/ironpython-users > > > > -- http://www.voidspace.org.uk/ > > May you do good and not evil > May you find forgiveness for yourself and forgive others > May you share freely, never taking more than you give. > -- the sqlite blessing http://www.sqlite.org/different.html > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Sep 1 19:07:19 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 1 Sep 2011 17:07:19 +0000 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: <4E5F3B16.3080605@gmail.com> References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> <4E5F3B16.3080605@gmail.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28F43E98@TK5EX14MBXC292.redmond.corp.microsoft.com> Antonio wrote: > it seems to work fine with pypy 1.6. Note that str() is called twice for each > line, so we get 1, 3, 5, 7..., but this happens only on cpython. Ahh yeah, I think I had some weird 1.5 build on my laptop where I tried it. Guess it's time to upgrade. From arigo at tunes.org Thu Sep 1 19:21:10 2011 From: arigo at tunes.org (Armin Rigo) Date: Thu, 1 Sep 2011 19:21:10 +0200 Subject: [Ironpython-users] [pypy-dev] Here's a fun one... In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28F43E98@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28F432C6@TK5EX14MBXC292.redmond.corp.microsoft.com> <4E5F3B16.3080605@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28F43E98@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Hi Dino, On Thu, Sep 1, 2011 at 7:07 PM, Dino Viehland wrote: > Ahh yeah, I think I had some weird 1.5 build on my laptop where I tried it. > Guess it's time to upgrade. Same in 1.6, but I fixed it in "default" today. Armin From andrewv at iastate.edu Fri Sep 2 23:48:07 2011 From: andrewv at iastate.edu (Vardeman, Andrew [CSSM]) Date: Fri, 2 Sep 2011 16:48:07 -0500 Subject: [Ironpython-users] IronPython imports all names from sub-namespaces? Message-ID: I'm seeing a behavior in IronPython that surprises me, but I'm new to Python and it may just be expected. On this page: http://ironpython.codeplex.com/wikipage?title=FAQ I found this blurb: "Once a namespace is imported, all nested namespaces are also accessible." Does this mean that, if I do a "from Foo import *", I get the names from the sub-namespaces Foo.Bar and Foo.Baz all flattened into my module's namespace (i.e. with no "Bar" and "Baz" prefixes)? That's what seems to be happening in my project. Thanks, Andrew From no_reply at codeplex.com Sat Sep 3 13:38:03 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 3 Sep 2011 04:38:03 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/2/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Better handling of binding failure due to .Net version ---------------------------------------------- ISSUES 1. [New issue] Better handling of binding failure due to .Net version http://ironpython.codeplex.com/workitem/31383 User skottmckay has proposed the issue: "The error message if binding of an assembly fails (clr.AddReference et al) is woefully unhelpful if the failure is due to attempting to load an assembly from a different clr version. I recently had this problem attempting to load a .net 2 assembly with .net 4 iron python. Some options: 1) Is there any reason why IronPython couldn't be shipped with an app.config file with the following to allow loading of .net 2 assemblies in .net 4, or at least information added to the FAQ for the user to create this file themselves (of course they will probably need a better error message to point them in the right direction first). 2) Could code be added to detect a mismatch and provide the user with a meaningful error message. For example, here are the steps to get the clr version from a dll. >>> import clr >>> import System >>> asm = System.Reflection.Assembly.ReflectionOnlyLoadFrom("my.dll") >>> print asm.ImageRuntimeVersion v2.0.50727" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Mon Sep 5 02:45:26 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Sun, 4 Sep 2011 18:45:26 -0600 Subject: [Ironpython-users] Recommended IDE for IronPython on Linux? (Advise for the poverty stricken) Message-ID: It looks like my next big project will be done in IronPython and Silverlight. But since my laptop runs Windows so poorly, and my student copy of Visual Studio is on a workstation 200 miles away, it seems that it might be a good idea to do the initial coding using Linux (which runs pretty well on the same laptop) and Moonlight. Q1) Is there an IDE which runs IronPython on Linux? Q2) If I do have to use Windows, is there an Express (that is free) compiler which will run the new IronPython integration stuff? -- Vernon Cole -------------- next part -------------- An HTML attachment was scrubbed... URL: From davew252 at tx.rr.com Mon Sep 5 03:27:01 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Sun, 04 Sep 2011 20:27:01 -0500 Subject: [Ironpython-users] Recommended IDE for IronPython on Linux? (Advise for the poverty stricken) In-Reply-To: References: Message-ID: <4E642565.2090806@tx.rr.com> On 9/4/2011 7:45 PM, Vernon Cole wrote: > It looks like my next big project will be done in IronPython and > Silverlight. > But since my laptop runs Windows so poorly, and my student copy of > Visual Studio is on a workstation 200 miles away, it seems that it > might be a good idea to do the initial coding using Linux (which runs > pretty well on the same laptop) and Moonlight. > > Q1) Is there an IDE which runs IronPython on Linux? > > Q2) If I do have to use Windows, is there an Express (that is free) > compiler which will run the new IronPython integration stuff? > -- > Vernon Cole > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users Well, hell. I just woke up and need another cup of coffee... I think THIS is what I was thinking of... http://monodevelop.com/ Looks interesting/promising. Just decided the other day to start doing more with Linux myself. Loaded up the Ubuntu install in a VirtualBox, and am seriously impressed... Well, best o' luck. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From davew252 at tx.rr.com Mon Sep 5 03:17:03 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Sun, 04 Sep 2011 20:17:03 -0500 Subject: [Ironpython-users] Recommended IDE for IronPython on Linux? (Advise for the poverty stricken) In-Reply-To: References: Message-ID: <4E64230F.8000102@tx.rr.com> On 9/4/2011 7:45 PM, Vernon Cole wrote: > It looks like my next big project will be done in IronPython and > Silverlight. > But since my laptop runs Windows so poorly, and my student copy of > Visual Studio is on a workstation 200 miles away, it seems that it > might be a good idea to do the initial coding using Linux (which runs > pretty well on the same laptop) and Moonlight. > > Q1) Is there an IDE which runs IronPython on Linux? > > Q2) If I do have to use Windows, is there an Express (that is free) > compiler which will run the new IronPython integration stuff? > -- > Vernon Cole > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users Vernon, I think I've seen where some folks were running SharpDevelop on Mono http://sharpdevelop.net/opensource/sd/ http://www.mono-project.com/Mono:Linux That should work for your C# coding... And the Express version (and/or free VSX shell) MIGHT run on Mono. Don't know. As far as the Express versions of VisualStudio, last I heard, they will not host the Python Tools for Visual Studio, BUT... you don't really need those anyway. I had a link somewhere to an article on creating a "debug project" in VS, where you basically just make a project out of the exe, and point the debugger to it. Works fine, but I haven't done it in a good while... If I run across it I'll drop you a line. The free VSX Shell WILL host the tools, allowing for IronPython dev and debugging, etc, I'm pretty sure, and it MAY run on Mono... not sure. Haven't tried it myself. http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1366 Best, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Mon Sep 5 04:58:55 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 4 Sep 2011 19:58:55 -0700 Subject: [Ironpython-users] Recommended IDE for IronPython on Linux? (Advise for the poverty stricken) In-Reply-To: <4E64230F.8000102@tx.rr.com> References: <4E64230F.8000102@tx.rr.com> Message-ID: VS is a mixed native / managed program, so Mono isn't sufficient to make it run on a non-Windows OS. If your goal is to host IronPython in a C# program, you should definitely be able to use the Express version to develop that. But you won't be able to use any of the Python tooling inside that copy of VS. You'd need to install a separate VS shell install to work with Python Tools. I belive you may still get some amount of IronPython debug support from Express if you set the right the right flags on your hosted IronPython engine such that it generates PDBs for the Python code. On Sun, Sep 4, 2011 at 6:17 PM, Dave Wald wrote: > On 9/4/2011 7:45 PM, Vernon Cole wrote: > > It looks like my next big project will be done in IronPython and > Silverlight. > But since my laptop runs Windows so poorly, and my student copy of Visual > Studio is on a workstation 200 miles away, it seems that it might be a good > idea to do the initial coding using Linux (which runs pretty well on the > same laptop) and Moonlight. > > Q1) Is there an IDE which runs IronPython on Linux? > > Q2) If I do have to use Windows, is there an Express (that is free) > compiler which will run the new IronPython integration stuff? > -- > Vernon Cole > > > > _______________________________________________ > Ironpython-users mailing listIronpython-users at python.orghttp://mail.python.org/mailman/listinfo/ironpython-users > > Vernon, > I think I've seen where some folks were running SharpDevelop on Mono > http://sharpdevelop.net/opensource/sd/ > http://www.mono-project.com/Mono:Linux > > That should work for your C# coding... > And the Express version (and/or free VSX shell) MIGHT run on Mono. Don't > know. > As far as the Express versions of VisualStudio, last I heard, they will > not host the Python Tools for Visual Studio, BUT... > you don't really need those anyway. > I had a link somewhere to an article on creating a "debug project" in VS, > where you basically just make a project out of the exe, and point the > debugger to it. Works fine, but I haven't done it in a good while... > If I run across it I'll drop you a line. > > The free VSX Shell WILL host the tools, allowing for IronPython dev and > debugging, etc, I'm pretty sure, and it MAY run on Mono... not sure. Haven't > tried it myself. > http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1366 > > Best, > Dave > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davew252 at tx.rr.com Mon Sep 5 06:13:46 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Sun, 04 Sep 2011 23:13:46 -0500 Subject: [Ironpython-users] Recommended IDE for IronPython on Linux? (Advise for the poverty stricken) In-Reply-To: References: <4E64230F.8000102@tx.rr.com> Message-ID: <4E644C7A.3020004@tx.rr.com> On 9/4/2011 9:58 PM, Curt Hagenlocher wrote: > VS is a mixed native / managed program, so Mono isn't sufficient to > make it run on a non-Windows OS. If your goal is to host IronPython in > a C# program, you should definitely be able to use the Express version > to develop that. But you won't be able to use any of the Python > tooling inside that copy of VS. You'd need to install a separate VS > shell install to work with Python Tools. I belive you may still get > some amount of IronPython debug support from Express if you set the > right the right flags on your hosted IronPython engine such that it > generates PDBs for the Python code. Quite right (now that I'm awake...) ;-) > > On Sun, Sep 4, 2011 at 6:17 PM, Dave Wald > wrote: > > On 9/4/2011 7:45 PM, Vernon Cole wrote: >> It looks like my next big project will be done in IronPython and >> Silverlight. >> But since my laptop runs Windows so poorly, and my student copy >> of Visual Studio is on a workstation 200 miles away, it seems >> that it might be a good idea to do the initial coding using Linux >> (which runs pretty well on the same laptop) and Moonlight. >> >> Q1) Is there an IDE which runs IronPython on Linux? >> >> Q2) If I do have to use Windows, is there an Express (that is >> free) compiler which will run the new IronPython integration stuff? >> -- >> Vernon Cole >> >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > Vernon, > I think I've seen where some folks were running SharpDevelop on Mono > http://sharpdevelop.net/opensource/sd/ > http://www.mono-project.com/Mono:Linux > > That should work for your C# coding... > And the Express version (and/or free VSX shell) MIGHT run on Mono. > Don't know. > As far as the Express versions of VisualStudio, last I heard, > they will not host the Python Tools for Visual Studio, BUT... > you don't really need those anyway. > I had a link somewhere to an article on creating a "debug project" > in VS, where you basically just make a project out of the exe, and > point the debugger to it. Works fine, but I haven't done it in a > good while... > If I run across it I'll drop you a line. > > The free VSX Shell WILL host the tools, allowing for IronPython > dev and debugging, etc, I'm pretty sure, and it MAY run on Mono... > not sure. Haven't tried it myself. > http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1366 > > > Best, > Dave > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Wed Sep 7 06:11:51 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Tue, 6 Sep 2011 22:11:51 -0600 Subject: [Ironpython-users] IPy 2.7 on Ubuntu -- YES! Message-ID: Good news: I loaded Ubuntu 11.10 Beta 1 yesterday and was pleased to see that the upgrade to mono 2.10 was indeed present. I downloaded the zipped executable version of 2.7.1 Beta and it ran -- not perfectly, and I'll be filing some bug reports -- but it did in fact execute. I read today that Ubuntu now has 34% of the Linux market -- so a good slice of new IPy users is about to come on line. -- Vernon -------------- next part -------------- An HTML attachment was scrubbed... URL: From davew252 at tx.rr.com Wed Sep 7 07:21:06 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Wed, 07 Sep 2011 00:21:06 -0500 Subject: [Ironpython-users] IPy 2.7 on Ubuntu -- YES! In-Reply-To: References: Message-ID: <4E66FF42.5090305@tx.rr.com> On 9/6/2011 11:11 PM, Vernon Cole wrote: > Good news: > I loaded Ubuntu 11.10 Beta 1 yesterday and was pleased to see that the > upgrade to mono 2.10 was indeed present. I downloaded the zipped > executable version of 2.7.1 Beta and it ran -- not perfectly, and I'll > be filing some bug reports -- but it did in fact execute. I read > today that Ubuntu now has 34% of the Linux market -- so a good slice > of new IPy users is about to come on line. > -- > Vernon > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users That is not good news. It's GREAT NEWS!! ;-) Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Sep 7 10:43:43 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 7 Sep 2011 01:43:43 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/6/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Trivial: Light Grey Text in ipy when running on Linux or Solaris ---------------------------------------------- ISSUES 1. [New comment] Trivial: Light Grey Text in ipy when running on Linux or Solaris http://ironpython.codeplex.com/workitem/3825 User vernondcole has commented on the issue: "Problem still exists on 2.7.1 Beta 1. I seem to remember a lot of comments about this bug, but can't see them now. Is this a duplicate, perhaps? " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From davew252 at tx.rr.com Wed Sep 7 16:43:30 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Wed, 07 Sep 2011 09:43:30 -0500 Subject: [Ironpython-users] New Notepad++ automation tool Message-ID: <4E678312.2080308@tx.rr.com> Greetings all, I've posted a new project on SourceForge for Notepad++ which we all know and love... http://sourceforge.net/projects/npppyscriptauto/ Here's the summary: Notepad++ Python Script Automation beta Provides a set of Python scripts that allow client apps to automate Notepad++ using the excellent Python Script plugin and the Python SimpleXMLRPC modules. *Demo apps* in *IronPython*, C#, and now a "pure"-Python2.7 console app. No .Net required! I haven't really had time to do an installer for it yet, but... it's pretty simple to configure. There are detailed "installation" instructions and a pictorial etc... (This is simply the next step in my nefarious plan to infuse my shop with Python. Iron or otherwise.) Go check it out when you get a few minutes and lemme know what you think. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Sep 8 14:26:37 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 8 Sep 2011 05:26:37 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/7/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Lib/config directory not present in zip distribution. 2. [New issue] Incorrect information message given for "exit" command on Linux systems 3. [New issue] console mode "exit()" command does not work. 4. [New issue] IPy version string somewhat misleading. 5. [New issue] IPy version string somewhat misleading. 6. [New comment] IPy version string somewhat misleading. 7. [Status update] IPy version string somewhat misleading. ---------------------------------------------- ISSUES 1. [New issue] Lib/config directory not present in zip distribution. http://ironpython.codeplex.com/workitem/31417 User vernondcole has proposed the issue: "When starting a newly downloaded IronPython, a traceback occurs due to a missing directory. vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ mono ipy.exe Traceback (most recent call last): File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/site.py", line 566, in File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/site.py", line 548, in main File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/site.py", line 278, in addusersitepackages File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/site.py", line 253, in getusersitepackages File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/site.py", line 243, in getuserbase File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/sysconfig.py", line 522, in get_config_var File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/sysconfig.py", line 421, in get_config_vars File "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/sysconfig.py", line 289, in _init_posix IOError: invalid Python installation: unable to open /windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/config/Makefile (Could not find a part of the path "/windows/Downloads/IronPython/IronPython-2.7.1-Beta2/Lib/config/Makefile".)IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1 Type "help", "copyright", "credits" or "license" for more information. >>> (This is running on Ubuntu 11.10 Beta 1 with mono 2.10.) There is no config folder in the zip file. -- Vernon"----------------- 2. [New issue] Incorrect information message given for "exit" command on Linux systems http://ironpython.codeplex.com/workitem/31418 User vernondcole has proposed the issue: "When running IronPython in console mode on a Linux system, if a user types "exit", she is given a suggestion which is valid on Windows only. Following the suggestion causes the IPy session to be backgrounded, where the intent is for it to be stopped. In the console session below, was typed when prompted, which sends IPy to the background. The IPy session is then returned to the forground using an "fg" command, and exited using sys.exit. Then CPython is started. Then is typed when prompted. >>> sys.version '2.7.1 (IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1)' >>> exit 'Use Ctrl-Z plus Return to exit' >>> [1]+ Stopped mono ipy.exe vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ fg mono ipy.exe >>> sys.exit() vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ python Python 2.7.2+ (default, Aug 16 2011, 07:29:45) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ The prompt should be changed to agree with the CPython when os.name == 'posix' -- Vernon"----------------- 3. [New issue] console mode "exit()" command does not work. http://ironpython.codeplex.com/workitem/31419 User vernondcole has proposed the issue: "The "exit()" command is not effective. In the console session below, the user types "exit" and is informed of the correct way to do what she wishes. [Note: another issue has been opened for the inappropriate Windows-based information.] If the user tries the correct command, with parenthesis, a traceback is produced rather than an exit accomplished. The same operation is then attempted using CPython for an example of what is expected to happen. IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1 Type "help", "copyright", "credits" or "license" for more information. >>> exit 'Use Ctrl-Z plus Return to exit' >>> >>> exit() Traceback (most recent call last): File "", line 1, in TypeError: str is not callable >>> sys.exit() vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ python Python 2.7.2+ (default, Aug 16 2011, 07:29:45) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> exit() vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ "exit()" should call sys.exit(), rather than attempt returning a string. -- Vernon"----------------- 4. [New issue] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31420 User vernondcole has proposed the issue: "The version string for IronPython includes the word 'on' which could lead one to confusion as to the actual CLR version in use. In the following session, the CLR is mono, not .NET. Perhaps the wording should be changed to 'for' rather than 'on'. vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ mono --version Mono JIT compiler version 2.10.5 (Debian 2.10.5-1) Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ mono ipy.exe IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.version '2.7.1 (IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1)' >>> "----------------- 5. [New issue] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31421 User vernondcole has proposed the issue: "The version string for IronPython includes the word 'on' which could lead one to confusion as to the actual CLR version in use. In the following session, the CLR is mono, not .NET. Perhaps the wording should be changed to 'for' rather than 'on'. vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ mono --version Mono JIT compiler version 2.10.5 (Debian 2.10.5-1) Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) vernon at dlc-ubuntu:/windows/Downloads/IronPython/IronPython-2.7.1-Beta2$ mono ipy.exe IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.version '2.7.1 (IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1)' >>> "----------------- 6. [New comment] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31421 User vernondcole has commented on the issue: "Sorry! This is a duplicate inadvertently created. I don't have sufficient authority to remove it. "----------------- 7. [Status update] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31421 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Duplicate" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Sep 9 09:47:57 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 9 Sep 2011 00:47:57 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/8/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Lib/config directory not present in zip distribution. 2. [New comment] IPy version string somewhat misleading. ---------------------------------------------- ISSUES 1. [New comment] Lib/config directory not present in zip distribution. http://ironpython.codeplex.com/workitem/31417 User jdhardy has commented on the issue: "This is actually a bug in sysconfig.py, which expects to read values from CPython's Makefile. Also, I thought I had fixed this already. It affects MacOS as well."----------------- 2. [New comment] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31420 User jdhardy has commented on the issue: "At the very least it should say if we're running on Mono or .NET." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Sep 10 11:13:53 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 10 Sep 2011 02:13:53 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/9/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] traceback events are sometimes missing their f_back pointer ---------------------------------------------- ISSUES 1. [New issue] traceback events are sometimes missing their f_back pointer http://ironpython.codeplex.com/workitem/31437 User dinov has proposed the issue: "This repro requires Scipy.net: import thread print "Running on thread", thread.get_ident() class C(object): def trace_func(self, frame, event, arg): if event == 'return': if frame.f_back is None: print 'no back frame', thread.get_ident() return self.trace_func import sys sys.settrace(C().trace_func) import scipy This will setup the trace function on the thread and then import scipy. Eventually we get to a point where there is no back frame on a return event - but one must exist because our top-level module code is still running. This can break debuggers built on top of sys.settrace" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sun Sep 11 14:18:38 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 11 Sep 2011 05:18:38 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/10/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] IOError: Unable to write data to the transport connection: cannot access a disposed object. 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. ---------------------------------------------- ISSUES 1. [New issue] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User loocas has proposed the issue: "This is a weird one that's been haunting me since I started using IronPython with a Python API to a service called Shotgun (it's a production tracking service, in short it's an Excel spreadsheet on steroids tailored at VFX productions etc... www.shotgunsoftware.com). When I try to communicate with the server via a secured https connection every odd time I call the methods, I get this IOError saying that I cannot write data to the transport connection. But every even time I call the method, all goes just fine, without errors. And so on so forth. I had to hack this nasty error by a try clause where I simply ignore the IOError, which isn't really safe or good. I've also attached the complete IronPython 2.7.1 Beta 2 output directly from the shell. The scenario is simple, I instantiate the Shotgun class first and then try to call its method. Then I get the error. When I call it again, I get the result. Then again, error, then again, result... Somebody told me this was a bug in some of the ssl or http or whatever modules. I haven't investigated this much further as I really don't have the time and honestly not even enough knowledge to debug this issue."----------------- 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User loocas has commented on the issue: "Also, here's the Shotgun_api3 if you want to have a look." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Mon Sep 12 09:46:45 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 12 Sep 2011 00:46:45 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/11/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. 2. [New comment] zlib.compress missing an overload allowing BufferObjects ---------------------------------------------- ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User jdhardy has commented on the issue: "I'm pretty sure this is a duplicate of #26852, which I have a patch for."----------------- 2. [New comment] zlib.compress missing an overload allowing BufferObjects http://ironpython.codeplex.com/workitem/30887 User jdhardy has commented on the issue: "Ultimately, even >>> b = buffer('foo') >>> bytes(b) doesn't work on IronPython either. PythonBuffer needs to be recognized by BytesConversion to fix all of these issues in one shot." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Mon Sep 12 12:05:38 2011 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Mon, 12 Sep 2011 13:05:38 +0300 Subject: [Ironpython-users] Did somebody has some tips and tricks for building a facebook-app in ASP.NET with iron-python In-Reply-To: <4E54B260.4010902@googlemail.com> References: <4E54B260.4010902@googlemail.com> Message-ID: 1. Get your feet wet using the JS API. That will help in your learning curve on how the FB API works. 2. Once you get a hang on how the FB API works, you don't really need a library. It's all just json with HTTP Verbs. On Wed, Aug 24, 2011 at 11:12 AM, Bernd Viehmann wrote: > Hello again. > > I have to create a simple facebook-app and want to use ironpython for it. > > Are there any suggestions what modules or libs would be the best way of > doing that in ipy. I have googled to get some answers before but i am > confused by the big amount of solutions. > There are solutions made in .NET and also some stuff developed as > python-module. > > My question is basically: > > What are your suggestions? > > Thank and kind regards > > ?Bernd > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- nomadlife.org From no_reply at codeplex.com Tue Sep 13 11:07:12 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 13 Sep 2011 02:07:12 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/12/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. 2. [New issue] Exception is thrown when attempting to run pre-compiled code with sys.settrace enabled ---------------------------------------------- ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User loocas has commented on the issue: "Hi there, great to hear about the patch! Is it available anywhere for download? I'd really appretiate if I could get my hands on it as I need to work with the shotgun_api quite a lot. Thank you!"----------------- 2. [New issue] Exception is thrown when attempting to run pre-compiled code with sys.settrace enabled http://ironpython.codeplex.com/workitem/31447 User dinov has proposed the issue: "Pre-compile the standard library using this script: import os all_files = [] for dir, blah, files in os.walk('Lib'): if dir.startswith('Lib\\site-packages'): print('skipping', dir) continue for file in files: if file.endswith('.py'): all_files.append('C:\Program Files (x86)\IronPython 2.7\\' + dir + '\\' + file) import clr clr.CompileModules('C:\\Users\\dinov\\LibPy.dll', *all_files) Then compile and run this program w/ reference to pre-compiled code assembly: using System; using System.Collections.Generic; using System.IO; using IronPython.Hosting; using IronPython.Runtime; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var engine = Python.CreateEngine(new Dictionary() { { "Debug", true }, {"ExceptionDetails",true} }); engine.Runtime.LoadAssembly(typeof(System.Linq.Enumerable).Assembly); engine.Runtime.LoadAssembly(typeof(System.String).Assembly); engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Process).Assembly); engine.Runtime.LoadAssembly(typeof(DLRCachedCode).Assembly); try { engine.Execute(@" from os import path import sys def f(*args): return f sys.settrace(f) path.abspath('\\\\tkzaw-pro-11\\mydocs7\\dinov\\my documents\\visual studio 2010\\Projects\\PythonApplication46\\PythonApplication46\\Program.py') def g(): pass g() "); } catch(Exception e) { Console.WriteLine(e); } Console.ReadLine(); } } } An exception is thrown trying to create a code which supports sys.settrace which we cannot do for pre-compiled code. FunctionCode.UpdateDelegate probably needs to also check that the _lambda is not a SerializedScopeStatement which doesn't support being turned into sys.settrace debuggable code." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Sep 14 14:27:28 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 14 Sep 2011 05:27:28 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/13/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. ---------------------------------------------- ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User jdhardy has commented on the issue: "The first draft is at https://github.com/IronLanguages/main/pull/43. It will change before it goes in, but it'd be nice to know if that solves your issue."----------------- 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User loocas has commented on the issue: "Thanks for the link, jdhardy, but, since I'm quite new to github, where can I get the actual fix? I'm sorry for this, but I can't see any "download" link or anything on the page. Thanks again, cheers." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Sep 15 09:47:53 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 15 Sep 2011 00:47:53 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/14/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. ---------------------------------------------- ISSUES 1. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User jdhardy has commented on the issue: "Hmm, I thought you could download a diff. Guess not. You'll need to do something like: $ git clone git://github.com/jdhardy/ironpython.git jdhardy-ironpython $ cd jdhardy-ironpython $ git checkout ipy-2.7-maint and then build from there."----------------- 2. [New comment] IOError: Unable to write data to the transport connection: cannot access a disposed object. http://ironpython.codeplex.com/workitem/31439 User loocas has commented on the issue: "Thanks for the info! I appretiate it. However, this would actually need me building IPy myself? Unfortunately, in this case, I'm out of luck as I don't do any other programming than in Python code :( When can I expect this fix to be rolled in the actual IPy official distro? Thank you again, sorry for bothering you with this, unfortunately I'm just an IPy "user" not a "dev". :)" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Mon Sep 19 15:09:47 2011 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 19 Sep 2011 09:09:47 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono Message-ID: IronPython users, We have a fairly robust editor/shell written in IronPython, using Gtk#, running under cross-platform Mono with abilities to switch between many languages (including Python, Ruby, Scheme, Lua, FSharp, CSharp, Boo, and a new visual Scratch-based language called Jigsaw. Although not all are DLR-based.) [1]. What would be the best option for creating an interactive debugger for the DLR languages on Mono? We would want to be able to set break-points, single step, and inspect local variables. Ideally, this would be a generic, language-neutral API, but if we have to do one for each language, that might work too. Things we've looked at: a) Seo's FePy Mono Profiler, but that seems too low-level, and requires C code for each platform. b) Microsoft.Scripting.Debugging [3], but will that work under Mono? c) sys.settrace(), but that would be Python-specific, and can't single-step (?) Are there other issues/options to consider? Please feel free to point me towards useful resources. Thanks! -Doug [1] - http://calicoproject.org/ [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/ From davew252 at tx.rr.com Wed Sep 21 05:30:42 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Tue, 20 Sep 2011 22:30:42 -0500 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: Message-ID: <4E795A62.9090509@tx.rr.com> Doug, First off, congrats on the Calico project. Seriously cool. I wish I was one of your students just starting out. These kids today... jeez. Anyway, if I was gonna tackle that project, first thing I would do is download the source code for PyTools for Visual Studio (it does CLR/DLR and CPython) http://pytools.codeplex.com/SourceControl/list/changesets and study it til I puked. Secondly, I would do the same with MonoDevelop, and do the old compare-and-contrast drill. Write myself a white-paper, as it were. Profusely annotated and Visio-diagrammed unto death. And then outline what I could re-use as is and where I needed to do major surgery. (Or get the students to do it... ;-) ) PyTools is written in C# mostly, looks like, with a sprinkling of C++/unsafe native code, but not in the debuggers. They look like straight cs. I have no idea what MonoDevelop looks like under the hood. But between the two, I would expect to be able to get a pretty good idea what could be done without re-inventing the world. That's my two cents... Best, Dave On 9/19/2011 8:09 AM, Doug Blank wrote: > IronPython users, > > We have a fairly robust editor/shell written in IronPython, using > Gtk#, running under cross-platform Mono with abilities to switch > between many languages (including Python, Ruby, Scheme, Lua, FSharp, > CSharp, Boo, and a new visual Scratch-based language called Jigsaw. > Although not all are DLR-based.) [1]. > > What would be the best option for creating an interactive debugger for > the DLR languages on Mono? We would want to be able to set > break-points, single step, and inspect local variables. Ideally, this > would be a generic, language-neutral API, but if we have to do one for > each language, that might work too. Things we've looked at: > > a) Seo's FePy Mono Profiler, but that seems too low-level, and > requires C code for each platform. > > b) Microsoft.Scripting.Debugging [3], but will that work under Mono? > > c) sys.settrace(), but that would be Python-specific, and can't single-step (?) > > Are there other issues/options to consider? Please feel free to point > me towards useful resources. > > Thanks! > > -Doug > > [1] - http://calicoproject.org/ > [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html > [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/ > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From s.j.dower at gmail.com Thu Sep 22 12:27:00 2011 From: s.j.dower at gmail.com (Steve Dower) Date: Thu, 22 Sep 2011 20:27:00 +1000 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: <4E795A62.9090509@tx.rr.com> References: <4E795A62.9090509@tx.rr.com> Message-ID: Dino will know better than I do, but most if not all the C++ code in PTVS is for debugging, but only for attaching to running CPython processes. Otherwise, the debugger is largely based around a 'settrace' script and a C# debug engine communicating through sockets - nothing to do with the DLR. The DLR debugger is still in there though, but I have no idea how easy it is to separate the two. You may want to look at the old IronPython Tools (https://github.com/IronLanguages/main/tree/master/Tools/IronStudio), since they won't have any of the CPython support, though there are bugs that were fixed in PTVS since IPyTools were last updated. On Wed, Sep 21, 2011 at 13:30, Dave Wald wrote: > Doug, > First off, congrats on the Calico project. Seriously cool. I wish I was one > of your students just starting out. > These kids today... jeez. > Anyway, if I was gonna tackle that project, first thing I would do is > download the source code for PyTools for Visual Studio (it does CLR/DLR and > CPython) > http://pytools.codeplex.com/SourceControl/list/changesets > and study it til I puked. > Secondly, I would do the same with MonoDevelop, and do the old > compare-and-contrast drill. > Write myself a white-paper, as it were. Profusely annotated and > Visio-diagrammed unto death. > And then outline what I could re-use as is and where I needed to do major > surgery. > (Or get the students to do it... ;-) ? ) > PyTools is written in C# mostly, looks like, with a sprinkling of C++/unsafe > native code, but not in the debuggers. They look like straight cs. > I have no idea what MonoDevelop looks like under the hood. > But between the two, I would expect to be able to get a pretty good idea > what could ?be done without re-inventing the world. > > That's my two cents... > > Best, > Dave > > On 9/19/2011 8:09 AM, Doug Blank wrote: >> >> IronPython users, >> >> We have a fairly robust editor/shell written in IronPython, using >> Gtk#, running under cross-platform Mono with abilities to switch >> between many languages (including Python, Ruby, Scheme, Lua, FSharp, >> CSharp, Boo, and a new visual Scratch-based language called Jigsaw. >> Although not all are DLR-based.) [1]. >> >> What would be the best option for creating an interactive debugger for >> the DLR languages on Mono? We would want to be able to set >> break-points, single step, and inspect local variables. Ideally, this >> would be a generic, language-neutral API, but if we have to do one for >> each language, that might work too. Things we've looked at: >> >> a) Seo's FePy Mono Profiler, but that seems too low-level, and >> requires C code for each platform. >> >> b) Microsoft.Scripting.Debugging [3], but will that work under Mono? >> >> c) sys.settrace(), but that would be Python-specific, and can't >> single-step (?) >> >> Are there other issues/options to consider? Please feel free to point >> me towards useful resources. >> >> Thanks! >> >> -Doug >> >> [1] - http://calicoproject.org/ >> [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html >> [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/ >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From dinov at microsoft.com Thu Sep 22 18:00:19 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 22 Sep 2011 16:00:19 +0000 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: <4E795A62.9090509@tx.rr.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> Yep, not only is most of the code in C# and Python the debugger its self doesn't actually depend on Visual Studio. If you look at the PythonProcess class it's the stand alone debugger. This exposed to VS by wrapping it in the AD7Engine* classes. But presumably it can be exposed to any other debugger API. PythonProcess generally works by having some APIs you can call on to get/set (get threads, eval an expression, set breakpoints, etc...) info and then it has some events when things happen (breakpoints hit, thread created, stepping done, etc...). That only gets you Python debugging though and general DLR debugging is implemented using the .NET debugger which is part of Visual Studio, not PTVS. Microsoft.Scripting.Debugging would work under Mono (it's just an AST re-writer which enables sys.settrace style debugger) but someone still needs to write the actual debugger part. -----Original Message----- From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Steve Dower Sent: Thursday, September 22, 2011 3:27 AM To: Dave Wald Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Options for debugger for DLR languages on Mono Dino will know better than I do, but most if not all the C++ code in PTVS is for debugging, but only for attaching to running CPython processes. Otherwise, the debugger is largely based around a 'settrace' script and a C# debug engine communicating through sockets - nothing to do with the DLR. The DLR debugger is still in there though, but I have no idea how easy it is to separate the two. You may want to look at the old IronPython Tools (https://github.com/IronLanguages/main/tree/master/Tools/IronStudio), since they won't have any of the CPython support, though there are bugs that were fixed in PTVS since IPyTools were last updated. On Wed, Sep 21, 2011 at 13:30, Dave Wald wrote: > Doug, > First off, congrats on the Calico project. Seriously cool. I wish I > was one of your students just starting out. > These kids today... jeez. > Anyway, if I was gonna tackle that project, first thing I would do is > download the source code for PyTools for Visual Studio (it does > CLR/DLR and > CPython) > http://pytools.codeplex.com/SourceControl/list/changesets > and study it til I puked. > Secondly, I would do the same with MonoDevelop, and do the old > compare-and-contrast drill. > Write myself a white-paper, as it were. Profusely annotated and > Visio-diagrammed unto death. > And then outline what I could re-use as is and where I needed to do > major surgery. > (Or get the students to do it... ;-) ? ) PyTools is written in C# > mostly, looks like, with a sprinkling of C++/unsafe native code, but > not in the debuggers. They look like straight cs. > I have no idea what MonoDevelop looks like under the hood. > But between the two, I would expect to be able to get a pretty good > idea what could ?be done without re-inventing the world. > > That's my two cents... > > Best, > Dave > > On 9/19/2011 8:09 AM, Doug Blank wrote: >> >> IronPython users, >> >> We have a fairly robust editor/shell written in IronPython, using >> Gtk#, running under cross-platform Mono with abilities to switch >> between many languages (including Python, Ruby, Scheme, Lua, FSharp, >> CSharp, Boo, and a new visual Scratch-based language called Jigsaw. >> Although not all are DLR-based.) [1]. >> >> What would be the best option for creating an interactive debugger >> for the DLR languages on Mono? We would want to be able to set >> break-points, single step, and inspect local variables. Ideally, this >> would be a generic, language-neutral API, but if we have to do one >> for each language, that might work too. Things we've looked at: >> >> a) Seo's FePy Mono Profiler, but that seems too low-level, and >> requires C code for each platform. >> >> b) Microsoft.Scripting.Debugging [3], but will that work under Mono? >> >> c) sys.settrace(), but that would be Python-specific, and can't >> single-step (?) >> >> Are there other issues/options to consider? Please feel free to point >> me towards useful resources. >> >> Thanks! >> >> -Doug >> >> [1] - http://calicoproject.org/ >> [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html >> [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/ >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From hfoffani at gmail.com Fri Sep 23 18:08:53 2011 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Fri, 23 Sep 2011 18:08:53 +0200 Subject: [Ironpython-users] instropection in an embedded engine Message-ID: Having the following Python code: class Plugin: def method(self): pass plugin = Plugin() and an embedded ScriptScope instance in my .NET application, the following C# works fine dynamic plugin = pythonEngine.GetVariable("plugin"); var attrs = plugin.__class__.__dict__; if Plugin python class was defined as an old-style class, but fails if Plugin inherits from object (__class__ non existent). Under the VS debugger the dynamic object plugin shows as having three attributes .class, .dict and .slots_and_weakref (with dots in their names) but no __class__ or __dict__. I found that I could do something like plugin.method.im_class.__dict__ but I'd rather stick with the common idiom. Is it a known issue? Something related to the way I'm using the engine? Thanks in advance, -Hern?n. From dinov at microsoft.com Fri Sep 23 21:43:48 2011 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 23 Sep 2011 19:43:48 +0000 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> __class__ exists on object in python and is then inherited by the other types. When accessing a member from C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. Sent from my Windows Phone -----Original Message----- From: Hern?n Foffani Sent: Friday, September 23, 2011 9:12 AM To: ironpython-users at python.org Subject: [Ironpython-users] instropection in an embedded engine Having the following Python code: class Plugin: def method(self): pass plugin = Plugin() and an embedded ScriptScope instance in my .NET application, the following C# works fine dynamic plugin = pythonEngine.GetVariable("plugin"); var attrs = plugin.__class__.__dict__; if Plugin python class was defined as an old-style class, but fails if Plugin inherits from object (__class__ non existent). Under the VS debugger the dynamic object plugin shows as having three attributes .class, .dict and .slots_and_weakref (with dots in their names) but no __class__ or __dict__. I found that I could do something like plugin.method.im_class.__dict__ but I'd rather stick with the common idiom. Is it a known issue? Something related to the way I'm using the engine? Thanks in advance, -Hern?n. _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From doug.blank at gmail.com Sat Sep 24 03:37:52 2011 From: doug.blank at gmail.com (Doug Blank) Date: Fri, 23 Sep 2011 21:37:52 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Thanks all for all the great pointers! Looks like we'll probably start with Python and the standard debugger, but work towards a generic Microsoft.Scripting.Debugging solution. That sounds like a big project that many people would be interested in. -Doug On Thu, Sep 22, 2011 at 12:00 PM, Dino Viehland wrote: > Yep, not only is most of the code in C# and Python the debugger its self doesn't actually depend on Visual Studio. > > If you look at the PythonProcess class it's the stand alone debugger. ?This exposed to VS by wrapping it in the AD7Engine* classes. ?But presumably it can be exposed to any other debugger API. ?PythonProcess generally works by having some APIs you can call on to get/set (get threads, eval an expression, set breakpoints, etc...) info and then it has some events when things happen (breakpoints hit, thread created, stepping done, etc...). > > That only gets you Python debugging though and general DLR debugging is implemented using the .NET debugger which is part of Visual Studio, not PTVS. > > Microsoft.Scripting.Debugging would work under Mono (it's just an AST re-writer which enables sys.settrace style debugger) but someone still needs to write the actual debugger part. > > -----Original Message----- > From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Steve Dower > Sent: Thursday, September 22, 2011 3:27 AM > To: Dave Wald > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Options for debugger for DLR languages on Mono > > Dino will know better than I do, but most if not all the C++ code in PTVS is for debugging, but only for attaching to running CPython processes. Otherwise, the debugger is largely based around a 'settrace' script and a C# debug engine communicating through sockets > - nothing to do with the DLR. > > The DLR debugger is still in there though, but I have no idea how easy it is to separate the two. You may want to look at the old IronPython Tools (https://github.com/IronLanguages/main/tree/master/Tools/IronStudio), > since they won't have any of the CPython support, though there are bugs that were fixed in PTVS since IPyTools were last updated. > > On Wed, Sep 21, 2011 at 13:30, Dave Wald wrote: >> Doug, >> First off, congrats on the Calico project. Seriously cool. I wish I >> was one of your students just starting out. >> These kids today... jeez. >> Anyway, if I was gonna tackle that project, first thing I would do is >> download the source code for PyTools for Visual Studio (it does >> CLR/DLR and >> CPython) >> http://pytools.codeplex.com/SourceControl/list/changesets >> and study it til I puked. >> Secondly, I would do the same with MonoDevelop, and do the old >> compare-and-contrast drill. >> Write myself a white-paper, as it were. Profusely annotated and >> Visio-diagrammed unto death. >> And then outline what I could re-use as is and where I needed to do >> major surgery. >> (Or get the students to do it... ;-) ? ) PyTools is written in C# >> mostly, looks like, with a sprinkling of C++/unsafe native code, but >> not in the debuggers. They look like straight cs. >> I have no idea what MonoDevelop looks like under the hood. >> But between the two, I would expect to be able to get a pretty good >> idea what could ?be done without re-inventing the world. >> >> That's my two cents... >> >> Best, >> Dave >> >> On 9/19/2011 8:09 AM, Doug Blank wrote: >>> >>> IronPython users, >>> >>> We have a fairly robust editor/shell written in IronPython, using >>> Gtk#, running under cross-platform Mono with abilities to switch >>> between many languages (including Python, Ruby, Scheme, Lua, FSharp, >>> CSharp, Boo, and a new visual Scratch-based language called Jigsaw. >>> Although not all are DLR-based.) [1]. >>> >>> What would be the best option for creating an interactive debugger >>> for the DLR languages on Mono? We would want to be able to set >>> break-points, single step, and inspect local variables. Ideally, this >>> would be a generic, language-neutral API, but if we have to do one >>> for each language, that might work too. Things we've looked at: >>> >>> a) Seo's FePy Mono Profiler, but that seems too low-level, and >>> requires C code for each platform. >>> >>> b) Microsoft.Scripting.Debugging [3], but will that work under Mono? >>> >>> c) sys.settrace(), but that would be Python-specific, and can't >>> single-step (?) >>> >>> Are there other issues/options to consider? Please feel free to point >>> me towards useful resources. >>> >>> Thanks! >>> >>> -Doug >>> >>> [1] - http://calicoproject.org/ >>> [2] - http://fepy.blogspot.com/2007/06/pyprof-progresses.html >>> [3] - http://devhawk.net/2009/07/08/microsoft-scripting-debugging/ >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> http://mail.python.org/mailman/listinfo/ironpython-users >>> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From doug.blank at gmail.com Sat Sep 24 19:47:46 2011 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 24 Sep 2011 13:47:46 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Use of sys.settrace (especially with the bdb.py) makes the Python debugger really easy. However, I'm having one little issue: I want to set the trace from outside the running code. Currently, I'm running a Python file like this: source = engine.CreateScriptSourceFromFile(filename) source.Compile() source.Execute(manager.scope) I have a bdb-based debugger that works it I put it the the file, but I can't figure out how to inject it into the Execution. For example, if I have in the file: d.set_trace() x = 1 I can trace that. But if I take out the "d.set_trace()" and execute it any other way in the same scope, it doesn't work. How can I get code to run as it it were in the file? Any ideas appreciated! -Doug From dinov at microsoft.com Sat Sep 24 23:09:46 2011 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 24 Sep 2011 21:09:46 +0000 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> You should be able to do engine.GetSysModule().settrace(func) and then do the Execute call (this is using C# dynamic to invoke settrace). GetSysModule is an extension method in IronPython.Hosting. > -----Original Message----- > From: ironpython-users- > bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- > users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of > Doug Blank > Sent: Saturday, September 24, 2011 10:48 AM > To: Dino Viehland > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Options for debugger for DLR languages on > Mono > > Use of sys.settrace (especially with the bdb.py) makes the Python debugger > really easy. However, I'm having one little issue: I want to set the trace from > outside the running code. Currently, I'm running a Python file like this: > > source = engine.CreateScriptSourceFromFile(filename) > source.Compile() > source.Execute(manager.scope) > > I have a bdb-based debugger that works it I put it the the file, but I can't > figure out how to inject it into the Execution. For example, if I have in the file: > > d.set_trace() > x = 1 > > I can trace that. But if I take out the "d.set_trace()" and execute it any other > way in the same scope, it doesn't work. > > How can I get code to run as it it were in the file? Any ideas appreciated! > > -Doug > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From doug.blank at gmail.com Sun Sep 25 02:46:43 2011 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 24 Sep 2011 20:46:43 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: On Sat, Sep 24, 2011 at 5:09 PM, Dino Viehland wrote: > You ?should be able to do engine.GetSysModule().settrace(func) and then > do the Execute call (this is using C# dynamic to invoke settrace). > > GetSysModule is an extension method in IronPython.Hosting. I didn't see GetSysModule for some reason in IronPython 2.7.... perhaps a Mono issue, or maybe I'm not importing it correctly? But I was able to: IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) source = engine.CreateScriptSourceFromFile(filename) source.Compile() source.Execute(scope) However, it ended up tracing the hosting level, rather than the source. Is that an IronPython issue? Or user error? Is there another way to inject a trace in an execution? -Doug >> -----Original Message----- >> From: ironpython-users- >> bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- >> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of >> Doug Blank >> Sent: Saturday, September 24, 2011 10:48 AM >> To: Dino Viehland >> Cc: ironpython-users at python.org >> Subject: Re: [Ironpython-users] Options for debugger for DLR languages on >> Mono >> >> Use of sys.settrace (especially with the bdb.py) makes the Python debugger >> really easy. However, I'm having one little issue: I want to set the trace from >> outside the running code. Currently, I'm running a Python file like this: >> >> source = engine.CreateScriptSourceFromFile(filename) >> source.Compile() >> source.Execute(manager.scope) >> >> I have a bdb-based debugger that works it I put it the the file, but I can't >> figure out how to inject it into the Execution. For example, if I have in the file: >> >> d.set_trace() >> x = 1 >> >> I can trace that. But if I take out the "d.set_trace()" and execute it any other >> way in the same scope, it doesn't work. >> >> How can I get code to run as it it were in the file? Any ideas appreciated! >> >> -Doug >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > From m.schaber at 3s-software.com Mon Sep 26 13:25:54 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Mon, 26 Sep 2011 13:25:54 +0200 Subject: [Ironpython-users] BerkeleyDB and other licenses Message-ID: Hi, The current IronPython 2.7.1 Beta 2 installs a License.StdLib.txt file which seems not current: The BerkeleyDB is AFAICS not included in the IronPython distribution, as it is CPython-Only. The xmlrpclib.py is one of several modules which include a license in the .py file, but the license is not part of the License.StdLib.txt. Best regards Markus Schaber -- ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Developer Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 From jdhardy at gmail.com Mon Sep 26 17:30:38 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 26 Sep 2011 08:30:38 -0700 Subject: [Ironpython-users] BerkeleyDB and other licenses In-Reply-To: References: Message-ID: Licence.StdLib.txt is a straight copy of CPython's LICENCE.txt, since IronPython's stdlib is more-or-less a copy of CPython's. The BDB licence could probably be removed; with it being dropped from 3, IP will never include it. I'm not sure what the deal is with xmlrpclib.py, since I thought that the entire CPython stdlib was under the PSF licence. - Jeff On Mon, Sep 26, 2011 at 4:25 AM, Markus Schaber wrote: > Hi, > > The current IronPython 2.7.1 Beta 2 installs a License.StdLib.txt file > which seems not current: > > The BerkeleyDB is AFAICS not included in the IronPython distribution, as > it is CPython-Only. > > The xmlrpclib.py is one of several modules which include a license in > the .py file, but the license is not part of the License.StdLib.txt. > > Best regards > > Markus Schaber > -- > ___________________________ > We software Automation. > > 3S-Smart Software Solutions GmbH > Markus Schaber | Developer > Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | > Fax +49-831-54031-50 > > Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com > CoDeSys internet forum: http://forum.3s-software.com > Download CoDeSys sample projects: > http://www.3s-software.com/index.shtml?sample_projects > > Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | > Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Sep 26 18:54:34 2011 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 26 Sep 2011 16:54:34 +0000 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E3F742051@TK5EX14MBXC292.redmond.corp.microsoft.com> Do you have a using statement for IronPython.Hosting? If you add that you should get the extension method showing up on ScriptEngine. As for tracing the hosting level - can you describe what you mean? Do you have additional hosting code written in Python? -----Original Message----- From: Doug Blank [mailto:doug.blank at gmail.com] Sent: Saturday, September 24, 2011 5:47 PM To: Dino Viehland; ironpython-users at python.org Subject: Re: [Ironpython-users] Options for debugger for DLR languages on Mono On Sat, Sep 24, 2011 at 5:09 PM, Dino Viehland wrote: > You ?should be able to do engine.GetSysModule().settrace(func) and > then do the Execute call (this is using C# dynamic to invoke settrace). > > GetSysModule is an extension method in IronPython.Hosting. I didn't see GetSysModule for some reason in IronPython 2.7.... perhaps a Mono issue, or maybe I'm not importing it correctly? But I was able to: IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) source = engine.CreateScriptSourceFromFile(filename) source.Compile() source.Execute(scope) However, it ended up tracing the hosting level, rather than the source. Is that an IronPython issue? Or user error? Is there another way to inject a trace in an execution? -Doug >> -----Original Message----- >> From: ironpython-users- >> bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- >> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of >> Doug Blank >> Sent: Saturday, September 24, 2011 10:48 AM >> To: Dino Viehland >> Cc: ironpython-users at python.org >> Subject: Re: [Ironpython-users] Options for debugger for DLR >> languages on Mono >> >> Use of sys.settrace (especially with the bdb.py) makes the Python >> debugger really easy. However, I'm having one little issue: I want to >> set the trace from outside the running code. Currently, I'm running a Python file like this: >> >> source = engine.CreateScriptSourceFromFile(filename) >> source.Compile() >> source.Execute(manager.scope) >> >> I have a bdb-based debugger that works it I put it the the file, but >> I can't figure out how to inject it into the Execution. For example, if I have in the file: >> >> d.set_trace() >> x = 1 >> >> I can trace that. But if I take out the "d.set_trace()" and execute >> it any other way in the same scope, it doesn't work. >> >> How can I get code to run as it it were in the file? Any ideas appreciated! >> >> -Doug >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > From doug.blank at gmail.com Mon Sep 26 19:25:27 2011 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 26 Sep 2011 13:25:27 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E3F742051@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E3F742051@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: On Mon, Sep 26, 2011 at 12:54 PM, Dino Viehland wrote: > Do you have a using statement for IronPython.Hosting? ?If you add that you should > get the extension method showing up on ScriptEngine. I'm using IronPython as the hosting language... does that mean I just can't get the extensions? But in any event, is this workaround: IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) equivalent? > As for tracing the hosting level - can you describe what you mean? ?Do you have additional > hosting code written in Python? Yes, all of the hosting code is written in IronPython. When I use the workaround above, I get tracing but at my IronPython hosting app level, not at the level of my script being run. The only way I can get tracing in my Python script being executed, is by having the set_trace inside that file. I'm trying to find a way that I can from outside that script (eg, from the IronPython hosting app) get tracing on. I can probably write some of this in C# if I need to, but all of the hosting app is written in IronPython at the moment. -Doug > -----Original Message----- > From: Doug Blank [mailto:doug.blank at gmail.com] > Sent: Saturday, September 24, 2011 5:47 PM > To: Dino Viehland; ironpython-users at python.org > Subject: Re: [Ironpython-users] Options for debugger for DLR languages on Mono > > On Sat, Sep 24, 2011 at 5:09 PM, Dino Viehland wrote: >> You ?should be able to do engine.GetSysModule().settrace(func) and >> then do the Execute call (this is using C# dynamic to invoke settrace). >> >> GetSysModule is an extension method in IronPython.Hosting. > > I didn't see GetSysModule for some reason in IronPython 2.7.... > perhaps a Mono issue, or maybe I'm not importing it correctly? > > But I was able to: > > IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) > source = engine.CreateScriptSourceFromFile(filename) > source.Compile() > source.Execute(scope) > > However, it ended up tracing the hosting level, rather than the source. Is that an IronPython issue? Or user error? Is there another way to inject a trace in an execution? > > -Doug > >>> -----Original Message----- >>> From: ironpython-users- >>> bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- >>> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of >>> Doug Blank >>> Sent: Saturday, September 24, 2011 10:48 AM >>> To: Dino Viehland >>> Cc: ironpython-users at python.org >>> Subject: Re: [Ironpython-users] Options for debugger for DLR >>> languages on Mono >>> >>> Use of sys.settrace (especially with the bdb.py) makes the Python >>> debugger really easy. However, I'm having one little issue: I want to >>> set the trace from outside the running code. Currently, I'm running a Python file like this: >>> >>> source = engine.CreateScriptSourceFromFile(filename) >>> source.Compile() >>> source.Execute(manager.scope) >>> >>> I have a bdb-based debugger that works it I put it the the file, but >>> I can't figure out how to inject it into the Execution. For example, if I have in the file: >>> >>> d.set_trace() >>> x = 1 >>> >>> I can trace that. But if I take out the "d.set_trace()" and execute >>> it any other way in the same scope, it doesn't work. >>> >>> How can I get code to run as it it were in the file? Any ideas appreciated! >>> >>> -Doug >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> http://mail.python.org/mailman/listinfo/ironpython-users >> >> > > > From hfoffani at gmail.com Mon Sep 26 19:36:12 2011 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Mon, 26 Sep 2011 19:36:12 +0200 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Thanks, I'm getting closer. Now I'm trying to find how to get a (new? current?) CodeContext to, for instance, call DictProxy.keys(..) The public constructor of CodeContext signature (a PythonDictionary and a ModuleContext) doesn't match the examples I could find (ScriptScope, LanguageContext). Does anyone know of any examples of introspection of a hosted IP scripting from C#? Evidently there's a lot I'm missing here and would like to do the due homework first. I'm using NET 4 and don't need 2.x compatibility. Regards, -Hern?n El 23/09/2011, a las 21:43, Dino Viehland escribi?: > __class__ exists on object in python and is then inherited by the other types. When accessing a member from > C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. > > Sent from my Windows Phone > > -----Original Message----- > From: Hern?n Foffani > Sent: Friday, September 23, 2011 9:12 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] instropection in an embedded engine > > > Having the following Python code: > > class Plugin: > def method(self): > pass > plugin = Plugin() > > and an embedded ScriptScope instance in my .NET application, > the following C# works fine > > dynamic plugin = pythonEngine.GetVariable("plugin"); > var attrs = plugin.__class__.__dict__; > > if Plugin python class was defined as an old-style class, but fails if > Plugin inherits from object (__class__ non existent). > > Under the VS debugger the dynamic object plugin shows as having three > attributes .class, .dict and .slots_and_weakref (with dots in their names) but > no __class__ or __dict__. > > I found that I could do something like plugin.method.im_class.__dict__ but > I'd rather stick with the common idiom. > > Is it a known issue? Something related to the way I'm using the engine? > > Thanks in advance, > -Hern?n. > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From rome at Wintellect.com Mon Sep 26 19:57:20 2011 From: rome at Wintellect.com (Keith Rome) Date: Mon, 26 Sep 2011 10:57:20 -0700 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <7737799D90E55E4BB9C9F7E40D161E110E38BA8887@VA3DIAXVS461.RED001.local> If you are just trying to enumerate members of a python object, and possibly invoke them, then wouldn't a LanguageContext's DynamicOperations get the job done? Perhaps I am misunderstanding your objectives though. HostingHelpers.GetLanguageContext(ScriptEngine) to get the LanguageContext, and then just use the Operations property from that. This gives you introspection methods for GetMemberNames() and a number of invocation mechanisms. All you need is a reference to an object to inspect and the language engine that owns it (or one that is compatible with it). In my implementation of a Watches/Locals/Modules UI for a python debugger, I use that procedure as the basis for routines that populate the inspector grids. Basically, whenever the user reaches a breakpoint via my settrace() hook, I inspect the members of all variables in the current scope and refresh a visual tree (really a grid with indentation), and as they drill down into those objects I just walk down one step further into the data structure. It isn't the fastest thing in the world, but then again it doesn't have to be - the script is effectively paused until I allow the breakpoint to resume. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -----Original Message----- From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Hern?n Foffani Sent: Monday, September 26, 2011 1:36 PM To: ironpython-users at python.org Subject: Re: [Ironpython-users] instropection in an embedded engine Thanks, I'm getting closer. Now I'm trying to find how to get a (new? current?) CodeContext to, for instance, call DictProxy.keys(..) The public constructor of CodeContext signature (a PythonDictionary and a ModuleContext) doesn't match the examples I could find (ScriptScope, LanguageContext). Does anyone know of any examples of introspection of a hosted IP scripting from C#? Evidently there's a lot I'm missing here and would like to do the due homework first. I'm using NET 4 and don't need 2.x compatibility. Regards, -Hern?n El 23/09/2011, a las 21:43, Dino Viehland escribi?: > __class__ exists on object in python and is then inherited by the > other types. When accessing a member from C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. > > Sent from my Windows Phone > > -----Original Message----- > From: Hern?n Foffani > Sent: Friday, September 23, 2011 9:12 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] instropection in an embedded engine > > > Having the following Python code: > > class Plugin: > def method(self): > pass > plugin = Plugin() > > and an embedded ScriptScope instance in my .NET application, the > following C# works fine > > dynamic plugin = pythonEngine.GetVariable("plugin"); > var attrs = plugin.__class__.__dict__; > > if Plugin python class was defined as an old-style class, but fails if > Plugin inherits from object (__class__ non existent). > > Under the VS debugger the dynamic object plugin shows as having three > attributes .class, .dict and .slots_and_weakref (with dots in their > names) but no __class__ or __dict__. > > I found that I could do something like plugin.method.im_class.__dict__ > but I'd rather stick with the common idiom. > > Is it a known issue? Something related to the way I'm using the engine? > > Thanks in advance, > -Hern?n. > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From dinov at microsoft.com Tue Sep 27 04:35:14 2011 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 27 Sep 2011 02:35:14 +0000 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E3F742051@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E3F74C4CA@TK5EX14MBXC292.redmond.corp.microsoft.com> Is the hosted IronPython running in the same ScriptEngine or a different one? If it's a different one you'll need to do the settrace on the other ScriptEngine but you should be able to do that from Python code as well. If it's the same then I would expect that you'd see the traces for both the hosting and hosted code (I'd also consider separating it into 2 different engines so that you should only see the traces for the hosted code, or you could look at the args and see if it's the hosting code and ignore it). But if they're the same and you're not getting the trace events for the hosted code then that could be a bug. > -----Original Message----- > From: ironpython-users- > bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- > users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of > Doug Blank > Sent: Monday, September 26, 2011 10:25 AM > To: Dino Viehland > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Options for debugger for DLR languages on > Mono > > On Mon, Sep 26, 2011 at 12:54 PM, Dino Viehland > wrote: > > Do you have a using statement for IronPython.Hosting? ?If you add that > > you should get the extension method showing up on ScriptEngine. > > I'm using IronPython as the hosting language... does that mean I just can't > get the extensions? > > But in any event, is this workaround: > > IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) > > equivalent? > > > As for tracing the hosting level - can you describe what you mean? ?Do > > you have additional hosting code written in Python? > > Yes, all of the hosting code is written in IronPython. When I use the > workaround above, I get tracing but at my IronPython hosting app level, not > at the level of my script being run. The only way I can get tracing in my > Python script being executed, is by having the set_trace inside that file. > > I'm trying to find a way that I can from outside that script (eg, from the > IronPython hosting app) get tracing on. I can probably write some of this in > C# if I need to, but all of the hosting app is written in IronPython at the > moment. > > -Doug > > > -----Original Message----- > > From: Doug Blank [mailto:doug.blank at gmail.com] > > Sent: Saturday, September 24, 2011 5:47 PM > > To: Dino Viehland; ironpython-users at python.org > > Subject: Re: [Ironpython-users] Options for debugger for DLR languages > > on Mono > > > > On Sat, Sep 24, 2011 at 5:09 PM, Dino Viehland > wrote: > >> You ?should be able to do engine.GetSysModule().settrace(func) and > >> then do the Execute call (this is using C# dynamic to invoke settrace). > >> > >> GetSysModule is an extension method in IronPython.Hosting. > > > > I didn't see GetSysModule for some reason in IronPython 2.7.... > > perhaps a Mono issue, or maybe I'm not importing it correctly? > > > > But I was able to: > > > > IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) > > source = engine.CreateScriptSourceFromFile(filename) > > source.Compile() > > source.Execute(scope) > > > > However, it ended up tracing the hosting level, rather than the source. Is > that an IronPython issue? Or user error? Is there another way to inject a > trace in an execution? > > > > -Doug > > > >>> -----Original Message----- > >>> From: ironpython-users- > >>> bounces+dinov=exchange.microsoft.com at python.org > [mailto:ironpython- > >>> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf > Of > >>> Doug Blank > >>> Sent: Saturday, September 24, 2011 10:48 AM > >>> To: Dino Viehland > >>> Cc: ironpython-users at python.org > >>> Subject: Re: [Ironpython-users] Options for debugger for DLR > >>> languages on Mono > >>> > >>> Use of sys.settrace (especially with the bdb.py) makes the Python > >>> debugger really easy. However, I'm having one little issue: I want > >>> to set the trace from outside the running code. Currently, I'm running a > Python file like this: > >>> > >>> source = engine.CreateScriptSourceFromFile(filename) > >>> source.Compile() > >>> source.Execute(manager.scope) > >>> > >>> I have a bdb-based debugger that works it I put it the the file, but > >>> I can't figure out how to inject it into the Execution. For example, if I > have in the file: > >>> > >>> d.set_trace() > >>> x = 1 > >>> > >>> I can trace that. But if I take out the "d.set_trace()" and execute > >>> it any other way in the same scope, it doesn't work. > >>> > >>> How can I get code to run as it it were in the file? Any ideas appreciated! > >>> > >>> -Doug > >>> _______________________________________________ > >>> Ironpython-users mailing list > >>> Ironpython-users at python.org > >>> http://mail.python.org/mailman/listinfo/ironpython-users > >> > >> > > > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From doug.blank at gmail.com Tue Sep 27 12:27:53 2011 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 27 Sep 2011 06:27:53 -0400 Subject: [Ironpython-users] Options for debugger for DLR languages on Mono In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E3F74C4CA@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <4E795A62.9090509@tx.rr.com> <6C7ABA8B4E309440B857D74348836F2E28F766A9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E28F796E9@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E3F742051@TK5EX14MBXC292.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E3F74C4CA@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: On Mon, Sep 26, 2011 at 10:35 PM, Dino Viehland wrote: > Is the hosted IronPython running in the same ScriptEngine or a different one? Different. > If it's a different one you'll need to do the settrace on the other ScriptEngine but > you should be able to do that from Python code as well. Yes, and I was hoping that is what this would do: IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) Here, "engine" is the engine for the hosted Python language (the Python host engine is actually in a bit of C#). > If it's the same then I would expect that you'd see the traces for both the hosting > and hosted code (I'd also consider separating it into 2 different engines so that > you should only see the traces for the hosted code, or you could look at the args > and see if it's the hosting code and ignore it). ?But if they're the same and you're > not getting the trace events for the hosted code then that could be a bug. Ok, sounds like a bug, if the above settrace command is supposed to be equivalent to the PythonEngine.GetSysModules().settrace. I'll try to come up with a small example for a bug report. Thanks! -Doug >> -----Original Message----- >> From: ironpython-users- >> bounces+dinov=exchange.microsoft.com at python.org [mailto:ironpython- >> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of >> Doug Blank >> Sent: Monday, September 26, 2011 10:25 AM >> To: Dino Viehland >> Cc: ironpython-users at python.org >> Subject: Re: [Ironpython-users] Options for debugger for DLR languages on >> Mono >> >> On Mon, Sep 26, 2011 at 12:54 PM, Dino Viehland >> wrote: >> > Do you have a using statement for IronPython.Hosting? ?If you add that >> > you should get the extension method showing up on ScriptEngine. >> >> I'm using IronPython as the hosting language... does that mean I just can't >> get the extensions? >> >> But in any event, is this workaround: >> >> IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) >> >> equivalent? >> >> > As for tracing the hosting level - can you describe what you mean? ?Do >> > you have additional hosting code written in Python? >> >> Yes, all of the hosting code is written in IronPython. When I use the >> workaround above, I get tracing but at my IronPython hosting app level, not >> at the level of my script being run. The only way I can get tracing in my >> Python script being executed, is by having the set_trace inside that file. >> >> I'm trying to find a way that I can from outside that script (eg, from the >> IronPython hosting app) get tracing on. I can probably write some of this in >> C# if I need to, but all of the hosting app is written in IronPython at the >> moment. >> >> -Doug >> >> > -----Original Message----- >> > From: Doug Blank [mailto:doug.blank at gmail.com] >> > Sent: Saturday, September 24, 2011 5:47 PM >> > To: Dino Viehland; ironpython-users at python.org >> > Subject: Re: [Ironpython-users] Options for debugger for DLR languages >> > on Mono >> > >> > On Sat, Sep 24, 2011 at 5:09 PM, Dino Viehland >> wrote: >> >> You ?should be able to do engine.GetSysModule().settrace(func) and >> >> then do the Execute call (this is using C# dynamic to invoke settrace). >> >> >> >> GetSysModule is an extension method in IronPython.Hosting. >> > >> > I didn't see GetSysModule for some reason in IronPython 2.7.... >> > perhaps a Mono issue, or maybe I'm not importing it correctly? >> > >> > But I was able to: >> > >> > IronPython.Hosting.Python.GetSysModule(engine).settrace(trace) >> > source = engine.CreateScriptSourceFromFile(filename) >> > source.Compile() >> > source.Execute(scope) >> > >> > However, it ended up tracing the hosting level, rather than the source. Is >> that an IronPython issue? Or user error? Is there another way to inject a >> trace in an execution? >> > >> > -Doug >> > >> >>> -----Original Message----- >> >>> From: ironpython-users- >> >>> bounces+dinov=exchange.microsoft.com at python.org >> [mailto:ironpython- >> >>> users-bounces+dinov=exchange.microsoft.com at python.org] On Behalf >> Of >> >>> Doug Blank >> >>> Sent: Saturday, September 24, 2011 10:48 AM >> >>> To: Dino Viehland >> >>> Cc: ironpython-users at python.org >> >>> Subject: Re: [Ironpython-users] Options for debugger for DLR >> >>> languages on Mono >> >>> >> >>> Use of sys.settrace (especially with the bdb.py) makes the Python >> >>> debugger really easy. However, I'm having one little issue: I want >> >>> to set the trace from outside the running code. Currently, I'm running a >> Python file like this: >> >>> >> >>> source = engine.CreateScriptSourceFromFile(filename) >> >>> source.Compile() >> >>> source.Execute(manager.scope) >> >>> >> >>> I have a bdb-based debugger that works it I put it the the file, but >> >>> I can't figure out how to inject it into the Execution. For example, if I >> have in the file: >> >>> >> >>> d.set_trace() >> >>> x = 1 >> >>> >> >>> I can trace that. But if I take out the "d.set_trace()" and execute >> >>> it any other way in the same scope, it doesn't work. >> >>> >> >>> How can I get code to run as it it were in the file? Any ideas appreciated! >> >>> >> >>> -Doug >> >>> _______________________________________________ >> >>> Ironpython-users mailing list >> >>> Ironpython-users at python.org >> >>> http://mail.python.org/mailman/listinfo/ironpython-users >> >> >> >> >> > >> > >> > >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > From hfoffani at gmail.com Tue Sep 27 12:42:57 2011 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Tue, 27 Sep 2011 12:42:57 +0200 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: <7737799D90E55E4BB9C9F7E40D161E110E38BA8887@VA3DIAXVS461.RED001.local> References: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> <7737799D90E55E4BB9C9F7E40D161E110E38BA8887@VA3DIAXVS461.RED001.local> Message-ID: <1A9BE436-3F93-4852-9F62-2E4235C12AF5@gmail.com> You are right. It was the all the Operations thing what I was missing altogether, silly me. Now it all make sense. Thanks a lot. El 26/09/2011, a las 19:57, Keith Rome escribi?: > If you are just trying to enumerate members of a python object, and possibly invoke them, then wouldn't a LanguageContext's DynamicOperations get the job done? Perhaps I am misunderstanding your objectives though. > > HostingHelpers.GetLanguageContext(ScriptEngine) to get the LanguageContext, and then just use the Operations property from that. This gives you introspection methods for GetMemberNames() and a number of invocation mechanisms. All you need is a reference to an object to inspect and the language engine that owns it (or one that is compatible with it). > > In my implementation of a Watches/Locals/Modules UI for a python debugger, I use that procedure as the basis for routines that populate the inspector grids. Basically, whenever the user reaches a breakpoint via my settrace() hook, I inspect the members of all variables in the current scope and refresh a visual tree (really a grid with indentation), and as they drill down into those objects I just walk down one step further into the data structure. It isn't the fastest thing in the world, but then again it doesn't have to be - the script is effectively paused until I allow the breakpoint to resume. > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > > -----Original Message----- > From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Hern?n Foffani > Sent: Monday, September 26, 2011 1:36 PM > To: ironpython-users at python.org > Subject: Re: [Ironpython-users] instropection in an embedded engine > > Thanks, I'm getting closer. > Now I'm trying to find how to get a (new? current?) CodeContext to, for instance, call DictProxy.keys(..) The public constructor of CodeContext signature (a PythonDictionary and a ModuleContext) doesn't match the examples I could find (ScriptScope, LanguageContext). > > Does anyone know of any examples of introspection of a hosted IP scripting from C#? > Evidently there's a lot I'm missing here and would like to do the due homework first. > > I'm using NET 4 and don't need 2.x compatibility. > > Regards, > -Hern?n > > El 23/09/2011, a las 21:43, Dino Viehland escribi?: > >> __class__ exists on object in python and is then inherited by the >> other types. When accessing a member from C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. >> >> Sent from my Windows Phone >> >> -----Original Message----- >> From: Hern?n Foffani >> Sent: Friday, September 23, 2011 9:12 AM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] instropection in an embedded engine >> >> >> Having the following Python code: >> >> class Plugin: >> def method(self): >> pass >> plugin = Plugin() >> >> and an embedded ScriptScope instance in my .NET application, the >> following C# works fine >> >> dynamic plugin = pythonEngine.GetVariable("plugin"); >> var attrs = plugin.__class__.__dict__; >> >> if Plugin python class was defined as an old-style class, but fails if >> Plugin inherits from object (__class__ non existent). >> >> Under the VS debugger the dynamic object plugin shows as having three >> attributes .class, .dict and .slots_and_weakref (with dots in their >> names) but no __class__ or __dict__. >> >> I found that I could do something like plugin.method.im_class.__dict__ >> but I'd rather stick with the common idiom. >> >> Is it a known issue? Something related to the way I'm using the engine? >> >> Thanks in advance, >> -Hern?n. >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > From rome at Wintellect.com Tue Sep 27 16:54:47 2011 From: rome at Wintellect.com (Keith Rome) Date: Tue, 27 Sep 2011 07:54:47 -0700 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: <1A9BE436-3F93-4852-9F62-2E4235C12AF5@gmail.com> References: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> <7737799D90E55E4BB9C9F7E40D161E110E38BA8887@VA3DIAXVS461.RED001.local> <1A9BE436-3F93-4852-9F62-2E4235C12AF5@gmail.com> Message-ID: <7737799D90E55E4BB9C9F7E40D161E110E38BA8A11@VA3DIAXVS461.RED001.local> Just beware that if you use this same mechanism to introspect CLR objects, it can return member names for static and protected members in addition to the public instance members (and attempts to access those members might fail). To work around this, I first use reflection to get a list of static or protected CLR members and then exclude those member names from the list returned by Operations.GetMemberNames(). For Python objects, this doesn't seem to cause any complications, since reflection does not know anything about the dynamic members. Doing it that way allows the same code to operate correctly in a heterogeneous environment, where some objects might originate from a dynamic scope while others originate from a static managed scope. Example (I am sure there are ways to tighten this up, but it gets the job done): IEnumerable GetMemberNames(dynamic obj) { // use reflection first so we can exclude anything that will just fail under the dynamic context var objType = ((object)obj).GetType(); var staticMembers = objType.GetMembers(BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); var privateMembers = objType.GetMembers(BindingFlags.Instance | BindingFlags.NonPublic); var excludedMembers = staticMembers.Union(privateMembers).Select(member => member.Name).OrderBy(name => name).Distinct(); var langContext = HostingHelpers.GetLanguageContext(_scriptService.GetScriptEngine()); try { IList members; try { members = langContext.Operations.GetMemberNames(obj); } catch (AmbiguousMatchException) { members = langContext.Operations.GetMemberNames((object)obj); } members = members.Except(excludedMembers).ToList(); // ... I do some more work here to filter out members that start with underbar // character or that resolve to types that don't make sense for my purposes (events, etc) return members; } catch (Exception) { return new string[] { }; } } Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -----Original Message----- From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Hern?n Foffani Sent: Tuesday, September 27, 2011 6:43 AM Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] instropection in an embedded engine You are right. It was the all the Operations thing what I was missing altogether, silly me. Now it all make sense. Thanks a lot. El 26/09/2011, a las 19:57, Keith Rome escribi?: > If you are just trying to enumerate members of a python object, and possibly invoke them, then wouldn't a LanguageContext's DynamicOperations get the job done? Perhaps I am misunderstanding your objectives though. > > HostingHelpers.GetLanguageContext(ScriptEngine) to get the LanguageContext, and then just use the Operations property from that. This gives you introspection methods for GetMemberNames() and a number of invocation mechanisms. All you need is a reference to an object to inspect and the language engine that owns it (or one that is compatible with it). > > In my implementation of a Watches/Locals/Modules UI for a python debugger, I use that procedure as the basis for routines that populate the inspector grids. Basically, whenever the user reaches a breakpoint via my settrace() hook, I inspect the members of all variables in the current scope and refresh a visual tree (really a grid with indentation), and as they drill down into those objects I just walk down one step further into the data structure. It isn't the fastest thing in the world, but then again it doesn't have to be - the script is effectively paused until I allow the breakpoint to resume. > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | > 770.617.4016 | krome at wintellect.com www.wintellect.com > > > -----Original Message----- > From: ironpython-users-bounces+rome=wintellect.com at python.org > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > Behalf Of Hern?n Foffani > Sent: Monday, September 26, 2011 1:36 PM > To: ironpython-users at python.org > Subject: Re: [Ironpython-users] instropection in an embedded engine > > Thanks, I'm getting closer. > Now I'm trying to find how to get a (new? current?) CodeContext to, for instance, call DictProxy.keys(..) The public constructor of CodeContext signature (a PythonDictionary and a ModuleContext) doesn't match the examples I could find (ScriptScope, LanguageContext). > > Does anyone know of any examples of introspection of a hosted IP scripting from C#? > Evidently there's a lot I'm missing here and would like to do the due homework first. > > I'm using NET 4 and don't need 2.x compatibility. > > Regards, > -Hern?n > > El 23/09/2011, a las 21:43, Dino Viehland escribi?: > >> __class__ exists on object in python and is then inherited by the >> other types. When accessing a member from C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. >> >> Sent from my Windows Phone >> >> -----Original Message----- >> From: Hern?n Foffani >> Sent: Friday, September 23, 2011 9:12 AM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] instropection in an embedded engine >> >> >> Having the following Python code: >> >> class Plugin: >> def method(self): >> pass >> plugin = Plugin() >> >> and an embedded ScriptScope instance in my .NET application, the >> following C# works fine >> >> dynamic plugin = pythonEngine.GetVariable("plugin"); >> var attrs = plugin.__class__.__dict__; >> >> if Plugin python class was defined as an old-style class, but fails >> if Plugin inherits from object (__class__ non existent). >> >> Under the VS debugger the dynamic object plugin shows as having three >> attributes .class, .dict and .slots_and_weakref (with dots in their >> names) but no __class__ or __dict__. >> >> I found that I could do something like >> plugin.method.im_class.__dict__ but I'd rather stick with the common idiom. >> >> Is it a known issue? Something related to the way I'm using the engine? >> >> Thanks in advance, >> -Hern?n. >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From hfoffani at gmail.com Tue Sep 27 19:50:13 2011 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Tue, 27 Sep 2011 19:50:13 +0200 Subject: [Ironpython-users] instropection in an embedded engine In-Reply-To: <7737799D90E55E4BB9C9F7E40D161E110E38BA8A11@VA3DIAXVS461.RED001.local> References: <6C7ABA8B4E309440B857D74348836F2E28F78A87@TK5EX14MBXC292.redmond.corp.microsoft.com> <7737799D90E55E4BB9C9F7E40D161E110E38BA8887@VA3DIAXVS461.RED001.local> <1A9BE436-3F93-4852-9F62-2E4235C12AF5@gmail.com> <7737799D90E55E4BB9C9F7E40D161E110E38BA8A11@VA3DIAXVS461.RED001.local> Message-ID: El 27/09/2011, a las 16:54, Keith Rome escribi?: > Just beware that if you use this same mechanism to introspect CLR objects, it can return member names for static and protected members in addition to the public instance members (and attempts to access those members might fail). To work around this, I first use reflection to get a list of static or protected CLR members and then exclude those member names from the list returned by Operations.GetMemberNames(). For Python objects, this doesn't seem to cause any complications, since reflection does not know anything about the dynamic members. My use case is pure Python objects, and right now a couple of C# lines solved it. > > Doing it that way allows the same code to operate correctly in a heterogeneous environment, where some objects might originate from a dynamic scope while others originate from a static managed scope. Interesting. I might use it in case our users decided to extend our application by using IP and pure .NET dlls. So far nobody did that, but who knows.... Thanks again, -Hern?n. > > Example (I am sure there are ways to tighten this up, but it gets the job done): > > IEnumerable GetMemberNames(dynamic obj) > { > // use reflection first so we can exclude anything that will just fail under the dynamic context > var objType = ((object)obj).GetType(); > var staticMembers = objType.GetMembers(BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); > var privateMembers = objType.GetMembers(BindingFlags.Instance | BindingFlags.NonPublic); > var excludedMembers = staticMembers.Union(privateMembers).Select(member => member.Name).OrderBy(name => name).Distinct(); > > var langContext = HostingHelpers.GetLanguageContext(_scriptService.GetScriptEngine()); > try > { > IList members; > > try > { > members = langContext.Operations.GetMemberNames(obj); > } > catch (AmbiguousMatchException) > { > members = langContext.Operations.GetMemberNames((object)obj); > } > > members = members.Except(excludedMembers).ToList(); > > // ... I do some more work here to filter out members that start with underbar > // character or that resolve to types that don't make sense for my purposes (events, etc) > > return members; > } > catch (Exception) > { > return new string[] { }; > } > } > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > > -----Original Message----- > From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Hern?n Foffani > Sent: Tuesday, September 27, 2011 6:43 AM > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] instropection in an embedded engine > > You are right. It was the all the Operations thing what I was missing altogether, silly me. > Now it all make sense. > Thanks a lot. > > El 26/09/2011, a las 19:57, Keith Rome escribi?: > >> If you are just trying to enumerate members of a python object, and possibly invoke them, then wouldn't a LanguageContext's DynamicOperations get the job done? Perhaps I am misunderstanding your objectives though. >> >> HostingHelpers.GetLanguageContext(ScriptEngine) to get the LanguageContext, and then just use the Operations property from that. This gives you introspection methods for GetMemberNames() and a number of invocation mechanisms. All you need is a reference to an object to inspect and the language engine that owns it (or one that is compatible with it). >> >> In my implementation of a Watches/Locals/Modules UI for a python debugger, I use that procedure as the basis for routines that populate the inspector grids. Basically, whenever the user reaches a breakpoint via my settrace() hook, I inspect the members of all variables in the current scope and refresh a visual tree (really a grid with indentation), and as they drill down into those objects I just walk down one step further into the data structure. It isn't the fastest thing in the world, but then again it doesn't have to be - the script is effectively paused until I allow the breakpoint to resume. >> >> >> Keith Rome >> Senior Consultant and Architect >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | >> 770.617.4016 | krome at wintellect.com www.wintellect.com >> >> >> -----Original Message----- >> From: ironpython-users-bounces+rome=wintellect.com at python.org >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >> Behalf Of Hern?n Foffani >> Sent: Monday, September 26, 2011 1:36 PM >> To: ironpython-users at python.org >> Subject: Re: [Ironpython-users] instropection in an embedded engine >> >> Thanks, I'm getting closer. >> Now I'm trying to find how to get a (new? current?) CodeContext to, for instance, call DictProxy.keys(..) The public constructor of CodeContext signature (a PythonDictionary and a ModuleContext) doesn't match the examples I could find (ScriptScope, LanguageContext). >> >> Does anyone know of any examples of introspection of a hosted IP scripting from C#? >> Evidently there's a lot I'm missing here and would like to do the due homework first. >> >> I'm using NET 4 and don't need 2.x compatibility. >> >> Regards, >> -Hern?n >> >> El 23/09/2011, a las 21:43, Dino Viehland escribi?: >> >>> __class__ exists on object in python and is then inherited by the >>> other types. When accessing a member from C# you get its view of the world which doesn't include Python object members. To get the Python type I suggest calling DynamicHelpers.GetPythonType. >>> >>> Sent from my Windows Phone >>> >>> -----Original Message----- >>> From: Hern?n Foffani >>> Sent: Friday, September 23, 2011 9:12 AM >>> To: ironpython-users at python.org >>> Subject: [Ironpython-users] instropection in an embedded engine >>> >>> >>> Having the following Python code: >>> >>> class Plugin: >>> def method(self): >>> pass >>> plugin = Plugin() >>> >>> and an embedded ScriptScope instance in my .NET application, the >>> following C# works fine >>> >>> dynamic plugin = pythonEngine.GetVariable("plugin"); >>> var attrs = plugin.__class__.__dict__; >>> >>> if Plugin python class was defined as an old-style class, but fails >>> if Plugin inherits from object (__class__ non existent). >>> >>> Under the VS debugger the dynamic object plugin shows as having three >>> attributes .class, .dict and .slots_and_weakref (with dots in their >>> names) but no __class__ or __dict__. >>> >>> I found that I could do something like >>> plugin.method.im_class.__dict__ but I'd rather stick with the common idiom. >>> >>> Is it a known issue? Something related to the way I'm using the engine? >>> >>> Thanks in advance, >>> -Hern?n. >>> >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> http://mail.python.org/mailman/listinfo/ironpython-users >>> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > From no_reply at codeplex.com Thu Sep 29 10:03:22 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 29 Sep 2011 01:03:22 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 9/28/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Bogus data is read from utf-16le file ---------------------------------------------- ISSUES 1. [New issue] Bogus data is read from utf-16le file http://ironpython.codeplex.com/workitem/31522 User roxaz911 has proposed the issue: "Test script attached reads invalid data from file. Read data contains string 'myselff' but it is nowhere to be found in test.obj file which is being read. I ran this test on CPython - error does not occur there (if it is of any help). Affected versions: 2.7 Stable 2.7.1 Beta 2" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: