From idan at cloudshare.com Thu Dec 2 17:21:40 2010 From: idan at cloudshare.com (Idan Zaltzberg) Date: Thu, 2 Dec 2010 18:21:40 +0200 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 In-Reply-To: <6C7ABA8B4E309440B857D74348836F2EFABCA0@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> <7e83f84c109370e8b45a06e29b30b26e@mail.gmail.com> <6C7ABA8B4E309440B857D74348836F2EFABCA0@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: <7afefb0b47a01ee2c1a1386ba6a86aaa@mail.gmail.com> After further testing I find very weird behaviors of the Jit. For instance, looks like if use some pattern too many times, The Jit counter goes to infinity, while otherwise it stabilizes. It would be very helpful to get printouts from ipy whenever it creates an a object that requires jitting. Are there a few places I can Console.writeline in the IronPython code that should cover most of these cases? Is there any cache mechanism you are aware of, that might cause this behavior where "over usage" generates infinite Jitting? *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland *Sent:* Monday, November 29, 2010 8:23 PM *To:* Discussion of IronPython *Subject:* Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 The closest non-windbg solution I could think of might be CLR Profiler which can probably report the number of dynamic method objects which are alive. Windbg can also do this when you dump the heap and is probably over all actually easier to use in this case as you can attach, do !DumpHeap ?stat, and then detach. Just one more data point which might help you understand what?s going on ? the JITed methods in this case are probably adding 4k of memory to the cost of each defaultdict instance as long as the defaultdict is alive. *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Idan Zaltzberg *Sent:* Monday, November 29, 2010 9:59 AM *To:* Discussion of IronPython *Subject:* Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Thanks. How I suspect there is a leak in the JIT of my application, up until now I thought that if the performance counter for "# of methods jitted" is constantly rising then that means exactly that. From your reply I understand that this is not the case. Can you tell how can I know how many uncollectible JIT objects I have so that I can trace them (preferably without using windbg) Thanks again? *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland *Sent:* Monday, November 29, 2010 7:41 PM *To:* Discussion of IronPython *Subject:* Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Defaultdict is creating a new invoke binder ? it should be getting the binder from PythonContext using the Invoke(CallSignature) method. Because it creates a new binder each time we are getting no caching of the rules across defaultdict instances and it?ll end up generating a new method to handle the missing call. It is collectible (so not really a leak) but it is really bad from a performance perspective. *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Idan Zaltzberg *Sent:* Monday, November 29, 2010 4:10 AM *To:* Discussion of IronPython *Subject:* [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Dec 3 03:51:19 2010 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 3 Dec 2010 02:51:19 +0000 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 In-Reply-To: <7afefb0b47a01ee2c1a1386ba6a86aaa@mail.gmail.com> References: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> <7e83f84c109370e8b45a06e29b30b26e@mail.gmail.com> <6C7ABA8B4E309440B857D74348836F2EFABCA0@TK5EX14MBXC135.redmond.corp.microsoft.com> <7afefb0b47a01ee2c1a1386ba6a86aaa@mail.gmail.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E01035B52@TK5EX14MBXC135.redmond.corp.microsoft.com> CompilerHelpers.CompileToMethod is probably where we'll usually go through whenever we need to compile anything. You might also look for other calls to LambdaExpression.Compile as there could be a few of those lurking. Any repeated jiting is probably being caused due to the failure of caching rather than caching its self. All of that caching should basically be in our call site bindings but they'll all age out over time so while methods may be getting JITed they should also be getting freed. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Thursday, December 02, 2010 8:22 AM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 After further testing I find very weird behaviors of the Jit. For instance, looks like if use some pattern too many times, The Jit counter goes to infinity, while otherwise it stabilizes. It would be very helpful to get printouts from ipy whenever it creates an a object that requires jitting. Are there a few places I can Console.writeline in the IronPython code that should cover most of these cases? Is there any cache mechanism you are aware of, that might cause this behavior where "over usage" generates infinite Jitting? From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, November 29, 2010 8:23 PM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 The closest non-windbg solution I could think of might be CLR Profiler which can probably report the number of dynamic method objects which are alive. Windbg can also do this when you dump the heap and is probably over all actually easier to use in this case as you can attach, do !DumpHeap -stat, and then detach. Just one more data point which might help you understand what's going on - the JITed methods in this case are probably adding 4k of memory to the cost of each defaultdict instance as long as the defaultdict is alive. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Monday, November 29, 2010 9:59 AM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Thanks. How I suspect there is a leak in the JIT of my application, up until now I thought that if the performance counter for "# of methods jitted" is constantly rising then that means exactly that. From your reply I understand that this is not the case. Can you tell how can I know how many uncollectible JIT objects I have so that I can trace them (preferably without using windbg) Thanks again... From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, November 29, 2010 7:41 PM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Defaultdict is creating a new invoke binder - it should be getting the binder from PythonContext using the Invoke(CallSignature) method. Because it creates a new binder each time we are getting no caching of the rules across defaultdict instances and it'll end up generating a new method to handle the missing call. It is collectible (so not really a leak) but it is really bad from a performance perspective. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Monday, November 29, 2010 4:10 AM To: Discussion of IronPython Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Fri Dec 3 06:28:14 2010 From: slide.o.mix at gmail.com (Slide) Date: Thu, 2 Dec 2010 22:28:14 -0700 Subject: [IronPython] __delattr__ in .NET class Message-ID: I am currently implementing a module in C#. I need to be able to override the __delattr__ method for one of my objects. I've put in a __delattr__ method that takes a string, but it never gets called. I also tried DeleteMember because I saw that around too. Is there a way to do this? Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ From dinov at microsoft.com Fri Dec 3 07:35:29 2010 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 3 Dec 2010 06:35:29 +0000 Subject: [IronPython] __delattr__ in .NET class In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E01036A8F@TK5EX14MBXC135.redmond.corp.microsoft.com> Slide wrote: > I am currently implementing a module in C#. I need to be able to override the > __delattr__ method for one of my objects. I've put in a __delattr__ method > that takes a string, but it never gets called. I also tried DeleteMember > because I saw that around too. Is there a way to do this? Did DeleteMember have [SpecialName] attribute on it? It should work if it's got that attribute. The ideal way to do this is to implement IDynamicMetaObjectProvider so that it'll work from all languages (DeleteMember is more of a IronPython-ism). From slide.o.mix at gmail.com Fri Dec 3 13:47:52 2010 From: slide.o.mix at gmail.com (Slide) Date: Fri, 3 Dec 2010 05:47:52 -0700 Subject: [IronPython] __delattr__ in .NET class In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E01036A8F@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E01036A8F@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: On Thu, Dec 2, 2010 at 11:35 PM, Dino Viehland wrote: > Slide wrote: >> I am currently implementing a module in C#. I need to be able to override the >> __delattr__ method for one of my objects. I've put in a __delattr__ method >> that takes a string, but it never gets called. I also tried DeleteMember >> because I saw that around too. Is there a way to do this? > > Did DeleteMember have [SpecialName] attribute on it? ?It should work if it's got > that attribute. ?The ideal way to do this is to implement IDynamicMetaObjectProvider > so that it'll work from all languages (DeleteMember is more of a IronPython-ism). > No, it did not have [SpecialName], it works great now. Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ From empirebuilder at gmail.com Sun Dec 5 15:45:34 2010 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Sun, 5 Dec 2010 16:45:34 +0200 Subject: [IronPython] no compile page model question In-Reply-To: References: Message-ID: I think it's because the Codedomprovider that asp.net relies on cannot be implemented in ironpython. On Sat, Nov 27, 2010 at 4:41 PM, Pablo Dalmazzo wrote: > I'm missing a big part of the picture so forgive me if this question doesnt > make any sense to you. > In C#, VB.NET, etc the code behind in asp.net page is defined inside a > class. Is there any relation between > IronPython code doesn't get compiled to normal .NET code where you'd have a > class at the IL level for each class you have at the source level, and > asp.net with IronPython using the no compile page model? > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org From pablodalma93 at hotmail.com Mon Dec 6 12:11:35 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Mon, 6 Dec 2010 08:11:35 -0300 Subject: [IronPython] no compile page model question In-Reply-To: References: , Message-ID: I was just reading about that you said here http://www.asp.net/dynamiclanguages/whitepaperI was trying to figure out if we can dll the asp.net code files without the workarounds we use now > Date: Sun, 5 Dec 2010 16:45:34 +0200 > From: empirebuilder at gmail.com > To: users at lists.ironpython.com > Subject: Re: [IronPython] no compile page model question > > I think it's because the Codedomprovider that asp.net relies on cannot > be implemented in ironpython. > > On Sat, Nov 27, 2010 at 4:41 PM, Pablo Dalmazzo > wrote: > > I'm missing a big part of the picture so forgive me if this question doesnt > > make any sense to you. > > In C#, VB.NET, etc the code behind in asp.net page is defined inside a > > class. Is there any relation between > > IronPython code doesn't get compiled to normal .NET code where you'd have a > > class at the IL level for each class you have at the source level, and > > asp.net with IronPython using the no compile page model? > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > -- > nomadlife.org > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From empirebuilder at gmail.com Tue Dec 7 03:29:01 2010 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Tue, 7 Dec 2010 04:29:01 +0200 Subject: [IronPython] no compile page model question In-Reply-To: References: Message-ID: The source code for IronPython for ASP.Net is available at codeplex. Check out the implementation - you can probably get something out of it. On Mon, Dec 6, 2010 at 1:11 PM, Pablo Dalmazzo wrote: > I was just reading about that you said here > http://www.asp.net/dynamiclanguages/whitepaper > I was trying to figure out if we can dll the asp.net code files without the > workarounds we use now >> Date: Sun, 5 Dec 2010 16:45:34 +0200 >> From: empirebuilder at gmail.com >> To: users at lists.ironpython.com >> Subject: Re: [IronPython] no compile page model question >> >> I think it's because the Codedomprovider that asp.net relies on cannot >> be implemented in ironpython. >> >> On Sat, Nov 27, 2010 at 4:41 PM, Pablo Dalmazzo >> wrote: >> > I'm missing a big part of the picture so forgive me if this question >> > doesnt >> > make any sense to you. >> > In C#, VB.NET, etc the code behind in asp.net page is defined inside a >> > class. Is there any relation between >> > IronPython code doesn't get compiled to normal .NET code where you'd >> > have a >> > class at the IL level for each class you have at the source level, and >> > asp.net with IronPython using the no compile page model? >> > >> > >> > _______________________________________________ >> > Users mailing list >> > Users at lists.ironpython.com >> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > >> > >> >> >> >> -- >> nomadlife.org >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- nomadlife.org From robinsiebler at 321.net Tue Dec 7 19:46:43 2010 From: robinsiebler at 321.net (robinsiebler) Date: Tue, 7 Dec 2010 10:46:43 -0800 (PST) Subject: [IronPython] adding items to a listview (what am I doing wrong) Message-ID: <30399194.post@talk.nabble.com> I am trying to add items to a list view. Just to make sure it works, I add 1 item when the control is created. However, when I try to add an item at run-time (using the same code), the item is not added to the control: item2 = ListViewItem() item2.Text = self.currGameName item2.SubItems.Add(self.currGameTrainer) item2.SubItems.Add(self.currGameExe) self._listView1.BeginUpdate() self._listView1.Items.Add(item2) self._listView1.EndUpdate() What am I doing wrong? http://old.nabble.com/file/p30399194/MainForm.py MainForm.py -- View this message in context: http://old.nabble.com/adding-items-to-a-listview-%28what-am-I-doing-wrong%29-tp30399194p30399194.html Sent from the IronPython mailing list archive at Nabble.com. From rjnienaber at gmail.com Thu Dec 9 09:32:24 2010 From: rjnienaber at gmail.com (Richard Nienaber) Date: Thu, 9 Dec 2010 08:32:24 +0000 Subject: [IronPython] Issue Triage In-Reply-To: References: Message-ID: I've identified the following issues that I think are fixed: PEP 342 broken -- generator.send() causes IPy exception socket.gethostbyaddr("") broken under .NET 4.0 Beta (It looks like the correct behavior but the error message is different) codecs.lookup errors with uppercase encoding names And with this: compile() incompatibility with CPython It seems mostly fixed but a SyntaxError is thrown instead of an IndentationError * * Richard * * On Wed, Nov 24, 2010 at 4:54 AM, Jeff Hardy wrote: > There are over 1000 open issues on CodePlex (http://ironpython.codeplex.com/workitem/list/basic), many of them > dating back to IronPython 1.0. A few people have wondered what they > can do to help IronPython without being familiar with the project. If > you're one of those people, then triaging issues would be a great > place to start - those issues should be checked against a modern > version of IronPython (preferably 2.7b1) to see if they are still > valid. > > Also, I'd like to start getting a list of issues that are blockers for > releasing 2.7. If you have an issue that is blocking you in IronPython > 2.7b1, report it on this list - I'll bump the priority up to high to > make sure it doesn't get missed. > > Finally, if everyone could vote for this CodePlex issue > (http://codeplex.codeplex.com/workitem/25398) it would make it much > easier to share the list of blocking bugs. For now, Status = Open, > Impact = High, Release = 2.7. The ones already in the list are the > ones I plan on fixing myself. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drken567 at gmail.com Thu Dec 9 15:50:04 2010 From: drken567 at gmail.com (Ken MacDonald) Date: Thu, 9 Dec 2010 09:50:04 -0500 Subject: [IronPython] IronPython memory usage Message-ID: Hi, We're trying to figure out the usage of overall system memory by our IronPython/WPF app. I've been looking at various "memory profilers", but they seem to be concerned with memory leaks within the app itself, etc. What we'd like to be able to find out is something like this: 1) How much memory does my app use? This is pretty straightforward, check task manager. 2) How much memory does a second (third, fourth...) copy of the app use? Task manager does not appear to show this correctly. It seems as if .NET should be shared among different instances of the application, so that if the first instance of an app uses up 600M of system memory (say, 400M of .NET and 200M of application code) then a second, third... instance of the app should only add each an incremental 200M to the total system memory usage. Task manager appears to show each instance as independently using 600M, inflating the apparent memory used. Anyone know how to properly determine the system load for multiple instances of a .NET app? Again, most of the "memory profilers" don't really appear to address this. Thanks, Ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From iivari at mokelainen.com Thu Dec 9 22:10:10 2010 From: iivari at mokelainen.com (Iivari Mokelainen) Date: Thu, 09 Dec 2010 23:10:10 +0200 Subject: [IronPython] IronPython memory usage In-Reply-To: References: Message-ID: <4D0145B2.20901@mokelainen.com> An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Dec 10 03:01:49 2010 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Dec 2010 02:01:49 +0000 Subject: [IronPython] IronPython memory usage In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E01062AD1@TK5EX14MBXC135.redmond.corp.microsoft.com> What task manager reports I believe depends on what version of Windows you're on. You might want to right click on the columns and add some of the Memory columns. By default Win7 seems to have private working set selected (which would be what each additional copy requires). But there's also a "Working Set" option which should be private + shared bytes. Also, one way to reduce the memory usage would be to pre-compile your app and ngen it if you're not already doing so. This will cause the Python code (at least the code which isn't eval'd/exec'd/compile'd) to be shared between processes. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ken MacDonald Sent: Thursday, December 09, 2010 6:50 AM To: Discussion of IronPython Subject: [IronPython] IronPython memory usage Hi, We're trying to figure out the usage of overall system memory by our IronPython/WPF app. I've been looking at various "memory profilers", but they seem to be concerned with memory leaks within the app itself, etc. What we'd like to be able to find out is something like this: 1) How much memory does my app use? This is pretty straightforward, check task manager. 2) How much memory does a second (third, fourth...) copy of the app use? Task manager does not appear to show this correctly. It seems as if .NET should be shared among different instances of the application, so that if the first instance of an app uses up 600M of system memory (say, 400M of .NET and 200M of application code) then a second, third... instance of the app should only add each an incremental 200M to the total system memory usage. Task manager appears to show each instance as independently using 600M, inflating the apparent memory used. Anyone know how to properly determine the system load for multiple instances of a .NET app? Again, most of the "memory profilers" don't really appear to address this. Thanks, Ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Dec 10 03:10:15 2010 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Dec 2010 02:10:15 +0000 Subject: [IronPython] Issue Triage In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E01062B2C@TK5EX14MBXC135.redmond.corp.microsoft.com> Thanks for doing this! I've gone ahead and closed the first three. I'm going to leave the compile() one open so it can get the right exception. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Richard Nienaber Sent: Thursday, December 09, 2010 12:32 AM To: Discussion of IronPython Subject: Re: [IronPython] Issue Triage I've identified the following issues that I think are fixed: PEP 342 broken -- generator.send() causes IPy exception socket.gethostbyaddr("") broken under .NET 4.0 Beta (It looks like the correct behavior but the error message is different) codecs.lookup errors with uppercase encoding names And with this: compile() incompatibility with CPython It seems mostly fixed but a SyntaxError is thrown instead of an IndentationError Richard On Wed, Nov 24, 2010 at 4:54 AM, Jeff Hardy > wrote: There are over 1000 open issues on CodePlex (http://ironpython.codeplex.com/workitem/list/basic), many of them dating back to IronPython 1.0. A few people have wondered what they can do to help IronPython without being familiar with the project. If you're one of those people, then triaging issues would be a great place to start - those issues should be checked against a modern version of IronPython (preferably 2.7b1) to see if they are still valid. Also, I'd like to start getting a list of issues that are blockers for releasing 2.7. If you have an issue that is blocking you in IronPython 2.7b1, report it on this list - I'll bump the priority up to high to make sure it doesn't get missed. Finally, if everyone could vote for this CodePlex issue (http://codeplex.codeplex.com/workitem/25398) it would make it much easier to share the list of blocking bugs. For now, Status = Open, Impact = High, Release = 2.7. The ones already in the list are the ones I plan on fixing myself. - Jeff _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Dec 10 09:42:48 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Dec 2010 01:42:48 -0700 Subject: [IronPython] Issue Triage In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E01062B2C@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E01062B2C@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: On Thu, Dec 9, 2010 at 7:10 PM, Dino Viehland wrote: > Thanks for doing this!? I?ve gone ahead and closed the first three.? I?m > going to leave the compile() one open so it can get the right exception. It looks like IndentationError is a subclass of SyntaxError anyway, so it should still work, right? - Jeff From jdhardy at gmail.com Fri Dec 10 09:44:05 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Dec 2010 01:44:05 -0700 Subject: [IronPython] Issue Triage In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E01062B2C@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: On Fri, Dec 10, 2010 at 1:42 AM, Jeff Hardy wrote: > On Thu, Dec 9, 2010 at 7:10 PM, Dino Viehland wrote: >> Thanks for doing this!? I?ve gone ahead and closed the first three.? I?m >> going to leave the compile() one open so it can get the right exception. > > It looks like IndentationError is a subclass of SyntaxError anyway, so > it should still work, right? Nevermind, I was reading it backwards - IronPython should be raising the Indentation error, but it's not. Whoops. - Jeff From twyatt at ppi.ca Fri Dec 10 09:46:38 2010 From: twyatt at ppi.ca (Tim P. Wyatt) Date: Fri, 10 Dec 2010 00:46:38 -0800 Subject: [IronPython] Tim Wyatt is out of the office Message-ID: I will be out of the office starting 10/12/2010 and will not return until 14/12/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpdesk at ppi.ca) From mauriciosl at yahoo.com.br Fri Dec 10 12:22:04 2010 From: mauriciosl at yahoo.com.br (Mauricio Souza Lima) Date: Fri, 10 Dec 2010 03:22:04 -0800 (PST) Subject: [IronPython] XNA 4.0 Message-ID: <742751.9202.qm@web33508.mail.mud.yahoo.com> Hi all. I'm trying to run the XNA example posted here: http://www.ironpython.info/index.php/XNA_Example_-_Luminance But i'm trying that with XNA and .NET 4.0 on IronPython 2.6. After changing some imports that seems to be different in XNA 4.0 version, the program gives me this error: Traceback (most recent call last): File "xna_test.py", line 33, in File "xna_test.py", line 13, in __init__ File "xna_test.py", line 17, in initializeComponent SystemError: The invoked member is not supported in a dynamic assembly. The line 17 is this one: self.graphics = GraphicsDeviceManager(self) Program can be seen here: http://pastebin.com/nQazPhFU Thanks, Mauricio Souza Lima mauriciosl at yahoo.com.br From jcao219 at gmail.com Fri Dec 10 23:35:55 2010 From: jcao219 at gmail.com (Jimmy Cao) Date: Fri, 10 Dec 2010 16:35:55 -0600 Subject: [IronPython] XNA 4.0 In-Reply-To: <742751.9202.qm@web33508.mail.mud.yahoo.com> References: <742751.9202.qm@web33508.mail.mud.yahoo.com> Message-ID: Hello, Happens for me too with the new version of XNA (I wrote that example). I have no idea what's causing it. Sorry that I can't help much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Sat Dec 11 02:39:32 2010 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 11 Dec 2010 01:39:32 +0000 Subject: [IronPython] XNA 4.0 In-Reply-To: <742751.9202.qm@web33508.mail.mud.yahoo.com> References: <742751.9202.qm@web33508.mail.mud.yahoo.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E0106837D@TK5EX14MBXC135.redmond.corp.microsoft.com> Mauricio wrote: > > Hi all. > > I'm trying to run the XNA example posted here: > http://www.ironpython.info/index.php/XNA_Example_-_Luminance > > But i'm trying that with XNA and .NET 4.0 on IronPython 2.6. > After changing some imports that seems to be different in XNA 4.0 version, > the program gives me this error: > > Traceback (most recent call last): > File "xna_test.py", line 33, in > File "xna_test.py", line 13, in __init__ > File "xna_test.py", line 17, in initializeComponent > SystemError: The invoked member is not supported in a dynamic assembly. > > The line 17 is this one: > > self.graphics = GraphicsDeviceManager(self) I would suggest compiling a small C# assembly which is just something like: public class Maker { public static object MakeGraphicsDeviceManager() { return new GraphicsDeviceManager(); } } And then call this instead of calling GraphicsDeviceManager directly. There's occasionally a type which disallows being created via reflection/dynamic methods (for whatever reason) and this is one work around. Another possibility is that we're calling it via reflection because it hasn't been called enough but it'll work if called via a dynamic method. In that case you can actually call it in a loop until we optimize the creation to a call from a dynamic method. I doubt this is the case this time though because of the error message is specifically calling out the dynamic assembly. From rjnienaber at gmail.com Mon Dec 13 15:14:51 2010 From: rjnienaber at gmail.com (Richard Nienaber) Date: Mon, 13 Dec 2010 14:14:51 +0000 Subject: [IronPython] Issue Triage Message-ID: The issues below look like they can be set to fixed. - ref parameter doesn't work with protected methods - Skype4COM and System.Windows.Forms.AxHost+Invalid ActiveXStateException - Reproducible in C# so I don't think this is an IronPython problem - pyc fails if a file contains a call to unicode - Calling compile on a bad encoding string doesnt throw error - This problem in the original an issue seems to be solved but the problem highlighted in the comment still seems to be occurring. I'm assuming this means the issue should stay open? - logging module still crashing even with Python Issue5287 logging2.patch - Stress: Modules use too much memory - It's a bit difficult to say whether this issue should be closed or not without seeing the original test script. I've added my own that tries to reproduce the error. However, it doesn't look like modules are taking up as much memory as stated in the issue. - Cannot set nullable long properties to Python long constants Sorry, if this is covered somewhere in the documentation but how do I run the tests in the '\Src\IronPython_Main\Languages\IronPython\Tests' directory? Tests like 'Cannot set nullable long properties to Python long constants' reference 'test_methodbinder1.py' but when I try and execute them I get the following error: \Src\IronPython_Main\Languages\IronPython\Tests>ipy test_methodbinder1.py Traceback (most recent call last): File "test_methodbinder1.py", line 20, in ImportError: No module named iptest.assert_util Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdozor at pyxismobile.com Mon Dec 13 18:18:04 2010 From: sdozor at pyxismobile.com (Sam Dozor) Date: Mon, 13 Dec 2010 12:18:04 -0500 Subject: [IronPython] Thread Locking Message-ID: <3AD3F31583CEBC40BD2560BBC96781BD0A9D665AA7@jefferson.pyxisit.com> Hello All, I'm trying to use IronPython to lock a thread and have not been able to import the correct modules. I have IronPython.modules.dll in the same directory as IronPython.dll, and yet when I try the line "import threading" I get something like "threading module does not exist". I'm basically trying to use the lock() keyword from .NET, but if I can use Python's locking capabilities I'd do that too. Any ideas? Thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Dec 13 19:09:49 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 13 Dec 2010 18:09:49 +0000 Subject: [IronPython] Thread Locking In-Reply-To: <3AD3F31583CEBC40BD2560BBC96781BD0A9D665AA7@jefferson.pyxisit.com> References: <3AD3F31583CEBC40BD2560BBC96781BD0A9D665AA7@jefferson.pyxisit.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E01076719@TK5EX14MBXC135.redmond.corp.microsoft.com> Lock is just syntactic sugar for doing Monitor.Enter/Monitor.Exit calls on the object and setting up the try/finally. Here's the IronPython equivalent: from System.Threading import Monitor class Locker(object): def __init__(self, obj): self.obj = obj def __enter__(self): Monitor.Enter(self.obj) def __exit__(self, exc_type, exc_value, exc_tb): Monitor.Exit(self.obj) with Locker(object()): print 'hello' (I thought we had considered putting something like this in the clr module at one point in time so you wouldn't have to define the Locker class but it looks like that never made it in but it'd be an easy thing to add if someone wanted to give it a try). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sam Dozor Sent: Monday, December 13, 2010 9:18 AM To: Discussion of IronPython Subject: [IronPython] Thread Locking Hello All, I'm trying to use IronPython to lock a thread and have not been able to import the correct modules. I have IronPython.modules.dll in the same directory as IronPython.dll, and yet when I try the line "import threading" I get something like "threading module does not exist". I'm basically trying to use the lock() keyword from .NET, but if I can use Python's locking capabilities I'd do that too. Any ideas? Thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Mon Dec 13 19:34:21 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 13 Dec 2010 11:34:21 -0700 Subject: [IronPython] Issue Triage In-Reply-To: References: Message-ID: First off: thanks, again, for doing this. I haven't had a chance to look at these, but I'll try ASAP. On Mon, Dec 13, 2010 at 7:14 AM, Richard Nienaber wrote: > Sorry, if this is covered somewhere in the documentation but how do I run > the tests in the '\Src\IronPython_Main\Languages\IronPython\Tests' > directory? Tests like 'Cannot set nullable long properties to Python long > constants' reference 'test_methodbinder1.py' but when I try and execute them > I get the following error: > > \Src\IronPython_Main\Languages\IronPython\Tests>ipy test_methodbinder1.py > Traceback (most recent call last): > ? File "test_methodbinder1.py", line 20, in > ImportError: No module named iptest.assert_util You need to use the TestRunner, whihc sets up a bunch of stuff for the tests. See http://ironpython.codeplex.com/wikipage?title=Respository%20Instructions ("Running Tests", at the bottom) for details. To run a specific test, you'll need to open IronPython.tests and find the name of the test that file belongs to (it *should* just be test_methodbinder1, but check to be sure). If you have the test-ipy.cmd script (I can't remember if I added to the tree or not), just run: test-ipy /test:test_methodbinder1 otherwise: TestRunner\TestRunner\bin\Debug\TestRunner.exe IronPython.tests /test:test_methodbinder1 Hope that helps. - Jeff From robinsiebler at 321.net Tue Dec 14 01:42:50 2010 From: robinsiebler at 321.net (robinsiebler) Date: Mon, 13 Dec 2010 16:42:50 -0800 (PST) Subject: [IronPython] adding items to a listview (what am I doing wrong) In-Reply-To: <30399194.post@talk.nabble.com> References: <30399194.post@talk.nabble.com> Message-ID: <30450878.post@talk.nabble.com> robinsiebler wrote: > > I am trying to add items to a list view. Just to make sure it works, I add > 1 item when the control is created. However, when I try to add an item at > run-time (using the same code), the item is not added to the control: > > item2 = ListViewItem() > item2.Text = self.currGameName > item2.SubItems.Add(self.currGameTrainer) > item2.SubItems.Add(self.currGameExe) > self._listView1.BeginUpdate() > self._listView1.Items.Add(item2) > self._listView1.EndUpdate() > > What am I doing wrong? > > http://old.nabble.com/file/p30399194/MainForm.py MainForm.py > I can't tell if the item is not being added or is just not visible. I tried using EnsureVisible, but it didn't help. -- View this message in context: http://old.nabble.com/adding-items-to-a-listview-%28what-am-I-doing-wrong%29-tp30399194p30450878.html Sent from the IronPython mailing list archive at Nabble.com. From LHaynes at Gemcomsoftware.com Tue Dec 14 01:52:14 2010 From: LHaynes at Gemcomsoftware.com (Leighton Haynes) Date: Mon, 13 Dec 2010 16:52:14 -0800 Subject: [IronPython] adding items to a listview (what am I doing wrong) In-Reply-To: <30450878.post@talk.nabble.com> References: <30399194.post@talk.nabble.com> <30450878.post@talk.nabble.com> Message-ID: <2EFB9E117D333C42A67280E55D2D3578018A5D0A559F@MAILBOX2.gemcomsoftware.priv> This looks like winforms, which I haven't used in ages, but I'm guessing that it's because you're changing the item inside the ListView's items collection, but the ListView doesn't know that the items collection has changed. You can probably set the ListView Items property to null and then back to your collection, which will result in it updating. (This isn't really an IronPython question - you'd probably be better off asking this UI stuff in a more appropriate forum). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of robinsiebler Sent: Tuesday, 14 December 2010 8:43 AM To: users at lists.ironpython.com Subject: Re: [IronPython] adding items to a listview (what am I doing wrong) robinsiebler wrote: > > I am trying to add items to a list view. Just to make sure it works, I > add > 1 item when the control is created. However, when I try to add an item > at run-time (using the same code), the item is not added to the control: > > item2 = ListViewItem() > item2.Text = self.currGameName > item2.SubItems.Add(self.currGameTrainer) > item2.SubItems.Add(self.currGameExe) > self._listView1.BeginUpdate() > self._listView1.Items.Add(item2) > self._listView1.EndUpdate() > > What am I doing wrong? > > http://old.nabble.com/file/p30399194/MainForm.py MainForm.py > I can't tell if the item is not being added or is just not visible. I tried using EnsureVisible, but it didn't help. -- View this message in context: http://old.nabble.com/adding-items-to-a-listview-%28what-am-I-doing-wrong%29-tp30399194p30450878.html Sent from the IronPython mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From charles.medcoff at rcmt.com Thu Dec 16 15:18:09 2010 From: charles.medcoff at rcmt.com (Medcoff, Charles) Date: Thu, 16 Dec 2010 09:18:09 -0500 Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process Message-ID: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> I have a SharePoint app (Commerce Server to be exact) that is launching an IronPython script. What is the best way to be able to step into or break into the debugger within the IronPython script? --chuck From sdozor at pyxismobile.com Thu Dec 16 15:40:12 2010 From: sdozor at pyxismobile.com (Sam Dozor) Date: Thu, 16 Dec 2010 09:40:12 -0500 Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process In-Reply-To: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> References: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> Message-ID: <3AD3F31583CEBC40BD2560BBC96781BD0A9D665BE0@jefferson.pyxisit.com> The only reliable tool that I've found is visual studio 2010 w/ IronPython add-on, although I often have a hard time breaking directly in IPy code, I tend to first break in c# land and then step into IPy. That said, I've been looking for a more lightweight (free?) option, so hopefully somebody will respond to this... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Medcoff, Charles Sent: Thursday, December 16, 2010 9:18 AM To: Discussion of IronPython Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process I have a SharePoint app (Commerce Server to be exact) that is launching an IronPython script. What is the best way to be able to step into or break into the debugger within the IronPython script? --chuck _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Thu Dec 16 15:40:31 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 16 Dec 2010 07:40:31 -0700 Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process In-Reply-To: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> References: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> Message-ID: On Thu, Dec 16, 2010 at 7:18 AM, Medcoff, Charles wrote: > I have a SharePoint app (Commerce Server to be exact) that is launching an IronPython script. ?What is the best way to be able to step into or break into the debugger within the IronPython script? Hi Charles, Simplest version: import System.Diagnostics; System.Diagnostics.Debugger.Break() See [1] for more details. Maybe I should add a clr.Break() or something like that to make it easier. - Jeff [1] http://jdhardy.blogspot.com/2010/01/debugging-techniques-for-ironpython.html From charles.medcoff at rcmt.com Thu Dec 16 15:41:48 2010 From: charles.medcoff at rcmt.com (Medcoff, Charles) Date: Thu, 16 Dec 2010 09:41:48 -0500 Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process In-Reply-To: <3AD3F31583CEBC40BD2560BBC96781BD0A9D665BE0@jefferson.pyxisit.com> References: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> <3AD3F31583CEBC40BD2560BBC96781BD0A9D665BE0@jefferson.pyxisit.com> Message-ID: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC31@RCMTMAIL.rcmt.com> Well I've got 2010 with the add-on. I just added the following code to my script and will let you know the outcome: import clr clr.AddReference("System.Diagnosics") from System.Diagnostics import Debugger Debugger.Break() -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sam Dozor Sent: Thursday, December 16, 2010 9:40 AM To: Discussion of IronPython Subject: Re: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process The only reliable tool that I've found is visual studio 2010 w/ IronPython add-on, although I often have a hard time breaking directly in IPy code, I tend to first break in c# land and then step into IPy. That said, I've been looking for a more lightweight (free?) option, so hopefully somebody will respond to this... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Medcoff, Charles Sent: Thursday, December 16, 2010 9:18 AM To: Discussion of IronPython Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process I have a SharePoint app (Commerce Server to be exact) that is launching an IronPython script. What is the best way to be able to step into or break into the debugger within the IronPython script? --chuck _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Thu Dec 16 18:53:43 2010 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 16 Dec 2010 17:53:43 +0000 Subject: [IronPython] How to break in the debugger in IP when script lauched from a hosting C# process In-Reply-To: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> References: <4EFFA72C340FF54A9A2FA84786378C6DCF0D6EEC26@RCMTMAIL.rcmt.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E010895DD@TK5EX14MBXC135.redmond.corp.microsoft.com> Chuck wrote: > I have a SharePoint app (Commerce Server to be exact) that is launching an > IronPython script. What is the best way to be able to step into or break into > the debugger within the IronPython script? You should enable debug mode for the script runtime to make the code debuggable. There's a DebugMode property on ScriptRuntimeSetup that you can set that will enable that. Then if the code you're compiling is all on disk w/ filenames we should emit debugging information for it (if you're creating script sources from strings you'll need to write them out to disk and create them from files). >From there you should be able to attach VS and step, set break points, etc... You don't want to do this all the time though because debuggable code is not collectible code so you could end up leaking memory. From msenko at completegenomics.com Thu Dec 16 20:48:42 2010 From: msenko at completegenomics.com (Mark Senko) Date: Thu, 16 Dec 2010 11:48:42 -0800 Subject: [IronPython] SciPy Message-ID: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> I've been searching for the current state of support for "C" based libraries, specifically SciPy (I'm just looking for a decent numerical analysis package). The responses I've seen on various websites are somewhat dated. What is the latest status, or is there no effort towards accommodating the C API? Is IronClad still the best option? Any info, suggestions and warnings would be appreciated before I start to invest a lot of time into installing and learning these packages. Mark Senko Complete Genomics, Inc. 2071 Stierlin Court Mountain View, CA 94043 ____ The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Dec 16 20:56:37 2010 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 16 Dec 2010 19:56:37 +0000 Subject: [IronPython] SciPy In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> Enthought has been working on getting numpy/scipy ported over to work w/ IronPython. I believe numpy is working but I'm not sure of how far along SciPy is. There's a separate mailing list for this at: https://mail.enthought.com/mailman/listinfo/scipy4dotnet It's very low traffic - it's usually just working through issues Enthought has run into and either workarounds or suggested changes to IronPython. I'd suggest sending a mail there - they might have something you can try. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mark Senko Sent: Thursday, December 16, 2010 11:49 AM To: users at lists.ironpython.com Subject: [IronPython] SciPy I've been searching for the current state of support for "C" based libraries, specifically SciPy (I'm just looking for a decent numerical analysis package). The responses I've seen on various websites are somewhat dated. What is the latest status, or is there no effort towards accommodating the C API? Is IronClad still the best option? Any info, suggestions and warnings would be appreciated before I start to invest a lot of time into installing and learning these packages. Mark Senko Complete Genomics, Inc. 2071 Stierlin Court Mountain View, CA 94043 ____ The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Sat Dec 18 00:28:51 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 17 Dec 2010 16:28:51 -0700 Subject: [IronPython] Issue Triage In-Reply-To: References: Message-ID: On Mon, Dec 13, 2010 at 7:14 AM, Richard Nienaber wrote: > The issues below look like they can be set to fixed. > > ref parameter doesn't work with protected methods > > Skype4COM and System.Windows.Forms.AxHost+InvalidActiveXStateException > > logging module still crashing even with Python Issue5287 logging2.patch > > Stress: Modules use too much memory > > Cannot set nullable long properties to Python long constants I've closed all of these as fixed in 2.6.2 and 2.7B1. > pyc fails if a file contains a call to unicode This is still an issue in 2.6.2; I've targeted to 2.6.3, if we ever do such a thing. > Calling compile on a bad encoding string doesnt throw error I still need to look into this one more closely. Thanks again! - Jeff From jmccampbell at enthought.com Mon Dec 20 16:13:28 2010 From: jmccampbell at enthought.com (Jason McCampbell) Date: Mon, 20 Dec 2010 09:13:28 -0600 Subject: [IronPython] SciPy In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: Hi Mark, As Dino mentioned we (Enthought) are working on refactoring Numpy into a pure "C" core with CPython and IronPython interface layers. This is largely complete and available at github (https://github.com/numpy/numpy-refactor), though the core layer is largely undocumented thus far. This is the multi-dimensional array. SciPy is in progress and we are updating it to work with the refactored numpy core and to add an IronPython interface. I assume you are looking for IronPython interfaces to SciPy as opposed to a C interface, correct? Regards, Jason On Thu, Dec 16, 2010 at 1:56 PM, Dino Viehland wrote: > Enthought has been working on getting numpy/scipy ported over to work w/ > IronPython. I believe numpy is working but I?m not sure of how far along > SciPy is. There?s a separate mailing list for this at: > > > > https://mail.enthought.com/mailman/listinfo/scipy4dotnet > > > > It?s very low traffic ? it?s usually just working through issues Enthought > has run into and either workarounds or suggested changes to IronPython. I?d > suggest sending a mail there ? they might have something you can try. > > > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Mark Senko > *Sent:* Thursday, December 16, 2010 11:49 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] SciPy > > > > I?ve been searching for the current state of support for ?C? based > libraries, specifically SciPy (I?m just looking for a decent numerical > analysis package). The responses I?ve seen on various websites are somewhat > dated. > > What is the latest status, or is there no effort towards accommodating the > C API? Is IronClad still the best option? Any info, suggestions and warnings > would be appreciated before I start to invest a lot of time into installing > and learning these packages. > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > > > > > ____ > > > > The contents of this e-mail and any attachments are confidential and only for > > use by the intended recipient. Any unauthorized use, distribution or copying > > of this message is strictly prohibited. If you are not the intended recipient > > please inform the sender immediately by reply e-mail and delete this message > > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From msenko at completegenomics.com Mon Dec 20 19:32:01 2010 From: msenko at completegenomics.com (Mark Senko) Date: Mon, 20 Dec 2010 10:32:01 -0800 Subject: [IronPython] SciPy In-Reply-To: References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com><6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Thank you. My real goal is to find a decent math/numerical package that I can use without having to reinvent the wheel. My searches came up with numpy/SciPy. Whether it actually uses the C interface or is a refactored version for .NET really doesn?t matter to me. At least not much. I think I?ll take this opportunity to explain to this portion of the IronPython community (which seems to contain most of the real ?movers? ) why I chose IronPython, and what I want to accomplish with it. I?m sure my use case may be of interest, at least academically, to some of you. I write software that controls hardware ? it moves samples around with a robot and stage, controls shutters, light sources, moves optics, performs data acquisition and data analysis. It?s a complicated system. It requires scientists and engineers with high levels of knowledge in optics, physics, electronics to develop, study and understand performance, and to calibrate. At my old company, we wrote our own macro language (early ?90s) which provided functions to move the pieces of hardware, call higher level routines in our code, call mathematical and higher level analysis routines, plot, macros could call other macros ? just about anything you want a scripting language to do. The portion of my efforts I spent extending this macro language was time well spent. Instead of being the bottleneck that had to write all new tests and experiments and new platform prototyping, I enabled the other scientists and engineers to do it themselves. I was an enabler, and productivity shot through the roof. Some of the macros written were simple, others complicated ? but most were not written by me, they were written by the scientists and engineers. But, they were not programmers ? at least not in the computer scientist sense. They think procedurally, not object oriented. They don?t want to argue about global vs. local variables, or whether a GOTO is good programming style. They don?t develop web pages. At my new company, which builds a tool with similar demands, I am implementing similar scripting abilities. I didn?t want to write my own scripting language again, that would be crazy with the number that are already available. The core needs are control over the hardware, numerical capabilities, plotting capabilities. The language also needs to be straightforward without too much overhead, like a pile of import statements, that don?t really contribute to the functionality. I also wanted a language with a some history, and lot?s of community written libraries that I could use without having to write my own. I did my internet search and looked at many different scripting languages, finally settling on Python as having the best set of language features for my needs. Granted, I HATE the indentation control, especially since an auto-indented line has a ?different? indentation than the preceding line which was indented with spaces (unless you carefully set up your editor). I would much rather see braces or ENDIF,ENDFOR, ENDDEF ? statements. That?s just an aside ? Our company uses C#. I quickly discovered that C# and Python don?t play well together ?. Ah, but here is IronPython. So I learned how to embed it, wrote my own console, learned how to make static wrappers, how to make my functions global, and how to make python functions global. I?m still learning the best and easiest ways to use it for our needs. But, I?m starting to find that the community developed libraries I was counting on are more often than not out of reach. That is what I found when I started looking for a simple math package that would fit a polynomial, perform an FFT, maybe even do a non-linear least squares fit. And I still need to find a plotting package ? Anyway, I thought this might be interesting to some of you. Mark Senko Complete Genomics, Inc. 2071 Stierlin Court Mountain View, CA 94043 From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jason McCampbell Sent: Monday, December 20, 2010 7:13 AM To: Discussion of IronPython Subject: Re: [IronPython] SciPy Hi Mark, As Dino mentioned we (Enthought) are working on refactoring Numpy into a pure "C" core with CPython and IronPython interface layers. This is largely complete and available at github (https://github.com/numpy/numpy-refactor), though the core layer is largely undocumented thus far. This is the multi-dimensional array. SciPy is in progress and we are updating it to work with the refactored numpy core and to add an IronPython interface. I assume you are looking for IronPython interfaces to SciPy as opposed to a C interface, correct? Regards, Jason On Thu, Dec 16, 2010 at 1:56 PM, Dino Viehland wrote: Enthought has been working on getting numpy/scipy ported over to work w/ IronPython. I believe numpy is working but I?m not sure of how far along SciPy is. There?s a separate mailing list for this at: https://mail.enthought.com/mailman/listinfo/scipy4dotnet It?s very low traffic ? it?s usually just working through issues Enthought has run into and either workarounds or suggested changes to IronPython. I?d suggest sending a mail there ? they might have something you can try. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mark Senko Sent: Thursday, December 16, 2010 11:49 AM To: users at lists.ironpython.com Subject: [IronPython] SciPy I?ve been searching for the current state of support for ?C? based libraries, specifically SciPy (I?m just looking for a decent numerical analysis package). The responses I?ve seen on various websites are somewhat dated. What is the latest status, or is there no effort towards accommodating the C API? Is IronClad still the best option? Any info, suggestions and warnings would be appreciated before I start to invest a lot of time into installing and learning these packages. Mark Senko Complete Genomics, Inc. 2071 Stierlin Court Mountain View, CA 94043 ____ The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ____ The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hrhan at att.net Mon Dec 20 20:42:45 2010 From: hrhan at att.net (Howard Hansen) Date: Mon, 20 Dec 2010 13:42:45 -0600 Subject: [IronPython] SciPy In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com><6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: <4D0FB1B5.5050007@att.net> Hello Mark, If you can't find an open source math package that meets your needs you may want to take a look at CenterSpace's NMath Library. The library is .Net compatible. See: http://www.centerspace.net/products/nmath/ Cost: $995 for Nmath or $1295 for NMath and a statistical library. Howard On 12/20/2010 12:32 PM, Mark Senko wrote: > > Thank you. > > My real goal is to find a decent math/numerical package that I can use > without having to reinvent the wheel. > > My searches came up with numpy/SciPy. Whether it actually uses the C > interface or is a refactored version for .NET really doesn?t matter > to me. > > At least not much. > > I think I?ll take this opportunity to explain to this portion of the > IronPython community (which seems to contain most of the real ?movers? > ) why I chose IronPython, and what I want to accomplish with it. > > I?m sure my use case may be of interest, at least academically, to > some of you. > > I write software that controls hardware ? it moves samples around with > a robot and stage, controls shutters, light sources, moves optics, > performs data acquisition and data analysis. > > It?s a complicated system. It requires scientists and engineers with > high levels of knowledge in optics, physics, electronics to develop, > study and understand performance, and to calibrate. > > At my old company, we wrote our own macro language (early ?90s) which > provided functions to move the pieces of hardware, call higher level > routines in our code, call mathematical and higher level analysis > routines, plot, macros could call other macros ? just about anything > you want a scripting language to do. The portion of my efforts I > spent extending this macro language was time well spent. Instead of > being the bottleneck that had to write all new tests and experiments > and new platform prototyping, I enabled the other scientists and > engineers to do it themselves. I was an enabler, and productivity shot > through the roof. > > Some of the macros written were simple, others complicated ? but most > were not written by me, they were written by the scientists and engineers. > > But, they were not programmers ? at least not in the computer > scientist sense. They think procedurally, not object oriented. They > don?t want to argue about global vs. local variables, or whether a > GOTO is good programming style. They don?t develop web pages. > > At my new company, which builds a tool with similar demands, I am > implementing similar scripting abilities. I didn?t want to write my > own scripting language again, that would be crazy with the number that > are already available. > > The core needs are control over the hardware, numerical capabilities, > plotting capabilities. The language also needs to be straightforward > without too much overhead, like a pile of import statements, that > don?t really contribute to the functionality. I also wanted a > language with a some history, and lot?s of community written libraries > that I could use without having to write my own. > > I did my internet search and looked at many different scripting > languages, finally settling on Python as having the best set of > language features for my needs. > > Granted, I HATE the indentation control, especially since an > auto-indented line has a ?different? indentation than the preceding > line which was indented with spaces (unless you carefully set up your > editor). > > I would much rather see braces or ENDIF,ENDFOR, ENDDEF ? statements. > That?s just an aside ? > > Our company uses C#. I quickly discovered that C# and Python don?t > play well together ?. Ah, but here is IronPython. > > So I learned how to embed it, wrote my own console, learned how to > make static wrappers, how to make my functions global, and how to make > python functions global. I?m still learning the best and easiest ways > to use it for our needs. > > But, I?m starting to find that the community developed libraries I was > counting on are more often than not out of reach. That is what I found > when I started looking for a simple math package that would fit a > polynomial, perform an FFT, maybe even do a non-linear least squares > fit. And I still need to find a plotting package ? > > Anyway, I thought this might be interesting to some of you. > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > *From:*users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Jason > McCampbell > *Sent:* Monday, December 20, 2010 7:13 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] SciPy > > Hi Mark, > > As Dino mentioned we (Enthought) are working on refactoring Numpy into > a pure "C" core with CPython and IronPython interface layers. This is > largely complete and available at github > (https://github.com/numpy/numpy-refactor), though the core layer is > largely undocumented thus far. This is the multi-dimensional array. > > SciPy is in progress and we are updating it to work with the > refactored numpy core and to add an IronPython interface. > > I assume you are looking for IronPython interfaces to SciPy as opposed > to a C interface, correct? > > Regards, > > Jason > > On Thu, Dec 16, 2010 at 1:56 PM, Dino Viehland > wrote: > > Enthought has been working on getting numpy/scipy ported over to work > w/ IronPython. I believe numpy is working but I?m not sure of how far > along SciPy is. There?s a separate mailing list for this at: > > https://mail.enthought.com/mailman/listinfo/scipy4dotnet > > It?s very low traffic ? it?s usually just working through issues > Enthought has run into and either workarounds or suggested changes to > IronPython. I?d suggest sending a mail there ? they might have > something you can try. > > *From:*users-bounces at lists.ironpython.com > > [mailto:users-bounces at lists.ironpython.com > ] *On Behalf Of *Mark Senko > *Sent:* Thursday, December 16, 2010 11:49 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] SciPy > > I?ve been searching for the current state of support for ?C? based > libraries, specifically SciPy (I?m just looking for a decent numerical > analysis package). The responses I?ve seen on various websites are > somewhat dated. > > What is the latest status, or is there no effort towards accommodating > the C API? Is IronClad still the best option? Any info, suggestions > and warnings would be appreciated before I start to invest a lot of > time into installing and learning these packages. > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > ____ > > The contents of this e-mail and any attachments are confidential and only for > use by the intended recipient. Any unauthorized use, distribution or copying > of this message is strictly prohibited. If you are not the intended recipient > please inform the sender immediately by reply e-mail and delete this message > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > ____ > > The contents of this e-mail and any attachments are confidential and only for > use by the intended recipient. Any unauthorized use, distribution or copying > of this message is strictly prohibited. If you are not the intended recipient > please inform the sender immediately by reply e-mail and delete this message > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Mon Dec 20 21:56:20 2010 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Mon, 20 Dec 2010 12:56:20 -0800 Subject: [IronPython] SciPy In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: There's also MetaNumerics (http://metanumerics.codeplex.com/) On Mon, Dec 20, 2010 at 10:32 AM, Mark Senko wrote: > Thank you. > > My real goal is to find a decent math/numerical package that I can use > without having to reinvent the wheel. > > My searches came up with numpy/SciPy. Whether it actually uses the C > interface or is a refactored version for .NET really doesn?t matter to me. > > > > At least not much. > > > > I think I?ll take this opportunity to explain to this portion of the > IronPython community (which seems to contain most of the real ?movers? ) why > I chose IronPython, and what I want to accomplish with it. > > I?m sure my use case may be of interest, at least academically, to some of > you. > > > > I write software that controls hardware ? it moves samples around with a > robot and stage, controls shutters, light sources, moves optics, performs > data acquisition and data analysis. > > It?s a complicated system. It requires scientists and engineers with high > levels of knowledge in optics, physics, electronics to develop, study and > understand performance, and to calibrate. > > > > At my old company, we wrote our own macro language (early ?90s) which > provided functions to move the pieces of hardware, call higher level > routines in our code, call mathematical and higher level analysis routines, > plot, macros could call other macros ? just about anything you want a > scripting language to do. The portion of my efforts I spent extending this > macro language was time well spent. Instead of being the bottleneck that > had to write all new tests and experiments and new platform prototyping, I > enabled the other scientists and engineers to do it themselves. I was an > enabler, and productivity shot through the roof. > > Some of the macros written were simple, others complicated ? but most were > not written by me, they were written by the scientists and engineers. > > > > But, they were not programmers ? at least not in the computer scientist > sense. They think procedurally, not object oriented. They don?t want to > argue about global vs. local variables, or whether a GOTO is good > programming style. They don?t develop web pages. > > > > At my new company, which builds a tool with similar demands, I am > implementing similar scripting abilities. I didn?t want to write my own > scripting language again, that would be crazy with the number that are > already available. > > The core needs are control over the hardware, numerical capabilities, > plotting capabilities. The language also needs to be straightforward > without too much overhead, like a pile of import statements, that don?t > really contribute to the functionality. I also wanted a language with a > some history, and lot?s of community written libraries that I could use > without having to write my own. > > > > I did my internet search and looked at many different scripting languages, > finally settling on Python as having the best set of language features for > my needs. > > Granted, I HATE the indentation control, especially since an auto-indented > line has a ?different? indentation than the preceding line which was > indented with spaces (unless you carefully set up your editor). > > I would much rather see braces or ENDIF,ENDFOR, ENDDEF ? statements. That?s > just an aside ? > > > > Our company uses C#. I quickly discovered that C# and Python don?t play > well together ?. Ah, but here is IronPython. > > So I learned how to embed it, wrote my own console, learned how to make > static wrappers, how to make my functions global, and how to make python > functions global. I?m still learning the best and easiest ways to use it > for our needs. > > But, I?m starting to find that the community developed libraries I was > counting on are more often than not out of reach. That is what I found when > I started looking for a simple math package that would fit a polynomial, > perform an FFT, maybe even do a non-linear least squares fit. And I still > need to find a plotting package ? > > > > Anyway, I thought this might be interesting to some of you. > > > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Jason McCampbell > *Sent:* Monday, December 20, 2010 7:13 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] SciPy > > > > Hi Mark, > > > > As Dino mentioned we (Enthought) are working on refactoring Numpy into a > pure "C" core with CPython and IronPython interface layers. This is largely > complete and available at github (https://github.com/numpy/numpy-refactor), > though the core layer is largely undocumented thus far. This is the > multi-dimensional array. > > > > SciPy is in progress and we are updating it to work with the refactored > numpy core and to add an IronPython interface. > > > > I assume you are looking for IronPython interfaces to SciPy as opposed to a > C interface, correct? > > > > Regards, > > Jason > > > > On Thu, Dec 16, 2010 at 1:56 PM, Dino Viehland > wrote: > > Enthought has been working on getting numpy/scipy ported over to work w/ > IronPython. I believe numpy is working but I?m not sure of how far along > SciPy is. There?s a separate mailing list for this at: > > > > https://mail.enthought.com/mailman/listinfo/scipy4dotnet > > > > It?s very low traffic ? it?s usually just working through issues Enthought > has run into and either workarounds or suggested changes to IronPython. I?d > suggest sending a mail there ? they might have something you can try. > > > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Mark Senko > *Sent:* Thursday, December 16, 2010 11:49 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] SciPy > > > > I?ve been searching for the current state of support for ?C? based > libraries, specifically SciPy (I?m just looking for a decent numerical > analysis package). The responses I?ve seen on various websites are somewhat > dated. > > What is the latest status, or is there no effort towards accommodating the > C API? Is IronClad still the best option? Any info, suggestions and warnings > would be appreciated before I start to invest a lot of time into installing > and learning these packages. > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > > > > > ____ > > > > The contents of this e-mail and any attachments are confidential and only for > > use by the intended recipient. Any unauthorized use, distribution or copying > > of this message is strictly prohibited. If you are not the intended recipient > > please inform the sender immediately by reply e-mail and delete this message > > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > ____ > > The contents of this e-mail and any attachments are confidential and only for > use by the intended recipient. Any unauthorized use, distribution or copying > of this message is strictly prohibited. If you are not the intended recipient > please inform the sender immediately by reply e-mail and delete this message > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleksii.bidiuk at gmail.com Mon Dec 20 22:04:48 2010 From: oleksii.bidiuk at gmail.com (Oleksii Bidiuk) Date: Mon, 20 Dec 2010 22:04:48 +0100 Subject: [IronPython] SciPy In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: Hi All, I am not intended to add oil to the fire, but I am curious whether somebody can comment on the statement of Mark >> Our company uses C#. I quickly discovered that C# and Python don?t play well together ?. I have a similar situation, meaning C# application that needs to be a) scriptable b) usable for image/data processing using e.g. NumPy and SciPy. While IronPython seems to be the 'easy bet', I wonder if it is also a 'safe bet' for the long term future and whether there are tangible alternatives like e.g. PythonNET (I hope there are others, preferrably backed up by some heavyweight/commercial players). Can anyone comment on this one? Anybody is using or going to use IronPython in commercial apps? Thanks in advance. -- Oleksii -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at mcneel.com Mon Dec 20 22:15:44 2010 From: steve at mcneel.com (Steve Baer) Date: Mon, 20 Dec 2010 13:15:44 -0800 Subject: [IronPython] SciPy In-Reply-To: References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com><6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com><8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: As far as commercial apps go we are using IronPython as a scripting option for the next version of our 3d modeling software, Rhinoceros. http://www.rhino3d.com/ support site specific to python in Rhino http://python.rhino3d.com/ -Steve From: Oleksii Bidiuk Sent: Monday, December 20, 2010 1:04 PM To: Discussion of IronPython Subject: Re: [IronPython] SciPy Hi All, I am not intended to add oil to the fire, but I am curious whether somebody can comment on the statement of Mark >> Our company uses C#. I quickly discovered that C# and Python don?t play well together ?. I have a similar situation, meaning C# application that needs to be a) scriptable b) usable for image/data processing using e.g. NumPy and SciPy. While IronPython seems to be the 'easy bet', I wonder if it is also a 'safe bet' for the long term future and whether there are tangible alternatives like e.g. PythonNET (I hope there are others, preferrably backed up by some heavyweight/commercial players). Can anyone comment on this one? Anybody is using or going to use IronPython in commercial apps? Thanks in advance. -- Oleksii -------------------------------------------------------------------------------- _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascal at travobject.com Mon Dec 20 22:53:27 2010 From: pascal at travobject.com (Pascal Normandin) Date: Mon, 20 Dec 2010 16:53:27 -0500 Subject: [IronPython] SciPy In-Reply-To: References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: <00b801cba090$55f6bf00$01e43d00$@com> Hello, Just to add to Oleksii?s comment, I?m also in a similar situation where I?d like to make an application scriptable with any of my good Iron language friend. I have been using IronPython and IronRuby for side projects for quite some time but not embedded in an application distributed to users. I will probably be embedding both languages but at some point I will need choose one for my users as I will need to create some helpers. I?m still hesitating between both languages so I?d like to know what others think about this. * I prefer the expressiveness of Ruby but I think Python me be easier to learn (for a non programmer technical person) * IronPython seems to perform much better than IronRuby but performance is not an issue in my case (compared to numerical computation) * Since the Iron languages have been released to the community I?m afraid they will not be equally supported or even stop to evolve and support new .net features. It seems to me that the IronPython community is bigger, so it might have a greater chance to survive or be able to continue evolve. Thanks; Pascal From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Oleksii Bidiuk Sent: December-20-10 4:05 PM To: Discussion of IronPython Subject: Re: [IronPython] SciPy Hi All, I am not intended to add oil to the fire, but I am curious whether somebody can comment on the statement of Mark >> Our company uses C#. I quickly discovered that C# and Python don?t play well together ?. I have a similar situation, meaning C# application that needs to be a) scriptable b) usable for image/data processing using e.g. NumPy and SciPy. While IronPython seems to be the 'easy bet', I wonder if it is also a 'safe bet' for the long term future and whether there are tangible alternatives like e.g. PythonNET (I hope there are others, preferrably backed up by some heavyweight/commercial players). Can anyone comment on this one? Anybody is using or going to use IronPython in commercial apps? Thanks in advance. -- Oleksii -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Dec 20 23:07:56 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 20 Dec 2010 22:07:56 +0000 Subject: [IronPython] SciPy In-Reply-To: <00b801cba090$55f6bf00$01e43d00$@com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> , <00b801cba090$55f6bf00$01e43d00$@com> Message-ID: You don't necessarily need to make this choice. IronPython and IronRuby mostly talk to each other (modulo bugs, which I would be happy to fix if possible :-). You can write your helpers in Python and let your users call them from Ruby (and vice versa). Or your helpers could be written in C# or VB. Granted, helpers designed specifically for one particular language might be easier/nicer to use from that language, but you can go pretty far with language interop. Tomas ________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] on behalf of Pascal Normandin [pascal at travobject.com] Sent: Monday, December 20, 2010 1:53 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] SciPy Hello, Just to add to Oleksii?s comment, I?m also in a similar situation where I?d like to make an application scriptable with any of my good Iron language friend. I have been using IronPython and IronRuby for side projects for quite some time but not embedded in an application distributed to users. I will probably be embedding both languages but at some point I will need choose one for my users as I will need to create some helpers. I?m still hesitating between both languages so I?d like to know what others think about this. * I prefer the expressiveness of Ruby but I think Python me be easier to learn (for a non programmer technical person) * IronPython seems to perform much better than IronRuby but performance is not an issue in my case (compared to numerical computation) * Since the Iron languages have been released to the community I?m afraid they will not be equally supported or even stop to evolve and support new .net features. It seems to me that the IronPython community is bigger, so it might have a greater chance to survive or be able to continue evolve. Thanks; Pascal From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Oleksii Bidiuk Sent: December-20-10 4:05 PM To: Discussion of IronPython Subject: Re: [IronPython] SciPy Hi All, I am not intended to add oil to the fire, but I am curious whether somebody can comment on the statement of Mark >> Our company uses C#. I quickly discovered that C# and Python don?t play well together ?. I have a similar situation, meaning C# application that needs to be a) scriptable b) usable for image/data processing using e.g. NumPy and SciPy. While IronPython seems to be the 'easy bet', I wonder if it is also a 'safe bet' for the long term future and whether there are tangible alternatives like e.g. PythonNET (I hope there are others, preferrably backed up by some heavyweight/commercial players). Can anyone comment on this one? Anybody is using or going to use IronPython in commercial apps? Thanks in advance. -- Oleksii -------------- next part -------------- An HTML attachment was scrubbed... URL: From avinhan at gmail.com Tue Dec 21 03:07:41 2010 From: avinhan at gmail.com (Aravin) Date: Tue, 21 Dec 2010 07:37:41 +0530 Subject: [IronPython] SciPy In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E402047CAEB@ws-be-exchange.completegenomics.com> <6C7ABA8B4E309440B857D74348836F2E0108A168@TK5EX14MBXC135.redmond.corp.microsoft.com> <8036074B72EB5B49B0BC19ED6F4E402047CC02@ws-be-exchange.completegenomics.com> Message-ID: Hello, I was also looking for a math library to use with a research tool I was developing. I am using IronPython as the scripting language as it is easy for non programmers, who are familiar with Matlab, to quickly prototype their algorithms. I evaluated Math.NET (http://mathnetnumerics.codeplex.com/) and ILNumerics (http://ilnumerics.net/). I sill prefer if I could use NumPy and SciPy with IronPython and am interested in trying out the Enthought refactored version. As for plotting packages, MatPlotLib (http://matplotlib.sourceforge.net/) is a great plotting library for python. It relies on NumPy. I managed to run it with IronClad, but I still prefer a fully managed version. I ended up writing a wrapper around Microsoft's charting library, so that plot(x,y) could produce a line plot etc. I would love to know if someone came across a plotting library to use with IronPython similar to matplotlib/Matlab type plotting. Aravin On Tue, Dec 21, 2010 at 12:02 AM, Mark Senko wrote: > Thank you. > > My real goal is to find a decent math/numerical package that I can use > without having to reinvent the wheel. > > My searches came up with numpy/SciPy. Whether it actually uses the C > interface or is a refactored version for .NET really doesn?t matter to me. > > > > At least not much. > > > > I think I?ll take this opportunity to explain to this portion of the > IronPython community (which seems to contain most of the real ?movers? ) why > I chose IronPython, and what I want to accomplish with it. > > I?m sure my use case may be of interest, at least academically, to some of > you. > > > > I write software that controls hardware ? it moves samples around with a > robot and stage, controls shutters, light sources, moves optics, performs > data acquisition and data analysis. > > It?s a complicated system. It requires scientists and engineers with high > levels of knowledge in optics, physics, electronics to develop, study and > understand performance, and to calibrate. > > > > At my old company, we wrote our own macro language (early ?90s) which > provided functions to move the pieces of hardware, call higher level > routines in our code, call mathematical and higher level analysis routines, > plot, macros could call other macros ? just about anything you want a > scripting language to do. The portion of my efforts I spent extending this > macro language was time well spent. Instead of being the bottleneck that > had to write all new tests and experiments and new platform prototyping, I > enabled the other scientists and engineers to do it themselves. I was an > enabler, and productivity shot through the roof. > > Some of the macros written were simple, others complicated ? but most were > not written by me, they were written by the scientists and engineers. > > > > But, they were not programmers ? at least not in the computer scientist > sense. They think procedurally, not object oriented. They don?t want to > argue about global vs. local variables, or whether a GOTO is good > programming style. They don?t develop web pages. > > > > At my new company, which builds a tool with similar demands, I am > implementing similar scripting abilities. I didn?t want to write my own > scripting language again, that would be crazy with the number that are > already available. > > The core needs are control over the hardware, numerical capabilities, > plotting capabilities. The language also needs to be straightforward > without too much overhead, like a pile of import statements, that don?t > really contribute to the functionality. I also wanted a language with a > some history, and lot?s of community written libraries that I could use > without having to write my own. > > > > I did my internet search and looked at many different scripting languages, > finally settling on Python as having the best set of language features for > my needs. > > Granted, I HATE the indentation control, especially since an auto-indented > line has a ?different? indentation than the preceding line which was > indented with spaces (unless you carefully set up your editor). > > I would much rather see braces or ENDIF,ENDFOR, ENDDEF ? statements. That?s > just an aside ? > > > > Our company uses C#. I quickly discovered that C# and Python don?t play > well together ?. Ah, but here is IronPython. > > So I learned how to embed it, wrote my own console, learned how to make > static wrappers, how to make my functions global, and how to make python > functions global. I?m still learning the best and easiest ways to use it > for our needs. > > But, I?m starting to find that the community developed libraries I was > counting on are more often than not out of reach. That is what I found when > I started looking for a simple math package that would fit a polynomial, > perform an FFT, maybe even do a non-linear least squares fit. And I still > need to find a plotting package ? > > > > Anyway, I thought this might be interesting to some of you. > > > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Jason McCampbell > *Sent:* Monday, December 20, 2010 7:13 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] SciPy > > > > Hi Mark, > > > > As Dino mentioned we (Enthought) are working on refactoring Numpy into a > pure "C" core with CPython and IronPython interface layers. This is largely > complete and available at github (https://github.com/numpy/numpy-refactor), > though the core layer is largely undocumented thus far. This is the > multi-dimensional array. > > > > SciPy is in progress and we are updating it to work with the refactored > numpy core and to add an IronPython interface. > > > > I assume you are looking for IronPython interfaces to SciPy as opposed to a > C interface, correct? > > > > Regards, > > Jason > > > > On Thu, Dec 16, 2010 at 1:56 PM, Dino Viehland > wrote: > > Enthought has been working on getting numpy/scipy ported over to work w/ > IronPython. I believe numpy is working but I?m not sure of how far along > SciPy is. There?s a separate mailing list for this at: > > > > https://mail.enthought.com/mailman/listinfo/scipy4dotnet > > > > It?s very low traffic ? it?s usually just working through issues Enthought > has run into and either workarounds or suggested changes to IronPython. I?d > suggest sending a mail there ? they might have something you can try. > > > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Mark Senko > *Sent:* Thursday, December 16, 2010 11:49 AM > *To:* users at lists.ironpython.com > *Subject:* [IronPython] SciPy > > > > I?ve been searching for the current state of support for ?C? based > libraries, specifically SciPy (I?m just looking for a decent numerical > analysis package). The responses I?ve seen on various websites are somewhat > dated. > > What is the latest status, or is there no effort towards accommodating the > C API? Is IronClad still the best option? Any info, suggestions and warnings > would be appreciated before I start to invest a lot of time into installing > and learning these packages. > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > > > > > ____ > > > > The contents of this e-mail and any attachments are confidential and only for > > use by the intended recipient. Any unauthorized use, distribution or copying > > of this message is strictly prohibited. If you are not the intended recipient > > please inform the sender immediately by reply e-mail and delete this message > > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > ____ > > The contents of this e-mail and any attachments are confidential and only for > use by the intended recipient. Any unauthorized use, distribution or copying > of this message is strictly prohibited. If you are not the intended recipient > please inform the sender immediately by reply e-mail and delete this message > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxyaffe at gmail.com Wed Dec 22 19:49:27 2010 From: maxyaffe at gmail.com (Max Yaffe) Date: Wed, 22 Dec 2010 13:49:27 -0500 Subject: [IronPython] What's Where Message-ID: Since the recent changes in the IronPython team, manangement, websites, etc., I'm a little confused about what's where, and what websites have the most current releases. First off, there is the http://ironpython.codeplex.com/ website, which has immediate links to: IronPython 2.7B1 for .NET 4.msi and IronPython 2.6.2 for .NET 4.0.msi Then there's ironpython.net which seems to redirect into ironpython.codeplex.com but into older releases, e.g. IronPython 2.6.1 for .NET 4.0.msi and IronPython-2.7A1.msi Which is the right site to use? And what's right for general information and documentation? Is everything on ironpython.net also on ironpython.codeplex.com? Also, I'm looking for up-to-date sample code. Is http://ironpython.codeplex.com/wikipage?title=Samples the best source? And is IronPython-2.6-Samples.zip the latest? Thanks for your clarifications. Max From jimmy at schementi.com Wed Dec 22 20:01:12 2010 From: jimmy at schementi.com (Jimmy Schementi) Date: Wed, 22 Dec 2010 14:01:12 -0500 Subject: [IronPython] What's Where In-Reply-To: References: Message-ID: Both sites are still valid. ironpython.net is the fancy landing page, ironpython.codeplex.com is where you find releases and log bugs. The current source code is on http://github.com/IronLanguages/main. The ironpython.netsite hasn't been updated in a couple months, but it will be, at the latest before the next release. ~Jimmy On Wed, Dec 22, 2010 at 1:49 PM, Max Yaffe wrote: > Since the recent changes in the IronPython team, manangement, websites, > etc., I'm a little confused about what's where, and what websites have the > most current releases. > > First off, there is the http://ironpython.codeplex.com/ website, which > has > immediate links to: > IronPython 2.7B1 for .NET 4.msi > and > IronPython 2.6.2 for .NET 4.0.msi > > Then there's ironpython.net which seems to redirect into > ironpython.codeplex.com but into older releases, e.g. > IronPython 2.6.1 for .NET 4.0.msi > and > IronPython-2.7A1.msi > > Which is the right site to use? And what's right for general information > and documentation? Is everything on ironpython.net also on > ironpython.codeplex.com? > > Also, I'm looking for up-to-date sample code. Is > http://ironpython.codeplex.com/wikipage?title=Samples the best source? > And > is IronPython-2.6-Samples.zip the latest? > > Thanks for your clarifications. > Max > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.antero.tammi at gmail.com Tue Dec 28 22:23:46 2010 From: e.antero.tammi at gmail.com (E. Antero Tammi) Date: Tue, 28 Dec 2010 23:23:46 +0200 Subject: [IronPython] cant import os Message-ID: Hello, I'm new to this list, but figured out that this would be most suitable place to ask following question. Shortly, I just installed latest (2.7) IronPython and it seems to be a very cool implementation indeed, but encountered soon an odd problem: In console I can just ? import os without any problems, howewer on VisualStudio 2010 Shell I'll get error when I'm trying the same: ? import os will yield to error like: Traceback (most recent call last): File "", line 1, in ImportError: No module named os However if I'll do first on the VisualStudio interactive shell: ? import sys ? sys.path.append(r'C:\Program Files (X86)\IronPython 2.7\Lib') and then ? import os everything is just fine (like in the console mode). So I think my question is actually twofold: - is the above behavior intended? - is it possible to add some initialization code to VS when it's launching the shell? Regards, eat -------------- next part -------------- An HTML attachment was scrubbed... URL: From msenko at completegenomics.com Tue Dec 28 23:33:39 2010 From: msenko at completegenomics.com (Mark Senko) Date: Tue, 28 Dec 2010 14:33:39 -0800 Subject: [IronPython] Passing arguments to C# Message-ID: <8036074B72EB5B49B0BC19ED6F4E40204FD13F@ws-be-exchange.completegenomics.com> I'm trying to set up a simple scripting environment for non-programmers that can call into our C# codebase. Python is a non-typed language, whereas C# is strongly typed. This is one of the reasons IronPython was written. It seems that the solution presented by IronPython is to expose .NET types into Python. If I want to call a C# function that takes an array of doubles as an argument, I have a problem. I know you can do something like: Import System Array=System.Array[float](range(10)) To create and initialize the array with a sequence of numbers. But now you are working with a .NET variable, not a Python variable. I can also do something similar with lists. I don't want to bring variable typing into Python, because then it's not Python. I also don't want my users to have to worry about this extra typing and keeping straight which variables need it and which don't. I think the IronPython.Runtime should take care of this, but it doesn't. I'm willing to write wrappers, in C#, for all the functions (if needed) that I want to expose to Python. I've been knocking myself out trying to do this. I've been trying to accept a non-typed list, and use it to fill an array of doubles. In my trial and error attempts, I've prototyped my argument as Public static void TestIt(IList inList) and public static void TestIt(IronPython.runtime.List inList). They both act pretty much the same. I've also tried using tuples. If my python list is created with pyList=range(10), then passed as an argument No matter what I do, I've been unsuccessful filling my array of doubles using myDoubles[i] = (double)inList[i]; (complains that it can't cast a value of infinity) or any other type of casting I can come up with. The debugger shows a nice list, with values 0-9. inList[i].GetType() shows System.Int32. So why can't it cast? As an aside, if I start with pyList=map(float,range(10)), then GetType() returns System.double and the cast works without a problem(and probably isn't needed). But this requires the user to once again worry about the variable type. Based on this, I'm pretty sure if I set up a switch statement on type in my wrapper, and assign a temp variable with the same type, then the cast of the temp variable it would work. But this sure seems clumsy! Does anyone have an idea of how to do this? I'm sure I just haven't hit on the right combination. Basically I want the user to be able to use pyList = range(10) and let me worry about converting it to double in a C# wrapper if that's what is needed. I'm already resigned to writing wrappers in Python to hide clr.Reference[type]() from my users when calling a C# functions that requires an "out" or "ref" parameters. Thanks in advance for reading a post that I *know* is as much rant as question. It's just been frustrating .... Mark Senko Complete Genomics, Inc. 2071 Stierlin Court Mountain View, CA 94043 ____ The contents of this e-mail and any attachments are confidential and only for use by the intended recipient. Any unauthorized use, distribution or copying of this message is strictly prohibited. If you are not the intended recipient please inform the sender immediately by reply e-mail and delete this message from your system. Thank you for your co-operation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjnienaber at gmail.com Wed Dec 29 00:39:17 2010 From: rjnienaber at gmail.com (Richard Nienaber) Date: Tue, 28 Dec 2010 23:39:17 +0000 Subject: [IronPython] Passing arguments to C# In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E40204FD13F@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E40204FD13F@ws-be-exchange.completegenomics.com> Message-ID: Hi Mark I managed to find the followingin the mailing list archives which seems to indicate that it was a design decision: We thought the implicit conversion from a List to an array was a little > evil. The array could be updated inside of the call and the user's list > wouldn't be updated. A caller w/ a tuple doesn't expect to see their tuple > updated, and therefore that is an acceptable conversion. > As is suggested in the mail, using a tuple does seem to work: C#: using System; public class DoubleTest { public void M(double[] arg) { Console.WriteLine(arg[1]); } } IronPython 2.6: import DoubleTest o = DoubleTest() values = tuple([1, 5]) o.M(values) #prints '5' Even though converting to a tuple does work, I think providing a wrapper that accepts IList (which is one of your suggestions) would provide a better experience for the users of your api. Richard On Tue, Dec 28, 2010 at 10:33 PM, Mark Senko wrote: > I?m trying to set up a simple scripting environment for non-programmers > that can call into our C# codebase. > > Python is a non-typed language, whereas C# is strongly typed. This is one > of the reasons IronPython was written. > > > > It seems that the solution presented by IronPython is to expose .NET types > into Python. If I want to call a C# function that takes an array of doubles > as an argument, I have a problem. > > > > I know you can do something like: > > Import System > > Array=System.Array[float](range(10)) > > To create and initialize the array with a sequence of numbers. But now you > are working with a .NET variable, not a Python variable. > > I can also do something similar with lists. > > > > I don?t want to bring variable typing into Python, because then it?s not > Python. I also don?t want my users to have to worry about this extra typing > and keeping straight which variables need it and which don?t. > > I think the IronPython.Runtime should take care of this, but it doesn?t. > > > > I?m willing to write wrappers, in C#, for all the functions (if needed) > that I want to expose to Python. I?ve been knocking myself out trying to do > this. > > I?ve been trying to accept a non-typed list, and use it to fill an array of > doubles. In my trial and error attempts, I?ve prototyped my argument as > > Public static void TestIt(IList inList) and public static void > TestIt(IronPython.runtime.List inList). They both act pretty much the same. > I?ve also tried using tuples. > > > > If my python list is created with pyList=range(10), then passed as an > argument > > No matter what I do, I?ve been unsuccessful filling my array of doubles > using > > myDoubles[i] = (double)inList[i]; (complains that it can?t cast a value > of infinity) > > or any other type of casting I can come up with. > > The debugger shows a nice list, with values 0-9. > > inList[i].GetType() shows System.Int32. So why can?t it cast? > > > > As an aside, if I start with pyList=map(float,range(10)), then GetType() > returns System.double and the cast works without a problem(and probably > isn?t needed). > > But this requires the user to once again worry about the variable type. > > Based on this, I?m pretty sure if I set up a switch statement on type in my > wrapper, and assign a temp variable with the same type, then the cast of the > temp variable it would work. > > But this sure seems clumsy! > > > > Does anyone have an idea of how to do this? I?m sure I just haven?t hit on > the right combination. > > Basically I want the user to be able to use pyList = range(10) and let me > worry about converting it to double in a C# wrapper if that?s what is > needed. > > > > I?m already resigned to writing wrappers in Python to hide > clr.Reference[type]() from my users when calling a C# functions that > requires an ?out? or ?ref? parameters. > > > > Thanks in advance for reading a post that I **know** is as much rant as > question. It?s just been frustrating ?. > > > > > > > > *Mark Senko* > > Complete Genomics, Inc. > > 2071 Stierlin Court > > Mountain View, CA 94043 > > > > ____ > > The contents of this e-mail and any attachments are confidential and only for > use by the intended recipient. Any unauthorized use, distribution or copying > of this message is strictly prohibited. If you are not the intended recipient > please inform the sender immediately by reply e-mail and delete this message > from your system. Thank you for your co-operation. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From twyatt at ppi.ca Wed Dec 29 00:41:55 2010 From: twyatt at ppi.ca (Tim P. Wyatt) Date: Tue, 28 Dec 2010 15:41:55 -0800 Subject: [IronPython] Tim Wyatt is out of the office Message-ID: I will be out of the office starting 24/12/2010 and will not return until 30/12/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpdesk at ppi.ca) From jdhardy at gmail.com Wed Dec 29 07:51:33 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 28 Dec 2010 23:51:33 -0700 Subject: [IronPython] cant import os In-Reply-To: References: Message-ID: What's happening here is that VS actually uses its own copy of IronPython, not the installed one. The copy used by VS does not include the Python stdlib. On Tue, Dec 28, 2010 at 2:23 PM, E. Antero Tammi wrote: > So I think my question is actually twofold: > - is the above behavior intended? I'm not sure; Dino would have to answer that one. > - is it possible to add some initialization code to VS when it's launching > the shell? I don't see why not. I can't really think of a situation where you wouldn't want the stdlib available. If there isn't already an issue for this, please open one, and as always, patches are welcome. - Jeff From jdhardy at gmail.com Wed Dec 29 07:55:30 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 28 Dec 2010 23:55:30 -0700 Subject: [IronPython] Passing arguments to C# In-Reply-To: <8036074B72EB5B49B0BC19ED6F4E40204FD13F@ws-be-exchange.completegenomics.com> References: <8036074B72EB5B49B0BC19ED6F4E40204FD13F@ws-be-exchange.completegenomics.com> Message-ID: On Tue, Dec 28, 2010 at 3:33 PM, Mark Senko wrote: > Public static void TestIt(IList inList) and public static void > TestIt(IronPython.runtime.List inList).? They both act pretty much the same. > I?ve also tried using tuples. > Have you tried using IList or IEnumerable as arguments? IronPython should then handle the conversion for you. - Jeff From pablodalma93 at hotmail.com Wed Dec 29 14:05:07 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Wed, 29 Dec 2010 10:05:07 -0300 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? Message-ID: Hi there, I was reading Michael's book for exception handling and in the book he says when a .NET exception percolates through to IronPython, it?s wrapped as a Python exception, and that you can catch a lot of .NET exceptions using the equivalent Python exceptions, and he gives a link where there are listed .net exception and their equivalents Python exceptions. But System.Web.Exception isnt there. Is there any way tocatch this exception from IronPython or a workaround? Greetings, Pablo -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Wed Dec 29 14:07:13 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Wed, 29 Dec 2010 10:07:13 -0300 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? In-Reply-To: References: Message-ID: Sorry guys, I didnt mean to raise, I wanted to say TO CATCH From: pablodalma93 at hotmail.com To: users at lists.ironpython.com Date: Wed, 29 Dec 2010 10:05:07 -0300 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? Hi there, I was reading Michael's book for exception handling and in the book he says when a .NET exception percolates through to IronPython, it?s wrapped as a Python exception, and that you can catch a lot of .NET exceptions using the equivalent Python exceptions, and he gives a link where there are listed .net exception and their equivalents Python exceptions. But System.Web.Exception isnt there. Is there any way tocatch this exception from IronPython or a workaround? Greetings, Pablo _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjnienaber at gmail.com Wed Dec 29 14:37:35 2010 From: rjnienaber at gmail.com (Richard Nienaber) Date: Wed, 29 Dec 2010 13:37:35 +0000 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? In-Reply-To: References: Message-ID: > Is there any way tocatch this exception from IronPython I'm not sure if there's a corresponding python exception but you can definitely catch the WebException: C#: using System.Net; public class RaiseException { public void Raise() { throw new WebException("My Exception"); } } IronPython 2.6/2.7: import clr from System.Net import WebException clr.AddReference("RaiseException") import RaiseException o = RaiseException() try: o.Raise() except WebException, e: print e.Message #prints 'My Exception' On Wed, Dec 29, 2010 at 1:07 PM, Pablo Dalmazzo wrote: > Sorry guys, I didnt mean to raise, I wanted to say TO CATCH > > ------------------------------ > From: pablodalma93 at hotmail.com > To: users at lists.ironpython.com > Date: Wed, 29 Dec 2010 10:05:07 -0300 > Subject: [IronPython] is it possible to raise a System.Web.Exception from > IronPython? > > > Hi there, > > I was reading Michael's book for exception handling and in the book he says > when a .NET exception percolates through to IronPython, it?s wrapped as a > Python exception, and that you can catch a lot of .NET exceptions using the > equivalent Python exceptions, and he gives a link where there are listed > .net exception and their equivalents Python exceptions. > But System.Web.Exception isnt there. Is there any way to > catch this exception from IronPython or a workaround? > > Greetings, Pablo > > > > _______________________________________________ Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Wed Dec 29 15:02:18 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Wed, 29 Dec 2010 11:02:18 -0300 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? In-Reply-To: References: , , Message-ID: thx man :) Date: Wed, 29 Dec 2010 13:37:35 +0000 From: rjnienaber at gmail.com To: users at lists.ironpython.com Subject: Re: [IronPython] is it possible to raise a System.Web.Exception from IronPython? > Is there any way tocatch this exception from IronPython I'm not sure if there's a corresponding python exception but you can definitely catch the WebException: C#: using System.Net; public class RaiseException { public void Raise() { throw new WebException("My Exception"); } } IronPython 2.6/2.7: import clrfrom System.Net import WebException clr.AddReference("RaiseException")import RaiseException o = RaiseException()try: o.Raise()except WebException, e: print e.Message #prints 'My Exception' On Wed, Dec 29, 2010 at 1:07 PM, Pablo Dalmazzo wrote: Sorry guys, I didnt mean to raise, I wanted to say TO CATCH From: pablodalma93 at hotmail.com To: users at lists.ironpython.com Date: Wed, 29 Dec 2010 10:05:07 -0300 Subject: [IronPython] is it possible to raise a System.Web.Exception from IronPython? Hi there, I was reading Michael's book for exception handling and in the book he says when a .NET exception percolates through to IronPython, it?s wrapped as a Python exception, and that you can catch a lot of .NET exceptions using the equivalent Python exceptions, and he gives a link where there are listed .net exception and their equivalents Python exceptions. But System.Web.Exception isnt there. Is there any way to catch this exception from IronPython or a workaround? Greetings, Pablo _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Wed Dec 29 19:09:41 2010 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 29 Dec 2010 18:09:41 +0000 Subject: [IronPython] Tim Wyatt is out of the office In-Reply-To: References: Message-ID: Can we bounce this guys emails? Michael On 28 December 2010 23:41, Tim P. Wyatt wrote: > > I will be out of the office starting 24/12/2010 and will not return until > 30/12/2010. > > I will be reviewing my email less frequently than usual. > > For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 > (helpdesk at ppi.ca) > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielj at arena.net Wed Dec 29 19:11:05 2010 From: danielj at arena.net (Daniel Jennings) Date: Wed, 29 Dec 2010 10:11:05 -0800 Subject: [IronPython] Tim Wyatt is out of the office Message-ID: I swear he's been out of the office for the full 4 months I've been on this list, too! Michael Foord wrote: Can we bounce this guys emails? Michael On 28 December 2010 23:41, Tim P. Wyatt > wrote: I will be out of the office starting 24/12/2010 and will not return until 30/12/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpdesk at ppi.ca) _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjnienaber at gmail.com Wed Dec 29 22:42:44 2010 From: rjnienaber at gmail.com (Richard Nienaber) Date: Wed, 29 Dec 2010 21:42:44 +0000 Subject: [IronPython] Issue Triage Message-ID: I've closed the following items: precision not respected when formatting strings IsolateStorage.GetUserStoreForApplication throws SystemError in IronPython 2.6 ipy.exe doesn't set module __name__ correctly when -m is used issues on very large method body (use interpreter?) I think the following needs some further scrutiny before closing: Write installation path to Registry.. module globals are reported incorrectly to sys.settrace Finish FunctionEnvironment cleanup Unable to set value type's field even with the help of StrongBox All issues have been tested in IronPython 2.6 and 2.7b1 and they seem to exhibit the same behavior. One issue that I think should be fixed for 2.7 is this one: binder failed to make the choice when non-generic/generic methods have the same signature Since Python doesn't deal with generics I would think the least-surprise outcome would be for the C# spec to be followed for overload resolution. Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: