From no_reply at codeplex.com Thu Dec 1 16:38:12 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 1 Dec 2011 07:38:12 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/30/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Failure to bind base accessor if only one accessor is overridden in derived class 2. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class 3. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class 4. [New issue] I can't import PIL module 5. [New comment] I can't import PIL module ---------------------------------------------- ISSUES 1. [New issue] Failure to bind base accessor if only one accessor is overridden in derived class http://ironpython.codeplex.com/workitem/31861 User sblom has proposed the issue: "If I have a CLS-compliant read/write property declared as virtual in a base class, and a derived class only overrides either the getter or the setter, IronPython finds the overridden accessor, but doesn't bother checking the base class for the non-overridden one. In case I can't figure out how to attach multiple files, I've got the following files posted as a Gist at https://gist.github.com/1407534 VirtualAccessors.cs defines a minimal class hierarchy which demonstrates the cases that I'm describing. VirtualAccessors.csx demonstrates correct behavior (and successfully finds both base and derived accessors, as appropriate). VirtualAccessors.py shows IronPython failing to find virtual base accessors."----------------- 2. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class http://ironpython.codeplex.com/workitem/31861 User sblom has commented on the issue: "The class definitions."----------------- 3. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class http://ironpython.codeplex.com/workitem/31861 User sblom has commented on the issue: "Attaching the csharp script that successfully resolves all the accessors."----------------- 4. [New issue] I can't import PIL module http://ironpython.codeplex.com/workitem/31865 User Monomachus has proposed the issue: "Hi, Is there a way to import a PIL module? I just downloaded the sources and put them into Libs folder. And this simple program doesn't work :( from PIL import Image im = Image.open("captcha_HS.png") im = im.convert("P") print im.histogram()"----------------- 5. [New comment] I can't import PIL module http://ironpython.codeplex.com/workitem/31865 User slide_o_mix has commented on the issue: "Please add any errors, etc that might be displayed. If you aren't getting any errors, please try using the mailing list for asking questions instead of the bug tracker." ---------------------------------------------- ---------------------------------------------- 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 jschementi at gmail.com Thu Dec 1 16:50:22 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Thu, 1 Dec 2011 10:50:22 -0500 Subject: [Ironpython-users] PI files for WING IDE In-Reply-To: References: Message-ID: <-8489924423602699610@unknownmsgid> Anyone using Wing IDE with IronPython and also use Michael's scripts? I haven't in a few years. CJ, have you considered the Python Tools for VS as an alternative? ~Jimmy On Nov 30, 2011, at 5:04 PM, "C. Justin Mayers" wrote: I am brand new to IronPython and have only been using Python for a little while. I use the WING IDE and love it. I am trying to create PI files using the generate_pi.py script that Michael Foord modified and has a link to on his website ( http://www.voidspace.org.uk/ironpython/wing-how-to.shtml#introduction). I am working on a 64-bit machine which apparently can lead to problems but I have access to several 32-bit machines all with .NET 4.0. When I follow the instructions I am able to generate a handful of pi files but they seem incomplete. The generate_pi.py script only took 15 seconds to run and produced 331 KB of data. I was under the impression that it should run much longer and produce multiple MB of data. Anybody have any thoughts? Maybe someone has another script or is willing to send me a zipped copy of PI files that they generated. Thanks. Cheers, CJ _______________________________________________ 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 cjustinmayers at gmail.com Thu Dec 1 17:16:02 2011 From: cjustinmayers at gmail.com (C. Justin Mayers) Date: Thu, 1 Dec 2011 08:16:02 -0800 Subject: [Ironpython-users] PI files for WING IDE In-Reply-To: <-8489924423602699610@unknownmsgid> References: <-8489924423602699610@unknownmsgid> Message-ID: Jimmy, I just thought I would try to use my current IDE of choice. I am open to alternative IDEs and spent most of yesterday diving into Eclipse and the PyDev extension. I like that I can easily create projects and flip between an IronPython interpreter to a Python interpreter . Having only invested a little time into Eclipse I am still very open to other free/inexpensive IDEs. Thanks. Anyone have a current list of IronPython/Python IDEs with pros/cons? Thanks. Cheers, CJ On Thu, Dec 1, 2011 at 7:50 AM, Jimmy Schementi wrote: > Anyone using Wing IDE with IronPython and also use Michael's scripts? I > haven't in a few years. > > CJ, have you considered the Python Tools for VS as an alternative? > > ~Jimmy > > > On Nov 30, 2011, at 5:04 PM, "C. Justin Mayers" > wrote: > > I am brand new to IronPython and have only been using Python for a little > while. > > I use the WING IDE and love it. I am trying to create PI files using the > generate_pi.py script that Michael Foord modified and has a link to on his > website ( > http://www.voidspace.org.uk/ironpython/wing-how-to.shtml#introduction). I > am working on a 64-bit machine which apparently can lead to problems but I > have access to several 32-bit machines all with .NET 4.0. When I follow the > instructions I am able to generate a handful of pi files but they seem > incomplete. The generate_pi.py script only took 15 seconds to run and > produced 331 KB of data. I was under the impression that it should run much > longer and produce multiple MB of data. > > Anybody have any thoughts? Maybe someone has another script or is willing > to send me a zipped copy of PI files that they generated. Thanks. > > Cheers, CJ > > _______________________________________________ > 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 mcolonno at stanford.edu Thu Dec 1 19:14:02 2011 From: mcolonno at stanford.edu (Michael Colonno) Date: Thu, 1 Dec 2011 10:14:02 -0800 Subject: [Ironpython-users] abstract class conversion? Message-ID: <04e901ccb055$01605160$0420f420$@stanford.edu> Hi ~ I'm trying to port some VB.NET code to IronPython; the goal is to access third-party .NET functionality through Python. I've managed to connect to the relevant Interop .dll files and expose the API but I'm having trouble reproducing the VB.NET functionality from Python (most likely due to my lack of familiarity with .NET itself). In VB.NET, this works just fine: Dim A As Type Dim Name As String Dim Option As Boolean Dim Err As Integer Dim value As Object value = A.function(Name, Option, Err) In IronPython I am trying (pseudo-code): import clr clr.AddReferenceToFileAndPath("relevant dll") from API.Interop.whatever import Type A = Type() value = A.function("Name", True, err) Two issues / questions: 1. The IronPython code above produces: TypeError: Cannot create instances of Type because it is abstract. Why is an abstract Python class being created and do I have any control over this? 2. Changing the code to access the functions of Type directly (e.g. Type.function()) results in a "self" argument being expressed as the first argument in the function. i.e. the syntax expected is now Type.function(self, string, boolean, int). I'm familiar with "self" only in the context of defining class functions and not outside of a class definition. My guess is that I'm not understanding / using the .NET <---> Python conversion correctly. Any advice or guidance would be greatly appreciated. Thanks, ~Mike C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Dec 1 19:36:21 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 1 Dec 2011 10:36:21 -0800 Subject: [Ironpython-users] abstract class conversion? In-Reply-To: <04e901ccb055$01605160$0420f420$@stanford.edu> References: <04e901ccb055$01605160$0420f420$@stanford.edu> Message-ID: On Thu, Dec 1, 2011 at 10:14 AM, Michael Colonno wrote: > ??????????? In VB.NET, this works just fine: > > > > Dim A As Type > Dim Name As String > Dim Option As Boolean > Dim Err As Integer > Dim value As Object > > value = A.function(Name, Option, Err) > > ??????????? In IronPython I am trying (pseudo-code): > > import clr > clr.AddReferenceToFileAndPath("relevant dll") > from API.Interop.whatever import Type > > A = Type() > value = A.function("Name", True, err) > > ??????????? Two issues / questions: > > 1.???? The IronPython code above produces: TypeError: Cannot create > instances of Type because it is abstract. Why is an abstract Python class > being created and do I have any control over this? Calling `A = Type()` tries to create an instance of Type, which your VB code doesn't do. Is `Type.function` a static method? > > 2.???? Changing the code to access the functions of Type directly (e.g. > Type.function()) results in a ?self? argument being expressed as the first > argument in the function. i.e. the syntax expected is now > Type.function(self, string, boolean, int). I?m familiar with ?self? only in > the context of defining class functions and not outside of a class > definition. It really depends on how what the signature of the function is. If it's static, calling `Type.function` from Python shouldn't need a self argument. Can you find the signature of `Type.function` (ILSpy is your friend here). Feel free to elide the names; they're not really important. - Jeff From mcolonno at stanford.edu Fri Dec 2 02:28:44 2011 From: mcolonno at stanford.edu (Michael Colonno) Date: Thu, 1 Dec 2011 17:28:44 -0800 Subject: [Ironpython-users] abstract class conversion? In-Reply-To: References: <04e901ccb055$01605160$0420f420$@stanford.edu> Message-ID: <051101ccb091$bbfa95d0$33efc170$@stanford.edu> Thanks for the reply, Jeff. ILSpy reports for "Type" (the "IL" version): .class interface public auto ansi abstract import [relevant dll name] { .custom instance void [mscorlib]System.Runtime.InteropServices.TypeLibTypeAttribute::.ctor(int16) = ( 01 00 50 10 00 00 ) .custom instance void [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = ( 01 00 ... (lots of numbers) And for "function": .method public hidebysig newslot abstract virtual instance object marshal(idispatch) function ( [in] string marshal(bstr) Name, [in] bool Option, [in] [out] int32& Errors ) runtime managed internalcall { .custom instance void [mscorlib]System.Runtime.InteropServices.DispIdAttribute::.ctor(int32) = ( 01 00 5b 00 00 00 00 00 ) I confess this does not mean a whole lot to me, though both Type and function are declared as abstract. Hopefully this sheds light on the behavior in IronPython. Thanks, ~Mike C. -----Original Message----- From: Jeff Hardy [mailto:jdhardy at gmail.com] Sent: Thursday, December 01, 2011 10:36 AM To: Michael Colonno Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] abstract class conversion? On Thu, Dec 1, 2011 at 10:14 AM, Michael Colonno < mcolonno at stanford.edu> wrote: > In VB.NET, this works just fine: > > > > Dim A As Type > Dim Name As String > Dim Option As Boolean > Dim Err As Integer > Dim value As Object > > value = A.function(Name, Option, Err) > > In IronPython I am trying (pseudo-code): > > import clr > clr.AddReferenceToFileAndPath("relevant dll") from > API.Interop.whatever import Type > > A = Type() > value = A.function("Name", True, err) > > Two issues / questions: > > 1. The IronPython code above produces: TypeError: Cannot create > instances of Type because it is abstract. Why is an abstract Python > class being created and do I have any control over this? Calling `A = Type()` tries to create an instance of Type, which your VB code doesn't do. Is `Type.function` a static method? > > 2. Changing the code to access the functions of Type directly (e.g. > Type.function()) results in a "self" argument being expressed as the > first argument in the function. i.e. the syntax expected is now > Type.function(self, string, boolean, int). I'm familiar with "self" > only in the context of defining class functions and not outside of a > class definition. It really depends on how what the signature of the function is. If it's static, calling `Type.function` from Python shouldn't need a self argument. Can you find the signature of `Type.function` (ILSpy is your friend here). Feel free to elide the names; they're not really important. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoniov at chile.com Fri Dec 2 02:38:44 2011 From: antoniov at chile.com (Apok) Date: Thu, 1 Dec 2011 22:38:44 -0300 Subject: [Ironpython-users] Beginner question. Message-ID: <000001ccb093$2124c240$636e46c0$@chile.com> Hi, I'm new in this community, I will try to be brief: - Python programmer. - 0 experience DotNet, CSharp I have a project for an open source game:. IronPython SlimDX JigLibSDX (physics engine) My question is: does it make sense for a game to use this resources?. Where I can found information about this "mix" ?. What I need to do it - all examples are on CSharp. Any information about this can be helpful, Thanks. Please don't tell me to use pygame or other python game engines J. Thanks. *** I have used ironpython.info as a start point (slimDX example section). -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Dec 2 10:14:25 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 2 Dec 2011 01:14:25 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/1/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] I can't import PIL module 2. [New issue] Console color choice is bad for bright consoles ---------------------------------------------- ISSUES 1. [New comment] I can't import PIL module http://ironpython.codeplex.com/workitem/31865 User jdhardy has commented on the issue: "Unfortunately, PIL uses a C extension module, which isn't supported for IronPython."----------------- 2. [New issue] Console color choice is bad for bright consoles http://ironpython.codeplex.com/workitem/31872 User sblom has proposed the issue: "May not be an IronPython-owned issue, but I can't find an upstream project to instead pursue this against. REPRO My default console background color is bright white, with black foreground text. When Microsoft.Scripting.Hosting.Shell.BasicConsole tries to pick a prompt color , it looks to see if my background color is exactly ConsoleColor.Gray. When it sees that it's not, it sets the foreground text to ConsoleColor.Gray. OBSERVED Light gray on white is _very_ hard to read. EXPECTED A slightly more sane color choice, perhaps even using my default foreground text color for _promptColor. (Sadly, I haven't figured out how to read that color correctly on a non-Windows console.) VERSION sys.version = '2.7.1 (IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.1)'" ---------------------------------------------- ---------------------------------------------- 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 z_shaheer at hotmail.com Fri Dec 2 14:36:23 2011 From: z_shaheer at hotmail.com (Shaheer Zubairi) Date: Fri, 2 Dec 2011 13:36:23 +0000 Subject: [Ironpython-users] SciPy for .NET Message-ID: Hi guys, I have a query regarding the use of SciPy for .NET. I have existing code written in Visual Basic (VB) in Visual Studio 2010. I would like to use the Singular Value Decomposition (SVD) of a non-square matrix using the Scipy library. I have downloaded and installed IronPython 2.7.1, Numpy and SciPy libraries following the steps shown on the website (http://www.enthought.com/repo/.iron/). My questions are: 1. Should there by a ScipyDotNet DLL available for me to use in Visual Studio? 2. Can I use the code found in the directory IronPython2.7.1>Lib>site-packages>scipy>linalg to do what I want? 3. Can anyone perhaps provide me an example of how to use SciPy SVD from within a Visual Basic script in Visual Studio 2010? Thank you for giving me your valuable time. I look forward to hearing from you soon. Kind regards, Mo -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Fri Dec 2 15:41:53 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 2 Dec 2011 06:41:53 -0800 Subject: [Ironpython-users] SciPy for .NET In-Reply-To: References: Message-ID: NumPy and SciPy aren't particularly suitable for use from non-Python environments, because a considerable amount of glue logic is actually implemented in Python. If you do an internet search for "svd .net", there doesn't seem to be a shortage of other implementations. Two I'm personally familiar with are Sho (http://research.microsoft.com/en-us/projects/sho/) -- has a somewhat-restrictive license Meta.Numerics (http://metanumerics.codeplex.com/releases/view/63906) On Fri, Dec 2, 2011 at 5:36 AM, Shaheer Zubairi wrote: > Hi guys, > > > > I have a query regarding the use of SciPy for .NET. I have existing code > written in Visual Basic (VB) in Visual Studio 2010. I would like to use the > Singular Value Decomposition (SVD) of a non-square matrix using the Scipy > library. I have downloaded and installed IronPython 2.7.1, Numpy and SciPy > libraries following the steps shown on the website ( > http://www.enthought.com/repo/.iron/). > My questions are: > > > > 1. Should there by a ScipyDotNet DLL available for me to use in Visual > Studio? > > 2. Can I use the code found in the directory > IronPython2.7.1>Lib>site-packages>scipy>linalg to do what I want? > > 3. Can anyone perhaps provide me an example of how to use SciPy SVD from > within a Visual Basic script in Visual Studio 2010? > > > > Thank you for giving me your valuable time. I look forward to hearing from > you soon. > > > > Kind regards, > > > > Mo > > _______________________________________________ > 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 jdhardy at gmail.com Fri Dec 2 21:04:25 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 2 Dec 2011 12:04:25 -0800 Subject: [Ironpython-users] Beginner question. In-Reply-To: <000001ccb093$2124c240$636e46c0$@chile.com> References: <000001ccb093$2124c240$636e46c0$@chile.com> Message-ID: I wouldn't be surprised if you were one of the first people to try this particular combination. However, anything that works from C# should work from IronPython (except possibly unsafe code). Translating C# to IronPython is fairly straightforward: remove most of the punctuation :) You may have to learn a bit of C# to read the examples, but it's not a hard language to learn and stack overflow is great for asking what a particular piece of C# syntax does. If you're trying to convert C# to Python, use the IronPython tag and someone will spot it fairly quickly. I don't know if there are many IronPython game programmers (I do my game programming in C++, because I'm insane), so anything you can find out will be appreciated. - Jeff On Thu, Dec 1, 2011 at 5:38 PM, Apok wrote: > Hi, I?m new in this community, I will try to be brief: > > -????????? Python programmer. > > -????????? 0 experience DotNet, CSharp > > I have a project for an open source game:. > > > > IronPython > > SlimDX > > JigLibSDX (physics engine) > > > > My question is: does it make sense for a game to use this resources?. > > Where I can found information about this ?mix? ?. > > What I need to do it ? all examples are on CSharp. > > Any information about this can be helpful, Thanks. > > > > Please don?t tell me to use pygame or other python game engines J. > > > > Thanks. > > > > *** I have used ironpython.info as a start point (slimDX example section). > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From jdhardy at gmail.com Fri Dec 2 21:08:11 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 2 Dec 2011 12:08:11 -0800 Subject: [Ironpython-users] abstract class conversion? In-Reply-To: <051101ccb091$bbfa95d0$33efc170$@stanford.edu> References: <04e901ccb055$01605160$0420f420$@stanford.edu> <051101ccb091$bbfa95d0$33efc170$@stanford.edu> Message-ID: Well, as you guessed, 'Type' and 'function' are both abstract (and 'function' is not static). You can't instantiate an abstract class directly (i.e., a = Type()). You need to either instantiate a subclass, or the library you're using may provide a factory function that does that internally and returns a Type reference. I can't see how the VB code you gave could work, so if there's something missing that piece is probably important. I take it this library is internal so that you can't share what it is? - Jeff On Thu, Dec 1, 2011 at 5:28 PM, Michael Colonno wrote: > ??????????? Thanks for the reply, Jeff. > > > > ILSpy reports for "Type" (the ?IL? version): > > > > ??????????? .class interface public auto ansi abstract import [relevant dll > name] > > ????? { > > ????? .custom instance void > [mscorlib]System.Runtime.InteropServices.TypeLibTypeAttribute::.ctor(int16) > = ( > > ??????????? 01 00 50 10 00 00 > > ????? ) > > ????? .custom instance void > [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = ( > > ??????????? 01 00 ... (lots of numbers) > > > > ??????????? And for "function": > > > > ??????????? .method public hidebysig newslot abstract virtual > > ????? instance object marshal(idispatch) function ( > > ??????????? [in] string marshal(bstr) Name, > > ??????????? [in] bool Option, > > ??????????? [in] [out] int32& Errors > > ????? ) runtime managed internalcall > > ????? { > > ????? .custom instance void > [mscorlib]System.Runtime.InteropServices.DispIdAttribute::.ctor(int32) = ( > > ??????????? 01 00 5b 00 00 00 00 00 > > ????? ) > > > > ??????????? I confess this does not mean a whole lot to me, though both Type > and function are declared as abstract. Hopefully this sheds light on the > behavior in IronPython. > > > > ??????????? Thanks, > > ??????????? ~Mike C. > > > > -----Original Message----- > From: Jeff Hardy [mailto:jdhardy at gmail.com] > Sent: Thursday, December 01, 2011 10:36 AM > To: Michael Colonno > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] abstract class conversion? > > > > On Thu, Dec 1, 2011 at 10:14 AM, Michael Colonno > wrote: > >> ??????????? In VB.NET, this works just fine: > >> > >> > >> > >> Dim A As Type > >> Dim Name As String > >> Dim Option As Boolean > >> Dim Err As Integer > >> Dim value As Object > >> > >> value = A.function(Name, Option, Err) > >> > >> ??????????? In IronPython I am trying (pseudo-code): > >> > >> import clr > >> clr.AddReferenceToFileAndPath("relevant dll") from > >> API.Interop.whatever import Type > >> > >> A = Type() > >> value = A.function("Name", True, err) > >> > >> ??????????? Two issues / questions: > >> > >> 1.???? The IronPython code above produces: TypeError: Cannot create > >> instances of Type because it is abstract. Why is an abstract Python > >> class being created and do I have any control over this? > > > > Calling `A = Type()` tries to create an instance of Type, which your VB code > doesn't do. Is `Type.function` a static method? > > > >> > >> 2.???? Changing the code to access the functions of Type directly (e.g. > >> Type.function()) results in a ?self? argument being expressed as the > >> first argument in the function. i.e. the syntax expected is now > >> Type.function(self, string, boolean, int). I?m familiar with ?self? > >> only in the context of defining class functions and not outside of a > >> class definition. > > > > It really depends on how what the signature of the function is. If it's > static, calling `Type.function` from Python shouldn't need a self argument. > Can you find the signature of `Type.function` (ILSpy is your friend here). > Feel free to elide the names; they're not really important. > > > > - Jeff > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From doug.blank at gmail.com Fri Dec 2 21:25:32 2011 From: doug.blank at gmail.com (Doug Blank) Date: Fri, 2 Dec 2011 15:25:32 -0500 Subject: [Ironpython-users] Beginner question. In-Reply-To: References: <000001ccb093$2124c240$636e46c0$@chile.com> Message-ID: On Fri, Dec 2, 2011 at 3:04 PM, Jeff Hardy wrote: > I wouldn't be surprised if you were one of the first people to try > this particular combination. However, anything that works from C# > should work from IronPython (except possibly unsafe code). > > Translating C# to IronPython is fairly straightforward: remove most of > the punctuation :) You may have to learn a bit of C# to read the > examples, but it's not a hard language to ?learn and stack overflow is > great for asking what a particular piece of C# syntax does. If you're > trying to convert C# to Python, use the IronPython tag and someone > will spot it fairly quickly. > > I don't know if there are many IronPython game programmers (I do my > game programming in C++, because I'm insane), so anything you can find > out will be appreciated. We have incorporated the Farseer Physics Engine in Calico, which makes it available to Python, Ruby, and Scheme on Mac, Windows, and Linux. Here are a few game-like things in IronPython: http://www.youtube.com/user/dsblank007?feature=guide#p/a/u/0/L3P5t8hAhe4 - Letter Physics http://www.youtube.com/user/dsblank007?feature=guide#p/a/u/2/yLZJmyQEALA - Angy Blocks http://www.youtube.com/user/dsblank007?feature=guide#p/u/8/GryaCuiaE3o - Art More info here: http://calicoproject.org/ http://calicoproject.org/Calico_Graphics -Doug > - Jeff > > On Thu, Dec 1, 2011 at 5:38 PM, Apok wrote: >> Hi, I?m new in this community, I will try to be brief: >> >> -????????? Python programmer. >> >> -????????? 0 experience DotNet, CSharp >> >> I have a project for an open source game:. >> >> >> >> IronPython >> >> SlimDX >> >> JigLibSDX (physics engine) >> >> >> >> My question is: does it make sense for a game to use this resources?. >> >> Where I can found information about this ?mix? ?. >> >> What I need to do it ? all examples are on CSharp. >> >> Any information about this can be helpful, Thanks. >> >> >> >> Please don?t tell me to use pygame or other python game engines J. >> >> >> >> Thanks. >> >> >> >> *** I have used ironpython.info as a start point (slimDX example section). >> >> >> _______________________________________________ >> 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 mcolonno at stanford.edu Fri Dec 2 22:08:48 2011 From: mcolonno at stanford.edu (Michael Colonno) Date: Fri, 2 Dec 2011 13:08:48 -0800 Subject: [Ironpython-users] abstract class conversion? In-Reply-To: References: <04e901ccb055$01605160$0420f420$@stanford.edu> <051101ccb091$bbfa95d0$33efc170$@stanford.edu> Message-ID: <05eb01ccb136$965401e0$c2fc05a0$@stanford.edu> Hi Jeff ~ Thanks for your help - it sounds like I have to do a lot more digging in the library itself to see what's going on. The VB.NET code (though paraphrased) does work; perhaps there is something internal to the library taking care of the translation to the subclass. No secret on the library; I'm working with the SolidWorks API. I felt it would be easier to understand and more useful to others in the future if I just made the names generic. In terms of a "missing middle" it's difficult to tell since the API is usually used via add-ins wizards for Visual Studio that likely take care of some things under the hood. The instructions for the simplest form of VB.NET add-in (a stand-alone executable that talks to the application) from the official documentation are as follows: Standalone Applications (.exe files) To create an instance of the SolidWorks software, your project should contain lines of code similar to the following: Sub Main Dim swApp As SldWorks.SldWorks swApp = New SldWorks.SldWorks() code... swApp.ExitApp swApp = Nothing End Sub Additionally, you must have added references to the SolidWorks type libraries. The type libraries mentioned are added as COM references through Visual Studio and then imported, e.g.: Imports System Imports SldWorks Imports SWPublished Imports SwConst Imports System.Runtime.InteropServices Finally the documentation for the function I was using as an example is: Dim instance As ISldWorks Dim Name As String Dim Silent As Boolean Dim Errors As Integer Dim value As Object value = instance.ActivateDoc2(Name, Silent, Errors) After this it's quite easy to build up VB.NET programs that talk to the application. I will try and rebuild a concrete example line by line to see if I can't identify the abstract from the non-abstract classes. Thanks, ~Mike C. -----Original Message----- From: Jeff Hardy [mailto:jdhardy at gmail.com] Sent: Friday, December 02, 2011 12:08 PM To: Michael Colonno Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] abstract class conversion? Well, as you guessed, 'Type' and 'function' are both abstract (and 'function' is not static). You can't instantiate an abstract class directly (i.e., a = Type()). You need to either instantiate a subclass, or the library you're using may provide a factory function that does that internally and returns a Type reference. I can't see how the VB code you gave could work, so if there's something missing that piece is probably important. I take it this library is internal so that you can't share what it is? - Jeff On Thu, Dec 1, 2011 at 5:28 PM, Michael Colonno < mcolonno at stanford.edu> wrote: > Thanks for the reply, Jeff. > > > > ILSpy reports for "Type" (the "IL" version): > > > > .class interface public auto ansi abstract import > [relevant dll name] > > { > > .custom instance void > [mscorlib]System.Runtime.InteropServices.TypeLibTypeAttribute::.ctor(i > nt16) > = ( > > 01 00 50 10 00 00 > > ) > > .custom instance void > [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) > = ( > > 01 00 ... (lots of numbers) > > > > And for "function": > > > > .method public hidebysig newslot abstract virtual > > instance object marshal(idispatch) function ( > > [in] string marshal(bstr) Name, > > [in] bool Option, > > [in] [out] int32& Errors > > ) runtime managed internalcall > > { > > .custom instance void > [mscorlib]System.Runtime.InteropServices.DispIdAttribute::.ctor(int32) > = ( > > 01 00 5b 00 00 00 00 00 > > ) > > > > I confess this does not mean a whole lot to me, though > both Type and function are declared as abstract. Hopefully this sheds > light on the behavior in IronPython. > > > > Thanks, > > ~Mike C. > > > > -----Original Message----- > From: Jeff Hardy [mailto:jdhardy at gmail.com] > Sent: Thursday, December 01, 2011 10:36 AM > To: Michael Colonno > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] abstract class conversion? > > > > On Thu, Dec 1, 2011 at 10:14 AM, Michael Colonno > < mcolonno at stanford.edu> > wrote: > >> In VB.NET, this works just fine: > >> > >> > >> > >> Dim A As Type > >> Dim Name As String > >> Dim Option As Boolean > >> Dim Err As Integer > >> Dim value As Object > >> > >> value = A.function(Name, Option, Err) > >> > >> In IronPython I am trying (pseudo-code): > >> > >> import clr > >> clr.AddReferenceToFileAndPath("relevant dll") from > >> API.Interop.whatever import Type > >> > >> A = Type() > >> value = A.function("Name", True, err) > >> > >> Two issues / questions: > >> > >> 1. The IronPython code above produces: TypeError: Cannot create > >> instances of Type because it is abstract. Why is an abstract Python > >> class being created and do I have any control over this? > > > > Calling `A = Type()` tries to create an instance of Type, which your > VB code doesn't do. Is `Type.function` a static method? > > > >> > >> 2. Changing the code to access the functions of Type directly (e.g. > >> Type.function()) results in a "self" argument being expressed as the > >> first argument in the function. i.e. the syntax expected is now > >> Type.function(self, string, boolean, int). I'm familiar with "self" > >> only in the context of defining class functions and not outside of a > >> class definition. > > > > It really depends on how what the signature of the function is. If > it's static, calling `Type.function` from Python shouldn't need a self argument. > Can you find the signature of `Type.function` (ILSpy is your friend here). > Feel free to elide the names; they're not really important. > > > > - Jeff > > > _______________________________________________ > 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 no_reply at codeplex.com Sat Dec 3 11:08:28 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 3 Dec 2011 02:08:28 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/2/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Console color choice is bad for bright consoles ---------------------------------------------- ISSUES 1. [New comment] Console color choice is bad for bright consoles http://ironpython.codeplex.com/workitem/31872 User jdhardy has commented on the issue: "This has actually bugged me for a while as well, since I prefer a white-on-blue scheme for my consoles. Would like to banish it once and for all in 2.7.2. Patches welcome, if you can!" ---------------------------------------------- ---------------------------------------------- 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 Cheng-B.Li at ubs.com Sat Dec 3 11:44:06 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Sat, 3 Dec 2011 18:44:06 +0800 Subject: [Ironpython-users] How to install Scipy and Numpy for .net offline? Message-ID: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> Hi Everyone, I am a newbie to Iron python. I find the below link is very useful since it make the scipy and numpy usable in ironpython http://www.enthought.com/repo/.iron/ Unfortunately the installation is done automatically on line. Due to some reason I can't install them in this way. I have just download the eggs from that site. But I don't know what should I do next.. Is there anyone have encountered the same problem and resolved it? Regards, Cheng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From jmccampbell at enthought.com Mon Dec 5 15:48:18 2011 From: jmccampbell at enthought.com (Jason McCampbell) Date: Mon, 5 Dec 2011 08:48:18 -0600 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> Message-ID: Hi Cheng, That's odd that the installation isn't working correctly. If you are seeing any error messages please send them to me and I'll take a look. You can install the eggs manually. Each egg file is just a ZIP archive with some defined metadata in it. If you extract the numpy and scipy eggs, you will get a directory named 'numpy' or 'scipy' plus an 'EGG-INFO' directory. Move the numpy or scipy directory to the lib/site-packages directory under your IronPython installation. There are also some DLL files in each egg under EGG-INFO/prefix/DLLs. Each of the DLL files should be copied to the DLLs directory under your IronPython install tree. After that you should be able to use both packages as though you used the automatic installer. Please let me know if you have any trouble getting this to work or any other questions. Regards, Jason *From:* ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto: > ironpython-users-bounces+smortaz=microsoft.com at python.org] *On Behalf Of * > Cheng-B.Li at ubs.com > *Sent:* Saturday, December 03, 2011 2:44 AM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] How to install Scipy and Numpy for .net > offline?**** > > ** ** > > Hi Everyone, ** ** > > I am a newbie to Iron python. I find the below link is very useful since > it make the scipy and numpy usable in ironpython**** > > http://www.enthought.com/repo/.iron/ **** > > Unfortunately the installation is done automatically on line. Due to some > reason I can't install them in this way. I have just download the eggs from > that site. But I don't know what should I do next.. Is there anyone have > encountered the same problem and resolved it?**** > > Regards, > Cheng **** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cheng-B.Li at ubs.com Tue Dec 6 03:19:32 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Tue, 6 Dec 2011 10:19:32 +0800 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> Message-ID: <47CC258F987F9F4D9728BD2C2F71907DC916D1@nhkg1140pex.ubsw.net> Hi Jason, Don't worry. The internet problem is due to my internet connection's restriction. There is nothing wrong on your side. I'll try to install it manually. Thx for your kindly reply! Regards, Cheng ________________________________ From: Jason McCampbell [mailto:jmccampbell at enthought.com] Sent: 2011?12?5? 22:48 To: Li, Cheng-B Cc: ironpython-users at python.org Subject: Re: FW: How to install Scipy and Numpy for .net offline? Hi Cheng, That's odd that the installation isn't working correctly. If you are seeing any error messages please send them to me and I'll take a look. You can install the eggs manually. Each egg file is just a ZIP archive with some defined metadata in it. If you extract the numpy and scipy eggs, you will get a directory named 'numpy' or 'scipy' plus an 'EGG-INFO' directory. Move the numpy or scipy directory to the lib/site-packages directory under your IronPython installation. There are also some DLL files in each egg under EGG-INFO/prefix/DLLs. Each of the DLL files should be copied to the DLLs directory under your IronPython install tree. After that you should be able to use both packages as though you used the automatic installer. Please let me know if you have any trouble getting this to work or any other questions. Regards, Jason From: ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto:ironpython-users-bounces+smortaz =microsoft.com at python.org] On Behalf Of Cheng-B.Li at ubs.com Sent: Saturday, December 03, 2011 2:44 AM To: ironpython-users at python.org Subject: [Ironpython-users] How to install Scipy and Numpy for .net offline? Hi Everyone, I am a newbie to Iron python. I find the below link is very useful since it make the scipy and numpy usable in ironpython http://www.enthought.com/repo/.iron/ Unfortunately the installation is done automatically on line. Due to some reason I can't install them in this way. I have just download the eggs from that site. But I don't know what should I do next.. Is there anyone have encountered the same problem and resolved it? Regards, Cheng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From thomas.joscht at siemens.com Tue Dec 6 13:37:28 2011 From: thomas.joscht at siemens.com (Joscht, Thomas) Date: Tue, 6 Dec 2011 13:37:28 +0100 Subject: [Ironpython-users] Inject RemoteObjects via SetVariable Message-ID: Hi, I'm trying to develop a script engine with debugging propabilites in Visual Studio in IronPython. My application is a client-server scenario. The scripts normally run hosted on a server and some objects like my OrderController are injected via ScriptScope and SetVariable method (this is my context of script). The server has access to the DB and so on. For debugging (on any developer machine) I connect via remoting to get an OrderController from server and try to inject this as SetVariable in script. My Problem is, that this doesn't work directly. Example: // Get the OrderController (Proxy) via Remoting: IOrderController service = (IOrderController)Activator.GetObject(typeof(IOrderController), "tcp://localhost:9898/Server/OrderController"); // Create scope and set OrderController as global variable: ScriptScope scope = runtime.CreateScope(); scope.SetVariable("OrderController", service); // -> This throws an SerializationException because many classes are not marked as serializable! // I have tried to unmarshal my OrderController (Proxy) and inject this serviceProxy. Example: System.Runtime.Remoting.ObjectHandle handle = (System.Runtime.Remoting.ObjectHandle) service; object unmarshaledService = System.Runtime.Remoting.RemotingServices.Unmarshal(handle.CreateObjRef(typeof(IOrderController)),true); IOrderController serviceProxy = (IOrderController)unmarshaledService ; scope.SetVariable("OrderController",serviceProxy); This works for the OrderController, but not for another MarshalByRefObjects which are Members of the OrderController. In my example is the Member 'SubObject' an another MarshalByRef object like the OrderController which has string Member 'Name'. Access in script to Member 'Name' fail. Example in python: print OrderController.SubObject.Name // -> This throws an MissingMemberException. 'MarshalByRefObject' has no attribute 'Name'. but in C# in my class which is hosting the script before I set the serviceProxy via SetVariable and run the script I can run Console.WriteLine(serviceProxy.SubObject.Name) without Problems. What can I do? I wouldn't create the OrderController in script via remoting because Script should run without changes with OrderController as normal object and with OrderController as RemoteObject. So developer can directly publish there new scripts to server and any client can run this. Thanks Best regards, Thomas Joscht From dinov at microsoft.com Wed Dec 7 22:32:02 2011 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 7 Dec 2011 21:32:02 +0000 Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 Message-ID: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> We're pleased to announce the release of Python Tools for Visual Studio 1.1 Beta ( http://pytools.codeplex.com/releases/view/76089 ). Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python programming language. This release includes new core IDE features, a couple of new sample libraries for interacting with Kinect and Excel, and many bug fixes for issues reported since the release of 1.0. Since the last alpha release we've fixed over 30 bugs and implemented several features around the project system and references. For IronPython users you can now add references to .NET projects or .NET assemblies and we'll automatically reload and re-analyze the references when they're rebuilt. For CPython users you can now add a reference to a .pyd extension module and we'll analyze the extension module and provide completions. We've also improved intellisense across multiple Python projects in the same solution. Finally we've added support for using IPython mode w/o PyLab - this enables out-of-line graphs and improves the startup time of the interactive window. We've also added many new features which improve the basic editing experience which were also available during 1.1 Alpha. This includes a feature for automatically adding imports after typing an identifier, a command for cleaning up unused imports, support for recognizing isinstance() calls and using them for providing improved completions, and using goto definition to go to members defined in the standard library. We've also made improvements to the project system so it'll behave more like the C# including proper support of linked files outside of the project directory. And we've made some improvements to our IPython REPL support including support for inline graphs and proper support for IPython's numbered prompts. Finally we've made several small improvements to the debugger including the option to step into the Python standard library while debugging, the option to not break on SystemExit exception with exit codes of zero as well as displaying the Python thread name in the threads window. Altogether this release includes over 130 features and bug fixes since 1.0 - a complete list of the changes is available here: http://bit.ly/IpyTools11Beta1Fixes Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets. Once downloaded and installed these plug-in to Visual Studio and provide templates; and they provide built-in support for installing into one of the recognized Python interpreters via Tools->Python Tools->Samples. The PyKinect sample is a wrapper around the Kinect SDK and enables development with the Kinect SDK directly from Python. The library presents an API which is similar to the API exposed via the Kinect SDK for C# developers. The sample includes a new template for quickly getting started creating games using PyGame with PyKinect. PyKinect is licensed under a license similar to the existing Kinect SDK. Pyvot (pronounced Pivot) connects familiar data-exploration and visualization tools in Excel with the powerful data analysis and transformation capabilities of Python, with an emphasis on tabular data. It provides a simple and Pythonic interface to Excel, smoothing over the pain points in using the existing Excel object model as exposed via COM. We'd like to thank all of the users who took the time to report issues and feedback for this release: 445363200, Andrew, AphexSA, benpmorgan, chadbr, dgkbny, drgn, holmboe, hyh, jimpeak, juanalumni, lblanchon, liuzhenhai, mahpour, MichaelBaker, po6856, pztrick44, salerio, slide_o_mix, somini, SoonStudios, stakemura, sumitbasu, swift_dev, synergetic, teebot, timeisaparallax, tonyandrewmeyer, xavier_grundus, and Zooba. Thanks, The Python Tools for Visual Studio Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Thu Dec 8 02:03:39 2011 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 8 Dec 2011 01:03:39 +0000 Subject: [Ironpython-users] Python Best Again Message-ID: <04F52281-623F-4D2A-9CC6-A00AEF1B8E70@voidspace.org.uk> (Sent on behalf of Steve Holden) I've just added a news item to the python.org home page noting that Linux Journal readers have voted Python the Best Programming Language for the third year in a row. This is excellent news, though I find it hard to believe that coming up on the outside we see C++. While it demonstrates that Linux Journal readers like object-oriented programming, it shows an uncomfortable tendency towards masochism :) and implies we can't necessarily trust their judgment. ;-) Attempted humor aside, here I am taking the opportunity as PSF chairman to say a big "thank you" to all developers and everyone else who helps to keep putting out releases that gain the kind of popularity that this most recent vote indicates. I know we do it to create a great programming environment, not for popularity, but the Foundation's mission involves encouraging the growth of the international Python community. Please pass this on to other members of your developer community who may not receive this message directly. Seriously, thanks. Having quality releases of a great language really does make it easier to promote Python! regards Steve -- 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 From Cheng-B.Li at ubs.com Thu Dec 8 03:04:40 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Thu, 8 Dec 2011 10:04:40 +0800 Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> Hi All, I'm currently using PTVS 1.1 alpha version. I think this tool is very useful in developing python projects. It makes it possible to leverage the power of Visual studio 10 and python. But I have one major problem on my side. I have installed VS 2010 shell on my machine and F# compiler 2.0. Both of them work fine. And then I installed IronPython and PTVS 1.1. Also they work fine too. But When I use VS 2010 shell to open an existing F# project I found that The compiler doesn't recognize the code correctly. It seems that Vs 2010 use the python code parser to parse the F# codes. Is the wrong behavior due to my improper option setting or other reason? Regards, Cheng ________________________________ From: ironpython-users-bounces+cheng-b.li=ubs.com at python.org [mailto:ironpython-users-bounces+cheng-b.li=ubs.com at python.org] On Behalf Of Dino Viehland Sent: 2011?12?8? 5:32 To: ironpython-users at python.org; python-announce-list at python.org Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 We?re pleased to announce the release of Python Tools for Visual Studio 1.1 Beta ( http://pytools.codeplex.com/releases/view/76089 ). Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python programming language. This release includes new core IDE features, a couple of new sample libraries for interacting with Kinect and Excel, and many bug fixes for issues reported since the release of 1.0. Since the last alpha release we?ve fixed over 30 bugs and implemented several features around the project system and references. For IronPython users you can now add references to .NET projects or .NET assemblies and we?ll automatically reload and re-analyze the references when they?re rebuilt. For CPython users you can now add a reference to a .pyd extension module and we?ll analyze the extension module and provide completions. We?ve also improved intellisense across multiple Python projects in the same solution. Finally we?ve added support for using IPython mode w/o PyLab - this enables out-of-line graphs and improves the startup time of the interactive window. We?ve also added many new features which improve the basic editing experience which were also available during 1.1 Alpha. This includes a feature for automatically adding imports after typing an identifier, a command for cleaning up unused imports, support for recognizing isinstance() calls and using them for providing improved completions, and using goto definition to go to members defined in the standard library. We?ve also made improvements to the project system so it?ll behave more like the C# including proper support of linked files outside of the project directory. And we?ve made some improvements to our IPython REPL support including support for inline graphs and proper support for IPython?s numbered prompts. Finally we?ve made several small improvements to the debugger including the option to step into the Python standard library while debugging, the option to not break on SystemExit exception with exit codes of zero as well a s displaying the Python thread name in the threads window. Altogether this release includes over 130 features and bug fixes since 1.0 - a complete list of the changes is available here: http://bit.ly/IpyTools11Beta1Fixes Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets. Once downloaded and installed these plug-in to Visual Studio and provide templates; and they provide built-in support for installing into one of the recognized Python interpreters via Tools->Python Tools->Samples. The PyKinect sample is a wrapper around the Kinect SDK and enables development with the Kinect SDK directly from Python. The library presents an API which is similar to the API exposed via the Kinect SDK for C# developers. The sample includes a new template for quickly getting started creating games using PyGame with PyKinect. PyKinect is licensed under a license similar to the existing Kinect SDK. Pyvot (pronounced Pivot) connects familiar data-exploration and visualization tools in Excel with the powerful data analysis and transformation capabilities of Python, with an emphasis on tabular data. It provides a simple and Pythonic interface to Excel, smoothing over the pain points in using the existing Excel object model as exposed via COM. We?d like to thank all of the users who took the time to report issues and feedback for this release: 445363200, Andrew, AphexSA, benpmorgan, chadbr, dgkbny, drgn, holmboe, hyh, jimpeak, juanalumni, lblanchon, liuzhenhai, mahpour, MichaelBaker, po6856, pztrick44, salerio, slide_o_mix, somini, SoonStudios, stakemura, sumitbasu, swift_dev, synergetic, teebot, timeisaparallax, tonyandrewmeyer, xavier_grundus, and Zooba. Thanks, The Python Tools for Visual Studio Team -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From dinov at microsoft.com Thu Dec 8 04:11:57 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 8 Dec 2011 03:11:57 +0000 Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 In-Reply-To: <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> References: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> Message-ID: <6C7ABA8B4E309440B857D74348836F2E4CC14217@TK5EX14MBXC292.redmond.corp.microsoft.com> That?s fixed in 1.1 beta. For 1.1 we did some work around file extensions and editor types which enables things like ?Open With? for non .py/.pyw files, ?Open With Encoding?, and registering Python as the default for extensionless files. As part of that work we registered the default file handler w/ too low a priority and broke languages which don?t have file extension registrations and instead get picked up by the default text editor. We?re now registered with a more appropriate priority. There?s a couple of different workarounds in this bug http://pytools.codeplex.com/workitem/599 if you don?t want to immediately upgrade to 1.1 Beta for some reason. From: Cheng-B.Li at ubs.com [mailto:Cheng-B.Li at ubs.com] Sent: Wednesday, December 07, 2011 6:05 PM To: Dino Viehland Cc: ironpython-users at python.org Subject: RE: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 Hi All, I'm currently using PTVS 1.1 alpha version. I think this tool is very useful in developing python projects. It makes it possible to leverage the power of Visual studio 10 and python. But I have one major problem on my side. I have installed VS 2010 shell on my machine and F# compiler 2.0. Both of them work fine. And then I installed IronPyth on and PTVS 1.1. Also they work fine too. But When I use VS 2010 shell to open an existing F# project I found that The compiler doesn't recognize the code correctly. It seems that Vs 2010 use the python code parser to parse the F# codes. Is the wrong behavior due to my improper option setting or other reason? Regards, Cheng ________________________________ From: ironpython-users-bounces+cheng-b.li=ubs.com at python.org [mailto:ironpython-users-bounces+cheng-b.li=ubs.com at python.org] On Behalf Of Dino Viehland Sent: 2011?12?8? 5:32 To: ironpython-users at python.org; python-announce-list at python.org Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 We?re pleased to announce the release of Python Tools for Visual Studio 1.1 Beta ( http://pytools.codeplex.com/releases/view/76089 ). Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python programming language. This release includes new core IDE features, a couple of new sample libraries for interacting with Kinect and Excel, and many bug fixes for issues reported since the release of 1.0. Since the last alpha release we?ve fixed over 30 bugs and implemented several features around the project system and references. For IronPython users you can now add references to .NET projects or .NET assemblies and we?ll automatically reload and re-analyze the references when they?re rebuilt. For CPython users you can now add a reference to a .pyd extension module and we?ll analyze the extension module and provide completions. We?ve also improved intellisense across multiple Python projects in the same solution. Finally we?ve added support for using IPython mode w/o PyLab - this enables out-of-line graphs and improves the startup time of the interactive window. We?ve also added many new features which improve the basic editing experience which were also available during 1.1 Alpha. This includes a feature for automatically adding imports after typing an identifier, a command for cleaning up unused imports, support for recognizing isinstance() calls and using them for providing improved completions, and using goto definition to go to members defined in the standard library. We?ve also made improvements to the project system so it?ll behave more like the C# including proper support of linked files outside of the project directory. And we?ve made some improvements to our IPython REPL support including support for inline graphs and proper support for IPython?s numbered prompts. Finally we?ve made several small improvements to the debugger including the option to step into the Python standard library while debugging, the option to not break on SystemExit exception with exit codes of zero as well as displaying the Python thread name in the threads window. Altogether this release includes over 130 features and bug fixes since 1.0 - a complete list of the changes is available here: http://bit.ly/IpyTools11Beta1Fixes Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets. Once downloaded and installed these plug-in to Visual Studio and provide templates; and they provide built-in support for installing into one of the recognized Python interpreters via Tools->Python Tools->Samples. The PyKinect sample is a wrapper around the Kinect SDK and enables development with the Kinect SDK directly from Python. The library presents an API which is similar to the API exposed via the Kinect SDK for C# developers. The sample includes a new template for quickly getting started creating games using PyGame with PyKinect. PyKinect is licensed under a license similar to the existing Kinect SDK. Pyvot (pronounced Pivot) connects familiar data-exploration and visualization tools in Excel with the powerful data analysis and transformation capabilities of Python, with an emphasis on tabular data. It provides a simple and Pythonic interface to Excel, smoothing over the pain points in using the existing Excel object model as exposed via COM. We?d like to thank all of the users who took the time to report issues and feedback for this release: 445363200, Andrew, AphexSA, benpmorgan, chadbr, dgkbny, drgn, holmboe, hyh, jimpeak, juanalumni, lblanchon, liuzhenhai, mahpour, MichaelBaker, po6856, pztrick44, salerio, slide_o_mix, somini, SoonStudios, stakemura, sumitbasu, swift_dev, synergetic, teebot, timeisaparallax, tonyandrewmeyer, xavier_grundus, and Zooba. Thanks, The Python Tools for Visual Studio Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cheng-B.Li at ubs.com Thu Dec 8 07:28:42 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Thu, 8 Dec 2011 14:28:42 +0800 Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta1 In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> Message-ID: <47CC258F987F9F4D9728BD2C2F71907DD1519E@nhkg1140pex.ubsw.net> Much Thx,. Thanks for your efforts! I love Iron Python! ________________________________ From: Shahrokh Mortazavi [mailto:smortaz at exchange.microsoft.com] Sent: 2011?12?8? 13:08 To: Li, Cheng-B; Dino Viehland Cc: ironpython-users at python.org Subject: RE: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta1 Hi Cheng-B! This is a known bug & is fixed in Beta (link below). Please uninstall Alpha & install this version & the problem will go away. Our apologies! s From: ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto:ironpython-users-bounces+smortaz=microsoft.com at python.org] On Behalf Of Cheng-B.Li at ubs.com Sent: Wednesday, December 07, 2011 6:05 PM To: Dino Viehland Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 Hi All, I'm currently using PTVS 1.1 alpha version. I think this tool is very useful in developing python projects. It makes it possible to leverage the power of Visual studio 10 and python. But I have one major problem on my side. I have installed VS 2010 shell on my machine and F# compiler 2.0. Both of them work fine. And then I installed IronPython and PTVS 1.1. Also they work fine too. But When I use VS 2010 shell to open an existing F# project I found that The compiler doesn't recognize the code correctly. It seems that Vs 2010 use the python code parser to parse the F# codes. Is the wrong behavior due to my improper option setting or other reason? Regards, Cheng ________________________________ From: ironpython-users-bounces+cheng-b.li=ubs.com at python.org [mailto:ironpython-users-bounces+cheng-b.li=ubs.com at python.org] On Behalf Of Dino Viehland Sent: 2011?12?8? 5:32 To: ironpython-users at python.org; python-announce-list at python.org Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 We?re pleased to announce the release of Python Tools for Visual Studio 1.1 Beta ( http://pytools.codeplex.com/releases/view/76089 ). Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python programming language. This release includes new core IDE features, a couple of new sample libraries for interacting with Kinect and Excel, and many bug fixes for issues reported since the release of 1.0. Since the last alpha release we?ve fixed over 30 bugs and implemented several features around the project system and references. For IronPython users you can now add references to .NET projects or .NET assemblies and we?ll automatically reload and re-analyze the references when they?re rebuilt. For CPython users you can now add a reference to a .pyd extension module and we?ll analyze the extension module and provide completions. We?ve also improved intellisense across multiple Python projects in the same solution. Finally we?ve added support for using IPython mode w/o PyLab - this enables out-of-line graphs and improves the startup time of the interactive window. We?ve also added many new features which improve the basic editing experience which were also available during 1.1 Alpha. This includes a feature for automatically adding imports after typing an identifier, a command for cleaning up unused imports, support for recognizing isinstance() calls and using them for providing improved completions, and using goto definition to go to members defined in the standard library. We?ve also made improvements to the project system so it?ll behave more like the C# including proper support of linked files outside of the project directory. And we?ve made some improvements to our IPython REPL support including support for inline graphs and proper support for IPython?s numbered prompts. Finally we?ve made several small improvements to the debugger including the option to step into the Python standard library while debugging, the option to not break on SystemExit exception with exit codes of zero as wel l as displaying the Python thread name in the threads window. Altogether this release includes over 130 features and bug fixes since 1.0 - a complete list of the changes is available here: http://bit.ly/IpyTools11Beta1Fixes Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets. Once downloaded and installed these plug-in to Visual Studio and provide templates; and they provide built-in support for installing into one of the recognized Python interpreters via Tools->Python Tools->Samples. The PyKinect sample is a wrapper around the Kinect SDK and enables development with the Kinect SDK directly from Python. The library presents an API which is similar to the API exposed via the Kinect SDK for C# developers. The sample includes a new template for quickly getting started creating games using PyGame with PyKinect. PyKinect is licensed under a license similar to the existing Kinect SDK. Pyvot (pronounced Pivot) connects familiar data-exploration and visualization tools in Excel with the powerful data analysis and transformation capabilities of Python, with an emphasis on tabular data. It provides a simple and Pythonic interface to Excel, smoothing over the pain points in using the existing Excel object model as exposed via COM. We?d like to thank all of the users who took the time to report issues and feedback for this release: 445363200, Andrew, AphexSA, benpmorgan, chadbr, dgkbny, drgn, holmboe, hyh, jimpeak, juanalumni, lblanchon, liuzhenhai, mahpour, MichaelBaker, po6856, pztrick44, salerio, slide_o_mix, somini, SoonStudios, stakemura, sumitbasu, swift_dev, synergetic, teebot, timeisaparallax, tonyandrewmeyer, xavier_grundus, and Zooba. Thanks, The Python Tools for Visual Studio Team -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From m.schaber at 3s-software.com Thu Dec 8 14:09:40 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Thu, 8 Dec 2011 13:09:40 +0000 Subject: [Ironpython-users] Private binding and protected members Message-ID: <727D8E16AE957149B447FE368139F2B508C6C421@SERVER10> Hi, It seems that private binding does not allow access to protected members of public classes. I'm curious about the rationale - it is possible to access those members even without private binding just by deriving your own class, so why are they not enabled by private binding? And it's not a security issue (as with private binding, all bets are off nevertheless). 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Thu Dec 8 14:28:57 2011 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Thu, 8 Dec 2011 05:28:57 -0800 Subject: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i parameter Message-ID: Hi All, I'm running the latest IronPython 2.7.1 and I'm not seeing the prompts with the -i parameter. It works without the -i but not luck trying execute a script then continuing to interactive mode. I notice that in the PythonCommandLine the Prompt field has been overridden. It tries to get the variable "ps1" if that doesn't exist it returns "". The only problem the ps1 variable is not created when executing a file. I just wanted to confirm if this is an issue. Thanks Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From smortaz at exchange.microsoft.com Thu Dec 8 06:08:19 2011 From: smortaz at exchange.microsoft.com (Shahrokh Mortazavi) Date: Thu, 8 Dec 2011 05:08:19 +0000 Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 In-Reply-To: <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> References: <6C7ABA8B4E309440B857D74348836F2E4CC12A38@TK5EX14MBXC292.redmond.corp.microsoft.com> <47CC258F987F9F4D9728BD2C2F71907DD150FE@nhkg1140pex.ubsw.net> Message-ID: Hi Cheng-B! This is a known bug & is fixed in Beta (link below). Please uninstall Alpha & install this version & the problem will go away. Our apologies! s From: ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto:ironpython-users-bounces+smortaz=microsoft.com at python.org] On Behalf Of Cheng-B.Li at ubs.com Sent: Wednesday, December 07, 2011 6:05 PM To: Dino Viehland Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 Hi All, I'm currently using PTVS 1.1 alpha version. I think this tool is very useful in developing python projects. It makes it possible to leverage the power of Visual studio 10 and python. But I have one major problem on my side. I have installed VS 2010 shell on my machine and F# compiler 2.0. Both of them work fine. And then I installed IronPython and PTVS 1.1. Also they work fine too. But When I use VS 2010 shell to open an existing F# project I found that The compiler doesn't recognize the code correctly. It seems that Vs 2010 use the python code parser to parse the F# codes. Is the wrong behavior due to my improper option setting or other reason? Regards, Cheng ________________________________ From: ironpython-users-bounces+cheng-b.li=ubs.com at python.org [mailto:ironpython-users-bounces+cheng-b.li=ubs.com at python.org] On Behalf Of Dino Viehland Sent: 2011?12?8? 5:32 To: ironpython-users at python.org; python-announce-list at python.org Subject: [Ironpython-users] ANN: Python Tools for Visual Studio 1.1 Beta 1 We?re pleased to announce the release of Python Tools for Visual Studio 1.1 Beta ( http://pytools.codeplex.com/releases/view/76089 ). Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python programming language. This release includes new core IDE features, a couple of new sample libraries for interacting with Kinect and Excel, and many bug fixes for issues reported since the release of 1.0. Since the last alpha release we?ve fixed over 30 bugs and implemented several features around the project system and references. For IronPython users you can now add references to .NET projects or .NET assemblies and we?ll automatically reload and re-analyze the references when they?re rebuilt. For CPython users you can now add a reference to a .pyd extension module and we?ll analyze the extension module and provide completions. We?ve also improved intellisense across multiple Python projects in the same solution. Finally we?ve added support for using IPython mode w/o PyLab - this enables out-of-line graphs and improves the startup time of the interactive window. We?ve also added many new features which improve the basic editing experience which were also available during 1.1 Alpha. This includes a feature for automatically adding imports after typing an identifier, a command for cleaning up unused imports, support for recognizing isinstance() calls and using them for providing improved completions, and using goto definition to go to members defined in the standard library. We?ve also made improvements to the project system so it?ll behave more like the C# including proper support of linked files outside of the project directory. And we?ve made some improvements to our IPython REPL support including support for inline graphs and proper support for IPython?s numbered prompts. Finally we?ve made several small improvements to the debugger including the option to step into the Python standard library while debugging, the option to not break on SystemExit exception with exit codes of zero as well as displaying the Python thread name in the threads window. Altogether this release includes over 130 features and bug fixes since 1.0 - a complete list of the changes is available here: http://bit.ly/IpyTools11Beta1Fixes Another major addition to 1.1 includes the addition of two additional sample libraries available as separate downloads: PyKinect for working with the Kinect Beta SDK and Pyvot for working with Excel spreadsheets. Once downloaded and installed these plug-in to Visual Studio and provide templates; and they provide built-in support for installing into one of the recognized Python interpreters via Tools->Python Tools->Samples. The PyKinect sample is a wrapper around the Kinect SDK and enables development with the Kinect SDK directly from Python. The library presents an API which is similar to the API exposed via the Kinect SDK for C# developers. The sample includes a new template for quickly getting started creating games using PyGame with PyKinect. PyKinect is licensed under a license similar to the existing Kinect SDK. Pyvot (pronounced Pivot) connects familiar data-exploration and visualization tools in Excel with the powerful data analysis and transformation capabilities of Python, with an emphasis on tabular data. It provides a simple and Pythonic interface to Excel, smoothing over the pain points in using the existing Excel object model as exposed via COM. We?d like to thank all of the users who took the time to report issues and feedback for this release: 445363200, Andrew, AphexSA, benpmorgan, chadbr, dgkbny, drgn, holmboe, hyh, jimpeak, juanalumni, lblanchon, liuzhenhai, mahpour, MichaelBaker, po6856, pztrick44, salerio, slide_o_mix, somini, SoonStudios, stakemura, sumitbasu, swift_dev, synergetic, teebot, timeisaparallax, tonyandrewmeyer, xavier_grundus, and Zooba. Thanks, The Python Tools for Visual Studio Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Dec 8 18:05:49 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 8 Dec 2011 09:05:49 -0800 Subject: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i parameter In-Reply-To: References: Message-ID: On Thu, Dec 8, 2011 at 5:28 AM, Daniel Fernandez wrote: > Hi All, > > I'm running the latest IronPython 2.7.1 and I'm not seeing the prompts with > the -i parameter. It works without the -i but not luck trying execute a > script then continuing to interactive mode. > > I notice that in the PythonCommandLine the Prompt field has been overridden. > It tries to get the variable "ps1" if that doesn't exist it returns "". The > only problem the ps1 variable is not created when executing a file.?I just > wanted to confirm if this is an issue. There were changes to -i handling in 2.7.1 so it's quite possible. I did test it, though, so I'm not sure what's going on. Can you open an issue on Codeplex? I'll take a look when I get a chance. - Jeff From fernandez_dan2 at hotmail.com Fri Dec 9 02:31:16 2011 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Thu, 8 Dec 2011 17:31:16 -0800 Subject: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i parameter In-Reply-To: References: , Message-ID: Hi Jeff, I have created #31908 for this issue. I can take a look at it too, is there a time frame for 2.7.2? Thanks Danny > Date: Thu, 8 Dec 2011 09:05:49 -0800 > Subject: Re: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i parameter > From: jdhardy at gmail.com > To: fernandez_dan2 at hotmail.com > CC: ironpython-users at python.org > > On Thu, Dec 8, 2011 at 5:28 AM, Daniel Fernandez > wrote: > > Hi All, > > > > I'm running the latest IronPython 2.7.1 and I'm not seeing the prompts with > > the -i parameter. It works without the -i but not luck trying execute a > > script then continuing to interactive mode. > > > > I notice that in the PythonCommandLine the Prompt field has been overridden. > > It tries to get the variable "ps1" if that doesn't exist it returns "". The > > only problem the ps1 variable is not created when executing a file. I just > > wanted to confirm if this is an issue. > > There were changes to -i handling in 2.7.1 so it's quite possible. I > did test it, though, so I'm not sure what's going on. Can you open an > issue on Codeplex? I'll take a look when I get a chance. > > - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Dec 9 05:24:11 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 8 Dec 2011 20:24:11 -0800 Subject: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i parameter In-Reply-To: References: Message-ID: I'm shooting for a late February release. There's a calendar that I really need to fill out more at http://bit.ly/ironpython_release_schedule. The idea is to do a release roughly every four months, if there's enough patches to make it worthwhile. - Jeff On Thu, Dec 8, 2011 at 5:31 PM, Daniel Fernandez wrote: > Hi Jeff, > > I have created #31908 for this issue.?I can take a look at it too, is there > a time frame for 2.7.2? > > Thanks > > Danny > > >> Date: Thu, 8 Dec 2011 09:05:49 -0800 >> Subject: Re: [Ironpython-users] IronPython 2.7.1 Missing Prompts with -i >> parameter >> From: jdhardy at gmail.com >> To: fernandez_dan2 at hotmail.com >> CC: ironpython-users at python.org > >> >> On Thu, Dec 8, 2011 at 5:28 AM, Daniel Fernandez >> wrote: >> > Hi All, >> > >> > I'm running the latest IronPython 2.7.1 and I'm not seeing the prompts >> > with >> > the -i parameter. It works without the -i but not luck trying execute a >> > script then continuing to interactive mode. >> > >> > I notice that in the PythonCommandLine the Prompt field has been >> > overridden. >> > It tries to get the variable "ps1" if that doesn't exist it returns "". >> > The >> > only problem the ps1 variable is not created when executing a file.?I >> > just >> > wanted to confirm if this is an issue. >> >> There were changes to -i handling in 2.7.1 so it's quite possible. I >> did test it, though, so I'm not sure what's going on. Can you open an >> issue on Codeplex? I'll take a look when I get a chance. >> >> - Jeff From no_reply at codeplex.com Fri Dec 9 14:05:29 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 9 Dec 2011 05:05:29 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/8/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] 2.7.1 Missing Prompts with -i parameter? 2. [New issue] IronPython does not support marshaling of python code objects 3. [New comment] IronPython does not support marshaling of python code objects 4. [New comment] Missing projects - build is broken right after download 5. [New comment] AttributeError: 'file' object has no attribute 'readinto',but Cpython has this attribute. 6. [New comment] AttributeError: 'file' object has no attribute 'readinto',but Cpython has this attribute. 7. [Status update] Load a new project error 8. [Status update] Running IronPython on a background thread in Silverlight ---------------------------------------------- ISSUES 1. [New issue] 2.7.1 Missing Prompts with -i parameter? http://ironpython.codeplex.com/workitem/31908 User fdanny has proposed the issue: "Executing a python script with the -i parameter the prompt message is missing. An example would be ipy.exe -i , with any python file would reproduce the issue."----------------- 2. [New issue] IronPython does not support marshaling of python code objects http://ironpython.codeplex.com/workitem/31909 User slide_o_mix has proposed the issue: "The zipimport test package uses the test_support module which has a method to create a pyc in memory. When IronPython is used, the marshal.dumps method raises a ValueError because the IronPython.Runtime.FunctionCode object is not one that is listed in the marshal.cs file for marshaling."----------------- 3. [New comment] IronPython does not support marshaling of python code objects http://ironpython.codeplex.com/workitem/31909 User slide_o_mix has commented on the issue: "Another part of this is that IronPython does not support bytecode, which is used by the marshal module for marshaling code objects."----------------- 4. [New comment] Missing projects - build is broken right after download http://ironpython.codeplex.com/workitem/28658 User slide_o_mix has commented on the issue: "Is this still an issue with 2.7?"----------------- 5. [New comment] AttributeError: 'file' object has no attribute 'readinto',but Cpython has this attribute. http://ironpython.codeplex.com/workitem/23801 User slide_o_mix has commented on the issue: "This is the doc info for the file.readinto "readinto() -> Undocumented. Don't use this; it may go away." For compatibility sake, should implement it, but it probably should not be used."----------------- 6. [New comment] AttributeError: 'file' object has no attribute 'readinto',but Cpython has this attribute. http://ironpython.codeplex.com/workitem/23801 User slide_o_mix has commented on the issue: "This looks like its implemented in the latest trunk at least. See _fileio.cs"----------------- 7. [Status update] Load a new project error http://ironpython.codeplex.com/workitem/30982 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "IronPython Tools are deprecated in favor of PTVS (http://pytools.codeplex.com/)"----------------- 8. [Status update] Running IronPython on a background thread in Silverlight http://ironpython.codeplex.com/workitem/31224 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Duplicate of 31223" ---------------------------------------------- ---------------------------------------------- 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 Dec 11 09:47:26 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 11 Dec 2011 00:47:26 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/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] Ironpython 2.7.1 on Windows 7 64bit Machines ---------------------------------------------- ISSUES 1. [New issue] Ironpython 2.7.1 on Windows 7 64bit Machines http://ironpython.codeplex.com/workitem/31918 User dawnsummit has proposed the issue: "It can be installed normally, however, ipy.exe or ipy64.exe doesn't work. there is always an error when it is opened. please see the attachment for more details. thanks. it seems that the problem is related with the file "Microsoft.Dynamic.Dll"." ---------------------------------------------- ---------------------------------------------- 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 jdhardy at gmail.com Sun Dec 11 21:13:16 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 11 Dec 2011 12:13:16 -0800 Subject: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 Message-ID: Does anyone have an objections to removing the IronPython Tools for VS from 2.7.2? They're already disabled by default, they're a small annoyance to keep building, and the Python Tools for VS are so much better that I see no point in continuing to include them. - Jeff From slide.o.mix at gmail.com Sun Dec 11 22:24:45 2011 From: slide.o.mix at gmail.com (Slide) Date: Sun, 11 Dec 2011 14:24:45 -0700 Subject: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 In-Reply-To: References: Message-ID: On Sun, Dec 11, 2011 at 1:13 PM, Jeff Hardy wrote: > Does anyone have an objections to removing the IronPython Tools for VS > from 2.7.2? They're already disabled by default, they're a small > annoyance to keep building, and the Python Tools for VS are so much > better that I see no point in continuing to include them. > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > I'd say definitely do it. -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From smortaz at exchange.microsoft.com Sun Dec 11 22:51:34 2011 From: smortaz at exchange.microsoft.com (Shahrokh Mortazavi) Date: Sun, 11 Dec 2011 21:51:34 +0000 Subject: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 In-Reply-To: References: Message-ID: +1. Slightly biased tho. From: ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto:ironpython-users-bounces+smortaz=microsoft.com at python.org] On Behalf Of Slide Sent: Sunday, December 11, 2011 1:25 PM To: Jeff Hardy Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 On Sun, Dec 11, 2011 at 1:13 PM, Jeff Hardy > wrote: Does anyone have an objections to removing the IronPython Tools for VS from 2.7.2? They're already disabled by default, they're a small annoyance to keep building, and the Python Tools for VS are so much better that I see no point in continuing to include them. - Jeff _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users I'd say definitely do it. -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Mon Dec 12 00:00:34 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Sun, 11 Dec 2011 18:00:34 -0500 Subject: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 In-Reply-To: References: Message-ID: <-4906881028286642027@unknownmsgid> I'm ok with removing the IronPython tools from the installer, but IronRuby's next release will most likely still use IronStudio, so I'd be careful removing it from git. ~Jimmy On Dec 11, 2011, at 4:53 PM, Shahrokh Mortazavi < smortaz at exchange.microsoft.com> wrote: +1. Slightly biased tho. *From:* ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto: ironpython-users-bounces+smortaz=microsoft.com at python.org] *On Behalf Of * Slide *Sent:* Sunday, December 11, 2011 1:25 PM *To:* Jeff Hardy *Cc:* ironpython-users at python.org *Subject:* Re: [Ironpython-users] Removal of IronPython Tools for Visual Studio from 2.7.2 On Sun, Dec 11, 2011 at 1:13 PM, Jeff Hardy wrote: Does anyone have an objections to removing the IronPython Tools for VS from 2.7.2? They're already disabled by default, they're a small annoyance to keep building, and the Python Tools for VS are so much better that I see no point in continuing to include them. - Jeff _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users I'd say definitely do it. -- slide-o-blog http://slide-o-blog.blogspot.com/ _______________________________________________ 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 no_reply at codeplex.com Mon Dec 12 11:05:44 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 12 Dec 2011 02:05:44 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/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] Ironpython 2.7.1 on Windows 7 64bit Machines 2. [New comment] Ironpython 2.7.1 on Windows 7 64bit Machines 3. [New comment] IPy version string somewhat misleading. ---------------------------------------------- ISSUES 1. [New comment] Ironpython 2.7.1 on Windows 7 64bit Machines http://ironpython.codeplex.com/workitem/31918 User jdhardy has commented on the issue: "Someone who can read that error message is going to need to translate it to English before much can be done."----------------- 2. [New comment] Ironpython 2.7.1 on Windows 7 64bit Machines http://ironpython.codeplex.com/workitem/31918 User vernondcole has commented on the issue: "I just tried an installation of 2.7.1 onto a virgin (never had IronPython installed before) Windows 7 Home Premium 64 bit machine with English/United States localization. ipy64.exe and ipy.exe both work fine. Therefore, we must guess that the problem is somehow connected to internationalization or localities. What nation/location are you using? If you change your localization to use a western script does the problem go away? "----------------- 3. [New comment] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31420 User vernondcole has commented on the issue: "I noticed today that ipy64.exe also emits the same version information. It would probably also be useful to state whether the 64 or 32 bit implementation is in use. This could be very helpful to uncover some errors, such as the way that 32 and 64 bit COM fail to interact -- 64 bit python trying to control 32 bit Word for example. " ---------------------------------------------- ---------------------------------------------- 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 waitmeforever at hotmail.com Mon Dec 12 20:15:47 2011 From: waitmeforever at hotmail.com (=?utf-8?B?5qWKIOmInuWHsQ==?=) Date: Mon, 12 Dec 2011 19:15:47 +0000 Subject: [Ironpython-users] =?utf-8?q?Visual_studio_C=23_using_IronPython_?= =?utf-8?q?=22no_module_named_ssl=22_import_error=E2=80=8F?= Message-ID: Hello Everyone, I want to use Ironpython to call a simple ssl socket test programbut I got a ImportException error called "no module named ssl".Strange thing is I can import socket and run as "import socket".(tested with another simple socket program without ssl)But I cant import ssl as "import ssl" and got a big error, Any tips?My code in c# to call python:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using IronPython.Hosting;using Microsoft.Scripting.Hosting;namespace test{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { ScriptRuntime pyRuntime = Python.CreateRuntime(); dynamic obj = pyRuntime.UseFile("sslsocket.py"); string response = obj.openssl("hello"); if (response == "true") MessageBox.Show("success", "success", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); this.Close(); }}And the sslsocket.py code is:import socketimport ssldef openssl(data): HOST = '192.168.1.6' PORT = 1234 d = data.encode('utf-8') s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssl_sock = ssl.wrap_socket(s,ca_certs="C:\Users\test\Documents\Visual Studio 2008\Projects\testupload\root.crt",cert_reqs=ssl.CERT_NONE) ssl_sock.connect((HOST, PORT)) ssl_sock.send(d) ssl_sock.close() return "true"Platform: Win7 32 bit, Python 2.7, Visual studio 2010, IronPython 2.7.1(latest one) PS.If this mail appeared twice, my bad >.< -------------- next part -------------- An HTML attachment was scrubbed... URL: From waitmeforever at hotmail.com Mon Dec 12 20:07:10 2011 From: waitmeforever at hotmail.com (=?big5?B?t6ggtnazzQ==?=) Date: Mon, 12 Dec 2011 19:07:10 +0000 Subject: [Ironpython-users] Visual studio C# "no module named ssl" import error In-Reply-To: References: Message-ID: Hello Everyone, I want to use Ironpython to call a simple ssl socket test program but I got a ImportException error called "no module named ssl". Strange thing is I can import socket and run as "import socket".(tested with another simple socket program without ssl) But I cant import ssl as "import ssl" and got a big error, Any tips? My code in c# to call python: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms; using IronPython.Hosting;using Microsoft.Scripting.Hosting; namespace test{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { ScriptRuntime pyRuntime = Python.CreateRuntime(); dynamic obj = pyRuntime.UseFile("sslsocket.py"); string response = obj.openssl("hello"); if (response == "true") MessageBox.Show("success", "success", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); this.Close(); }} And the sslsocket.py code is: import socketimport ssl def openssl(data): HOST = '192.168.1.6' PORT = 1234 d = data.encode('utf-8') s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssl_sock = ssl.wrap_socket(s,ca_certs="C:\Users\test\Documents\Visual Studio 2008\Projects\testupload\root.crt",cert_reqs=ssl.CERT_NONE) ssl_sock.connect((HOST, PORT)) ssl_sock.send(d) ssl_sock.close() return "true" Platform: Win7 32 bit, Python 2.7, Visual studio 2010, IronPython 2.7.1(latest one) -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Dec 12 20:58:51 2011 From: slide.o.mix at gmail.com (Slide) Date: Mon, 12 Dec 2011 12:58:51 -0700 Subject: [Ironpython-users] Visual studio C# "no module named ssl" import error In-Reply-To: References: Message-ID: socket is provided via IronPython.Modules, but only _ssl (the "native" module) is implemented in IronPython.Modules. You would need the Python stdlib which has the ssl module (which uses _ssl). Thanks, slide 2011/12/12 ? ?? > Hello Everyone, I want to use Ironpython to call a simple ssl socket > test program > > but I got a ImportException error called "no module named ssl". > > Strange thing is I can import socket and run as "import socket".(tested > with another simple socket program without ssl) > > But I cant import ssl as "import ssl" and got a big error, Any tips? > > My code in c# to call python: > > using System; > using System.Collections.Generic; > using System.ComponentModel; > using System.Data; > using System.Drawing; > using System.Linq; > using System.Text; > using System.Windows.Forms; > > using IronPython.Hosting; > using Microsoft.Scripting.Hosting; > > namespace test > { > public partial class Form1 : Form > { > public Form1() > { > InitializeComponent(); > } > > private void button1_Click(object sender, EventArgs e) > { > ScriptRuntime pyRuntime = Python.CreateRuntime(); > > dynamic obj = pyRuntime.UseFile("sslsocket.py"); > > string response = obj.openssl("hello"); > > if (response == "true") > MessageBox.Show("success", "success", > MessageBoxButtons.OK, MessageBoxIcon.Exclamation); > > &nbs p; this.Close(); > } > } > > And the sslsocket.py code is: > > import socket > import ssl > > def openssl(data): > HOST = '192.168.1.6' > PORT = 1234 > d = data.encode('utf-8') > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > ssl_sock = ssl.wrap_socket(s,ca_certs="C:\Users\test\Documents\Visual > Studio 2008\Projects\testupload\root.crt",cert_reqs=ssl.CERT_NONE) > ssl_sock.connect((HOST, PORT)) > ** ssl_sock.send(d) > ssl_sock.close() > return "true" > > Platform: Win7 32 bit, Python 2.7, Visual studio 2010, IronPython > 2.7.1(latest one) > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cheng-B.Li at ubs.com Tue Dec 13 03:16:29 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Tue, 13 Dec 2011 10:16:29 +0800 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> Message-ID: <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> Hi Jason, I used your recommended way to install the numpy and scipy packages. It works fine for numpy but failed on scipy. I put the python source file under lib/site-packages and the dlls under the folder IronPython 2.7.1/DLLs. The error messgae reads as follows: Traceback (most recent call last): File "", line 1, in File "C:\Program Files\IronPython 2.7.1\lib\site-packages\scipy\__init__.py", line 124, in pkgload = PackageLoader() File "C:\Program Files\IronPython 2.7.1\lib\site-packages\numpy\_import_tools.py", line 15, in __init__ self.parent_frame = frame = sys._getframe(_level) AttributeError: 'module' object has no attribute '_getframe' Do you know where the problem lies. Much thx. Regards, Cheng ________________________________ From: Li, Cheng-B Sent: 2011?12?6? 10:20 To: 'Jason McCampbell' Cc: ironpython-users at python.org Subject: RE: FW: How to install Scipy and Numpy for .net offline? Hi Jason, Don't worry. The internet problem is due to my internet connection's restriction. There is nothing wrong on your side. I'll try to install it manually. Thx for your kindly reply! Regards, Cheng ________________________________ From: Jason McCampbell [mailto:jmccampbell at enthought.com] Sent: 2011?12?5? 22:48 To: Li, Cheng-B Cc: ironpython-users at python.org Subject: Re: FW: How to install Scipy and Numpy for .net offline? Hi Cheng, That's odd that the installation isn't working correctly. If you are seeing any error messages please send them to me and I'll take a look. You can install the eggs manually. Each egg file is just a ZIP archive with some defined metadata in it. If you extract the numpy and scipy eggs, you will get a directory named 'numpy' or 'scipy' plus an 'EGG-INFO' directory. Move the numpy or scipy directory to the lib/site-packages directory under your IronPython installation. There are also some DLL files in each egg under EGG-INFO/prefix/DLLs. Each of the DLL files should be copied to the DLLs directory under your IronPython install tree. After that you should be able to use both packages as though you used the automatic installer. Please let me know if you have any trouble getting this to work or any other questions. Regards, Jason From: ironpython-users-bounces+smortaz=microsoft.com at python.org [mailto:ironpython-users-bounces+smortaz =microsoft.com at python.org] On Behalf Of Cheng-B.Li at ubs.com Sent: Saturday, December 03, 2011 2:44 AM To: ironpython-users at python.org Subject: [Ironpython-users] How to install Scipy and Numpy for .net offline? Hi Everyone, I am a newbie to Iron python. I find the below link is very useful since it make the scipy and numpy usable in ironpython http://www.enthought.com/repo/.iron/ Unfortunately the installation is done automatically on line. Due to some reason I can't install them in this way. I have just download the eggs from that site. But I don't know what should I do next.. Is there anyone have encountered the same problem and resolved it? Regards, Cheng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From zgramana at pottsconsultinggroup.com Tue Dec 13 03:22:01 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Mon, 12 Dec 2011 21:22:01 -0500 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> Message-ID: Try running: ipy.exe -X:FullFrames ... On Dec 12, 2011, at 21:16, wrote: > self.parent_frame = frame = sys._getframe(_level) > AttributeError: 'module' object has no attribute '_getframe From waitmeforever at hotmail.com Tue Dec 13 08:29:18 2011 From: waitmeforever at hotmail.com (=?big5?B?t6ggtnazzQ==?=) Date: Tue, 13 Dec 2011 07:29:18 +0000 Subject: [Ironpython-users] FW: Visual studio C# "no module named ssl" import error In-Reply-To: References: , , , Message-ID: Good Day!~~ Thanks for your fast reply. So there is _ssl module in IronPython, but no ssl module, and I need to find a standard library to call _ssl module, am I right? C has stdlib module so I can do such as , but seems there is no module called stdlib in IronPython.(Import error again >.<) Can you be more specific about Python stdlib(standard library) which has ssl module to call _ssl? Or could you tell me how to use Python "ssl.py" (I found it under Python/lib folder) to let things work if this is the one I needed. Thank you very much ^ ^ KayDate: Mon, 12 Dec 2011 12:58:51 -0700 Subject: Re: [Ironpython-users] Visual studio C# "no module named ssl" import error From: slide.o.mix at gmail.com To: waitmeforever at hotmail.com CC: ironpython-users at python.org socket is provided via IronPython.Modules, but only _ssl (the "native" module) is implemented in IronPython.Modules. You would need the Python stdlib which has the ssl module (which uses _ssl). Thanks, slide 2011/12/12 ? ?? Hello Everyone, I want to use Ironpython to call a simple ssl socket test program but I got a ImportException error called "no module named ssl". Strange thing is I can import socket and run as "import socket".(tested with another simple socket program without ssl) But I cant import ssl as "import ssl" and got a big error, Any tips? My code in c# to call python: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing; using System.Linq;using System.Text;using System.Windows.Forms; using IronPython.Hosting;using Microsoft.Scripting.Hosting; namespace test { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { ScriptRuntime pyRuntime = Python.CreateRuntime(); dynamic obj = pyRuntime.UseFile("sslsocket.py"); string response = obj.openssl("hello"); if (response == "true") MessageBox.Show("success", "success", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); &nbs p; this.Close(); }} And the sslsocket.py code is: import socketimport ssl def openssl(data): HOST = '192.168.1.6' PORT = 1234 d = data.encode('utf-8') s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssl_sock = ssl.wrap_socket(s,ca_certs="C:\Users\test\Documents\Visual Studio 2008\Projects\testupload\root.crt",cert_reqs=ssl.CERT_NONE) ssl_sock.connect((HOST, PORT)) ssl_sock.send(d) ssl_sock.close() return "true" Platform: Win7 32 bit, Python 2.7, Visual studio 2010, IronPython 2.7.1(latest one) _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cheng-B.Li at ubs.com Tue Dec 13 10:09:50 2011 From: Cheng-B.Li at ubs.com (Cheng-B.Li at ubs.com) Date: Tue, 13 Dec 2011 17:09:50 +0800 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> Message-ID: <47CC258F987F9F4D9728BD2C2F71907DD1582F@nhkg1140pex.ubsw.net> Is there a way to make it work when I use the Python Tools For Visual Studio? -----Original Message----- From: Zachary Gramana [mailto:zgramana at pottsconsultinggroup.com] Sent: 2011?12?13? 10:22 To: Li, Cheng-B Cc: Subject: Re: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? Try running: ipy.exe -X:FullFrames ... On Dec 12, 2011, at 21:16, wrote: > self.parent_frame = frame = sys._getframe(_level) > AttributeError: 'module' object has no attribute '_getframe Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. From no_reply at codeplex.com Tue Dec 13 14:11:25 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 13 Dec 2011 05:11:25 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/12/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] IP 2.7.1 xml.etree.Elementree#iterparse is not working 2. [New issue] Why is calling a Python lambda expression from C# not thread-safe? 3. [New issue] Why is calling a Python lambda expression from C# not thread-safe? 4. [New comment] Why is calling a Python lambda expression from C# not thread-safe? 5. [New comment] IPy version string somewhat misleading. ---------------------------------------------- ISSUES 1. [New issue] IP 2.7.1 xml.etree.Elementree#iterparse is not working http://ironpython.codeplex.com/workitem/31923 User mkorpela has proposed the issue: "from StringIO import StringIO as S from xml.etree import ElementTree as ET ET.iterparse(S('')) --> AttributeError: TreeBuilder instance has no attribute '_parser' Seems that SimpleXMLTreeBuilder.TreeBuilder or xmllib.XMLParser should have this for iterparser to work (or the sys.platform == 'cli' part should be changed in ElementTree.py). Anyway completely makes it impossible to use iterparse in xml.etree with ironpython."----------------- 2. [New issue] Why is calling a Python lambda expression from C# not thread-safe? http://ironpython.codeplex.com/workitem/31924 User Rauhotz has proposed the issue: "I define a side-effect-free (pure) lambda expression in IronPython and assign it to a C# delegate. When invoking the delegate simultaneously from multiple threads i get exceptions of type **AccessViolationException**, **NullReferenceException** and **FatalEngineExecutionError**. The occurance of the error is non-deterministic and it mostly takes several million iterations to provoke it, which says "race condition" to me. How can i avoid it? The exceptions are only raised when running the process with x64 (x86 does not crash) and outside of the debugger. The test system is a Core I7 (8 threads) on Windows 7, .NET Framework 4.0 and IronPython 2.7.1. Here's the minimal code to produce the error: var engine = Python.CreateEngine(); double a = 1.0; double b = 2.0; while (true) { Func calculate = engine.Execute("lambda a,b : a+b"); System.Threading.Tasks.Parallel.For(0, 1000, _ => { for (int i = 0; i < 1000; i++) { calculate(a,b); } }); Console.Write("."); } Error message: >FatalExecutionEngineError was detected > >Message: The runtime has encountered a fatal error. The address of the error was at 0xf807829e, on thread 0x3da0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Even if the engine is declared as thread-local, it crashes after some time: var calculate = new ThreadLocal>(() => Python.CreateEngine().Execute("lambda a,b : a+b"));"----------------- 3. [New issue] Why is calling a Python lambda expression from C# not thread-safe? http://ironpython.codeplex.com/workitem/31925 User Rauhotz has proposed the issue: "I define a side-effect-free (pure) lambda expression in IronPython and assign it to a C# delegate. When invoking the delegate simultaneously from multiple threads i get exceptions of type **AccessViolationException**, **NullReferenceException** and **FatalEngineExecutionError**. The occurance of the error is non-deterministic and it mostly takes several million iterations to provoke it, which says "race condition" to me. How can i avoid it? The exceptions are only raised when running the process with x64 (x86 does not crash) and outside of the debugger. The test system is a Core I7 (8 threads) on Windows 7, .NET Framework 4.0 and IronPython 2.7.1. Here's the minimal code to produce the error: var engine = Python.CreateEngine(); double a = 1.0; double b = 2.0; while (true) { Func calculate = engine.Execute("lambda a,b : a+b"); System.Threading.Tasks.Parallel.For(0, 1000, _ => { for (int i = 0; i < 1000; i++) { calculate(a,b); } }); Console.Write("."); } Error message: >FatalExecutionEngineError was detected > >Message: The runtime has encountered a fatal error. The address of the error was at 0xf807829e, on thread 0x3da0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. Even if the engine is declared as thread-local, it crashes after some time: var calculate = new ThreadLocal>(() => Python.CreateEngine().Execute("lambda a,b : a+b"));"----------------- 4. [New comment] Why is calling a Python lambda expression from C# not thread-safe? http://ironpython.codeplex.com/workitem/31925 User Rauhotz has commented on the issue: "Sorry, pressing the "Save" button had no effect, so i pressed it again. Now there's a double post."----------------- 5. [New comment] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31420 User jdhardy has commented on the issue: "I'm going to be making changes to the version string (there was another bug about it recently), and I do want to add more information without turning it into a browser User-Agent string." ---------------------------------------------- ---------------------------------------------- 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 jdhardy at gmail.com Tue Dec 13 17:27:24 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 13 Dec 2011 08:27:24 -0800 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> Message-ID: 2011/12/12 : > Hi Jason, > > I used your recommended way to install the numpy and scipy packages. It > works fine for numpy but failed on scipy. I put the python source file under > lib/site-packages and the dlls under the folder IronPython 2.7.1/DLLs.? The > error messgae reads as follows: > > Traceback (most recent call last): > ? File "", line 1, in > ? File "C:\Program Files\IronPython > 2.7.1\lib\site-packages\scipy\__init__.py", line 124, in > ??? pkgload = PackageLoader() > ? File "C:\Program Files\IronPython > 2.7.1\lib\site-packages\numpy\_import_tools.py", line 15, in __init__ > ??? self.parent_frame = frame = sys._getframe(_level) > AttributeError: 'module' object has no attribute '_getframe' > > Do you know where the problem lies. Much thx. You'll have to run IronPython with the -X:FullFrames option (i.e. ipy.exe -X:FullFrames). - Jeff From jdhardy at gmail.com Tue Dec 13 19:25:33 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 13 Dec 2011 10:25:33 -0800 Subject: [Ironpython-users] IronPython 2011 Survey Message-ID: The IronPython team would like some feedback on how IronPython is being used and what areas need to improved. Take the survey at bit.ly/ipy-2011-survey! - Jeff From dinov at microsoft.com Tue Dec 13 21:40:50 2011 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 13 Dec 2011 20:40:50 +0000 Subject: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? In-Reply-To: <47CC258F987F9F4D9728BD2C2F71907DD1582F@nhkg1140pex.ubsw.net> References: <47CC258F987F9F4D9728BD2C2F71907DC91488@nhkg1140pex.ubsw.net> <47CC258F987F9F4D9728BD2C2F71907DD15721@nhkg1140pex.ubsw.net> <47CC258F987F9F4D9728BD2C2F71907DD1582F@nhkg1140pex.ubsw.net> Message-ID: <6C7ABA8B4E309440B857D74348836F2E4CC2367F@TK5EX14MBXC292.redmond.corp.microsoft.com> Yep, you can specify -X:Frames for the interactive window via Tools->Options->Python Tools->Interactive Windows->Interpreter Options. For launching/debugging projects you can specify it in the project properties page under the Debug tab. -----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 Cheng-B.Li at ubs.com Sent: Tuesday, December 13, 2011 1:10 AM To: zgramana at pottsconsultinggroup.com Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? Is there a way to make it work when I use the Python Tools For Visual Studio? -----Original Message----- From: Zachary Gramana [mailto:zgramana at pottsconsultinggroup.com] Sent: 2011?12?13? 10:22 To: Li, Cheng-B Cc: Subject: Re: [Ironpython-users] FW: How to install Scipy and Numpy for .net offline? Try running: ipy.exe -X:FullFrames ... On Dec 12, 2011, at 21:16, wrote: > self.parent_frame = frame = sys._getframe(_level) > AttributeError: 'module' object has no attribute '_getframe Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Wed Dec 14 16:36:10 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 14 Dec 2011 07:36:10 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/13/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] Why is calling a Python lambda expression from C# not thread-safe? ---------------------------------------------- ISSUES 1. [Status update] Why is calling a Python lambda expression from C# not thread-safe? http://ironpython.codeplex.com/workitem/31925 User jdhardy has updated the issue: Status has changed from Proposed to Closed with the following comment, "Duplicate of [workitem:31924]." ---------------------------------------------- ---------------------------------------------- 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 slide.o.mix at gmail.com Thu Dec 15 06:02:36 2011 From: slide.o.mix at gmail.com (Slide) Date: Wed, 14 Dec 2011 22:02:36 -0700 Subject: [Ironpython-users] __package__ Message-ID: Currently, I am working on implementing zipimport. I have modules being imported from egg files (very early and not a lot of testing done yet), but I notice that the __package__ attribute is not getting set up correctly, e.g.: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import oauth >>> dir(oauth) ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__'] IronPython 3.0 DEBUG (3.0.0.0) on .NET 4.0.30319.237 Type "help", "copyright", "credits" or "license" for more information. >>> import oauth >>> dir(oauth) ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__path__'] I see in the code that there are references to __package__, but following where it it set is proving to be a bit difficult. Can someone point me in the right direction? Thanks, slide Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Dec 15 06:19:17 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 15 Dec 2011 05:19:17 +0000 Subject: [Ironpython-users] __package__ In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E4CC25FA4@TK5EX14MBXC292.redmond.corp.microsoft.com> It happens in Importer.cs - there's a comment saying "// explicit relative import, calculate and store __package__" It also happens in imp.new_module, when creating the sys module, and in PythonContext.CreateBuiltinModule, but I think those are all much less interesting. Import bugs are really tough... Anyone who has worked on the importer code has never looked at the CPython source code to see how it works - so there's subtle issues like this. I'd suggest looking at CPython where it sets it and then making IronPython work the same. From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Slide Sent: Wednesday, December 14, 2011 9:03 PM To: ironpython-users at python.org Subject: [Ironpython-users] __package__ Currently, I am working on implementing zipimport. I have modules being imported from egg files (very early and not a lot of testing done yet), but I notice that the __package__ attribute is not getting set up correctly, e.g.: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import oauth >>> dir(oauth) ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__'] IronPython 3.0 DEBUG (3.0.0.0) on .NET 4.0.30319.237 Type "help", "copyright", "credits" or "license" for more information. >>> import oauth >>> dir(oauth) ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__path__'] I see in the code that there are references to __package__, but following where it it set is proving to be a bit difficult. Can someone point me in the right direction? Thanks, slide Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Dec 15 13:40:03 2011 From: slide.o.mix at gmail.com (Slide) Date: Thu, 15 Dec 2011 05:40:03 -0700 Subject: [Ironpython-users] __package__ In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E4CC25FA4@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E4CC25FA4@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Yeah, the very strange this is that __package__ (in that code in Importer.cs) is done BEFORE the module is even loaded. I don't see how it could be ever setting the __package__ attribute correctly. In CPython, import.c is about as "confusing" as Importer.cs, so at least IP is compatible with CPython in that respect :-) I'll continue to dig into import.c and see what I can determine about __package__ Thanks, slide On Wed, Dec 14, 2011 at 10:19 PM, Dino Viehland wrote: > It happens in Importer.cs ? there?s a comment saying ?// explicit > relative import, calculate and store __package__?**** > > ** ** > > It also happens in imp.new_module, when creating the sys module, and in > PythonContext.CreateBuiltinModule, but I think those are all much less > interesting.**** > > ** ** > > Import bugs are really tough? Anyone who has worked on the importer code > has never looked at the CPython source code to see how it works ? so > there?s subtle issues like this. I?d suggest looking at CPython where it > sets it and then making IronPython work the same. **** > > ** ** > > *From:* ironpython-users-bounces+dinov=microsoft.com at python.org [mailto: > ironpython-users-bounces+dinov=microsoft.com at python.org] *On Behalf Of * > Slide > *Sent:* Wednesday, December 14, 2011 9:03 PM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] __package__**** > > ** ** > > Currently, I am working on implementing zipimport. I have modules being > imported from egg files (very early and not a lot of testing done yet), but > I notice that the __package__ attribute is not getting set up correctly, > e.g.:**** > > ** ** > > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] > on win**** > > 32**** > > Type "help", "copyright", "credits" or "license" for more information.**** > > >>> import oauth**** > > >>> dir(oauth)**** > > ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', > '__package__',**** > > '__path__']**** > > ** ** > > ** ** > > IronPython 3.0 DEBUG (3.0.0.0) on .NET 4.0.30319.237**** > > Type "help", "copyright", "credits" or "license" for more information.**** > > >>> import oauth**** > > >>> dir(oauth)**** > > ['__builtins__', '__doc__', '__file__', '__loader__', '__name__', > '__path__']**** > > ** ** > > ** ** > > I see in the code that there are references to __package__, but following > where it it set is proving to be a bit difficult. Can someone point me in > the right direction?**** > > ** ** > > Thanks,**** > > ** ** > > slide**** > > Website: http://earl-of-code.com**** > > ** ** > -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.koperdraad at exchangeit24.com Thu Dec 15 17:34:04 2011 From: r.koperdraad at exchangeit24.com (Rutger Koperdraad) Date: Thu, 15 Dec 2011 11:34:04 -0500 Subject: [Ironpython-users] PythonAst Message-ID: <004901ccbb47$5d6edb00$184c9100$@exchangeit24.com> Hi, I'm writing an application in Visual Basic .NET that allows the users to write scripts in IronPython for some specialized customization needs. Users provide a script, a number of variable names and values, and an expression. For example, to customize the displaying of dates, they could provide the following script, variables and expressions: Script: dateformat = 'dddd d MMMM yyyy' prefix = 'Birth date: ' def format(d): import System dd = System.DateTime.Parse(d) return dd.ToString(dateformat) Variables: birthdate = '10/04/1968' Expression: prefix + format(birthdate) In Visual Basic .NET I create a ScriptRuntime, ScriptEngine, ScriptSource and ScriptScope. I add the variables to the ScriptScope, execute the script and evaluate the expression. That's working like a charm. I would like to add functionality that automatically detects which variables need to be defined. In the above example, I would like the user to specify the script and the expression and the software to detect that the variable "birthdate" is needed and prompt for a value. I tried to do so with PythonAst, but I cannot find sufficient documentation on internet to get it working in general. The functions below work to some extent. They get all the names from the expression and then remove "format" for being a function name and not a variable name. But this function still returns "prefix", which it shouldn't. Any help or documentation would be appreciated. Public Function GetVariableNames(ByVal strExpression As String) As StringCollection Try If Not String.IsNullOrEmpty(strExpression) Then ' Create a script runtime if needed If m_objScriptRuntime Is Nothing Then m_objScriptRuntime = ScriptRuntime.CreateFromConfiguration() End If ' Create the objects needed by the expression walker Dim objEngine As ScriptEngine = m_objScriptRuntime.GetEngine(ScriptLanguage) Dim objSource As ScriptSource = objEngine.CreateScriptSourceFromString(strExpression, SourceCodeKind.Expression) Dim objSourceUnit As SourceUnit = Providers.HostingHelpers.GetSourceUnit(objSource) Dim objLanguageContext As LanguageContext = HostingHelpers.GetLanguageContext(objEngine) Dim objCompilerContext As New CompilerContext(objSourceUnit, objLanguageContext.GetCompilerOptions(), ErrorSink.Default) Dim objParser As Parser = Parser.CreateParser(objCompilerContext, New PythonOptions) Dim objPythonAst As PythonAst = objParser.ParseSingleStatement() Dim objExpressionWalker As New ExpressionWalker ' Determine the variable names Call objPythonAst.Walk(objExpressionWalker) Return objExpressionWalker.VariableNames End If Catch ex As Exception Call LogException(strExpression, ex) End Try Return New StringCollection End Function Private Class ExpressionWalker Inherits PythonWalker Private clnVariableNames As New StringCollection Public ReadOnly Property VariableNames As StringCollection Get Return clnVariableNames End Get End Property Public Overrides Sub PostWalk(node As NameExpression) Call clnVariableNames.Add(node.Name) Call MyBase.PostWalk(node) End Sub Public Overrides Sub PostWalk(node As CallExpression) Dim objNameExpression As NameExpression = TryCast(node.Target, NameExpression) If Not objNameExpression Is Nothing Then Call clnVariableNames.Remove(objNameExpression.Name) End If Call MyBase.PostWalk(node) End Sub End Class With best regards, Rutger Koperdraad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Dec 15 20:06:30 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 15 Dec 2011 19:06:30 +0000 Subject: [Ironpython-users] PythonAst In-Reply-To: <004901ccbb47$5d6edb00$184c9100$@exchangeit24.com> References: <004901ccbb47$5d6edb00$184c9100$@exchangeit24.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E4CC27C8B@TK5EX14MBXC292.redmond.corp.microsoft.com> I'd suggest adding a method in the walker which handles AssignmentStatements and looks to see if the left-hand side is a NameExpression. If it is then you can add it to a list of excluded variable names which you can remove from clnVariableNames after the walk is finished. From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Rutger Koperdraad Sent: Thursday, December 15, 2011 8:34 AM To: ironpython-users at python.org Subject: [Ironpython-users] PythonAst Hi, I'm writing an application in Visual Basic .NET that allows the users to write scripts in IronPython for some specialized customization needs. Users provide a script, a number of variable names and values, and an expression. For example, to customize the displaying of dates, they could provide the following script, variables and expressions: Script: dateformat = 'dddd d MMMM yyyy' prefix = 'Birth date: ' def format(d): import System dd = System.DateTime.Parse(d) return dd.ToString(dateformat) Variables: birthdate = '10/04/1968' Expression: prefix + format(birthdate) In Visual Basic .NET I create a ScriptRuntime, ScriptEngine, ScriptSource and ScriptScope. I add the variables to the ScriptScope, execute the script and evaluate the expression. That's working like a charm. I would like to add functionality that automatically detects which variables need to be defined. In the above example, I would like the user to specify the script and the expression and the software to detect that the variable "birthdate" is needed and prompt for a value. I tried to do so with PythonAst, but I cannot find sufficient documentation on internet to get it working in general. The functions below work to some extent. They get all the names from the expression and then remove "format" for being a function name and not a variable name. But this function still returns "prefix", which it shouldn't. Any help or documentation would be appreciated. Public Function GetVariableNames(ByVal strExpression As String) As StringCollection Try If Not String.IsNullOrEmpty(strExpression) Then ' Create a script runtime if needed If m_objScriptRuntime Is Nothing Then m_objScriptRuntime = ScriptRuntime.CreateFromConfiguration() End If ' Create the objects needed by the expression walker Dim objEngine As ScriptEngine = m_objScriptRuntime.GetEngine(ScriptLanguage) Dim objSource As ScriptSource = objEngine.CreateScriptSourceFromString(strExpression, SourceCodeKind.Expression) Dim objSourceUnit As SourceUnit = Providers.HostingHelpers.GetSourceUnit(objSource) Dim objLanguageContext As LanguageContext = HostingHelpers.GetLanguageContext(objEngine) Dim objCompilerContext As New CompilerContext(objSourceUnit, objLanguageContext.GetCompilerOptions(), ErrorSink.Default) Dim objParser As Parser = Parser.CreateParser(objCompilerContext, New PythonOptions) Dim objPythonAst As PythonAst = objParser.ParseSingleStatement() Dim objExpressionWalker As New ExpressionWalker ' Determine the variable names Call objPythonAst.Walk(objExpressionWalker) Return objExpressionWalker.VariableNames End If Catch ex As Exception Call LogException(strExpression, ex) End Try Return New StringCollection End Function Private Class ExpressionWalker Inherits PythonWalker Private clnVariableNames As New StringCollection Public ReadOnly Property VariableNames As StringCollection Get Return clnVariableNames End Get End Property Public Overrides Sub PostWalk(node As NameExpression) Call clnVariableNames.Add(node.Name) Call MyBase.PostWalk(node) End Sub Public Overrides Sub PostWalk(node As CallExpression) Dim objNameExpression As NameExpression = TryCast(node.Target, NameExpression) If Not objNameExpression Is Nothing Then Call clnVariableNames.Remove(objNameExpression.Name) End If Call MyBase.PostWalk(node) End Sub End Class With best regards, Rutger Koperdraad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dir2104 at columbia.edu Fri Dec 16 02:15:09 2011 From: dir2104 at columbia.edu (David Rinck) Date: Thu, 15 Dec 2011 17:15:09 -0800 Subject: [Ironpython-users] Embedding numpy in C# In-Reply-To: References: Message-ID: <5B554D7EAB2448B784D732CE892795B7@gmail.com> >From the interactive python window I can import numpy and use it just fine. Within C# however, I am having troubles getting it to import correctly. I'm using: string programPath = Path.Combine(rootDir, (string)args[0]); Dictionary options = new Dictionary(); options["Debug"] = true; ScriptEngine engine = Python.CreateEngine(options); List argList = new List(); argList.extend(args); ScriptScope sys = Python.GetSysModule(engine); sys.SetVariable("argv", argList); var sp = engine.GetSearchPaths(); sp.Add(@"c:\Program Files\IronPython2.7.1"); sp.Add(@"c:\Program Files\IronPython 2.7.1\DLLs"); sp.Add(@"c:\Program Files\IronPython 2.7.1\Lib"); sp.Add(@"c:\Program Files\IronPython 2.7.1\Lib\site-packages"); engine.SetSearchPaths(sp); ScriptSource source = engine.CreateScriptSourceFromFile(programPath); int result = source.ExecuteProgram(); The python file: import sys sys.path.append(r'c:\Program Files\IronPython2.7.1') sys.path.append(r'c:\Program Files\IronPython 2.7.1\DLLs') sys.path.append(r'c:\Program Files\IronPython 2.7.1\Lib') sys.path.append(r'c:\Program Files\IronPython 2.7.1\Lib\site-packages') print "Running!" import numpy My response in the console window is as follows: Running! Command line arguments ['program.py'] File "c:\Program Files\IronPython 2.7.1\Lib\os.py", line 754 bs = b"" ^ SyntaxError: invalid syntax I also tried this with Python 2.7 and had the same result. Where am I going wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Dec 16 11:03:18 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 16 Dec 2011 02:03:18 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/15/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] importing numpy within C# 2. [Status update] importing numpy within C# 3. [Status update] IronPython does not support marshaling of python code objects 4. [New comment] IP2.6.2: embeded - sys.builtin_modules not loaded 5. [New comment] ValueError: unmarshallable object ---------------------------------------------- ISSUES 1. [New issue] importing numpy within C# http://ironpython.codeplex.com/workitem/31953 User svaha1728 has proposed the issue: "From the interactive python window I can import numpy and use it just fine. Within C# however, I am having troubles getting it to import correctly. I'm using: string programPath = Path.Combine(rootDir, (string)args[0]); Dictionary options = new Dictionary(); options["Debug"] = true; ScriptEngine engine = Python.CreateEngine(options); List argList = new List(); argList.extend(args); ScriptScope sys = Python.GetSysModule(engine); sys.SetVariable("argv", argList); var sp = engine.GetSearchPaths(); sp.Add(@"c:\Program Files\IronPython2.7.1"); sp.Add(@"c:\Program Files\IronPython 2.7.1\DLLs"); sp.Add(@"c:\Program Files\IronPython 2.7.1\Lib"); sp.Add(@"c:\Program Files\IronPython 2.7.1\Lib\site-packages"); engine.SetSearchPaths(sp); ScriptSource source = engine.CreateScriptSourceFromFile(programPath); int result = source.ExecuteProgram(); The python file: import sys sys.path.append(r'c:\Program Files\IronPython2.7.1') sys.path.append(r'c:\Program Files\IronPython 2.7.1\DLLs') sys.path.append(r'c:\Program Files\IronPython 2.7.1\Lib') sys.path.append(r'c:\Program Files\IronPython 2.7.1\Lib\site-packages') print "Running!" import numpy My response in the console window is as follows: Running! Command line arguments ['program.py'] File "c:\Program Files\IronPython 2.7.1\Lib\os.py", line 754 bs = b"" ^ SyntaxError: invalid syntax I also tried this with Python 2.7 and had the same result. Where am I going wrong?"----------------- 2. [Status update] importing numpy within C# http://ironpython.codeplex.com/workitem/31953 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Please use the mailing list for questions. http://mail.python.org/mailman/listinfo/ironpython-users"----------------- 3. [Status update] IronPython does not support marshaling of python code objects http://ironpython.codeplex.com/workitem/31909 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Duplicate of 23877"----------------- 4. [New comment] IP2.6.2: embeded - sys.builtin_modules not loaded http://ironpython.codeplex.com/workitem/30270 User slide_o_mix has commented on the issue: "Is this issue resolved then?"----------------- 5. [New comment] ValueError: unmarshallable object http://ironpython.codeplex.com/workitem/26489 User slide_o_mix has commented on the issue: "Is your specific issue resolved for now? There is another issue for marshaling of code objects already created." ---------------------------------------------- ---------------------------------------------- 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 Dec 17 11:52:02 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 17 Dec 2011 02:52:02 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/16/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Issue passing lists, tuples, dictionaries through WCF ---------------------------------------------- ISSUES 1. [New issue] Issue passing lists, tuples, dictionaries through WCF http://ironpython.codeplex.com/workitem/31970 User GlennDiviney has proposed the issue: "I posted a problem here: http://stackoverflow.com/questions/8542010/ironpython-lists-tuples-dictionaries-crash-wcf-communications Basically time a client asks for a dictionary containing a list or tuple, or even just a simple tuple, the WCF communications channel crashes Simple dictionaries, dictionaries containing simple dictionaries, or lists are OK Ideas?" ---------------------------------------------- ---------------------------------------------- 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 anders.u.persson at gmail.com Sat Dec 17 13:53:17 2011 From: anders.u.persson at gmail.com (Anders Persson) Date: Sat, 17 Dec 2011 13:53:17 +0100 Subject: [Ironpython-users] Controll VisualStudio 2010 from python Message-ID: <4EEC90BD.1070107@gmail.com> Hi! I have looked att IronPython, as a way to automate stuff in VisualStudio when i'm developing. Example: I have som Classes/project in a Solution that i normal dublicate and change a specific amount of stuff depending och som rules, this is hard to do with macro and it would be nice to make this with IronPython. So i have not found if this is possible to have IronPython interact with VisualStudio as a "macro on steriods" *smile* Best regads Anders From jdhardy at gmail.com Sun Dec 18 21:41:10 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 18 Dec 2011 12:41:10 -0800 Subject: [Ironpython-users] IronPython foundations work Message-ID: IronPython's foundations have been a minor issue since it was split off from MS, and I never really found the time to address them. I've made some progress, and these improvements should make the project better in the long run. I've mainly been working on an improved build system for IronPython and it's finally ready. I have a pull request up at https://github.com/IronLanguages/main/pull/48 because I'd like to get a few more eyes on it to make sure I didn't miss anything obvious. The big advantage is that release packages are much easier to build and version numbers are stored in one place, so I can spin up packages much quicker than before. It will also allow for nightly builds on teamcity.codebetter.com. Building is now as easy as going into the root and typing 'msbuild' or 'make'. Automated tests work much better - the TestRunner had a tendency to deadlock on a handful of tests, but those should be gone. I still need to add a Test target to the build system to make it easier to use, though. Lots of tests are still failing; see http://teamcity.codebetter.com/viewLog.html?buildId=35599 (click "Login as Guest" if you don't have an account). Most of them are Python standard library tests; some help working on making those green would be very much appreciated. 2.7.2 is currently targeted for late February; the first alpha release will probably be early January, but there's lots of time after that to get changes in. If not, 2.7.3 will be released in June. I think 2.7.2 is going to be a good release. Alex almost has zipimport working, which means that setuptools/distribute will be much easier to support. Getting virtualenv and pip to work as well would complete that set of important Python tools. I have some surprises that I'm working on as well that will greatly interest some people. There's still lots of issues to go through for 2.7.2, though: http://bit.ly/ipy-272-issues. Any help there would be much appreciated; if you need any help getting started making changes to IronPython, don't hesitate to ask. If you don't know where to start, a missing module (pyexpat, bz2, etc.) is a good place to start because there's lots of examples to draw from. IronPython's first year was good. There's some momentum to the project now, and I'd like to see that continue into 2012. Getting more people involved as developers is key, so if there's anything I can do to help with that, let me know. All the best to you and yours, Jeff P.S. If you haven't taken the IronPython 2011 survey yet, please do! It only takes a few minutes. http://bit.ly/ipy-2011-survey. Thanks! From no_reply at codeplex.com Mon Dec 19 16:35:49 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 19 Dec 2011 07:35:49 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/18/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Console color choice is bad for bright consoles 2. [New comment] Console color choice is bad for bright consoles 3. [New comment] Console exit behavior on OSX/Mono in 2.7A1 4. [New comment] Console exit behavior on OSX/Mono in 2.7A1 5. [New comment] Console exit behavior on OSX/Mono in 2.7A1 6. [New comment] Converting large float to int produces Int64 (which is not int or long) ---------------------------------------------- ISSUES 1. [New comment] Console color choice is bad for bright consoles http://ironpython.codeplex.com/workitem/31872 User jdhardy has commented on the issue: "Looking into this further, if you're not running with -X:ColorfulConsole the console should use the foreground colour. The ColorfulConsole option could choose between a light and dark them depending on what the background is."----------------- 2. [New comment] Console color choice is bad for bright consoles http://ironpython.codeplex.com/workitem/31872 User jdhardy has commented on the issue: "Fixed in ba0ee88/d21c6c3. The console will choose its colours based on the background."----------------- 3. [New comment] Console exit behavior on OSX/Mono in 2.7A1 http://ironpython.codeplex.com/workitem/28248 User jdhardy has commented on the issue: "I can reproduce this on Linux/Mono. Oddly, when launched from Visual Studio (debugger attached or not), I get the same issue. Running the same build from the command line works as expected."----------------- 4. [New comment] Console exit behavior on OSX/Mono in 2.7A1 http://ironpython.codeplex.com/workitem/28248 User jdhardy has commented on the issue: "To make things more interesting, 'help' doesn't work properly, and 'credits', 'copyright', and 'license' do not work when run under VS either."----------------- 5. [New comment] Console exit behavior on OSX/Mono in 2.7A1 http://ironpython.codeplex.com/workitem/28248 User jdhardy has commented on the issue: "exit, help, credits, copyright, and license are all actually set in site.py, not IronPython itself. However, IronPython's site.py is empty be default. Fixed in 75a2467/2964728."----------------- 6. [New comment] Converting large float to int produces Int64 (which is not int or long) http://ironpython.codeplex.com/workitem/31549 User jdhardy has commented on the issue: "For some reason, float.__int__ would produce in Int64. Fixed in 7ea0730/fca526c." ---------------------------------------------- ---------------------------------------------- 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 r.koperdraad at exchangeit24.com Mon Dec 19 16:38:58 2011 From: r.koperdraad at exchangeit24.com (Rutger Koperdraad) Date: Mon, 19 Dec 2011 10:38:58 -0500 Subject: [Ironpython-users] PythonAst In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E4CC27C8B@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <004901ccbb47$5d6edb00$184c9100$@exchangeit24.com> <6C7ABA8B4E309440B857D74348836F2E4CC27C8B@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: <001c01ccbe64$551fb490$ff5f1db0$@exchangeit24.com> Hi Dino, Thanks a lot. It's working reasonably well now. It would be nice to have more comprehensive documentation of these classes, as it is quite a hassle to extract the variables. I'm now extracting the assignment statements from the script, but excluding those that are inside function bodies. In the expression, I get al name expressions and then remove the function names (call expressions targets) and the global variables. Thanks a lot for your help. With best regards, Rutger Koperdraad _____ The ExchangeIt Support Team Description: cid:image001.jpg at 01C8455E.47D3E2D0 EUR: O: +31 (0)20 893 2601 | F: +31 (0)172 413 746 USA: O: +1 (925) 208 4716 Support request only via our online support ticket system at www.ExchangeIt24.eu SALES: Sales at ExchangeIt24.com WEB: www.ExchangeIt24.eu FORUM: www.CardExchange.eu ... Solving today's card production problems, with tomorrow in mind! IT'S HERE! CHECK OUT THE NEW CARDEXCHANGER 6! Click here to download a FREE trial version This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. From: Dino Viehland [mailto:dinov at microsoft.com] Sent: Thursday, 15 December, 2011 14:07 To: Rutger Koperdraad; ironpython-users at python.org Subject: RE: [Ironpython-users] PythonAst I'd suggest adding a method in the walker which handles AssignmentStatements and looks to see if the left-hand side is a NameExpression. If it is then you can add it to a list of excluded variable names which you can remove from clnVariableNames after the walk is finished. From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Rutger Koperdraad Sent: Thursday, December 15, 2011 8:34 AM To: ironpython-users at python.org Subject: [Ironpython-users] PythonAst Hi, I'm writing an application in Visual Basic .NET that allows the users to write scripts in IronPython for some specialized customization needs. Users provide a script, a number of variable names and values, and an expression. For example, to customize the displaying of dates, they could provide the following script, variables and expressions: Script: dateformat = 'dddd d MMMM yyyy' prefix = 'Birth date: ' def format(d): import System dd = System.DateTime.Parse(d) return dd.ToString(dateformat) Variables: birthdate = '10/04/1968' Expression: prefix + format(birthdate) In Visual Basic .NET I create a ScriptRuntime, ScriptEngine, ScriptSource and ScriptScope. I add the variables to the ScriptScope, execute the script and evaluate the expression. That's working like a charm. I would like to add functionality that automatically detects which variables need to be defined. In the above example, I would like the user to specify the script and the expression and the software to detect that the variable "birthdate" is needed and prompt for a value. I tried to do so with PythonAst, but I cannot find sufficient documentation on internet to get it working in general. The functions below work to some extent. They get all the names from the expression and then remove "format" for being a function name and not a variable name. But this function still returns "prefix", which it shouldn't. Any help or documentation would be appreciated. Public Function GetVariableNames(ByVal strExpression As String) As StringCollection Try If Not String.IsNullOrEmpty(strExpression) Then ' Create a script runtime if needed If m_objScriptRuntime Is Nothing Then m_objScriptRuntime = ScriptRuntime.CreateFromConfiguration() End If ' Create the objects needed by the expression walker Dim objEngine As ScriptEngine = m_objScriptRuntime.GetEngine(ScriptLanguage) Dim objSource As ScriptSource = objEngine.CreateScriptSourceFromString(strExpression, SourceCodeKind.Expression) Dim objSourceUnit As SourceUnit = Providers.HostingHelpers.GetSourceUnit(objSource) Dim objLanguageContext As LanguageContext = HostingHelpers.GetLanguageContext(objEngine) Dim objCompilerContext As New CompilerContext(objSourceUnit, objLanguageContext.GetCompilerOptions(), ErrorSink.Default) Dim objParser As Parser = Parser.CreateParser(objCompilerContext, New PythonOptions) Dim objPythonAst As PythonAst = objParser.ParseSingleStatement() Dim objExpressionWalker As New ExpressionWalker ' Determine the variable names Call objPythonAst.Walk(objExpressionWalker) Return objExpressionWalker.VariableNames End If Catch ex As Exception Call LogException(strExpression, ex) End Try Return New StringCollection End Function Private Class ExpressionWalker Inherits PythonWalker Private clnVariableNames As New StringCollection Public ReadOnly Property VariableNames As StringCollection Get Return clnVariableNames End Get End Property Public Overrides Sub PostWalk(node As NameExpression) Call clnVariableNames.Add(node.Name) Call MyBase.PostWalk(node) End Sub Public Overrides Sub PostWalk(node As CallExpression) Dim objNameExpression As NameExpression = TryCast(node.Target, NameExpression) If Not objNameExpression Is Nothing Then Call clnVariableNames.Remove(objNameExpression.Name) End If Call MyBase.PostWalk(node) End Sub End Class With best regards, Rutger Koperdraad. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2282 bytes Desc: not available URL: From doug.blank at gmail.com Tue Dec 20 09:15:20 2011 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 20 Dec 2011 03:15:20 -0500 Subject: [Ironpython-users] Simulating Python's scoping at the DLR level Message-ID: What would be a good way to simulate Python's scoping rules at the DLR level? For example, if I were running two DLR-based scripts, I can just use the same ScriptScope for both to have shared globals. But how would you replicate Python's exact idea of a local environment in each, while falling back to a shared, global one, in DLR-based code? I guess I'm looking for something like: Execute("x = y + z", local1, globals); ? ?Execute("x = y + z", local2, globals); where local1, local2, and globals are dictionaries, and "x" would end up being added to the local dictionaries, and "y" and "z" would be looked for first in local1 or 2, then a shared globals. Any suggestions? Thanks! -Doug From curt at hagenlocher.org Tue Dec 20 17:03:31 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 20 Dec 2011 08:03:31 -0800 Subject: [Ironpython-users] Simulating Python's scoping at the DLR level In-Reply-To: References: Message-ID: I don't think you can replicate Python's semantics exactly, because Python compiles an entire block at once but your scope would only see reads and writes sequentially as they happen. For instance, in Python, the following code will generate an error: a = 1 def test(): print(a) a = 2 That's because the assignment to "a" in "test" causes Python to consider "a" to be a local variable for the duration of the entire function. This isn't something you can duplicate with a ScriptScope-level component. Having said that, and with the disclaimer that it's been over two years since I've looked at DLR source code, here's what I think you want to do: 1. Given that you have two scopes -- a "global" scope and a "local" scope, think carefully about the behavior that you want to define for the eight possible cases of (read/write)(present/absent in local scope)(present/absent in global scope). 2. Implement an IDynamicMetaObjectProvider which implements this behavior on top of two other IDMOPs. 3. Using the global and local ScriptScopes (or Scopes, or ScopeStorages), construct an instance of this new type. 4. Pass this object to ScriptRuntime.CreateScope to create a new ScriptScope from the combined child scopes. The delegating IDMOP can probably be built pretty efficently by being smart about the error/fallback. On Tue, Dec 20, 2011 at 12:15 AM, Doug Blank wrote: > What would be a good way to simulate Python's scoping rules at the DLR > level? > > For example, if I were running two DLR-based scripts, I can just use > the same ScriptScope for both to have shared globals. > > But how would you replicate Python's exact idea of a local environment > in each, while falling back to a shared, global one, in DLR-based > code? > > I guess I'm looking for something like: > > Execute("x = y + z", local1, globals); > Execute("x = y + z", local2, globals); > where local1, local2, and globals are dictionaries, and "x" would end > up being added to the local dictionaries, and "y" and "z" would be > looked for first in local1 or 2, then a shared globals. > > Any suggestions? > > Thanks! > > -Doug > _______________________________________________ > 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 fernandez_dan2 at hotmail.com Wed Dec 21 03:33:42 2011 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Tue, 20 Dec 2011 18:33:42 -0800 Subject: [Ironpython-users] Reload module within embedded C# app Message-ID: Hi All, I have an embedded Python engine in my C# app that executes python scripts. I have a filewatcher watching if any python scripts have been modified. I am trying to perform a reload within my C# app but I didn't couldn't figure out how to perform this. The best I could figured out was to Compile the ScriptSource again when the change occurs. Any tips?? Thanks Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Wed Dec 21 04:36:31 2011 From: ps at peter-schwalm.de (Peter Schwalm) Date: Wed, 21 Dec 2011 04:36:31 +0100 Subject: [Ironpython-users] bug / issue tracking for ironpython releases Message-ID: <4EF1543F.5080106@peter-schwalm.de> Hi ironpython, I have a question regarding issues for ironpython. Where should I place indications for (possible) errors in the latest release? (I use 2.7.1) I have found an issue tracker at http://ironpython.codeplex.com/workitem/list/advanced but it looks orphaned since October this year. Especially I would like to report problems with: a) pdb which I think does not work consistently b) some tracebacks on exceptions/errors which do not report the last line of execution. c) the use of sys.argv (sys.argv[0]) which as it looks behaves different from standard python. Should problems of this kind be reported to this mailing list or does there exist a new bug tracker? Thank you Peter Schwalm From jdhardy at gmail.com Wed Dec 21 07:35:24 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 20 Dec 2011 22:35:24 -0800 Subject: [Ironpython-users] bug / issue tracking for ironpython releases In-Reply-To: <4EF1543F.5080106@peter-schwalm.de> References: <4EF1543F.5080106@peter-schwalm.de> Message-ID: On Tue, Dec 20, 2011 at 7:36 PM, Peter Schwalm wrote: > Hi ironpython, > > I have a question regarding issues for ironpython. Where should I place > indications for (possible) errors in the latest release? (I use 2.7.1) > > I have found an issue tracker at > > ? ?http://ironpython.codeplex.com/workitem/list/advanced That's the right place. > > but it looks orphaned since October this year. > Not at all. I just updated some issues a few hours ago. > Especially I would like to report problems with: > > ? ?a) pdb which I think does not work consistently > > ? ?b) some tracebacks on exceptions/errors which do not report the last line > of execution. > > ? ?c) the use of sys.argv (sys.argv[0]) which as it looks behaves different > from standard python. Please do! - Jeff From jdhardy at gmail.com Wed Dec 21 07:37:38 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 20 Dec 2011 22:37:38 -0800 Subject: [Ironpython-users] Reload module within embedded C# app In-Reply-To: References: Message-ID: On Tue, Dec 20, 2011 at 6:33 PM, Daniel Fernandez wrote: > Hi All, > > I have an embedded Python engine in my C# app that executes python scripts. > I have a filewatcher watching if any python scripts have been modified.? I > am trying to perform a reload within my C# app but I didn't couldn't figure > out how to perform this.?The best I could figured out was to Compile the > ScriptSource again when the change occurs. Any tips?? That's what I do for NWSGI (more or less). When a script change is detected it reloads, recompiles, and executes the script, and then pulls the variables that it needs and continues on. - Jeff From no_reply at codeplex.com Wed Dec 21 11:25:04 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 21 Dec 2011 02:25:04 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/20/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] zlib fails to compress an empty string 2. [New comment] binascii.b2a_qp is present but throws NotImplemented breaking quopri standard module. 3. [New comment] Remove obsolete APIs after IronPython 2.6 ships 4. [New comment] "from System.Net import *" throws "SystemError: Object reference not set to an instance of an object" 5. [New comment] CPython's test_fileio.py broken under IPy 6. [New comment] Implement zipimport module 7. [New comment] Implement zipimport module ---------------------------------------------- ISSUES 1. [New issue] zlib fails to compress an empty string http://ironpython.codeplex.com/workitem/31976 User slide_o_mix has proposed the issue: "Error in IronPython: Traceback (most recent call last): File "C:\Users\acearl\Desktop\test.py", line 11, in File "C:\Users\acearl\Code\IronLanguagesMain\External.LCA_RESTRICTED\Languages \IronPython\27\Lib\zipfile.py", line 1094, in writestr zlib.error: Error -3 while compressing: buffer error CPython does not output an error and successfully creates the zip file. Code to reproduce: import sys import zipimport, time from zipfile import * z = ZipFile('foo.zip', 'w') zinfo = ZipInfo('foo.py', time.localtime()) zinfo.compress_type = ZIP_DEFLATED z.writestr(zinfo, '')"----------------- 2. [New comment] binascii.b2a_qp is present but throws NotImplemented breaking quopri standard module. http://ironpython.codeplex.com/workitem/4928 User slide_o_mix has commented on the issue: "I get a different error on the latest trunk: TypeError: b2a_qp() got an unexpected keyword argument 'header'"----------------- 3. [New comment] Remove obsolete APIs after IronPython 2.6 ships http://ironpython.codeplex.com/workitem/20775 User slide_o_mix has commented on the issue: "Do you have a list of those API's that can be removed?"----------------- 4. [New comment] "from System.Net import *" throws "SystemError: Object reference not set to an instance of an object" http://ironpython.codeplex.com/workitem/25806 User slide_o_mix has commented on the issue: "I don't see a modules.misc file in the source tree, is this available somewhere else?"----------------- 5. [New comment] CPython's test_fileio.py broken under IPy http://ironpython.codeplex.com/workitem/24686 User slide_o_mix has commented on the issue: "Added check for sys.platform != "cli" in test_fileio.py, will merge test file."----------------- 6. [New comment] Implement zipimport module http://ironpython.codeplex.com/workitem/391 User slide_o_mix has commented on the issue: "Implemented in https://github.com/IronLanguages/main/pull/49"----------------- 7. [New comment] Implement zipimport module http://ironpython.codeplex.com/workitem/391 User jdhardy has commented on the issue: "Fixed in 9c479d1/1d6ffca." ---------------------------------------------- ---------------------------------------------- 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 slide.o.mix at gmail.com Wed Dec 21 14:28:48 2011 From: slide.o.mix at gmail.com (Slide) Date: Wed, 21 Dec 2011 06:28:48 -0700 Subject: [Ironpython-users] Codeplex Issues Message-ID: It would be really nice to get some help from the community in reviewing the current set of issues that exist on Codeplex. There are LOTS of issues that could be obsolete, duplicate, etc that would be nice if we could determine the current status. If you have some time, please take a look at the issues at [1] and see if you can run a quick test to verify if it is still an issue or not. Thanks, slide [1] http://ironpython.codeplex.com/workitem/list/advanced?keyword=&status=Open%2b%28not%2bclosed%29&type=All&priority=All&release=All&assignedTo=All&component=All&sortField=LastUpdatedDate&sortDirection=Descending&page=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Dec 21 20:53:36 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 21 Dec 2011 11:53:36 -0800 Subject: [Ironpython-users] Reload module within embedded C# app In-Reply-To: References: Message-ID: On Wed, Dec 21, 2011 at 11:32 AM, Daniel Fernandez wrote: > Hi Jeff, > > I downloaded NWSGI and?see where you call engine.ImportModule in > the?WsgiApplication.GetApplicationInfo method. It works great with that > module changes. > > I couldn't get modules that were changed from the entry module to update. I > have python script test.py that imports test2, if test2.py the changes in > the scope didn't reflect after engine.ImportModule on test.py. I was sure if > there was a way to force a reload of test2 module. I figure if I can remove > test2 module from sys.modules the next time I perform ImportModule on test > it would reload test2, but I am not sure if this makes sense. That's basically what you want to do. I'm not 100% up on the import mechanism (it's a bit hairy) but that should do what you want. The other option would be to completely recreate the ScriptEngine, which is where the modules are stored. This is a bit more time-consuming, but if scripts aren't changing constantly it shouldn't be too bad. - Jeff From fernandez_dan2 at hotmail.com Wed Dec 21 23:16:38 2011 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Wed, 21 Dec 2011 14:16:38 -0800 Subject: [Ironpython-users] Reload module within embedded C# app In-Reply-To: References: , , , Message-ID: Hi Jeff, In my simple scenario was able to update test2. I just perform the followingvarsuccess = engine.GetSysModule().GetVariable("modules").Remove("test2"); then I perform the ImportModule on the test module and test2 was updated. I'm not sure if this is correct but I received the wanted effect. I will keep playing and thanks for the help. Danny > Date: Wed, 21 Dec 2011 11:53:36 -0800 > Subject: Re: [Ironpython-users] Reload module within embedded C# app > From: jdhardy at gmail.com > To: fernandez_dan2 at hotmail.com > CC: ironpython-users at python.org > > On Wed, Dec 21, 2011 at 11:32 AM, Daniel Fernandez > wrote: > > Hi Jeff, > > > > I downloaded NWSGI and see where you call engine.ImportModule in > > the WsgiApplication.GetApplicationInfo method. It works great with that > > module changes. > > > > I couldn't get modules that were changed from the entry module to update. I > > have python script test.py that imports test2, if test2.py the changes in > > the scope didn't reflect after engine.ImportModule on test.py. I was sure if > > there was a way to force a reload of test2 module. I figure if I can remove > > test2 module from sys.modules the next time I perform ImportModule on test > > it would reload test2, but I am not sure if this makes sense. > > That's basically what you want to do. I'm not 100% up on the import > mechanism (it's a bit hairy) but that should do what you want. > > The other option would be to completely recreate the ScriptEngine, > which is where the modules are stored. This is a bit more > time-consuming, but if scripts aren't changing constantly it shouldn't > be too bad. > > - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Thu Dec 22 00:17:20 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Wed, 21 Dec 2011 18:17:20 -0500 Subject: [Ironpython-users] Reload module within embedded C# app In-Reply-To: References: Message-ID: On Wed, Dec 21, 2011 at 5:16 PM, Daniel Fernandez wrote: > Hi Jeff, > > In my simple scenario was able to update test2. I just perform the following > varsuccess = engine.GetSysModule().GetVariable("modules").Remove("test2"); > > > then I perform the ImportModule on the test module and test2 was updated. > I'm not sure if this is correct but I received the wanted effect.? I will > keep playing and thanks for the help. > > Danny Yes, that's an acceptable way to do it; I have done this in environments where recreating the ScriptRuntime was too expensive. From jdhardy at gmail.com Thu Dec 22 08:34:49 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 21 Dec 2011 23:34:49 -0800 Subject: [Ironpython-users] IronPython for Android Message-ID: In what must have been a fit of insanity, I decided to try porting IronPython to Mono for Android. Surprisingly, it wan't that hard to get it to compile, and the new build system makes it much easier to add more platforms (this is not a coincidence, of course). Unfortunately, I don't know enough about MonoDroid to say that it will work 100%. My very quick hello world demo worked, but it doesn't do much. I don't know what pieces are only loaded at runtime that will fail, and I haven't figured out a sane way to run the test suite under the Android emulator. If you want to check it out, there's a preview build available at http://dl.dropbox.com/u/18551867/IronPython-2.7.2a0.zip (look in Platforms/android) and the source is at https://github.com/jdhardy/ironpython/tree/ipy-2.7-android. Please open any issues on http://ironpython.codeplex.com/workitem/list/basic, as always. This, of course, is just the beginning. MonoTouch, Windows Phone, Windows 8 Metro, etc. would all be nice additions as well. - Jeff From zgramana at pottsconsultinggroup.com Thu Dec 22 13:21:06 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Thu, 22 Dec 2011 07:21:06 -0500 Subject: [Ironpython-users] IronPython for Android In-Reply-To: References: Message-ID: FTW! On Dec 22, 2011, at 2:34, Jeff Hardy wrote: > In what must have been a fit of insanity, I decided to try porting > IronPython to Mono for Android. Surprisingly, it wan't that hard to > get it to compile, and the new build system makes it much easier to > add more platforms (this is not a coincidence, of course). > > Unfortunately, I don't know enough about MonoDroid to say that it will > work 100%. My very quick hello world demo worked, but it doesn't do > much. I don't know what pieces are only loaded at runtime that will > fail, and I haven't figured out a sane way to run the test suite under > the Android emulator. > > If you want to check it out, there's a preview build available at > http://dl.dropbox.com/u/18551867/IronPython-2.7.2a0.zip (look in > Platforms/android) and the source is at > https://github.com/jdhardy/ironpython/tree/ipy-2.7-android. Please > open any issues on http://ironpython.codeplex.com/workitem/list/basic, > as always. > > This, of course, is just the beginning. MonoTouch, Windows Phone, > Windows 8 Metro, etc. would all be nice additions as well. > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Thu Dec 22 14:30:03 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 22 Dec 2011 05:30:03 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/21/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] sys.version is incomplete in user created engine, creating problems in platform.py 2. [New comment] IPy version string somewhat misleading. 3. [Status update] 2.0.3: Uninstalling (Ngen'ed) IronPython 2.0.2's MSI doesn't remove Ngen'ing 4. [New comment] Memory leak in IronPython 2.0 CreateScriptSource 5. [Status update] "from System.Net import *" throws "SystemError: Object reference not set to an instance of an object" 6. [Status update] def test_dst() fails on new VMs added to the snap pool 7. [Status update] When console_hw.exe fails in SNAP, it should be automatically closed... 8. [Status update] SNAP failure when sanity check passes 9. [Status update] SNAP: RunDesktopDebuggingTests.cmd now failing on x64 OSes 10. [Status update] SNAP: test_cookielib.py randomly failing 11. [Status update] CPython's test_inspect.py randomly failing in SNAP 12. [Status update] CPython's test_asynchat.py failing randomly in SNAP 13. [Status update] CPython's test_ssl.py failing randomly in SNAP 14. [Status update] SNAP: CPython's test_tokenize.py failing randomly 15. [Status update] test_generator_throw randomly failing in SNAP 16. [Status update] SNAP BLOCKING: test_threadedtempfile_cpy fails randomly 17. [Status update] CPy 2.5 test_weakref.py fails on 32-bit Vista quad core SNAP machines 18. [Status update] SNAP: test_bufio.py failing randomly 19. [Status update] SNAP blocking: test_threadsafety_20 is failing randomly in the Signoff and Main pools 20. [Status update] SNAP BLOCKING: CPy 2.5's test_socket.py fails randomly under ipy 21. [Status update] SNAP blocking: test_cgcheck.py failing in the Signoff SNAP pool 22. [New comment] 2.7.1 Missing Prompts with -i parameter? 23. [New comment] 2.7.1 Missing Prompts with -i parameter? 24. [Status update] Implement strop module ---------------------------------------------- ISSUES 1. [New comment] sys.version is incomplete in user created engine, creating problems in platform.py http://ironpython.codeplex.com/workitem/31736 User jdhardy has commented on the issue: "Fixed in baf43f6/a093f70."----------------- 2. [New comment] IPy version string somewhat misleading. http://ironpython.codeplex.com/workitem/31420 User jdhardy has commented on the issue: "Fixed in baf43f6/a093f70."----------------- 3. [Status update] 2.0.3: Uninstalling (Ngen'ed) IronPython 2.0.2's MSI doesn't remove Ngen'ing http://ironpython.codeplex.com/workitem/23556 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "Obsolete."----------------- 4. [New comment] Memory leak in IronPython 2.0 CreateScriptSource http://ironpython.codeplex.com/workitem/20399 User slide_o_mix has commented on the issue: "Is this still the case on 2.7.2?"----------------- 5. [Status update] "from System.Net import *" throws "SystemError: Object reference not set to an instance of an object" http://ironpython.codeplex.com/workitem/25806 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "Can't replicate this with the post-MS environment. "----------------- 6. [Status update] def test_dst() fails on new VMs added to the snap pool http://ironpython.codeplex.com/workitem/24078 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP tests not reproducible"----------------- 7. [Status update] When console_hw.exe fails in SNAP, it should be automatically closed... http://ironpython.codeplex.com/workitem/24496 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 8. [Status update] SNAP failure when sanity check passes http://ironpython.codeplex.com/workitem/23501 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 9. [Status update] SNAP: RunDesktopDebuggingTests.cmd now failing on x64 OSes http://ironpython.codeplex.com/workitem/23588 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 10. [Status update] SNAP: test_cookielib.py randomly failing http://ironpython.codeplex.com/workitem/21692 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 11. [Status update] CPython's test_inspect.py randomly failing in SNAP http://ironpython.codeplex.com/workitem/27625 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 12. [Status update] CPython's test_asynchat.py failing randomly in SNAP http://ironpython.codeplex.com/workitem/27189 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 13. [Status update] CPython's test_ssl.py failing randomly in SNAP http://ironpython.codeplex.com/workitem/27188 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 14. [Status update] SNAP: CPython's test_tokenize.py failing randomly http://ironpython.codeplex.com/workitem/26988 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 15. [Status update] test_generator_throw randomly failing in SNAP http://ironpython.codeplex.com/workitem/24689 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 16. [Status update] SNAP BLOCKING: test_threadedtempfile_cpy fails randomly http://ironpython.codeplex.com/workitem/23895 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 17. [Status update] CPy 2.5 test_weakref.py fails on 32-bit Vista quad core SNAP machines http://ironpython.codeplex.com/workitem/23981 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 18. [Status update] SNAP: test_bufio.py failing randomly http://ironpython.codeplex.com/workitem/22919 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 19. [Status update] SNAP blocking: test_threadsafety_20 is failing randomly in the Signoff and Main pools http://ironpython.codeplex.com/workitem/24102 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 20. [Status update] SNAP BLOCKING: CPy 2.5's test_socket.py fails randomly under ipy http://ironpython.codeplex.com/workitem/23858 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 21. [Status update] SNAP blocking: test_cgcheck.py failing in the Signoff SNAP pool http://ironpython.codeplex.com/workitem/23720 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "SNAP failures not reproducible"----------------- 22. [New comment] 2.7.1 Missing Prompts with -i parameter? http://ironpython.codeplex.com/workitem/31908 User jdhardy has commented on the issue: "Fixed in c0c9e6e/d60c7b0."----------------- 23. [New comment] 2.7.1 Missing Prompts with -i parameter? http://ironpython.codeplex.com/workitem/31908 User jdhardy has commented on the issue: "Fixed in c0c9e6e/d60c7b0."----------------- 24. [Status update] Implement strop module http://ironpython.codeplex.com/workitem/21403 User jdhardy has updated the issue: Status has changed from Active to Closed with the following comment, "This should never be referenced in real code, and IronPython already implements the `string` module." ---------------------------------------------- ---------------------------------------------- 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 jdhardy at gmail.com Thu Dec 22 23:52:54 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 22 Dec 2011 14:52:54 -0800 Subject: [Ironpython-users] Last day for the IronPython 2011 survey Message-ID: Today is the last day for the IronPython 2011 survey. It only takes a few minutes, so if you haven't filled it out yet, please do. http://bit.ly/ipy-2011-survey I'll crunch the results and post them sometime next year. - Jeff From no_reply at codeplex.com Tue Dec 27 09:48:34 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 27 Dec 2011 00:48:34 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/26/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] wpf.LoadComponent can't read Relative URI of ImageSource in ImageBrush ---------------------------------------------- ISSUES 1. [New issue] wpf.LoadComponent can't read Relative URI of ImageSource in ImageBrush http://ironpython.codeplex.com/workitem/32006 User guchi has proposed the issue: "wpf.LoadComonent() can't read follow xaml file. ------------------------------------------------------------------------ ------------------------------------------------------------------------ But wpf.LoadComponent can read when ImageBrush tag is changed as follows. And I add a follow line in a script file. " self.image1.ImageSource = BitmapImage(Uri("/cake.jpg", UriKind.Relative))" ("self" is a Window class.) Then the script file can work as intended. Of course, I have comfirmed that wpf.LoadComponent can read Absolute URI of ImageSource in ImageBrush. Therefore, I assume this is a bug. Please comfirm." ---------------------------------------------- ---------------------------------------------- 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 Dec 28 15:32:23 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 28 Dec 2011 06:32:23 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 12/27/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Pickling Numpy arrays 2. [New comment] Pickling Numpy arrays 3. [New comment] Pickling Numpy arrays 4. [New comment] Pickling Numpy arrays ---------------------------------------------- ISSUES 1. [New issue] Pickling Numpy arrays http://ironpython.codeplex.com/workitem/32007 User Hyang02116 has proposed the issue: "When I pickle large Numpy arrays using IronPython [e.g. arrays that have 1 million elements], >99% of the numbers are recovered exactly when using Unpickle, but <1% of the entries are quite different after loading the pickled value, and the differences seem larger than can be accounted for by simple floating point precision errors, e.g. -0.0241330987517 becomes -0.448629580028. I wonder if anyone else has experienced this."----------------- 2. [New comment] Pickling Numpy arrays http://ironpython.codeplex.com/workitem/32007 User slide_o_mix has commented on the issue: "Can you please add a simple test case so this can be reproduced and debugged."----------------- 3. [New comment] Pickling Numpy arrays http://ironpython.codeplex.com/workitem/32007 User Hyang02116 has commented on the issue: "import numpy, pickle fname = "H:\\testfile" fobj = open(fname, 'w') old = numpy.zeros((1, 1)) old[0][0] = -0.0241330987517 pickle.dump(["h","a","y", old], fobj) fobj.close() fobj = open(fname) new = pickle.Unpickler(fobj).load() new = new[3] fobj.close() for i in range(1): if old[i][0] != new[i][0]: print str(i) + " " + str(old[i][0]) + " " + str(new[i][0]) "----------------- 4. [New comment] Pickling Numpy arrays http://ironpython.codeplex.com/workitem/32007 User Hyang02116 has commented on the issue: "Doing that, I get an old value of -0.02413309877517 and a new value of -0.448629580027" ---------------------------------------------- ---------------------------------------------- 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 phatfish at gmail.com Thu Dec 29 16:30:27 2011 From: phatfish at gmail.com (Chris) Date: Thu, 29 Dec 2011 15:30:27 +0000 Subject: [Ironpython-users] PyPDF error Message-ID: Hi, Can anyone explain this bellow. Does PyPDF use some unsported part of the standard lib? Because there are no external modules required for it. On another note, is there a way for the "Execute Project in Python Interactive" to use the vanilla Python interpreter rather than the IronPython one. I cant see a way to change this? Thanks *Python 2.7 Interactive Window* Resetting execution engine >>> from pyPdf import PdfFileReader >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short numbers/2370.pdf', 'rb')) >>> print 'test' test >>> *IronPython 2.7 Interactive Window* >>> from pyPdf import PdfFileReader >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short numbers/2370.pdf', 'rb')) Traceback (most recent call last): File "", line 1, in File "C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\pdf.py", line 374, in __init__ self.read(stream) File "C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\pdf.py", line 732, in read num = readObject(stream, self) File "C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\generic.py", line 87, in readObject return NumberObject.readFromStream(stream) File "C:\Program Files (x86)\IronPython 2.7.1\lib\site-packages\pyPdf\generic.py", line 236, in readFromStream return NumberObject(name) TypeError: expected int, got str >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Thu Dec 29 17:15:20 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 29 Dec 2011 08:15:20 -0800 Subject: [Ironpython-users] PyPDF error In-Reply-To: References: Message-ID: This looks like a bug in IronPython when deriving a class from int. Here's a simple repro; file a bug! In IronPython 2.7.1, >>> class Integer(int): ... def __init__(self, value): ... int.__init__(value) ... >>> Integer(10) 10 >>> Integer('10') Traceback (most recent call last): File "", line 1, in TypeError: expected int, got str >>> int('10') 10 >>> In Python 2.6, >>> class Integer(int): ... def __init__(self, value): ... int.__init__(value) ... >>> Integer(10) 10 >>> Integer('10') 10 >>> int('10') 10 >>> On Thu, Dec 29, 2011 at 7:30 AM, Chris wrote: > Hi, > > Can anyone explain this bellow. Does PyPDF use some unsported part of the > standard lib? Because there are no external modules required for it. > On another note, is there a way for the "Execute Project in Python > Interactive" to use the vanilla Python interpreter rather than the > IronPython one. I cant see a way to change this? > > Thanks > > *Python 2.7 Interactive Window* > > Resetting execution engine > >>> from pyPdf import PdfFileReader > >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short > numbers/2370.pdf', 'rb')) > >>> print 'test' > test > >>> > > *IronPython 2.7 Interactive Window* > > >>> from pyPdf import PdfFileReader > >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short > numbers/2370.pdf', 'rb')) > Traceback (most recent call last): > File "", line 1, in > File "C:\Program Files (x86)\IronPython > 2.7.1\lib\site-packages\pyPdf\pdf.py", line 374, in __init__ > self.read(stream) > File "C:\Program Files (x86)\IronPython > 2.7.1\lib\site-packages\pyPdf\pdf.py", line 732, in read > num = readObject(stream, self) > File "C:\Program Files (x86)\IronPython > 2.7.1\lib\site-packages\pyPdf\generic.py", line 87, in readObject > return NumberObject.readFromStream(stream) > File "C:\Program Files (x86)\IronPython > 2.7.1\lib\site-packages\pyPdf\generic.py", line 236, in readFromStream > return NumberObject(name) > TypeError: expected int, got str > >>> > > _______________________________________________ > 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 phatfish at gmail.com Fri Dec 30 00:22:15 2011 From: phatfish at gmail.com (Chris) Date: Thu, 29 Dec 2011 23:22:15 +0000 Subject: [Ironpython-users] PyPDF error In-Reply-To: References: Message-ID: Oh i see, thanks for explaining Curt. I should have dug a little deeper myself, but usually its me doing something stupid and not a bug. I assumed it was my fault =) I'll open a ticket. On 29 December 2011 16:15, Curt Hagenlocher wrote: > This looks like a bug in IronPython when deriving a class from int. Here's > a simple repro; file a bug! > > In IronPython 2.7.1, > > >>> class Integer(int): > ... def __init__(self, value): > ... int.__init__(value) > ... > >>> Integer(10) > 10 > >>> Integer('10') > > Traceback (most recent call last): > File "", line 1, in > > TypeError: expected int, got str > >>> int('10') > 10 > >>> > > In Python 2.6, > >>> class Integer(int): > ... def __init__(self, value): > ... int.__init__(value) > ... > >>> Integer(10) > 10 > >>> Integer('10') > 10 > >>> int('10') > 10 > >>> > On Thu, Dec 29, 2011 at 7:30 AM, Chris wrote: > >> Hi, >> >> Can anyone explain this bellow. Does PyPDF use some unsported part of the >> standard lib? Because there are no external modules required for it. >> On another note, is there a way for the "Execute Project in Python >> Interactive" to use the vanilla Python interpreter rather than the >> IronPython one. I cant see a way to change this? >> >> Thanks >> >> *Python 2.7 Interactive Window* >> >> Resetting execution engine >> >>> from pyPdf import PdfFileReader >> >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short >> numbers/2370.pdf', 'rb')) >> >>> print 'test' >> test >> >>> >> >> *IronPython 2.7 Interactive Window* >> >> >>> from pyPdf import PdfFileReader >> >>> pdf = PdfFileReader(open('D:/Chris/Documents/sorting/short >> numbers/2370.pdf', 'rb')) >> Traceback (most recent call last): >> File "", line 1, in >> File "C:\Program Files (x86)\IronPython >> 2.7.1\lib\site-packages\pyPdf\pdf.py", line 374, in __init__ >> self.read(stream) >> File "C:\Program Files (x86)\IronPython >> 2.7.1\lib\site-packages\pyPdf\pdf.py", line 732, in read >> num = readObject(stream, self) >> File "C:\Program Files (x86)\IronPython >> 2.7.1\lib\site-packages\pyPdf\generic.py", line 87, in readObject >> return NumberObject.readFromStream(stream) >> File "C:\Program Files (x86)\IronPython >> 2.7.1\lib\site-packages\pyPdf\generic.py", line 236, in readFromStream >> return NumberObject(name) >> TypeError: expected int, got str >> >>> >> >> _______________________________________________ >> 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: