From dinov at microsoft.com Wed Jun 1 00:08:03 2011 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 31 May 2011 22:08:03 +0000 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E15C04C78@TK5EX14MBXC292.redmond.corp.microsoft.com> I have a few bugs I wanted to get fixed so I'll actually start working on those :) > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Tuesday, May 31, 2011 2:27 PM > To: Discussion of IronPython > Subject: [IronPython] Moving forward on 2.7.1 > > Hi all, > I think it's about time to get 2.7.1 shipped. I don't have a timeline in mind, but > I'd like it out by the end of June. There's a few new modules and some bug > fixes as well, but I'd like to see some more bugs fixed. If there's anything in > 2.7.0 that's blocking you and not already fixed, post it here and I'll adjust the > priorities. I'm also going to update the stdlib to match CPython 2.7.1. > > After 2.7.1 I doubt I will be putting much effort into the 2.7 branch > (3.0 is just more interesting), so if there's continued interest in future 2.7 > releases, someone else will probably have to step up. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ps at peter-schwalm.de Wed Jun 1 05:01:50 2011 From: ps at peter-schwalm.de (Peter Schwalm) Date: Wed, 01 Jun 2011 05:01:50 +0200 Subject: [IronPython] memoryview / passing string data to a C function without copying Message-ID: <4DE5AB9E.3000307@peter-schwalm.de> Hi, I am looking for an efficient way to pass a string to a c++ function. In CPython this function works on binary (byte) data usually read in from a file. Now I need an Ironpython version. Although I am not happy with it I can live with the automatic transformation of (binary) file data into unicode strings during reading and writing. So I have modified my C++ function to work on wide chars (i.e. unicode chars). Now I am looking for a way to pass the unicode string to the c++ function efficiently, i.e. without copying or modifying it before the call. I found memoryview and thought it is what I need. But as far as I see it works only with byte strings. x2 = b"abc" # byte string view2 = memoryview(x2) # ok x3 = "abc" # the following code line results in: # char string # "error: TypeError: expected IBufferProtocol, got str" view3 = memoryview(x3) # error My questions: Why does memory view not work here? Does anyone know how to pass the contents of a string to a C function without copying it? The context I am working with is roughly as follows: ... import ctypes as ct ... self.dll = ct.cdll.LoadLibrary(dllPath) cObject = self.dll.ctor() self.dll.cFunc(cObject, source, destination, length) where cFunc is the exported name of the c function, and cObject is the address of a housekeeping object allocated in the C-dll via C++ new and returned by the ctor function. Source should provide the string data to the C function in a suitable and efficient form, and for destination I used an "array.array("H", length). Thanks in advance Peter From m.schaber at 3s-software.com Wed Jun 1 08:01:11 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Wed, 1 Jun 2011 08:01:11 +0200 Subject: [IronPython] memoryview / passing string data to a C functionwithout copying In-Reply-To: <4DE5AB9E.3000307@peter-schwalm.de> References: <4DE5AB9E.3000307@peter-schwalm.de> Message-ID: Hi, Peter, > Von: users-bounces at lists.ironpython.com [mailto:users- [...] > > Does anyone know how to pass the contents of a string to a C function > without copying it? A non-pythonic suggestion: Maybe you could use the .NET System.FileStream to read the data into a byte array (or a .NET memory stream), and pass that one to the cFunc? Or you wait for IronPython 3 which has better support for byte data. Best regards Markus Schaber ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Developer Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 From jdhardy at gmail.com Wed Jun 1 17:32:52 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 1 Jun 2011 08:32:52 -0700 Subject: [IronPython] memoryview / passing string data to a C functionwithout copying In-Reply-To: References: <4DE5AB9E.3000307@peter-schwalm.de> Message-ID: On Tue, May 31, 2011 at 11:01 PM, Markus Schaber wrote: > Hi, Peter, > >> Von: users-bounces at lists.ironpython.com [mailto:users- > [...] >> >> ? ? ?Does anyone know how to pass the contents of a string to a C > function >> without copying it? > > A non-pythonic suggestion: > > Maybe you could use the .NET System.FileStream to read the data into a > byte array (or a .NET memory stream), and pass that one to the cFunc? This is probably your best bet. file() doesn't return bytes until Python 3. - Jeff From davew252 at tx.rr.com Wed Jun 1 17:47:39 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Wed, 01 Jun 2011 10:47:39 -0500 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: References: Message-ID: <4DE65F1B.9060804@tx.rr.com> On 5/31/2011 4:27 PM, Jeff Hardy wrote: > Hi all, > I think it's about time to get 2.7.1 shipped. I don't have a timeline > in mind, but I'd like it out by the end of June. There's a few new > modules and some bug fixes as well, but I'd like to see some more bugs > fixed. If there's anything in 2.7.0 that's blocking you and not > already fixed, post it here and I'll adjust the priorities. I'm also > going to update the stdlib to match CPython 2.7.1. > > After 2.7.1 I doubt I will be putting much effort into the 2.7 branch > (3.0 is just more interesting), so if there's continued interest in > future 2.7 releases, someone else will probably have to step up. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > Jeff, ctypes seems to be having some issues... It would be great if you could check on this one and squeeze it in if possible : http://ironpython.codeplex.com/workitem/30698 30698 ctypes WINFUNCTYPE prototype fails with 'TypeError: WinFunctionType() takes at most 2 arguments (3 given)' Dino, I know you already have this one assigned to yourself, (thanks again) http://ironpython.codeplex.com/workitem/30379 Chaining LINQ calls fails Looking forward to seeing that one done for sure. Thanks much, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Wed Jun 1 23:50:39 2011 From: ps at peter-schwalm.de (Peter Schwalm) Date: Wed, 01 Jun 2011 23:50:39 +0200 Subject: [IronPython] memoryview Message-ID: <4DE6B42F.8040504@peter-schwalm.de> Hi Marcus, hi Jeff, thank you for the suggestions! I considered using the .net functions for i-o and byte arrays and decided not to. The reason: the module I am talking about is used in an environment of everyday programming, often in a quick and dirty manner. The data used are 1-byte characters and are mostly text, but with mixed in binary sections. The module users are used to treating chars as being of no special meaning. Umlauts, encodings, and the like do not need to be considered; they are interpreted elsewhere, and it is only expected that these characters are *preserved*, i.e. simply not changed. On the other hand we need string functions like slicing, find, replace, startswith and the like for interpretating the relevant parts. Byte arrays do not fit good there, and even worse would be an environment of mixed bytes and unicode with frequent conversions. Unwanted encoding and decoding problem would probably show up. It would be somewhat confusing and it would require a too technical view in a context focused on application logic. In the moment, I can only hope that no information is lost during the implicit conversions of file i-o. That means I hope these conversion simply add a 0-byte to every byte read in to make it unicode and only discards the 0-byte when writing to a file. Best regards Peter From jdhardy at gmail.com Thu Jun 2 00:01:49 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 1 Jun 2011 15:01:49 -0700 Subject: [IronPython] memoryview In-Reply-To: <4DE6B42F.8040504@peter-schwalm.de> References: <4DE6B42F.8040504@peter-schwalm.de> Message-ID: On Wed, Jun 1, 2011 at 2:50 PM, Peter Schwalm wrote: > In the moment, I can only hope that no information is lost during the > implicit conversions of file i-o. That means I hope these conversion simply > add a 0-byte to every byte read in to make it unicode and only discards the > 0-byte when writing to a file. I'm 99% sure that's how it works. One other option that I forgot about is the 2.7 io module: f = io.open('data.txt', 'rb') b = f.read() Passing the 'b' flag to open causes it to return bytes instead of strings, which should give you what you want. - Jeff From janssen at parc.com Thu Jun 2 01:03:37 2011 From: janssen at parc.com (Bill Janssen) Date: Wed, 1 Jun 2011 16:03:37 PDT Subject: [IronPython] differences in IronPython/CPython regular expressions? Message-ID: <5022.1306969417@parc.com> I have a large RE (223613 chars) that works fine in CPython 2.6, but seems to produce an endless loop in IronPython (see below). I'm using Mono 2.10 (.NET 4.0.x) on Ubuntu, with IronPython 2.7. Anyone have pointers to the differences between them? Is System::Text::RegularExpressions in .NET configurable in some fashion that might help? I'm a .NET newbie. TIA, Bill -------------------------------------------------- import sys, os, re try: # we use the name lists in nltk to create person-name matching patterns import nltk.data except ImportError: sys.stderr.write("Can't import nltk; can't do name lists.\nSee http://www.nltk.org/.\n") sys.exit(1) else: __MALE_NAME_EXCLUDES = ("Hill", "Ave", ) __FEMALE_NAME_EXCLUDES = () __FEMALE_NAMES = [x for x in nltk.data.load("corpora/names/female.txt", format="raw").split("\n") if (x and (x not in __FEMALE_NAME_EXCLUDES))] __FEMALE_NAMES += [x.upper() for x in __FEMALE_NAMES] __MALE_NAMES = [x for x in nltk.data.load("corpora/names/male.txt", format="raw").split("\n") if (x and (x not in __MALE_NAME_EXCLUDES))] __MALE_NAMES += [x.upper() for x in __MALE_NAMES] __INITS = [chr(x) for x in range(ord('A'), ord('Z'))] PERSON_PATTERN = re.compile( "^((?PMr|Ms|Mrs|Dr|MR|MS|MRS|DR)\.? )?" # honorific "(?P" + "|".join(__FEMALE_NAMES + __MALE_NAMES + __INITS) + # first name ")" "( (?P([A-Z]\.)|(" + "|".join(__FEMALE_NAMES + __MALE_NAMES) + # middle initial or name ")))?" " +(?P[A-Z][A-Za-z]+)", # space then last name re.MULTILINE) print PERSON_PATTERN.match("Mr. John Smith") From jdhardy at gmail.com Thu Jun 2 01:23:17 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 1 Jun 2011 16:23:17 -0700 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <5022.1306969417@parc.com> References: <5022.1306969417@parc.com> Message-ID: On Wed, Jun 1, 2011 at 4:03 PM, Bill Janssen wrote: > I have a large RE (223613 chars) that works fine in CPython 2.6, but That's truly horrible, but I assume you have a good reason for it. > seems to produce an endless loop in IronPython (see below). ?I'm using > Mono 2.10 (.NET 4.0.x) on Ubuntu, with IronPython 2.7. ?Anyone have > pointers to the differences between them? ?Is > System::Text::RegularExpressions in .NET configurable in some fashion > that might help? First off, is there a reason you don't use re.IGNORECASE? That would cut the regex in half, at least. For the most part, CPython and IronPython regexes should be fairly compatible - IronPython takes the regex and massages it to work with System.Text.RE, but the changes are pretty straightforward and small, and I don't think the re you provided hits any of them. It's quite possible that the Mono version of System.Text.RE can't handle the expression; you could test this saving the full regex and building a small C# program that runs it. The regex template has a lot of potential backtracking in it; are you sure it's not caught in a pathological (exponential) case? Finally, is one ginormous really the best way to do this? Have you tried other approaches? - Jeff > > I'm a .NET newbie. > > TIA, > > Bill > > -------------------------------------------------- > import sys, os, re > > try: > ? ?# we use the name lists in nltk to create person-name matching patterns > ? ?import nltk.data > except ImportError: > ? ?sys.stderr.write("Can't import nltk; can't do name lists.\nSee http://www.nltk.org/.\n") > ? ?sys.exit(1) > else: > ? ?__MALE_NAME_EXCLUDES = ("Hill", > ? ? ? ? ? ? ? ? ? ? ? ? ?"Ave", > ? ? ? ? ? ? ? ? ? ? ? ? ?) > ? ?__FEMALE_NAME_EXCLUDES = () > ? ?__FEMALE_NAMES = [x for x in > ? ? ? ? ? ? ? ? ? ? ?nltk.data.load("corpora/names/female.txt", format="raw").split("\n") > ? ? ? ? ? ? ? ? ? ? ?if (x and (x not in __FEMALE_NAME_EXCLUDES))] > ? ?__FEMALE_NAMES += [x.upper() for x in __FEMALE_NAMES] > ? ?__MALE_NAMES = [x for x in > ? ? ? ? ? ? ? ? ? ?nltk.data.load("corpora/names/male.txt", format="raw").split("\n") > ? ? ? ? ? ? ? ? ? ?if (x and (x not in __MALE_NAME_EXCLUDES))] > ? ?__MALE_NAMES += [x.upper() for x in __MALE_NAMES] > ? ?__INITS = [chr(x) for x in range(ord('A'), ord('Z'))] > > PERSON_PATTERN = re.compile( > ? ?"^((?PMr|Ms|Mrs|Dr|MR|MS|MRS|DR)\.? )?" ? ? ? ? # honorific > ? ?"(?P" + > ? ?"|".join(__FEMALE_NAMES + __MALE_NAMES + __INITS) + # first name > ? ?")" > ? ?"( (?P([A-Z]\.)|(" + > ? ?"|".join(__FEMALE_NAMES + __MALE_NAMES) + ? ? ? ? # middle initial or name > ? ?")))?" > ? ?" +(?P[A-Z][A-Za-z]+)", ? ? ? ? ? ? # space then last name > ? ?re.MULTILINE) > > print PERSON_PATTERN.match("Mr. John Smith") > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From janssen at parc.com Thu Jun 2 01:44:16 2011 From: janssen at parc.com (Bill Janssen) Date: Wed, 1 Jun 2011 16:44:16 PDT Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: References: <5022.1306969417@parc.com> Message-ID: <6280.1306971856@parc.com> Jeff Hardy wrote: > On Wed, Jun 1, 2011 at 4:03 PM, Bill Janssen wrote: > > I have a large RE (223613 chars) that works fine in CPython 2.6, but > > That's truly horrible, but I assume you have a good reason for it. Hi, Jeff. Yes, I think so. > > seems to produce an endless loop in IronPython (see below). ?I'm using > > Mono 2.10 (.NET 4.0.x) on Ubuntu, with IronPython 2.7. ?Anyone have > > pointers to the differences between them? ?Is > > System::Text::RegularExpressions in .NET configurable in some fashion > > that might help? > > First off, is there a reason you don't use re.IGNORECASE? That would > cut the regex in half, at least. Sure. Names sensitive to capitalization; the rule I'm implementing says names are either capitalized or upper-case. > For the most part, CPython and IronPython regexes should be fairly > compatible - IronPython takes the regex and massages it to work with > System.Text.RE, but the changes are pretty straightforward and small, Are those changes documented anywhere? > and I don't think the re you provided hits any of them. It's quite > possible that the Mono version of System.Text.RE can't handle the > expression; you could test this saving the full regex and building a > small C# program that runs it. The regex template has a lot of > potential backtracking in it; are you sure it's not caught in a > pathological (exponential) case? No; all I'm sure of is that this runs in 1.2 seconds in CPython, and takes up a core for 15 minutes (till I kill it) with IronPython/Mono. Something is clearly hitting a bug somewhere... I suppose I should try it on Windows. > Finally, is one ginormous really the best way to do this? Have you > tried other approaches? No need, until I hit .NET. I'm used to working with a full-featured finite-state machine (PARC's xfst; see http://www.cis.upenn.edu/~cis639/docs/xfst.html), and was wondering if we could do similar things with Python's RE machinery. Long lists like these names are often used for lists of companies or cities or such. People's names are actually a fairly simple and short example of this :-). Bill From georger.silva at gmail.com Thu Jun 2 04:28:04 2011 From: georger.silva at gmail.com (George Silva) Date: Wed, 1 Jun 2011 23:28:04 -0300 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <6280.1306971856@parc.com> References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> Message-ID: If youre on Windows, you can test the native c# behvaior with a software called Rad Software regular expression designer. Its very helpful. On Wed, Jun 1, 2011 at 8:44 PM, Bill Janssen wrote: > Jeff Hardy wrote: > > > On Wed, Jun 1, 2011 at 4:03 PM, Bill Janssen wrote: > > > I have a large RE (223613 chars) that works fine in CPython 2.6, but > > > > That's truly horrible, but I assume you have a good reason for it. > > Hi, Jeff. Yes, I think so. > > > > seems to produce an endless loop in IronPython (see below). I'm using > > > Mono 2.10 (.NET 4.0.x) on Ubuntu, with IronPython 2.7. Anyone have > > > pointers to the differences between them? Is > > > System::Text::RegularExpressions in .NET configurable in some fashion > > > that might help? > > > > First off, is there a reason you don't use re.IGNORECASE? That would > > cut the regex in half, at least. > > Sure. Names sensitive to capitalization; the rule I'm implementing says > names are either capitalized or upper-case. > > > For the most part, CPython and IronPython regexes should be fairly > > compatible - IronPython takes the regex and massages it to work with > > System.Text.RE, but the changes are pretty straightforward and small, > > Are those changes documented anywhere? > > > and I don't think the re you provided hits any of them. It's quite > > possible that the Mono version of System.Text.RE can't handle the > > expression; you could test this saving the full regex and building a > > small C# program that runs it. The regex template has a lot of > > potential backtracking in it; are you sure it's not caught in a > > pathological (exponential) case? > > No; all I'm sure of is that this runs in 1.2 seconds in CPython, and > takes up a core for 15 minutes (till I kill it) with IronPython/Mono. > Something is clearly hitting a bug somewhere... I suppose I should > try it on Windows. > > > Finally, is one ginormous really the best way to do this? Have you > > tried other approaches? > > No need, until I hit .NET. I'm used to working with a full-featured > finite-state machine (PARC's xfst; see > http://www.cis.upenn.edu/~cis639/docs/xfst.html), and was wondering if > we could do similar things with Python's RE machinery. Long lists like > these names are often used for lists of companies or cities or such. > People's names are actually a fairly simple and short example of this :-). > > Bill > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- George R. C. Silva Desenvolvimento em GIS http://geoprocessamento.net http://blog.geoprocessamento.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Jun 2 07:54:38 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 1 Jun 2011 22:54:38 -0700 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <6280.1306971856@parc.com> References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> Message-ID: > Sure. ?Names sensitive to capitalization; the rule I'm implementing says > names are either capitalized or upper-case. Ah, I see that now. I assumed the name lists were in lower case. > >> For the most part, CPython and IronPython regexes should be fairly >> compatible - IronPython takes the regex and massages it to work with >> System.Text.RE, but the changes are pretty straightforward and small, > > Are those changes documented anywhere? The code is in Languages\IronPython\IronPython.Modules\re.cs in the PreParseRegex function; it's pretty straightforward, if a little long. Looking at it again, it's quite possible there's a bug in there, but we'd need a minimal repro to have any hope of finding it. > No need, until I hit .NET. ?I'm used to working with a full-featured > finite-state machine (PARC's xfst; see > http://www.cis.upenn.edu/~cis639/docs/xfst.html), and was wondering if > we could do similar things with Python's RE machinery. ?Long lists like > these names are often used for lists of companies or cities or such. > People's names are actually a fairly simple and short example of this :-). The fact that it works on CPython fairly fast indicates a bug somewhere, I'm just not sure if it's IronPython or Mono. - Jeff From janssen at parc.com Thu Jun 2 18:33:51 2011 From: janssen at parc.com (Bill Janssen) Date: Thu, 2 Jun 2011 09:33:51 PDT Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> Message-ID: <16381.1307032431@parc.com> George Silva wrote: > If youre on Windows, you can test the native c# behvaior with a software > called Rad Software regular expression designer. Its very helpful. Thanks, George. That looks like a useful piece of software. Bill From janssen at parc.com Thu Jun 2 18:41:45 2011 From: janssen at parc.com (Bill Janssen) Date: Thu, 2 Jun 2011 09:41:45 PDT Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> Message-ID: <16559.1307032905@parc.com> Jeff Hardy wrote: > The fact that it works on CPython fairly fast indicates a bug > somewhere, I'm just not sure if it's IronPython or Mono. I just tried it with real MS .NET, on a 64-bit Windows 7 machine with a new download of IronPython 2.7. On that platform, it core-dumps (well, ipy exits with a StackOverflowException). Bill From jdhardy at gmail.com Thu Jun 2 18:45:45 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 2 Jun 2011 09:45:45 -0700 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <16559.1307032905@parc.com> References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> <16559.1307032905@parc.com> Message-ID: On Thu, Jun 2, 2011 at 9:41 AM, Bill Janssen wrote: > Jeff Hardy wrote: > >> The fact that it works on CPython fairly fast indicates a bug >> somewhere, I'm just not sure if it's IronPython or Mono. > > I just tried it with real MS .NET, on a 64-bit Windows 7 machine with a > new download of IronPython 2.7. ?On that platform, it core-dumps (well, > ipy exits with a StackOverflowException). Any chance you could get a debugger on there and figure out where the SOE is (IronPython or .NET)? If not, I can try to take a look if you send the complete regex, but probably not until the weekend. - Jeff From Tomas.Matousek at microsoft.com Thu Jun 2 20:00:25 2011 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 2 Jun 2011 18:00:25 +0000 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> <16559.1307032905@parc.com> Message-ID: <9597F4A19BFDB342B6E90963100C33080AF41D19@SN2PRD0302MB113.namprd03.prod.outlook.com> BTW, depending on how CPython regex syntax and semantics compares to Oniguruma (Ruby's Regex engine) it might be useful to look at the implementation for IronRuby (http://github.com/IronLanguages/main/blob/master/Languages/Ruby/Ruby/Builtins/RegexpTransformer.cs) I implemented Oniguruma compatible parser that translates 99% of the features to .NET. There are a few missing features that can be implemented relatively easily and then there are some Unicode features that would be quite difficult to do since .NET Regex doesn't support Unicode so much. In any case, if you found you need to fix the IronPython translator and the fix would require precise understanding of the syntax it might be worth it to reuse the code from IronRuby. Tomas -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Thursday, June 02, 2011 9:46 AM To: Discussion of IronPython Subject: Re: [IronPython] differences in IronPython/CPython regular expressions? On Thu, Jun 2, 2011 at 9:41 AM, Bill Janssen wrote: > Jeff Hardy wrote: > >> The fact that it works on CPython fairly fast indicates a bug >> somewhere, I'm just not sure if it's IronPython or Mono. > > I just tried it with real MS .NET, on a 64-bit Windows 7 machine with > a new download of IronPython 2.7. ?On that platform, it core-dumps > (well, ipy exits with a StackOverflowException). Any chance you could get a debugger on there and figure out where the SOE is (IronPython or .NET)? If not, I can try to take a look if you send the complete regex, but probably not until the weekend. - Jeff _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From janssen at parc.com Thu Jun 2 20:58:54 2011 From: janssen at parc.com (Bill Janssen) Date: Thu, 2 Jun 2011 11:58:54 PDT Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> <16559.1307032905@parc.com> Message-ID: <18868.1307041134@parc.com> Jeff Hardy wrote: > On Thu, Jun 2, 2011 at 9:41 AM, Bill Janssen wrote: > > Jeff Hardy wrote: > > > >> The fact that it works on CPython fairly fast indicates a bug > >> somewhere, I'm just not sure if it's IronPython or Mono. > > > > I just tried it with real MS .NET, on a 64-bit Windows 7 machine with a > > new download of IronPython 2.7. ?On that platform, it core-dumps (well, > > ipy exits with a StackOverflowException). > > Any chance you could get a debugger on there and figure out where the > SOE is (IronPython or .NET)? If not, I can try to take a look if you > send the complete regex, but probably not until the weekend. Would gdb work? I'll try. The fact that it's different between .NET and Mono makes me guess it's in the System::Text::RegularExpressions package. Bill From jdhardy at gmail.com Thu Jun 2 21:10:15 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 2 Jun 2011 12:10:15 -0700 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <18868.1307041134@parc.com> References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> <16559.1307032905@parc.com> <18868.1307041134@parc.com> Message-ID: On Thu, Jun 2, 2011 at 11:58 AM, Bill Janssen wrote: > Would gdb work? ?I'll try. Mono's debugger might be better, if their regex engine is managed. It looks like there's some Mono support in gdb but I've never used it. On Windows, windbg is your friend. It's about as user-friendly as gdb, though (take that how you want). - Jeff From saunderl at hotmail.com Thu Jun 2 21:36:54 2011 From: saunderl at hotmail.com (L. Lee Saunders) Date: Thu, 2 Jun 2011 14:36:54 -0500 Subject: [IronPython] differences in IronPython/CPython regular expressions? In-Reply-To: <18868.1307041134@parc.com> References: <5022.1306969417@parc.com> <6280.1306971856@parc.com> <16559.1307032905@parc.com> <18868.1307041134@parc.com> Message-ID: > The fact that it's different between .NET and Mono makes me guess it's > in the System::Text::RegularExpressions package. If that is the case, it should be easy to test by using C#. Just write a little console app to test you RegEx on both Mono and MS.NET. If that fails then it is not a problem with IronPython but in the .NET core. Of course I just may be smoking something. Lee From billchi at microsoft.com Thu Jun 2 21:37:24 2011 From: billchi at microsoft.com (Bill Chiles) Date: Thu, 2 Jun 2011 19:37:24 +0000 Subject: [IronPython] Expr Tree Spec Updated Message-ID: <87F87F189CDD444089246B8290EC97353BFA9054@TK5EX14MBXC207.redmond.corp.microsoft.com> I've been sitting on some incremental updates for several months and finally cleared a couple out of my inbox backlog, so I pushed an updated version to codeplex. I don't recall all of what's in the update, but for example, I added more clarification around using and creating byref parameters (which was already pretty detailed) with an example from Tomas. Jeff or someone may want to propagate the .doc/.pdf to the ironlanguages tree, can't remember if Dino and I put them in the final IPy tree we shipped or just left them on the codeplex project site. Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy_fulstow at hotmail.com Mon Jun 6 14:13:30 2011 From: andy_fulstow at hotmail.com (AndyF.) Date: Mon, 6 Jun 2011 05:13:30 -0700 (PDT) Subject: [IronPython] Dispatcher Problem Message-ID: <31782357.post@talk.nabble.com> Hi Chaps I have attempted to purloin some of the code shipped with IP in Action and, following issues, I have even gone to the lengths of reading the book! I am getting the error 'expect Delegate, got Function' when I use the following code. FYI I am passing in a reference to a WPF textBox so I should have a dispatcher on my UI element I have removed all of the threading pipe reading stuff just to leave 'test' code: import System import System.IO import Avacta.Optim.Server.WebServices import Avacta.Optim.Server.DataModel import sys import clr import time from System import Console from System.Threading import Thread, ThreadStart def SetDispatcher(ui_element): global dispatcher # needed else "Exception: 'NoneType' object has no attribute 'BeginInvoke'" dispatcher = ui_element.Dispatcher def Dispatch(function, *args): dispatcher.BeginInvoke(lambda *_: function(*args)) def GetDispatchFunction(function): return lambda *args: Dispatch(function, *args) class ListOutput: def __init__(self, textbox): self.textbox = textbox def write(self, string): Dispatch(self.addText, string) # error: "expect Delegate, got Function" # self.addText(string) # ok works fine w-w/o dispatcher stuff def addText(self, string): textbox.AppendText(string) if textbox != None: listout = ListOutput(textbox) sys.stdout = listout SetDispatcher(textbox) print "Define running" #running = True Thread.Sleep(0) time.sleep(2) print "Start The Comms Thread..." #comms_t = Thread(ThreadStart(run_comms)) #comms_t.Start() Thread.Sleep(0) time.sleep(2) Any clues would be greatly appreciated! AndyF. -- View this message in context: http://old.nabble.com/Dispatcher-Problem-tp31782357p31782357.html Sent from the IronPython mailing list archive at Nabble.com. From dinov at microsoft.com Mon Jun 6 22:57:58 2011 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 6 Jun 2011 20:57:58 +0000 Subject: [IronPython] Dispatcher Problem In-Reply-To: <31782357.post@talk.nabble.com> References: <31782357.post@talk.nabble.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28DFFB0B@TK5EX14MBXC294.redmond.corp.microsoft.com> AndyF wrote: > Hi Chaps > > I have attempted to purloin some of the code shipped with IP in Action and, > following issues, I have even gone to the lengths of reading the book! > > I am getting the error 'expect Delegate, got Function' when I use the > following code. FYI I am passing in a reference to a WPF textBox so I should > have a dispatcher on my UI element > > I have removed all of the threading pipe reading stuff just to leave 'test' > code: > > import System > import System.IO > import Avacta.Optim.Server.WebServices > import Avacta.Optim.Server.DataModel > import sys > import clr > import time > > from System import Console > from System.Threading import Thread, ThreadStart > > def SetDispatcher(ui_element): > global dispatcher # needed else "Exception: 'NoneType' object has no > attribute 'BeginInvoke'" > dispatcher = ui_element.Dispatcher > > def Dispatch(function, *args): > dispatcher.BeginInvoke(lambda *_: function(*args)) > > def GetDispatchFunction(function): > return lambda *args: Dispatch(function, *args) > > class ListOutput: > def __init__(self, textbox): > self.textbox = textbox > > def write(self, string): > Dispatch(self.addText, string) # error: "expect Delegate, got Function" > # self.addText(string) # ok works fine w-w/o dispatcher stuff > > def addText(self, string): > textbox.AppendText(string) > > if textbox != None: > listout = ListOutput(textbox) > sys.stdout = listout > SetDispatcher(textbox) > > print "Define running" > #running = True > > Thread.Sleep(0) > time.sleep(2) > > print "Start The Comms Thread..." > #comms_t = Thread(ThreadStart(run_comms)) > #comms_t.Start() > > Thread.Sleep(0) > time.sleep(2) > > Any clues would be greatly appreciated! The WPF invocation functions just take a type which is typed to "Delegate" instead of a type of a specific delegate. Therefore we don't know what type of delegate to create for you automatically. Instead you can convert the Python function into a delegate by calling the delegate type directly, e.g.: dispatcher.BeginInvoke(System.Action(lambda *_: function(*args))) or you can use another delegate type (e.g. System.Action[object]) with the appropriate signature you need. From paul.grenyer at gmail.com Tue Jun 7 09:24:09 2011 From: paul.grenyer at gmail.com (Paul Grenyer) Date: Tue, 7 Jun 2011 08:24:09 +0100 Subject: [IronPython] Visual studio 2010 Message-ID: Hi All I'd like to develop some system tests in Iron Python that test against an executable written in C#. Is there a way that i can easily run Iron Python modules from Visual Studio 2010 or do I need to set it up as a post build task? Also, is there an Iron Python plugin for Visual Studio 2010? Finally, when it comes to CI, is there a recognised way of running Iron Python modules from an MSBuild script? -- Thanks Paul Paul Grenyer e: paul.grenyer at gmail.com b: paulgrenyer.blogspot.com t: pjgrenyer From andy_fulstow at hotmail.com Tue Jun 7 10:00:51 2011 From: andy_fulstow at hotmail.com (AndyF.) Date: Tue, 7 Jun 2011 01:00:51 -0700 (PDT) Subject: [IronPython] Dispatcher Problem In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28DFFB0B@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <31782357.post@talk.nabble.com> <6C7ABA8B4E309440B857D74348836F2E28DFFB0B@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <31789855.post@talk.nabble.com> Thank you Dino modifying my Python dispatcher to read dispatcher.BeginInvoke(System.Action(lambda *_: function(*args))) fixed the problem. Unfortunately for me, utilising the dispatcher has an unforseen side effect - the 'messages' printed to my console only appear when the python script exits. If I revert the code to bypass all dispatcher code i.e. use the following def write(self, string): self.texbox.AppendText(string) then I see the messages arrive in real time. I have tested launching my PythonEngine class using a thread with both ApartmentState.STA and MTA but this has no discernible effect. Can you offer any explanation, maybe workaround? Thanks AndyF. Dino Viehland wrote: > > AndyF wrote: >> Hi Chaps >> >> I have attempted to purloin some of the code shipped with IP in Action >> and, >> following issues, I have even gone to the lengths of reading the book! >> >> I am getting the error 'expect Delegate, got Function' when I use the >> following code. FYI I am passing in a reference to a WPF textBox so I >> should >> have a dispatcher on my UI element >> >> I have removed all of the threading pipe reading stuff just to leave >> 'test' >> code: >> >> import System >> import System.IO >> import Avacta.Optim.Server.WebServices >> import Avacta.Optim.Server.DataModel >> import sys >> import clr >> import time >> >> from System import Console >> from System.Threading import Thread, ThreadStart >> >> def SetDispatcher(ui_element): >> global dispatcher # needed else "Exception: 'NoneType' object has no >> attribute 'BeginInvoke'" >> dispatcher = ui_element.Dispatcher >> >> def Dispatch(function, *args): >> dispatcher.BeginInvoke(lambda *_: function(*args)) >> >> def GetDispatchFunction(function): >> return lambda *args: Dispatch(function, *args) >> >> class ListOutput: >> def __init__(self, textbox): >> self.textbox = textbox >> >> def write(self, string): >> Dispatch(self.addText, string) # error: "expect Delegate, got Function" >> # self.addText(string) # ok works fine w-w/o dispatcher stuff >> >> def addText(self, string): >> textbox.AppendText(string) >> >> if textbox != None: >> listout = ListOutput(textbox) >> sys.stdout = listout >> SetDispatcher(textbox) >> >> print "Define running" >> #running = True >> >> Thread.Sleep(0) >> time.sleep(2) >> >> print "Start The Comms Thread..." >> #comms_t = Thread(ThreadStart(run_comms)) >> #comms_t.Start() >> >> Thread.Sleep(0) >> time.sleep(2) >> >> Any clues would be greatly appreciated! > > The WPF invocation functions just take a type which is typed to "Delegate" > instead of a type of a specific delegate. Therefore we don't know what > type > of delegate to create for you automatically. Instead you can convert the > Python function into a delegate by calling the delegate type directly, > e.g.: > > dispatcher.BeginInvoke(System.Action(lambda *_: function(*args))) > > or you can use another delegate type (e.g. System.Action[object]) with the > appropriate signature you need. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- View this message in context: http://old.nabble.com/Dispatcher-Problem-tp31782357p31789855.html Sent from the IronPython mailing list archive at Nabble.com. From vernondcole at gmail.com Tue Jun 7 16:18:57 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Tue, 7 Jun 2011 08:18:57 -0600 Subject: [IronPython] Dispatcher Problem In-Reply-To: <31789855.post@talk.nabble.com> References: <31782357.post@talk.nabble.com> <6C7ABA8B4E309440B857D74348836F2E28DFFB0B@TK5EX14MBXC294.redmond.corp.microsoft.com> <31789855.post@talk.nabble.com> Message-ID: I have not tested this on a GUI screen, but... You should be able to assign any class with a .write() method to sys.stdout (and/or sys.stderr) so that normal "print" statements/functions and tracebacks will be sent to that method. I use the trick frequently to get a simple logging facility by assigning a text file -- like: import sys my_log = open('my_log_file.txt','w') sys.stdout = my_log print 'Hello, Log.' sys.stderr = my_log error = 1 / 0 Is that the kind of 'messages' you were thinking about? -- Vernon On Tue, Jun 7, 2011 at 2:00 AM, AndyF. wrote: > > Thank you Dino > > modifying my Python dispatcher to read > > dispatcher.BeginInvoke(System.Action(lambda *_: function(*args))) > > fixed the problem. Unfortunately for me, utilising the dispatcher has an > unforseen side effect - the 'messages' printed to my console only appear > when the python script exits. > > If I revert the code to bypass all dispatcher code i.e. use the following > > def write(self, string): > self.texbox.AppendText(string) > > then I see the messages arrive in real time. > > I have tested launching my PythonEngine class using a thread with both > ApartmentState.STA and MTA but this has no discernible effect. > > Can you offer any explanation, maybe workaround? > > Thanks > > AndyF. > > > > Dino Viehland wrote: > > > > AndyF wrote: > >> Hi Chaps > >> > >> I have attempted to purloin some of the code shipped with IP in Action > >> and, > >> following issues, I have even gone to the lengths of reading the book! > >> > >> I am getting the error 'expect Delegate, got Function' when I use the > >> following code. FYI I am passing in a reference to a WPF textBox so I > >> should > >> have a dispatcher on my UI element > >> > >> I have removed all of the threading pipe reading stuff just to leave > >> 'test' > >> code: > >> > >> import System > >> import System.IO > >> import Avacta.Optim.Server.WebServices > >> import Avacta.Optim.Server.DataModel > >> import sys > >> import clr > >> import time > >> > >> from System import Console > >> from System.Threading import Thread, ThreadStart > >> > >> def SetDispatcher(ui_element): > >> global dispatcher # needed else "Exception: 'NoneType' object has no > >> attribute 'BeginInvoke'" > >> dispatcher = ui_element.Dispatcher > >> > >> def Dispatch(function, *args): > >> dispatcher.BeginInvoke(lambda *_: function(*args)) > >> > >> def GetDispatchFunction(function): > >> return lambda *args: Dispatch(function, *args) > >> > >> class ListOutput: > >> def __init__(self, textbox): > >> self.textbox = textbox > >> > >> def write(self, string): > >> Dispatch(self.addText, string) # error: "expect Delegate, got Function" > >> # self.addText(string) # ok works fine w-w/o dispatcher stuff > >> > >> def addText(self, string): > >> textbox.AppendText(string) > >> > >> if textbox != None: > >> listout = ListOutput(textbox) > >> sys.stdout = listout > >> SetDispatcher(textbox) > >> > >> print "Define running" > >> #running = True > >> > >> Thread.Sleep(0) > >> time.sleep(2) > >> > >> print "Start The Comms Thread..." > >> #comms_t = Thread(ThreadStart(run_comms)) > >> #comms_t.Start() > >> > >> Thread.Sleep(0) > >> time.sleep(2) > >> > >> Any clues would be greatly appreciated! > > > > The WPF invocation functions just take a type which is typed to > "Delegate" > > instead of a type of a specific delegate. Therefore we don't know what > > type > > of delegate to create for you automatically. Instead you can convert the > > Python function into a delegate by calling the delegate type directly, > > e.g.: > > > > dispatcher.BeginInvoke(System.Action(lambda *_: function(*args))) > > > > or you can use another delegate type (e.g. System.Action[object]) with > the > > appropriate signature you need. > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > View this message in context: > http://old.nabble.com/Dispatcher-Problem-tp31782357p31789855.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Wed Jun 8 07:05:25 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Wed, 8 Jun 2011 01:05:25 -0400 Subject: [IronPython] Visual studio 2010 In-Reply-To: References: Message-ID: On Jun 7, 2011, at 3:24 AM, Paul Grenyer wrote: > Hi All > > I'd like to develop some system tests in Iron Python that test against > an executable written in C#. Is there a way that i can easily run Iron > Python modules from Visual Studio 2010 or do I need to set it up as a > post build task? Also, is there an Iron Python plugin for Visual > Studio 2010? > > Finally, when it comes to CI, is there a recognised way of running > Iron Python modules from an MSBuild script? Paul, I have a VS2010 plugin that lets you run IronPython tests in MSTest; I'll put it on GitHub shortly. ~Jimmy From paul.grenyer at gmail.com Wed Jun 8 07:08:34 2011 From: paul.grenyer at gmail.com (Paul Grenyer) Date: Wed, 8 Jun 2011 06:08:34 +0100 Subject: [IronPython] Visual studio 2010 In-Reply-To: References: Message-ID: Hi >> Finally, when it comes to CI, is there a recognised way of running >> Iron Python modules from an MSBuild script? > > Paul, > > I have a VS2010 plugin that lets you run IronPython tests in MSTest; I'll put it on GitHub shortly. > Excellent, thank you! I'll look forward to the link. -- Thanks Paul Paul Grenyer e: paul.grenyer at gmail.com b: paulgrenyer.blogspot.com t: pjgrenyer From loocas at duber.cz Fri Jun 10 13:55:46 2011 From: loocas at duber.cz (=?UTF-8?B?THVrw6HFoSBEdWLEm2Rh?=) Date: Fri, 10 Jun 2011 13:55:46 +0200 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError Message-ID: <4DF20642.50400@duber.cz> Hi there, I hope someone out there could help me out with this problem. I have a API written in Python (CPython that is) that relies on some of the CPython modules, such as ssl and httplib. The problem is, when I call the API and its methods via IronPython I get IOError: "System.IO.IOException: Unable to write data to the transport connection: Cannot access a disposed object." The weirdest thing is, if I make the call for the second time, all goes through beautifully. Then again, thrid time errors out, but fourth goes through just fine. And so on so forth. Here's the exact script excerpt (with the thorough error output) at pastebin: http://pastebin.com/TKbKDtPb I call the sg.find_one() method the first time, which produces the IOError. Then at the end of the error output, I call it again and as you can see, it returns the correct object. Please, could anyone tell me how to deal with this without rewriting the given API to use .NET objects? Thanks a lot in advance, cheers, -- Luk?? Dub?da Director [T] +420 602 444 164 duber studio(tm) [M] info at duber.cz [W] http://www.duber.cz [A] R.A.Dvorsk?ho 601, Praha 10 [A] 10900, Czech Republic, Europe From zgramana at pottsconsultinggroup.com Fri Jun 10 16:32:51 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 10:32:51 -0400 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <4DF20642.50400@duber.cz> References: <4DF20642.50400@duber.cz> Message-ID: <4DF22B13.4080105@pottsconsultinggroup.com> Lukas, I'm working on this issue, or at least an issue that generates the same exception. I do have a working patch, which I hope to contribute back after a little more work on it. Check your API to see if you are making any calls to socket.makefile(). If you do, and subsequently close the fileobject (but not the socket object), the underlying .NET Socket will also get closed (and garbage collected), even though other objects are still referencing it. However, the Python socket will not be aware of this corrupt state, and subsequent socket operations will raise the exception. Not sure why subsequent attempts work for you, other than that perhaps your API has error handling code that re-create the connection. Hope this might be helpful. Best Regards, Zack On 6/10/2011 7:55 AM, Luk?? Dub?da wrote: > Hi there, > > I hope someone out there could help me out with this problem. > > I have a API written in Python (CPython that is) that relies on > some of the CPython modules, such as ssl and httplib. > > The problem is, when I call the API and its methods via IronPython > I get IOError: "System.IO.IOException: Unable to write data to the > transport connection: Cannot access a disposed object." > > The weirdest thing is, if I make the call for the second time, > all goes through beautifully. Then again, thrid time errors out, but > fourth goes through just fine. And so on so forth. > > Here's the exact script excerpt (with the thorough error output) at > pastebin: http://pastebin.com/TKbKDtPb > > I call the sg.find_one() method the first time, which produces the > IOError. Then at the end of the error output, I call it again and > as you can see, it returns the correct object. > > Please, could anyone tell me how to deal with this without rewriting > the given API to use .NET objects? > > Thanks a lot in advance, cheers, > From zgramana at pottsconsultinggroup.com Fri Jun 10 17:02:41 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 11:02:41 -0400 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: References: Message-ID: <4DF23211.8090609@pottsconsultinggroup.com> I hesitate to say anything as I am someone who just started lurking in the periphery, but on the off chance that others might agree, I'm throwing in my $0.02 USD: There are some big Python applications (e.g. Mercurial) that are going to remain on 2.7 for some time. There are important modules that are still missing (bz2), or are incomplete (_winreg), that create compatibility barriers. It would also be nice to have sockets moved to the socket.py/_socket.cs model (similar to how ssl has been implemented) to support apps that monkey patch that module. I know the community is limited in resources, but I would hope that 2.7 not be abandoned too quickly. I would happily volunteer to own the maintenance of 2.7, but I am far too early in the learning curve to be of any practical use. That said, I'm happy to help on items where I am familiar with that part of the codebase, or where an experienced contributor can give me some mentoring. For example, I'm interested in helping to implement the bz2 module using ic#code's #zip lib (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would definitely need some mentoring along the way. On 5/31/2011 5:27 PM, Jeff Hardy wrote: > Hi all, > I think it's about time to get 2.7.1 shipped. I don't have a timeline > in mind, but I'd like it out by the end of June. There's a few new > modules and some bug fixes as well, but I'd like to see some more bugs > fixed. If there's anything in 2.7.0 that's blocking you and not > already fixed, post it here and I'll adjust the priorities. I'm also > going to update the stdlib to match CPython 2.7.1. > > After 2.7.1 I doubt I will be putting much effort into the 2.7 branch > (3.0 is just more interesting), so if there's continued interest in > future 2.7 releases, someone else will probably have to step up. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri Jun 10 18:21:35 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 09:21:35 -0700 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: <4DF23211.8090609@pottsconsultinggroup.com> References: <4DF23211.8090609@pottsconsultinggroup.com> Message-ID: On Fri, Jun 10, 2011 at 8:02 AM, Zachary Gramana wrote: > There are some big Python applications (e.g. Mercurial) that are going to > remain on 2.7 for some time. There are important modules that are still > missing (bz2), or are incomplete (_winreg), that create compatibility > barriers. ?It would also be nice to have sockets moved to the > socket.py/_socket.cs model (similar to how ssl has been implemented) to > support apps that monkey patch that module. 100% agreed. I don't want to see 2.7 whither, for exactly the reasons you mention, and there is still a lot of low hanging fruit that could make it much better. The thing is, my own interests are drifting to Python 3, because I think it will allow IronPython to be as close to perfectly compatible as possible. Plus, it will give me a chance to really get into the guts of IronPython, which I'm going to document more fully as I go. > > I know the community is limited in resources, but I would hope that 2.7 not > be abandoned too quickly. I would happily volunteer to own the maintenance > of 2.7, but I am far too early in the learning curve to be of any practical > use. ?That said, I'm happy to help on items where I am familiar with that > part of the codebase, or where an experienced contributor can give me some > mentoring. For example, I'm interested in helping to implement the bz2 > module using ic#code's #zip lib > (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would definitely > need some mentoring along the way. I will do (almost) whatever I need to to get more people involved in this project. Unimplemented or incomplete modules are a great place to start (that's how I started). Any assistance (no matter how small) is appreciated. - Jeff From jdhardy at gmail.com Fri Jun 10 18:36:06 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 09:36:06 -0700 Subject: [IronPython] Website Update Help Message-ID: Hi, I'm wondering if there's anyone out there willing to help update the website, in particular replacing the big "IronPython Tools" banner with something else. Updating it isn't too hard and I'll offer any assistance that may be necessary. - Jeff From jschementi at gmail.com Fri Jun 10 18:49:22 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Fri, 10 Jun 2011 12:49:22 -0400 Subject: [IronPython] Website Update Help In-Reply-To: References: Message-ID: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> I can do it. ~Jimmy On Jun 10, 2011, at 12:36 PM, Jeff Hardy wrote: > Hi, > I'm wondering if there's anyone out there willing to help update the > website, in particular replacing the big "IronPython Tools" banner > with something else. Updating it isn't too hard and I'll offer any > assistance that may be necessary. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri Jun 10 18:56:39 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 09:56:39 -0700 Subject: [IronPython] Website Update Help In-Reply-To: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> References: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> Message-ID: On Fri, Jun 10, 2011 at 9:49 AM, Jimmy Schementi wrote: > I can do it. Thanks. Make sure you check my fork to make sure it's in sync with yours. Any objections to using https://github.com/IronLanguages/iron-websites as the main fork, and doing all of the updates from there? - Jeff > > ~Jimmy > > > On Jun 10, 2011, at 12:36 PM, Jeff Hardy wrote: > >> Hi, >> I'm wondering if there's anyone out there willing to help update the >> website, in particular replacing the big "IronPython Tools" banner >> with something else. Updating it isn't too hard and I'll offer any >> assistance that may be necessary. >> >> - Jeff >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jschementi at gmail.com Fri Jun 10 19:08:26 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Fri, 10 Jun 2011 13:08:26 -0400 Subject: [IronPython] Website Update Help In-Reply-To: References: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> Message-ID: <1A503231-28EA-4082-BB59-A97D16712D43@gmail.com> On Jun 10, 2011, at 12:56 PM, Jeff Hardy wrote: > On Fri, Jun 10, 2011 at 9:49 AM, Jimmy Schementi wrote: >> I can do it. > > Thanks. Make sure you check my fork to make sure it's in sync with yours. > > Any objections to using https://github.com/IronLanguages/iron-websites > as the main fork, and doing all of the updates from there? No objections here. Since our sites are all HTML, might be nice just to use GitHub pages rather than the current GoDaddy hosting, though changing the nameservers through Microsoft will be a pain. > - Jeff > >> >> ~Jimmy >> >> >> On Jun 10, 2011, at 12:36 PM, Jeff Hardy wrote: >> >>> Hi, >>> I'm wondering if there's anyone out there willing to help update the >>> website, in particular replacing the big "IronPython Tools" banner >>> with something else. Updating it isn't too hard and I'll offer any >>> assistance that may be necessary. >>> >>> - Jeff >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri Jun 10 19:26:30 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 10:26:30 -0700 Subject: [IronPython] Website Update Help In-Reply-To: <1A503231-28EA-4082-BB59-A97D16712D43@gmail.com> References: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> <1A503231-28EA-4082-BB59-A97D16712D43@gmail.com> Message-ID: > Since our sites are all HTML, might be nice just to use GitHub pages rather than the current GoDaddy hosting, though changing the nameservers through Microsoft will be a pain. I was considering that as well, but I'm not sure we can have two sets of pages from one account. I'll poke github and see what our options are. I'll also see if there's anyway to transfer the domains from MS. You might have a better idea of who to ask then I would, though. - Jeff From jdhardy at gmail.com Fri Jun 10 19:42:54 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 10:42:54 -0700 Subject: [IronPython] Seattle IronPython Meetup Message-ID: Hi all, Is anyone in the Seattle area interested in an IronPython meetup, or even a sprint? Anybody fancy a hands-on crash course in how IronPython works? Let me know! If enough people are interested, I'll work something out (probably for the coming week). I'm new to the area, so if anyone has any suggestions on where to meet, feel free. I'd prefer to avoid downtown Seattle, unless that works for everyone else. - Jeff From zgramana at pottsconsultinggroup.com Fri Jun 10 19:48:25 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 13:48:25 -0400 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: References: <4DF23211.8090609@pottsconsultinggroup.com> Message-ID: <4DF258E9.1050405@pottsconsultinggroup.com> That's great to hear. On the getting involved note, one thing I would love is a code review over ichat/skype/mikogo/cell/etc. I have a patch I intend to submit shortly, and would love someone who knows what they are doing to review it with me synchronously, if nothing else so I can validate some of my assumptions. On 6/10/2011 12:21 PM, Jeff Hardy wrote: > On Fri, Jun 10, 2011 at 8:02 AM, Zachary Gramana > wrote: >> There are some big Python applications (e.g. Mercurial) that are going to >> remain on 2.7 for some time. There are important modules that are still >> missing (bz2), or are incomplete (_winreg), that create compatibility >> barriers. It would also be nice to have sockets moved to the >> socket.py/_socket.cs model (similar to how ssl has been implemented) to >> support apps that monkey patch that module. > > 100% agreed. I don't want to see 2.7 whither, for exactly the reasons > you mention, and there is still a lot of low hanging fruit that could > make it much better. The thing is, my own interests are drifting to > Python 3, because I think it will allow IronPython to be as close to > perfectly compatible as possible. Plus, it will give me a chance to > really get into the guts of IronPython, which I'm going to document > more fully as I go. > >> >> I know the community is limited in resources, but I would hope that 2.7 not >> be abandoned too quickly. I would happily volunteer to own the maintenance >> of 2.7, but I am far too early in the learning curve to be of any practical >> use. That said, I'm happy to help on items where I am familiar with that >> part of the codebase, or where an experienced contributor can give me some >> mentoring. For example, I'm interested in helping to implement the bz2 >> module using ic#code's #zip lib >> (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would definitely >> need some mentoring along the way. > > I will do (almost) whatever I need to to get more people involved in > this project. Unimplemented or incomplete modules are a great place to > start (that's how I started). Any assistance (no matter how small) is > appreciated. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From loocas at duber.cz Fri Jun 10 19:49:29 2011 From: loocas at duber.cz (=?UTF-8?B?THVrw6HFoSBEdWLEm2Rh?=) Date: Fri, 10 Jun 2011 19:49:29 +0200 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <4DF22B13.4080105@pottsconsultinggroup.com> References: <4DF20642.50400@duber.cz> <4DF22B13.4080105@pottsconsultinggroup.com> Message-ID: <4DF25929.3080905@duber.cz> Thank you, Zack, unfortunately, editing the API I got isn't an option, so the only workaround I found was to catch the exception and completely ignore it, which is terrible, but at least it works. So you're saying that this is actually a "bug" in IronPython that's being worked at? Thanks again, much appretiated! Luk?? Dub?da Director [T] +420 602 444 164 duber studio(tm) [M] info at duber.cz [W] http://www.duber.cz [A] R.A.Dvorsk?ho 601, Praha 10 [A] 10900, Czech Republic, Europe On 10.6.2011 16:32, Zachary Gramana wrote: > Lukas, > > I'm working on this issue, or at least an issue that generates the same > exception. I do have a working patch, which I hope to contribute back > after a little more work on it. > > Check your API to see if you are making any calls to socket.makefile(). > If you do, and subsequently close the fileobject (but not the socket > object), the underlying .NET Socket will also get closed (and garbage > collected), even though other objects are still referencing it. However, > the Python socket will not be aware of this corrupt state, and > subsequent socket operations will raise the exception. > > Not sure why subsequent attempts work for you, other than that perhaps > your API has error handling code that re-create the connection. > > Hope this might be helpful. > > Best Regards, Zack > > > > On 6/10/2011 7:55 AM, Luk?? Dub?da wrote: >> Hi there, >> >> I hope someone out there could help me out with this problem. >> >> I have a API written in Python (CPython that is) that relies on >> some of the CPython modules, such as ssl and httplib. >> >> The problem is, when I call the API and its methods via IronPython >> I get IOError: "System.IO.IOException: Unable to write data to the >> transport connection: Cannot access a disposed object." >> >> The weirdest thing is, if I make the call for the second time, >> all goes through beautifully. Then again, thrid time errors out, but >> fourth goes through just fine. And so on so forth. >> >> Here's the exact script excerpt (with the thorough error output) at >> pastebin: http://pastebin.com/TKbKDtPb >> >> I call the sg.find_one() method the first time, which produces the >> IOError. Then at the end of the error output, I call it again and >> as you can see, it returns the correct object. >> >> Please, could anyone tell me how to deal with this without rewriting >> the given API to use .NET objects? >> >> Thanks a lot in advance, cheers, >> > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri Jun 10 19:56:50 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 10:56:50 -0700 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: <4DF258E9.1050405@pottsconsultinggroup.com> References: <4DF23211.8090609@pottsconsultinggroup.com> <4DF258E9.1050405@pottsconsultinggroup.com> Message-ID: Skype would work, and if anyone knows of a way to do screen sharing as well, please chime in. Shoot me a mail off list and we'll sort it out. - Jeff On Fri, Jun 10, 2011 at 10:48 AM, Zachary Gramana wrote: > That's great to hear. > > On the getting involved note, one thing I would love is a code review over > ichat/skype/mikogo/cell/etc. I have a patch I intend to submit shortly, and > would love someone who knows what they are doing to review it with me > synchronously, if nothing else so I can validate some of my assumptions. > > > On 6/10/2011 12:21 PM, Jeff Hardy wrote: >> >> On Fri, Jun 10, 2011 at 8:02 AM, Zachary Gramana >> ?wrote: >>> >>> There are some big Python applications (e.g. Mercurial) that are going to >>> remain on 2.7 for some time. There are important modules that are still >>> missing (bz2), or are incomplete (_winreg), that create compatibility >>> barriers. ?It would also be nice to have sockets moved to the >>> socket.py/_socket.cs model (similar to how ssl has been implemented) to >>> support apps that monkey patch that module. >> >> 100% agreed. I don't want to see 2.7 whither, for exactly the reasons >> you mention, and there is still a lot of low hanging fruit that could >> make it much better. The thing is, my own interests are drifting to >> Python 3, because I think it will allow IronPython to be as close to >> perfectly compatible as possible. Plus, it will give me a chance to >> really get into the guts of IronPython, which I'm going to document >> more fully as I go. >> >>> >>> I know the community is limited in resources, but I would hope that 2.7 >>> not >>> be abandoned too quickly. I would happily volunteer to own the >>> maintenance >>> of 2.7, but I am far too early in the learning curve to be of any >>> practical >>> use. ?That said, I'm happy to help on items where I am familiar with that >>> part of the codebase, or where an experienced contributor can give me >>> some >>> mentoring. For example, I'm interested in helping to implement the bz2 >>> module using ic#code's #zip lib >>> (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would >>> definitely >>> need some mentoring along the way. >> >> I will do (almost) whatever I need to to get more people involved in >> this project. Unimplemented or incomplete modules are a great place to >> start (that's how I started). Any assistance (no matter how small) is >> appreciated. >> >> - Jeff >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jschementi at gmail.com Fri Jun 10 19:57:08 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Fri, 10 Jun 2011 13:57:08 -0400 Subject: [IronPython] Website Update Help In-Reply-To: References: <7246DE6F-C99B-45BB-A3C8-07131BAD4E4D@gmail.com> <1A503231-28EA-4082-BB59-A97D16712D43@gmail.com> Message-ID: <286A4CBD-8D77-4F4B-9650-AAB53C858BEE@gmail.com> On Jun 10, 2011, at 1:26 PM, Jeff Hardy wrote: >> Since our sites are all HTML, might be nice just to use GitHub pages rather than the current GoDaddy hosting, though changing the nameservers through Microsoft will be a pain. > > I was considering that as well, but I'm not sure we can have two sets > of pages from one account. I'll poke github and see what our options > are. Good point. Thanks for looking into it. > I'll also see if there's anyway to transfer the domains from MS. You > might have a better idea of who to ask then I would, though. > > - Jeff Adding Bill ... Bill, the last thing I want to ask you to do is talk to the domains people, but ... Please? > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From zgramana at pottsconsultinggroup.com Fri Jun 10 19:58:14 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 13:58:14 -0400 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <4DF25929.3080905@duber.cz> References: <4DF20642.50400@duber.cz> <4DF22B13.4080105@pottsconsultinggroup.com> <4DF25929.3080905@duber.cz> Message-ID: <4DF25B36.5030200@pottsconsultinggroup.com> I can't say for certain that issue you are experiencing is caused by the bug I'm working on, but it looks very likely. I'll let you know when I submit the patch back to the project. On 6/10/2011 1:49 PM, Luk?? Dub?da wrote: > Thank you, Zack, > > unfortunately, editing the API I got isn't an option, so the > only workaround I found was to catch the exception and completely > ignore it, which is terrible, but at least it works. > > So you're saying that this is actually a "bug" in IronPython > that's being worked at? > > Thanks again, much appretiated! > > Luk?? Dub?da > Director > [T] +420 602 444 164 > > duber studio(tm) > [M] info at duber.cz > [W] http://www.duber.cz > > [A] R.A.Dvorsk?ho 601, Praha 10 > [A] 10900, Czech Republic, Europe > > On 10.6.2011 16:32, Zachary Gramana wrote: >> Lukas, >> >> I'm working on this issue, or at least an issue that generates the same >> exception. I do have a working patch, which I hope to contribute back >> after a little more work on it. >> >> Check your API to see if you are making any calls to socket.makefile(). >> If you do, and subsequently close the fileobject (but not the socket >> object), the underlying .NET Socket will also get closed (and garbage >> collected), even though other objects are still referencing it. However, >> the Python socket will not be aware of this corrupt state, and >> subsequent socket operations will raise the exception. >> >> Not sure why subsequent attempts work for you, other than that perhaps >> your API has error handling code that re-create the connection. >> >> Hope this might be helpful. >> >> Best Regards, Zack >> >> >> >> On 6/10/2011 7:55 AM, Luk?? Dub?da wrote: >>> Hi there, >>> >>> I hope someone out there could help me out with this problem. >>> >>> I have a API written in Python (CPython that is) that relies on >>> some of the CPython modules, such as ssl and httplib. >>> >>> The problem is, when I call the API and its methods via IronPython >>> I get IOError: "System.IO.IOException: Unable to write data to the >>> transport connection: Cannot access a disposed object." >>> >>> The weirdest thing is, if I make the call for the second time, >>> all goes through beautifully. Then again, thrid time errors out, but >>> fourth goes through just fine. And so on so forth. >>> >>> Here's the exact script excerpt (with the thorough error output) at >>> pastebin: http://pastebin.com/TKbKDtPb >>> >>> I call the sg.find_one() method the first time, which produces the >>> IOError. Then at the end of the error output, I call it again and >>> as you can see, it returns the correct object. >>> >>> Please, could anyone tell me how to deal with this without rewriting >>> the given API to use .NET objects? >>> >>> Thanks a lot in advance, cheers, >>> >> _______________________________________________ >> 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 zgramana at pottsconsultinggroup.com Fri Jun 10 20:02:37 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 14:02:37 -0400 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: References: <4DF23211.8090609@pottsconsultinggroup.com> <4DF258E9.1050405@pottsconsultinggroup.com> Message-ID: <4DF25C3D.8050202@pottsconsultinggroup.com> Apparently skype now supports it: http://www.skype.com/intl/en-us/features/allfeatures/screen-sharing I have also had good (cross-platform) luck with the currently-free mikogo service: http://www.mikogo.com/ On 6/10/2011 1:56 PM, Jeff Hardy wrote: > Skype would work, and if anyone knows of a way to do screen sharing as > well, please chime in. > > Shoot me a mail off list and we'll sort it out. > > - Jeff > > On Fri, Jun 10, 2011 at 10:48 AM, Zachary Gramana > wrote: >> That's great to hear. >> >> On the getting involved note, one thing I would love is a code review over >> ichat/skype/mikogo/cell/etc. I have a patch I intend to submit shortly, and >> would love someone who knows what they are doing to review it with me >> synchronously, if nothing else so I can validate some of my assumptions. >> >> >> On 6/10/2011 12:21 PM, Jeff Hardy wrote: >>> >>> On Fri, Jun 10, 2011 at 8:02 AM, Zachary Gramana >>> wrote: >>>> >>>> There are some big Python applications (e.g. Mercurial) that are going to >>>> remain on 2.7 for some time. There are important modules that are still >>>> missing (bz2), or are incomplete (_winreg), that create compatibility >>>> barriers. It would also be nice to have sockets moved to the >>>> socket.py/_socket.cs model (similar to how ssl has been implemented) to >>>> support apps that monkey patch that module. >>> >>> 100% agreed. I don't want to see 2.7 whither, for exactly the reasons >>> you mention, and there is still a lot of low hanging fruit that could >>> make it much better. The thing is, my own interests are drifting to >>> Python 3, because I think it will allow IronPython to be as close to >>> perfectly compatible as possible. Plus, it will give me a chance to >>> really get into the guts of IronPython, which I'm going to document >>> more fully as I go. >>> >>>> >>>> I know the community is limited in resources, but I would hope that 2.7 >>>> not >>>> be abandoned too quickly. I would happily volunteer to own the >>>> maintenance >>>> of 2.7, but I am far too early in the learning curve to be of any >>>> practical >>>> use. That said, I'm happy to help on items where I am familiar with that >>>> part of the codebase, or where an experienced contributor can give me >>>> some >>>> mentoring. For example, I'm interested in helping to implement the bz2 >>>> module using ic#code's #zip lib >>>> (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would >>>> definitely >>>> need some mentoring along the way. >>> >>> I will do (almost) whatever I need to to get more people involved in >>> this project. Unimplemented or incomplete modules are a great place to >>> start (that's how I started). Any assistance (no matter how small) is >>> appreciated. >>> >>> - Jeff >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Fri Jun 10 20:08:05 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 11:08:05 -0700 Subject: [IronPython] Moving forward on 2.7.1 In-Reply-To: <4DF25C3D.8050202@pottsconsultinggroup.com> References: <4DF23211.8090609@pottsconsultinggroup.com> <4DF258E9.1050405@pottsconsultinggroup.com> <4DF25C3D.8050202@pottsconsultinggroup.com> Message-ID: Oh, cool. I've only ever used skype for video chats, so I've never looked at what else it does. I'd never heard of Mikogo, but I'll keep it in the back of my head because it looks interesting. - Jeff On Fri, Jun 10, 2011 at 11:02 AM, Zachary Gramana wrote: > Apparently skype now supports it: > http://www.skype.com/intl/en-us/features/allfeatures/screen-sharing > > I have also had good (cross-platform) luck with the currently-free mikogo > service: http://www.mikogo.com/ > > On 6/10/2011 1:56 PM, Jeff Hardy wrote: >> >> Skype would work, and if anyone knows of a way to do screen sharing as >> well, please chime in. >> >> Shoot me a mail off list and we'll sort it out. >> >> - Jeff >> >> On Fri, Jun 10, 2011 at 10:48 AM, Zachary Gramana >> ?wrote: >>> >>> That's great to hear. >>> >>> On the getting involved note, one thing I would love is a code review >>> over >>> ichat/skype/mikogo/cell/etc. I have a patch I intend to submit shortly, >>> and >>> would love someone who knows what they are doing to review it with me >>> synchronously, if nothing else so I can validate some of my assumptions. >>> >>> >>> On 6/10/2011 12:21 PM, Jeff Hardy wrote: >>>> >>>> On Fri, Jun 10, 2011 at 8:02 AM, Zachary Gramana >>>> ? ?wrote: >>>>> >>>>> There are some big Python applications (e.g. Mercurial) that are going >>>>> to >>>>> remain on 2.7 for some time. There are important modules that are still >>>>> missing (bz2), or are incomplete (_winreg), that create compatibility >>>>> barriers. ?It would also be nice to have sockets moved to the >>>>> socket.py/_socket.cs model (similar to how ssl has been implemented) to >>>>> support apps that monkey patch that module. >>>> >>>> 100% agreed. I don't want to see 2.7 whither, for exactly the reasons >>>> you mention, and there is still a lot of low hanging fruit that could >>>> make it much better. The thing is, my own interests are drifting to >>>> Python 3, because I think it will allow IronPython to be as close to >>>> perfectly compatible as possible. Plus, it will give me a chance to >>>> really get into the guts of IronPython, which I'm going to document >>>> more fully as I go. >>>> >>>>> >>>>> I know the community is limited in resources, but I would hope that 2.7 >>>>> not >>>>> be abandoned too quickly. I would happily volunteer to own the >>>>> maintenance >>>>> of 2.7, but I am far too early in the learning curve to be of any >>>>> practical >>>>> use. ?That said, I'm happy to help on items where I am familiar with >>>>> that >>>>> part of the codebase, or where an experienced contributor can give me >>>>> some >>>>> mentoring. For example, I'm interested in helping to implement the bz2 >>>>> module using ic#code's #zip lib >>>>> (http://www.icsharpcode.net/OpenSource/SharpZipLib/), but would >>>>> definitely >>>>> need some mentoring along the way. >>>> >>>> I will do (almost) whatever I need to to get more people involved in >>>> this project. Unimplemented or incomplete modules are a great place to >>>> start (that's how I started). Any assistance (no matter how small) is >>>> appreciated. >>>> >>>> - Jeff >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.ironpython.com >>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >> _______________________________________________ >> 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 curt at hagenlocher.org Fri Jun 10 20:16:12 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 10 Jun 2011 11:16:12 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: Welcome to Seattle! Or as I like to think of it, welcome to June-and-we-still-have-the-heat-on! :( On Fri, Jun 10, 2011 at 10:42 AM, Jeff Hardy wrote: > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or > even a sprint? Anybody fancy a hands-on crash course in how IronPython > works? Let me know! If enough people are interested, I'll work > something out (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to > meet, feel free. I'd prefer to avoid downtown Seattle, unless that > works for everyone else. > > - 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 Jun 10 20:24:10 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 11:24:10 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: On Fri, Jun 10, 2011 at 11:16 AM, Curt Hagenlocher wrote: > Welcome to Seattle! Or as I like to think of it, welcome to > June-and-we-still-have-the-heat-on! :( I'm from Canada, so this is normal (more rain though). I look forward to not dealing with -40, and laughing at the locals who panic in an inch of snow. :) - Jeff From zgramana at pottsconsultinggroup.com Fri Jun 10 20:26:44 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Fri, 10 Jun 2011 14:26:44 -0400 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: <4DF261E4.60904@pottsconsultinggroup.com> I you are open to "virtual" attendees, then I'm in. On 6/10/2011 2:24 PM, Jeff Hardy wrote: > On Fri, Jun 10, 2011 at 11:16 AM, Curt Hagenlocher wrote: >> Welcome to Seattle! Or as I like to think of it, welcome to >> June-and-we-still-have-the-heat-on! :( > > I'm from Canada, so this is normal (more rain though). I look forward > to not dealing with -40, and laughing at the locals who panic in an > inch of snow. :) > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From brian.curtin at gmail.com Fri Jun 10 20:36:26 2011 From: brian.curtin at gmail.com (Brian Curtin) Date: Fri, 10 Jun 2011 13:36:26 -0500 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: On Fri, Jun 10, 2011 at 12:42, Jeff Hardy wrote: > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or > even a sprint? Anybody fancy a hands-on crash course in how IronPython > works? Let me know! If enough people are interested, I'll work > something out (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to > meet, feel free. I'd prefer to avoid downtown Seattle, unless that > works for everyone else. > > - Jeff If you end up putting together a sprint, the PSF Sprints committee will gladly throw some money your way to sweeten the deal. site: http://pythonsprints.com/ email: sprints at python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.j.dower at gmail.com Fri Jun 10 20:50:14 2011 From: s.j.dower at gmail.com (Steve Dower) Date: Fri, 10 Jun 2011 11:50:14 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: Since I'm in the country for the next couple of months, I'll come along. On Fri, Jun 10, 2011 at 11:36, Brian Curtin wrote: > On Fri, Jun 10, 2011 at 12:42, Jeff Hardy wrote: >> >> Hi all, >> Is anyone in the Seattle area interested in an IronPython meetup, or >> even a sprint? Anybody fancy a hands-on crash course in how IronPython >> works? Let me know! If enough people are interested, I'll work >> something out (probably for the coming week). >> >> I'm new to the area, so if anyone has any suggestions on where to >> meet, feel free. I'd prefer to avoid downtown Seattle, unless that >> works for everyone else. >> >> - Jeff > > If you end up putting together a sprint, the PSF Sprints committee will > gladly throw some money your way to sweeten the deal. > site:?http://pythonsprints.com/ > email: sprints at python.org > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From loocas at duber.cz Fri Jun 10 21:04:42 2011 From: loocas at duber.cz (=?UTF-8?B?THVrw6HFoSBEdWLEm2Rh?=) Date: Fri, 10 Jun 2011 21:04:42 +0200 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <4DF25B36.5030200@pottsconsultinggroup.com> References: <4DF20642.50400@duber.cz> <4DF22B13.4080105@pottsconsultinggroup.com> <4DF25929.3080905@duber.cz> <4DF25B36.5030200@pottsconsultinggroup.com> Message-ID: <4DF26ACA.3000507@duber.cz> Great! That'll save me and my clients a lot of headaches, actually. :) Thank you, Luk?? Dub?da Director [T] +420 602 444 164 duber studio(tm) [M] info at duber.cz [W] http://www.duber.cz [A] R.A.Dvorsk?ho 601, Praha 10 [A] 10900, Czech Republic, Europe On 10.6.2011 19:58, Zachary Gramana wrote: > I can't say for certain that issue you are experiencing is caused by the > bug I'm working on, but it looks very likely. > > I'll let you know when I submit the patch back to the project. > > On 6/10/2011 1:49 PM, Luk?? Dub?da wrote: >> Thank you, Zack, >> >> unfortunately, editing the API I got isn't an option, so the >> only workaround I found was to catch the exception and completely >> ignore it, which is terrible, but at least it works. >> >> So you're saying that this is actually a "bug" in IronPython >> that's being worked at? >> >> Thanks again, much appretiated! >> >> Luk?? Dub?da >> Director >> [T] +420 602 444 164 >> >> duber studio(tm) >> [M] info at duber.cz >> [W] http://www.duber.cz >> >> [A] R.A.Dvorsk?ho 601, Praha 10 >> [A] 10900, Czech Republic, Europe >> >> On 10.6.2011 16:32, Zachary Gramana wrote: >>> Lukas, >>> >>> I'm working on this issue, or at least an issue that generates the same >>> exception. I do have a working patch, which I hope to contribute back >>> after a little more work on it. >>> >>> Check your API to see if you are making any calls to socket.makefile(). >>> If you do, and subsequently close the fileobject (but not the socket >>> object), the underlying .NET Socket will also get closed (and garbage >>> collected), even though other objects are still referencing it. However, >>> the Python socket will not be aware of this corrupt state, and >>> subsequent socket operations will raise the exception. >>> >>> Not sure why subsequent attempts work for you, other than that perhaps >>> your API has error handling code that re-create the connection. >>> >>> Hope this might be helpful. >>> >>> Best Regards, Zack >>> >>> >>> >>> On 6/10/2011 7:55 AM, Luk?? Dub?da wrote: >>>> Hi there, >>>> >>>> I hope someone out there could help me out with this problem. >>>> >>>> I have a API written in Python (CPython that is) that relies on >>>> some of the CPython modules, such as ssl and httplib. >>>> >>>> The problem is, when I call the API and its methods via IronPython >>>> I get IOError: "System.IO.IOException: Unable to write data to the >>>> transport connection: Cannot access a disposed object." >>>> >>>> The weirdest thing is, if I make the call for the second time, >>>> all goes through beautifully. Then again, thrid time errors out, but >>>> fourth goes through just fine. And so on so forth. >>>> >>>> Here's the exact script excerpt (with the thorough error output) at >>>> pastebin: http://pastebin.com/TKbKDtPb >>>> >>>> I call the sg.find_one() method the first time, which produces the >>>> IOError. Then at the end of the error output, I call it again and >>>> as you can see, it returns the correct object. >>>> >>>> Please, could anyone tell me how to deal with this without rewriting >>>> the given API to use .NET objects? >>>> >>>> Thanks a lot in advance, cheers, >>>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Fri Jun 10 21:36:39 2011 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jun 2011 19:36:39 +0000 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E0B3E3@TK5EX14MBXC294.redmond.corp.microsoft.com> I'd be up for it - personally I'd prefer downtown but I could drive to the east side if that's preferable. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Friday, June 10, 2011 10:43 AM > To: Discussion of IronPython > Subject: [IronPython] Seattle IronPython Meetup > > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or even a > sprint? Anybody fancy a hands-on crash course in how IronPython works? > Let me know! If enough people are interested, I'll work something out > (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to meet, feel > free. I'd prefer to avoid downtown Seattle, unless that works for everyone > else. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From steve at mcneel.com Fri Jun 10 22:44:00 2011 From: steve at mcneel.com (Steve Baer) Date: Fri, 10 Jun 2011 13:44:00 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E0B3E3@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E0B3E3@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: I'd also be up for it and we could probably use our office if that works best for people. We're up in the Fremont/Wallingford area with our very own private parking lot;) http://www.en.na.mcneel.com/contact.htm -Steve Steve Baer Robert McNeel & Associates www.rhino3d.com python.rhino3d.com -----Original Message----- From: Dino Viehland Sent: Friday, June 10, 2011 12:36 PM To: Discussion of IronPython Subject: Re: [IronPython] Seattle IronPython Meetup I'd be up for it - personally I'd prefer downtown but I could drive to the east side if that's preferable. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Jeff Hardy > Sent: Friday, June 10, 2011 10:43 AM > To: Discussion of IronPython > Subject: [IronPython] Seattle IronPython Meetup > > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or even > a > sprint? Anybody fancy a hands-on crash course in how IronPython works? > Let me know! If enough people are interested, I'll work something out > (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to meet, > feel > free. I'd prefer to avoid downtown Seattle, unless that works for everyone > else. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From wkhazzard at gmail.com Fri Jun 10 23:10:45 2011 From: wkhazzard at gmail.com (Kevin Hazzard, C# MVP) Date: Fri, 10 Jun 2011 17:10:45 -0400 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: <4DF261E4.60904@pottsconsultinggroup.com> References: <4DF261E4.60904@pottsconsultinggroup.com> Message-ID: Yeah, if there's a way to skype the meeting, that would be great. We've been doing that with some of our UG meetings here in Virginia & D.C. recently with some success. We typically have one person aim a webcam at whoever's speaking and turn the gain up on the mic. Works pretty well. Thanks, Kevin On Fri, Jun 10, 2011 at 2:26 PM, Zachary Gramana < zgramana at pottsconsultinggroup.com> wrote: > I you are open to "virtual" attendees, then I'm in. > > > On 6/10/2011 2:24 PM, Jeff Hardy wrote: > >> On Fri, Jun 10, 2011 at 11:16 AM, Curt Hagenlocher >> wrote: >> >>> Welcome to Seattle! Or as I like to think of it, welcome to >>> June-and-we-still-have-the-heat-on! :( >>> >> >> I'm from Canada, so this is normal (more rain though). I look forward >> to not dealing with -40, and laughing at the locals who panic in an >> inch of snow. :) >> >> - Jeff >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Kevin Hazzard http://manning.com/hazzard -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at mcneel.com Fri Jun 10 23:17:57 2011 From: steve at mcneel.com (Steve Baer) Date: Fri, 10 Jun 2011 14:17:57 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E0B3E3@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: Doesn't really matter; we're a pretty laid back company. We have a meeting room that comfortably holds at least 15 (could hold more) with a big screen television that we can hook up to. We actually have the room pretty well wired with mics and a soundboard since we hold a weekly Tuesday lunch meeting there and include a few co-workers in Europe and in other states through skype or teamviewer. Weekends and evenings are also fine, but if the weather starts getting too nice I might not be there to open the door;) We're using IronPython as a scripting language on both our Windows and Mac products. -Steve Steve Baer Robert McNeel & Associates www.rhino3d.com python.rhino3d.com -----Original Message----- From: Jeff Hardy Sent: Friday, June 10, 2011 1:59 PM To: steve at mcneel.com Subject: Re: [IronPython] Seattle IronPython Meetup Hi Steve, Interesting offer - would evening or weekends work better? And how many people could you accommodate (realistically, we might get 3 or 4, but I'm eternally hopeful...) - Jeff On Fri, Jun 10, 2011 at 1:44 PM, Steve Baer wrote: > I'd also be up for it and we could probably use our office if that works > best for people. We're up in the Fremont/Wallingford area with our very > own > private parking lot;) > http://www.en.na.mcneel.com/contact.htm > > -Steve > > Steve Baer > Robert McNeel & Associates > www.rhino3d.com > python.rhino3d.com > > -----Original Message----- From: Dino Viehland > Sent: Friday, June 10, 2011 12:36 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Seattle IronPython Meetup > > I'd be up for it - personally I'd prefer downtown but I could drive to the > east side > if that's preferable. > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Jeff Hardy >> Sent: Friday, June 10, 2011 10:43 AM >> To: Discussion of IronPython >> Subject: [IronPython] Seattle IronPython Meetup >> >> Hi all, >> Is anyone in the Seattle area interested in an IronPython meetup, or even >> a >> sprint? Anybody fancy a hands-on crash course in how IronPython works? >> Let me know! If enough people are interested, I'll work something out >> (probably for the coming week). >> >> I'm new to the area, so if anyone has any suggestions on where to meet, >> feel >> free. I'd prefer to avoid downtown Seattle, unless that works for >> everyone >> else. >> >> - Jeff >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jdhardy at gmail.com Fri Jun 10 23:26:00 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 14:26:00 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E0B3E3@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Fri, Jun 10, 2011 at 2:17 PM, Steve Baer wrote: > Doesn't really matter; we're a pretty laid back company. ?We have a meeting > room that comfortably holds at least 15 (could hold more) with a big screen > television that we can hook up to. ?We actually have the room pretty well > wired with mics and a soundboard since we hold a weekly Tuesday lunch > meeting there and include a few co-workers in Europe and in other states > through skype or teamviewer. Ooh, nice. > > Weekends and evenings are also fine, but if the weather starts getting too > nice I might not be there to open the door;) You did say you were in Seattle, right? ;) - Jeff From jdhardy at gmail.com Fri Jun 10 23:37:21 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jun 2011 14:37:21 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: OK, follow up questions: * When? Sometime this coming week would work great for me; what about anyone else? * What times work best? Either weekends or evenings are fine by me. * What format? Right now I'm thinking that we actually plan it as a sprint, with perhaps a couple of lightning talks thrown in. * Who's coming? A few people have indicated interest; I'd like to have a half-dozen or so committed people. I'd also like to get some newbies there; I'm not sure how best to reach out to them. If there's no rough consensus, I'll just pick a date & time. We'll probably use Steve Baer's graciously volunteered office, so obviously Steve has a fair bit of say over the date & time :). - Jeff On Fri, Jun 10, 2011 at 10:42 AM, Jeff Hardy wrote: > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or > even a sprint? Anybody fancy a hands-on crash course in how IronPython > works? Let me know! If enough people are interested, I'll work > something out (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to > meet, feel free. I'd prefer to avoid downtown Seattle, unless that > works for everyone else. > > - Jeff > From steve at mcneel.com Sat Jun 11 00:07:47 2011 From: steve at mcneel.com (Steve Baer) Date: Fri, 10 Jun 2011 15:07:47 -0700 Subject: [IronPython] Seattle IronPython Meetup In-Reply-To: References: Message-ID: <251D3F6F3D934A1A909627C70A298B31@mcneel.com> Any time works for me next week. We have Tuesday meetings at lunch which can tend to last way too long, but other than that my schedule looks pretty open next week. -Steve Steve Baer Robert McNeel & Associates www.rhino3d.com python.rhino3d.com -----Original Message----- From: Jeff Hardy Sent: Friday, June 10, 2011 2:37 PM To: Discussion of IronPython Subject: Re: [IronPython] Seattle IronPython Meetup OK, follow up questions: * When? Sometime this coming week would work great for me; what about anyone else? * What times work best? Either weekends or evenings are fine by me. * What format? Right now I'm thinking that we actually plan it as a sprint, with perhaps a couple of lightning talks thrown in. * Who's coming? A few people have indicated interest; I'd like to have a half-dozen or so committed people. I'd also like to get some newbies there; I'm not sure how best to reach out to them. If there's no rough consensus, I'll just pick a date & time. We'll probably use Steve Baer's graciously volunteered office, so obviously Steve has a fair bit of say over the date & time :). - Jeff On Fri, Jun 10, 2011 at 10:42 AM, Jeff Hardy wrote: > Hi all, > Is anyone in the Seattle area interested in an IronPython meetup, or > even a sprint? Anybody fancy a hands-on crash course in how IronPython > works? Let me know! If enough people are interested, I'll work > something out (probably for the coming week). > > I'm new to the area, so if anyone has any suggestions on where to > meet, feel free. I'd prefer to avoid downtown Seattle, unless that > works for everyone else. > > - Jeff > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From janssen at parc.com Sun Jun 12 19:34:37 2011 From: janssen at parc.com (Bill Janssen) Date: Sun, 12 Jun 2011 10:34:37 PDT Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <4DF20642.50400@duber.cz> References: <4DF20642.50400@duber.cz> Message-ID: <16277.1307900077@parc.com> Luk?? Dub?da wrote: > Hi there, > > I hope someone out there could help me out with this problem. > > I have a API written in Python (CPython that is) that relies on > some of the CPython modules, such as ssl and httplib. > > The problem is, when I call the API and its methods via IronPython > I get IOError: "System.IO.IOException: Unable to write data to the > transport connection: Cannot access a disposed object." I re-wrote the SSL module for CPython back in 2007, and as part of that delved into the socket and httplib modules, further than I wanted to go. The httplib module relies on the socket module's not actually closing the socket when it gets GC'd. It passes the file descriptor off to a callback function, and drops the socket object, assuming that the file descriptor will stay open so the callback function can read from it, until someone (presumably the callback function) closes it. (This apparently was originally done to work around the absence of dup() on Windows.) I believe it was re-engineered in py3, but am not sure what the status is in py2. I could easily see this leading to something similar to what you're seeing. Bill From jschementi at gmail.com Sun Jun 12 20:32:16 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Sun, 12 Jun 2011 14:32:16 -0400 Subject: [IronPython] [Ironruby-core] Send your IronRuby usage and quotes In-Reply-To: <16A7DD08F0425648AB80B28A3453C40BDEDFBB@NW60R2.napa.fi> References: <62f0df8b1419e3b7c6c754a5b16aae8d@ruby-forum.com> <16A7DD08F0425648AB80B28A3453C40BDEDFBB@NW60R2.napa.fi> Message-ID: Dug this old thread up and added the posts to https://github.com/IronLanguages/main/wiki/IronLanguage-usages; if you have anything to add, feel free to add it to the wiki page directly. ~Jimmy From loocas at duber.cz Sun Jun 12 22:57:02 2011 From: loocas at duber.cz (=?UTF-8?B?THVrw6HFoSBEdWLEm2Rh?=) Date: Sun, 12 Jun 2011 22:57:02 +0200 Subject: [IronPython] IronPython and CPython httplib and ssl modules produce IOError In-Reply-To: <16277.1307900077@parc.com> References: <4DF20642.50400@duber.cz> <16277.1307900077@parc.com> Message-ID: <4DF5281E.4090904@duber.cz> Hi there, Bill, thanks a lot for the insight of the issue, I can see how my programs could error out like that now. I'll see what I can do for now, but, unfortunately the fastest and easiest workaround I used was: try: main() except IOError: main() which is painful even when looked at. :( Thanks again, cheers, Luk?? Dub?da Director [T] +420 602 444 164 duber studio(tm) [M] info at duber.cz [W] http://www.duber.cz [A] R.A.Dvorsk?ho 601, Praha 10 [A] 10900, Czech Republic, Europe On 12.6.2011 19:34, Bill Janssen wrote: > Luk?? Dub?da wrote: > >> Hi there, >> >> I hope someone out there could help me out with this problem. >> >> I have a API written in Python (CPython that is) that relies on >> some of the CPython modules, such as ssl and httplib. >> >> The problem is, when I call the API and its methods via IronPython >> I get IOError: "System.IO.IOException: Unable to write data to the >> transport connection: Cannot access a disposed object." > > I re-wrote the SSL module for CPython back in 2007, and as part of that > delved into the socket and httplib modules, further than I wanted to go. > The httplib module relies on the socket module's not actually closing > the socket when it gets GC'd. It passes the file descriptor off to a > callback function, and drops the socket object, assuming that the file > descriptor will stay open so the callback function can read from it, > until someone (presumably the callback function) closes it. (This > apparently was originally done to work around the absence of dup() on > Windows.) I believe it was re-engineered in py3, but am not sure what > the status is in py2. I could easily see this leading to something > similar to what you're seeing. > > Bill > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From TomU at MITEM.com Mon Jun 13 19:16:21 2011 From: TomU at MITEM.com (Tom Unger) Date: Mon, 13 Jun 2011 10:16:21 -0700 Subject: [IronPython] How to place static class in script name space Message-ID: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> I am using IronPython for scripting an application. To make writing scripts easier I want to place several objects in the script name space so they can be easily used. I got stuck with how to place a reference to a static object, "App", in the name space. This is probably a simple operation and just don't know what it is. 1. Python import works: from AppFrame import App gives the script access to the static fields and methods on App. But I want to eliminate the need for each script to do that import by setting up the scope with: scriptScope.SetVariable("App", App); This does not compile because App is a static class, not an object. How does my hosing application place a reference to the static class in the script's scope such that it can be used as if it was imported? Thanks Tom Seattle -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Jun 13 19:21:46 2011 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 13 Jun 2011 17:21:46 +0000 Subject: [IronPython] How to place static class in script name space In-Reply-To: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> References: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E0F120@TK5EX14MBXC294.redmond.corp.microsoft.com> We specifically allow from staticclass import * because we treat a static class as if it were like a module. So you could simply run that line of code in the scope on behalf of the user. Otherwise you'll need to re-create getting the dynamic members and then setting them in the scope. Then you can use PythonOps.GetAttrNames to get the defined names and finally PythonOps.GetBoundAttr to get the actual members which you'll then set in the scope. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tom Unger Sent: Monday, June 13, 2011 10:16 AM To: 'users at lists.ironpython.com' Subject: [IronPython] How to place static class in script name space I am using IronPython for scripting an application. To make writing scripts easier I want to place several objects in the script name space so they can be easily used. I got stuck with how to place a reference to a static object, "App", in the name space. This is probably a simple operation and just don't know what it is. 1. Python import works: from AppFrame import App gives the script access to the static fields and methods on App. But I want to eliminate the need for each script to do that import by setting up the scope with: scriptScope.SetVariable("App", App); This does not compile because App is a static class, not an object. How does my hosing application place a reference to the static class in the script's scope such that it can be used as if it was imported? Thanks Tom Seattle -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Mon Jun 13 20:25:54 2011 From: rome at Wintellect.com (Keith Rome) Date: Mon, 13 Jun 2011 11:25:54 -0700 Subject: [IronPython] How to place static class in script name space In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E0F120@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> <6C7ABA8B4E309440B857D74348836F2E28E0F120@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <7737799D90E55E4BB9C9F7E40D161E110E346A1CDB@VA3DIAXVS461.RED001.local> To pre-load various module imports into our execution environment, I am doing something like this at application startup (we have a number of modules that we pre-load): dynamic builtin = Engine.GetBuiltinModule(); dynamic import = builtin.__import__; var DefaultImports = new string[] { "math", "clr", "sys", "string", "cmath", "re" /*etc...*/ }; CachedModules = new Dictionary(); foreach (var mod in DefaultImports) CachedModules.Add(mod, import(mod)); And then later on, just before executing a new script each time, I create a new empty scope using Engine.CreateScope() and then I inject all of the cached modules that were previously imported: foreach (var mod in CachedModules) LocalScope.SetVariable(mod.Key, mod.Value); PreCompiled.Execute(LocalScope); This allows each script invocation to reside in its own somewhat isolated sandbox, while only importing those commonly used modules once. You should be able to do something similar to the above, using the builtin __import__() function. From looking over the IronPython source, it looks like you should be able to call it like this (I haven't tested it in this way, but I believe it should work): dynamic AppModule = import("App", null, null, "AppFrame"); This should effectively mimic exactly what happens when you run the statement "from AppFrame import App". Many Bothan spies have died in bringing you this information. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, June 13, 2011 1:22 PM To: Discussion of IronPython Subject: Re: [IronPython] How to place static class in script name space We specifically allow from staticclass import * because we treat a static class as if it were like a module. So you could simply run that line of code in the scope on behalf of the user. Otherwise you'll need to re-create getting the dynamic members and then setting them in the scope. Then you can use PythonOps.GetAttrNames to get the defined names and finally PythonOps.GetBoundAttr to get the actual members which you'll then set in the scope. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tom Unger Sent: Monday, June 13, 2011 10:16 AM To: 'users at lists.ironpython.com' Subject: [IronPython] How to place static class in script name space I am using IronPython for scripting an application. To make writing scripts easier I want to place several objects in the script name space so they can be easily used. I got stuck with how to place a reference to a static object, "App", in the name space. This is probably a simple operation and just don't know what it is. 1. Python import works: from AppFrame import App gives the script access to the static fields and methods on App. But I want to eliminate the need for each script to do that import by setting up the scope with: scriptScope.SetVariable("App", App); This does not compile because App is a static class, not an object. How does my hosing application place a reference to the static class in the script's scope such that it can be used as if it was imported? Thanks Tom Seattle -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at wildsong.biz Tue Jun 14 02:13:18 2011 From: brian at wildsong.biz (Brian Wilson) Date: Mon, 13 Jun 2011 17:13:18 -0700 Subject: [IronPython] Program.py can't find its DLL when compiled with pyc.py Message-ID: Can anyone shed any light on this? I spent several hours searching the Web for some hints with no luck. Using VS2010, I built a little IronPython program and added a Windows form to it as a separate project. It all works fine when invoked as "ipyw.exe -D Program.py". (IronPython 2.6.2 with .net 2.0) Moving on to try out pyc.py, I built a trivial program (no separate form) and the executable works fine. (I used the sample that gets created when you create a new IP project in VS2010.) But when I try to build and run my version with the separate form, it does not work; my compiled python can't find the DLL when run. The exact error message is this: Unhandled Exception: System.IO.IOException: Could not add reference to assembly form.dll at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[] args, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`6.Call5(CallSite site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) at IronPython.Runtime.Importer.Import(CodeContext context, String fullName, PythonTuple from, Int32 level) at IronPython.Runtime.Operations.PythonOps.InitializeModule(Assembly precompiled, String main, String[] references) at PythonMain.Main() The pyc.py build command is ipy.exe pyc.py /main:Program.py /out:setup /target:winexe I am building and running in a directory containing the DLL's, form.dll IronPython.Modules.dll IronPython.dll Lib Microsoft.Dynamic.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.ExtensionAttribute.dll Microsoft.Scripting.dll Program.py pyc.py Here is my Program.py import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import * clr.AddReference('form.dll') from ipform import Form1 form = Form1() Application.Run(form) -- Brian Wilson Corvallis Oregon From davew252 at tx.rr.com Tue Jun 14 04:56:53 2011 From: davew252 at tx.rr.com (Dave Wald) Date: Mon, 13 Jun 2011 21:56:53 -0500 Subject: [IronPython] Program.py can't find its DLL when compiled with pyc.py In-Reply-To: References: Message-ID: <4DF6CDF5.2090200@tx.rr.com> On 6/13/2011 7:13 PM, Brian Wilson wrote: > Can anyone shed any light on this? I spent several hours searching the > Web for some hints with no luck. > > Using VS2010, I built a little IronPython program and added a Windows > form to it as a separate project. > It all works fine when invoked as "ipyw.exe -D Program.py". > (IronPython 2.6.2 with .net 2.0) > > Moving on to try out pyc.py, I built a trivial program (no separate > form) and the executable works fine. > (I used the sample that gets created when you create a new IP project > in VS2010.) > > But when I try to build and run my version with the separate form, it > does not work; my compiled python can't find the DLL when run. > The exact error message is this: > > Unhandled Exception: System.IO.IOException: Could not add reference to > assembly form.dll > at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[] > args, Boolean& shouldOptimize) > at IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`6.Call5(CallSite > site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, > T3 arg3, T4 arg4) > at System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) > at IronPython.Runtime.Importer.Import(CodeContext context, String > fullName, PythonTuple from, Int32 level) > at IronPython.Runtime.Operations.PythonOps.InitializeModule(Assembly > precompiled, String main, String[] references) > at PythonMain.Main() > > The pyc.py build command is > > ipy.exe pyc.py /main:Program.py /out:setup /target:winexe > > I am building and running in a directory containing the DLL's, > > form.dll > IronPython.Modules.dll > IronPython.dll > Lib > Microsoft.Dynamic.dll > Microsoft.Scripting.Core.dll > Microsoft.Scripting.ExtensionAttribute.dll > Microsoft.Scripting.dll > Program.py > pyc.py > > Here is my Program.py > > import clr > clr.AddReference('System.Windows.Forms') > from System.Windows.Forms import * > clr.AddReference('form.dll') > from ipform import Form1 > form = Form1() > Application.Run(form) > Brian, I haven't tried the pyc tool yet, (haven't needed to), but I have run into similar problems just running under IPy and VS. I suspect pyc'ing is a whole different set of issues. But anyway, I have taken to always using the clr.AddReferenceToFileAndPath(...) form for my extraneous dll's for that reason. I add a bin folder to my project and put all my dlls in it and then reference them by filepath, e.g.: clr.AddReferenceToFileAndPath(r".\bin\IPyScratchPad.dll") I think the "clr.AddReference(...)" form is really only for well-known .Net dlls. It's spelled out pretty well here: http://www.ironpython.net/documentation/dotnet/ Give that a try. Best, Dave From m.schaber at 3s-software.com Tue Jun 14 09:01:07 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Tue, 14 Jun 2011 09:01:07 +0200 Subject: [IronPython] How to place static class in script name space In-Reply-To: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> References: <76D9C96B0A468C4EADAFAC354674E0AC0138E2@menlo6.mitem.com> Message-ID: Hi, Tom, Von: Tom Unger > But I want to eliminate the need for each script to do that import by setting up the scope with: > scriptScope.SetVariable("App", App); > This does not compile because App is a static class, not an object. Maybe scriptScope.SetVariable("App", DynamicHelpers.GetPythonTypeFromType(typeof(App))) can help here? The C# typeof() operator returns the .NET type object (the same as you get from GetType() of an instance), and the DynamicHelpers.GetPythonTypeFromType() method returns the corresponding python type object for that .NET type. I successfully used it to expose types (constructors, static members) to IronPython 2.6 scripts. (DynamicHelpers is defined in the IronPython.Runtime.Types namespace.) HTH, Markus ? From jdhardy at gmail.com Tue Jun 14 18:20:11 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 14 Jun 2011 09:20:11 -0700 Subject: [IronPython] Upcoming Mailing List Changes Message-ID: Hi all, This a notice that some changes may be coming to this mailing list in the near future. I'm planning on moving the list from it's current host (by a gracious IronPython community member) to being hosted on python.org. The address of the list will change from users at lists.ironpython.com to ironpython-users at python.org. Ideally all of the subscribers and archives will be transferred over as well, but that's still being sorted out. The old list address should also be usable for a while as well. The timeline hasn't been established, but I'll let you know when the expected transition is. Ideally, it will all be seamless, but if you have any mail filters based on the old address, you'll have to update them. - Jeff From jdhardy at gmail.com Wed Jun 15 05:29:53 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 14 Jun 2011 20:29:53 -0700 Subject: [IronPython] Upcoming Mailing List Changes In-Reply-To: References: Message-ID: On Tue, Jun 14, 2011 at 9:20 AM, Jeff Hardy wrote: > The timeline hasn't been established... It looks like the move is going to go ahead tomorrow (Wednesday) or the next day. Remember, list traffic will be coming from ironpython-users at python.org, and mails need to be sent to that address as well. Also, the new list does not enable Reply-To munging (for all the reasons in http://marc.merlins.org/netrants/reply-to-harmful.html). If you want your email to be in the archives, wait a couple of days until we're sure that everything has gone smoothly. I'll send a notification when the move is complete, and then any mails to the list have to go to the new address. - Jeff From doug.blank at gmail.com Wed Jun 15 16:04:07 2011 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 15 Jun 2011 10:04:07 -0400 Subject: [IronPython] How can IronPython access a public static value defined in C#? Message-ID: Consider this C# code: public static class Graphics { public static Color white = new Color(255, 255, 255); } I can compile and import this from IronPython: >>> import clr >>> clr.AddReference("Graphics") >>> import Graphics >>> Graphics.white But I can't: >>> import clr >>> clr.AddReference("Graphics") >>> from Graphics import * >>> white Traceback (most recent call last): File "/home/dblank/Calico/src/engine.py", line 159, in execute source.Execute(self.manager.scope) File "", line 1, in : name 'white' is not defined Is there something I can do to make white accessible with "from ... import *"? Thanks for any pointers, -Doug From jdhardy at gmail.com Thu Jun 16 17:39:49 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 16 Jun 2011 08:39:49 -0700 Subject: [Ironpython-users] New Mailing List is now available Message-ID: Hi all, After the downtime yesterday, the new mailing list is now available. It appears that everyone has received unsubscribe notices; these were sent in error. Everyone who was subscribed to the old list should be subscribed to the new list. The page for the new list is http://mail.python.org/mailman/listinfo/ironpython-users, and mails should now be sent to ironpython-users at python.org. If you think that you are not getting mail, please send me an email directly and I will verify that you are still in the membership database. Also, a big thank you goes out to DreamHost, Jim Hugunin, and Ralf Hildebrandt for their work in getting the mailing list moved over. Again, I apologize for any inconvenience this may have caused, and for the erroneous unsubscribe messages. - Jeff From slide.o.mix at gmail.com Thu Jun 16 18:03:06 2011 From: slide.o.mix at gmail.com (Slide) Date: Thu, 16 Jun 2011 09:03:06 -0700 Subject: [Ironpython-users] New Mailing List is now available In-Reply-To: References: Message-ID: On Thu, Jun 16, 2011 at 8:39 AM, Jeff Hardy wrote: > Hi all, > After the downtime yesterday, the new mailing list is now available. > It appears that everyone has received unsubscribe notices; these were > sent in error. Everyone who was subscribed to the old list should be > subscribed to the new list. > > The page for the new list is > http://mail.python.org/mailman/listinfo/ironpython-users, and mails > should now be sent to ironpython-users at python.org. > > If you think that you are not getting mail, please send me an email > directly and I will verify that you are still in the membership > database. > > Also, a big thank you goes out to DreamHost, Jim Hugunin, and Ralf > Hildebrandt for their work in getting the mailing list moved over. > > Again, I apologize for any inconvenience this may have caused, and for > the erroneous unsubscribe messages. > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > Jeff, Thanks to you also for your continued work to improve the IP infrastructure. Your work is much appreciated! Slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxpatric at gmail.com Thu Jun 16 18:31:45 2011 From: zxpatric at gmail.com (zxpatric) Date: Thu, 16 Jun 2011 12:31:45 -0400 Subject: [Ironpython-users] (Resend after group email address changed): Way to extend IronPython to application specific request without changing its source code? Message-ID: Hi, I am looking to extend IronPython in the way that a script like following can run: Class1 c1 = Class1() print c1.Property with Class1 defined in .NET module: public class Class1 { private int a; public int A { get { return a;} set { a=value;} } }; Property is not a .NET property of Class1 but there is an applicatin hard "rule" for example that "Class1.Property" is equal to: public int Property { get { return A+1;} } How may I append this rule (as a .NET module to IronPython or Microsoft.Scripting.dll?) without touching the IronPython source so that print c1.Property could be correctly inteperated by IronPython? Thanks -Patrick. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at wildsong.biz Thu Jun 16 18:55:13 2011 From: brian at wildsong.biz (Brian Wilson) Date: Thu, 16 Jun 2011 09:55:13 -0700 Subject: [Ironpython-users] IronPython wiki In-Reply-To: References: Message-ID: Do you think there is enough interest to unlock the member feature on the IronPython.info wiki, or should I just talk here? BTW I've dealt with wiki spam by putting Captcha and ConfirmEdit on my wiki and it seems to work. -- Brian Wilson Corvallis Oregon From jschementi at gmail.com Thu Jun 16 19:12:37 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Thu, 16 Jun 2011 13:12:37 -0400 Subject: [Ironpython-users] IronPython wiki In-Reply-To: References: Message-ID: <70C1539F-0E00-426C-82EB-94C5AF1DAFB6@gmail.com> On Jun 16, 2011, at 12:55 PM, Brian Wilson wrote: > Do you think there is enough interest to unlock the member feature on > the IronPython.info wiki, or should I just talk here? > > BTW I've dealt with wiki spam by putting Captcha and ConfirmEdit on my > wiki and it seems to work. http://ironpython.info is actually owned and operated my Michael Foord as a cookbook for IronPython. We can very easily set up a wiki on http://ironpython.codeplex.com, but talking on the mailing list and looking at the archives has worked pretty well so-far. Anything that is lacking in documentation can be added to http://ironpython.net/documentation/dotnet/; right now that file is in https://github.com/IronLanguages/main/blob/master/Languages/IronPython/Public/Doc/dotnet-integration.rst. ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Jun 16 19:17:34 2011 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 16 Jun 2011 17:17:34 +0000 Subject: [Ironpython-users] (Resend after group email address changed): Way to extend IronPython to application specific request without changing its source code? In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E18991@TK5EX14MBXC294.redmond.corp.microsoft.com> You can implement IDynamicMetaObjectProvider on the object, then implement a DynamicMetaObject which overrides GetMember and handles when "Property" is accessed. You'll need to produce an AST which represents how to access the member. A simple way to do this would be if you had a "static bool TryGetProperty(string name, Class1 class, out object res)" method then you could generate an expression tree which just calls that method and if it succeeds returns the result, otherwise you fallback to the binder that called you. This would also have the result of making this work w/ C# dynamic or other dynamic languages. An easier way to do this would be if you could make Class1 inherit from .NET 4's DynamicObject class. In that case you can just override TryGetMember and return the value (rather than dealing w/ the ASTs and IDMOP protocol). From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of zxpatric Sent: Thursday, June 16, 2011 9:32 AM To: ironpython-users at python.org Subject: [Ironpython-users] (Resend after group email address changed): Way to extend IronPython to application specific request without changing its source code? Hi, I am looking to extend IronPython in the way that a script like following can run: Class1 c1 = Class1() print c1.Property with Class1 defined in .NET module: public class Class1 { private int a; public int A { get { return a;} set { a=value;} } }; Property is not a .NET property of Class1 but there is an applicatin hard "rule" for example that "Class1.Property" is equal to: public int Property { get { return A+1;} } How may I append this rule (as a .NET module to IronPython or Microsoft.Scripting.dll?) without touching the IronPython source so that print c1.Property could be correctly inteperated by IronPython? Thanks -Patrick. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Jun 16 20:55:25 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 16 Jun 2011 11:55:25 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend Message-ID: I'm planning to release a Beta of IronPython 2.7.1 for this weekend (June 18-19). I haven't decided on a timeline for the final release, but expect it to be about 3 weeks later. Bug fixes will still be accepted after the beta is released, but the sooner, the better. The main reason for this release is to get the newly supported modules (unicodedata, _ast, csv) and the updated stdlib (from CPython 2.7.2) out there to see if there are no major issues. IronPython 2.7,1 will have the same assembly version as 2.7, so it should be a drop-in replacement. - Jeff P.S. If anyone wants to write a pyexpat implementation, I - and many others - would greatly appreciate it. From wkhazzard at gmail.com Thu Jun 16 20:55:37 2011 From: wkhazzard at gmail.com (Kevin Hazzard, C# MVP) Date: Thu, 16 Jun 2011 14:55:37 -0400 Subject: [Ironpython-users] (Resend after group email address changed): Way to extend IronPython to application specific request without changing its source code? In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E18991@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E18991@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: Inheriting from DynamicObject is the way to go for 90% of applications. I implement most of my dynamic types that way, as Dino suggested. If you already have a base class though, implementing IDynamicMetaObjectProvider isn't all that difficult. But you should have good working knowledge of Expression Trees before you dive into that. Kevin On Thu, Jun 16, 2011 at 1:17 PM, Dino Viehland wrote: > You can implement IDynamicMetaObjectProvider on the object, then > implement a DynamicMetaObject which overrides GetMember and handles when > ?Property? is accessed. You?ll need to produce an AST which represents how > to access the member. A simple way to do this would be if you had a ?static > bool TryGetProperty(string name, Class1 class, out object res)? method then > you could generate an expression tree which just calls that method and if it > succeeds returns the result, otherwise you fallback to the binder that > called you. This would also have the result of making this work w/ C# > dynamic or other dynamic languages. **** > > ** ** > > An easier way to do this would be if you could make Class1 inherit from > .NET 4?s DynamicObject class. In that case you can just override > TryGetMember and return the value (rather than dealing w/ the ASTs and IDMOP > protocol).**** > > ** ** > > *From:* ironpython-users-bounces+dinov=microsoft.com at python.org [mailto: > ironpython-users-bounces+dinov=microsoft.com at python.org] *On Behalf Of * > zxpatric > *Sent:* Thursday, June 16, 2011 9:32 AM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] (Resend after group email address changed): > Way to extend IronPython to application specific request without changing > its source code?**** > > ** ** > > Hi,**** > > **** > > I am looking to extend IronPython in the way that a script like following > can run:**** > > **** > > Class1 c1 = Class1()**** > > print c1.Property**** > > **** > > with Class1 defined in .NET module:**** > > **** > > public class Class1**** > > {**** > > private int a;**** > > public int A**** > > {**** > > get { return a;}**** > > set { a=value;}**** > > }**** > > };**** > > **** > > Property is not a .NET property of Class1 but there is an applicatin hard > "rule" for example that "Class1.Property" is equal to:**** > > **** > > public int Property**** > > {**** > > get { return A+1;}**** > > }**** > > **** > > How may I append this rule (as a .NET module to IronPython or > Microsoft.Scripting.dll?) without touching the IronPython source so that > print c1.Property could be correctly inteperated by IronPython?**** > > **** > > Thanks**** > > -Patrick.**** > > ** ** > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -- Kevin Hazzard http://manning.com/hazzard -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Fri Jun 17 00:14:04 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Thu, 16 Jun 2011 18:14:04 -0400 Subject: [Ironpython-users] [IronPython] Visual studio 2010 In-Reply-To: References: Message-ID: <4B3F0FE5-9E28-463E-8345-9292D034C28E@gmail.com> >>> Finally, when it comes to CI, is there a recognised way of running >>> Iron Python modules from an MSBuild script? >> >> Paul, >> >> I have a VS2010 plugin that lets you run IronPython tests in MSTest; I'll put it on GitHub shortly. >> > > Excellent, thank you! I'll look forward to the link. OK, I put the tool on GitHub: https://github.com/jschementi/ironpython-mstest/zipball/master Please help me test out the clean install: To install: 0. Make sure you have IronPython installed. 1. Run path\to\extracted\zip\Releases\IronPythonTools.Testing.vsix 2. Run path\to\extracted\zip\Releases\install.bat as an Administrator (might see a bunch of warnings ... take a look at them but keep going ...) To use/test: 1. Open ExampleTestProject\ExampleTestProject.sln in a new instance of Visual Studio 2. Delete test_example.cs (test_example.py's code-behind). 4. Open test_example.py and immediately save it; this should regenerate test_example.cs. 5. Now run that project's unit tests, and you should see them run as any other MSTest. Let me know if you run into any issues. If not, I'll write some documentation and maybe make a proper installer. ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.tiff Type: image/tiff Size: 20100 bytes Desc: not available URL: From m.schaber at 3s-software.com Fri Jun 17 07:58:06 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Fri, 17 Jun 2011 07:58:06 +0200 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: Hi, Jeff, Von: Jeff Hardy > > I'm planning to release a Beta of IronPython 2.7.1 for this weekend (June > 18-19). I haven't decided on a timeline for the final release, but expect > it to be about 3 weeks later. Bug fixes will still be accepted after the > beta is released, but the sooner, the better. Fine, I'm looking forward to it. Is this release still compileable using .NET 2.0? > The main reason for this release is to get the newly supported modules > (unicodedata, _ast, csv) and the updated stdlib (from CPython 2.7.2) out > there to see if there are no major issues. > > IronPython 2.7,1 will have the same assembly version as 2.7, so it should > be a drop-in replacement. I'm not really sure whether using the same assembly version is a good idea - in my experience, having different versions of the file using the same assembly version can lead to some confusions. But maybe the drop-in character outweighs the disadvantages. Best regards, Markus Schaber From jdhardy at gmail.com Fri Jun 17 09:04:12 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 17 Jun 2011 00:04:12 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Thu, Jun 16, 2011 at 10:58 PM, Markus Schaber wrote: > Fine, I'm looking forward to it. Is this release still compileable using > .NET 2.0? It should be, although I haven't tested that lately. > >> The main reason for this release is to get the newly supported modules >> (unicodedata, _ast, csv) and the updated stdlib (from CPython 2.7.2) > out >> there to see if there are no major issues. >> >> IronPython 2.7,1 will have the same assembly version as 2.7, so it > should >> be a drop-in replacement. > > I'm not really sure whether using the same assembly version is a good > idea - in my experience, having different versions of the file using the > same assembly version can lead to some confusions. > > But maybe the drop-in character outweighs the disadvantages. Yeah, it's a tradeoff, but I'm pretty firmly on the drop-in side for point releases. I don't want to have to push out another NWSGI update for 2.7.1. There shouldn't be any breaking changes at the assembly level, so we can leave the version unchanged without issues. I figure if MS can do it with the .NET service packs, then we can too. :) - Jeff From m.schaber at 3s-software.com Fri Jun 17 09:08:51 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Fri, 17 Jun 2011 09:08:51 +0200 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: Hi, Jeff, > Von: Jeff Hardy [mailto:jdhardy at gmail.com] > On Thu, Jun 16, 2011 at 10:58 PM, Markus Schaber software.com> wrote: > > Fine, I'm looking forward to it. Is this release still compileable > > using .NET 2.0? > > It should be, although I haven't tested that lately. Fine. > >> The main reason for this release is to get the newly supported > >> modules (unicodedata, _ast, csv) and the updated stdlib (from CPython > >> 2.7.2) > > out > >> there to see if there are no major issues. > >> > >> IronPython 2.7,1 will have the same assembly version as 2.7, so it > > should > >> be a drop-in replacement. > > > > I'm not really sure whether using the same assembly version is a good > > idea - in my experience, having different versions of the file using > > the same assembly version can lead to some confusions. > > > > But maybe the drop-in character outweighs the disadvantages. > > Yeah, it's a tradeoff, but I'm pretty firmly on the drop-in side for point > releases. I don't want to have to push out another NWSGI update for 2.7.1. > There shouldn't be any breaking changes at the assembly level, so we can > leave the version unchanged without issues. Ok. But at least you should update the FileVersion then, or give some other visible indicator that allows at least manual diagnostics which version actually is installed. > I figure if MS can do it with the .NET service packs, then we can too. :) .NET service packs run a lower risc of being downgraded silently by an installer unconditionally writing the old version into the GAC. :-( Maybe the version overriding via manifest or .conf files would work? Best regards Markus Schaber ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Developer Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 From curt at hagenlocher.org Fri Jun 17 16:10:04 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 17 Jun 2011 07:10:04 -0700 Subject: [Ironpython-users] Kinect and IronPython via Sho Message-ID: Very cool: http://blogs.msdn.com/b/the_blog_of_sho/archive/2011/06/16/connecting-to-kinect-from-sho.aspx -Curt -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jun 17 18:01:13 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 17 Jun 2011 09:01:13 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Fri, Jun 17, 2011 at 12:08 AM, Markus Schaber wrote: > Ok. But at least you should update the FileVersion then, or give some > other visible indicator that allows at least manual diagnostics which > version actually is installed. Oh, of course! Only AssemblyVersion will remain the same. > >> I figure if MS can do it with the .NET service packs, then we can too. > :) > > .NET service packs run a lower risc of being downgraded silently by an > installer unconditionally writing the old version into the GAC. :-( Only the IronPython installer should be adding them to get GAC. I'll check to make sure that you can't install 2.7 over 2.7.1 (it should bail with a "cannot downgrade" message, but getting installers right for these scenarios is hard :|). > > Maybe the version overriding via manifest or .conf files would work? Yeah, binding redirects are an option, but they're horribly ugly. This is the same path taken with the IronPython 2.6 series - their version numbers remained the same throughout, and we didn't get any complaints that I recall. Worst case, if there are major issues, I'll spin a 2.7.2 with a new version, but I'm expecting anything. - Jeff From jdhardy at gmail.com Fri Jun 17 18:06:28 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 17 Jun 2011 09:06:28 -0700 Subject: [Ironpython-users] Kinect and IronPython via Sho In-Reply-To: References: Message-ID: Hmm, looks like Sho is still on 2.6. I wonder if they plan on upgrading ... or if they even can (2.6.2 was the last MS release). - Jeff On Fri, Jun 17, 2011 at 7:10 AM, Curt Hagenlocher wrote: > Very cool: > http://blogs.msdn.com/b/the_blog_of_sho/archive/2011/06/16/connecting-to-kinect-from-sho.aspx > > -Curt > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > From sumitb at microsoft.com Fri Jun 17 18:14:16 2011 From: sumitb at microsoft.com (Sumit Basu) Date: Fri, 17 Jun 2011 16:14:16 +0000 Subject: [Ironpython-users] Kinect and IronPython via Sho In-Reply-To: References: Message-ID: Hi Jeff, we do want to move to 2.7, but as you surmised it's complex :) I'll post here when we know for sure what's happening on that front. Ps: thanks Curt for the shout-out! -Sumit -----Original Message----- From: ironpython-users-bounces+sumitb=microsoft.com at python.org [mailto:ironpython-users-bounces+sumitb=microsoft.com at python.org] On Behalf Of Jeff Hardy Sent: Friday, June 17, 2011 9:06 AM To: Curt Hagenlocher Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Kinect and IronPython via Sho Hmm, looks like Sho is still on 2.6. I wonder if they plan on upgrading ... or if they even can (2.6.2 was the last MS release). - Jeff On Fri, Jun 17, 2011 at 7:10 AM, Curt Hagenlocher wrote: > Very cool: > http://blogs.msdn.com/b/the_blog_of_sho/archive/2011/06/16/connecting- > to-kinect-from-sho.aspx > > -Curt > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From doug.blank at gmail.com Sat Jun 18 19:33:57 2011 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 18 Jun 2011 13:33:57 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: Message-ID: I asked: Consider this C# code: public static class Graphics { ?public static Color white = new Color(255, 255, 255); } I can compile and import this from IronPython: >>> import clr >>> clr.AddReference("Graphics") >>> import Graphics >>> Graphics.white But I can't: >>> import clr >>> clr.AddReference("Graphics") >>> from Graphics import * >>> white Traceback (most recent call last): ?File "/home/dblank/Calico/src/engine.py", line 159, in execute ? ?source.Execute(self.manager.scope) ?File "", line 1, in : name 'white' is not defined Is there something I can do to make white accessible with "from ... import *"? Thanks for any pointers, -Doug And Dino (via http://stackoverflow.com/questions/6358222/how-can-ironpython-access-a-public-static-property-defined-in-c) said: If you mark the field as readonly then we'll allow importing it via import * because it'll get added to Graphics.all. Dino Viehland I ask follow-up questions: Yes, that did it. Is there a way to make public static properties visible? public static int MyValue { get {} set {} }; doesn't seem to appear in "from ... import *". Oh, and what is .all? Can we add things to that in C#? -Doug From dinov at microsoft.com Sat Jun 18 19:56:46 2011 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 18 Jun 2011 17:56:46 +0000 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Doug wrote: > I asked: > > Consider this C# code: > > public static class Graphics { > ?public static Color white = new Color(255, 255, 255); } > > I can compile and import this from IronPython: > > >>> import clr > >>> clr.AddReference("Graphics") > >>> import Graphics > >>> Graphics.white > > > But I can't: > > >>> import clr > >>> clr.AddReference("Graphics") > >>> from Graphics import * > >>> white > Traceback (most recent call last): > ?File "/home/dblank/Calico/src/engine.py", line 159, in execute > ? ?source.Execute(self.manager.scope) > ?File "", line 1, in > : name 'white' is not defined > > Is there something I can do to make white accessible with "from ... import > *"? If you mark the field as readonly we'll let you import it using import *. Without it being read-only we don't put it in Graphics.__all__ and therefore it doesn't get imported. From fuzzyman at voidspace.org.uk Sat Jun 18 23:14:38 2011 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sat, 18 Jun 2011 22:14:38 +0100 Subject: [Ironpython-users] IronPython wiki In-Reply-To: References: Message-ID: <4DFD153E.9060706@voidspace.org.uk> On 16/06/2011 17:55, Brian Wilson wrote: > Do you think there is enough interest to unlock the member feature on > the IronPython.info wiki, or should I just talk here? > > BTW I've dealt with wiki spam by putting Captcha and ConfirmEdit on my > wiki and it seems to work. > Hey Brian, I turned off editing on the IronPython.info wiki because of spam. I tried turning it back on again a few weeks ago and within minutes was seeing new spam. *sigh* I can try finding a good captcha plugin and ConfirmEdit and see if that helps. I'd definitely like to see the wiki receiving contributions from the community again. All the best, Michael Foord -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html From no_reply at codeplex.com Sat Jun 18 10:26:03 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 18 Jun 2011 01:26:03 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/17/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Iron Python Ver 1.0 DLL's folder ?? 2. [Status update] Iron Python Ver 1.0 DLL's folder ?? 3. [New comment] unicode() can not deal with buffer object in IronPython 4. [Status update] unicode() can not deal with buffer object in IronPython ---------------------------------------------- ISSUES 1. [New issue] Iron Python Ver 1.0 DLL's folder ?? http://ironpython.codeplex.com/workitem/30862 User mohsin2011 has proposed the issue: "Hi all is there any one who let me know about the ironpython ver 1.0 folder exactly which contains Dll's ??? Rregards,"----------------- 2. [Status update] Iron Python Ver 1.0 DLL's folder ?? http://ironpython.codeplex.com/workitem/30862 User jdhardy has updated the issue: Status has changed from Proposed to Closed with the following comment, "Questions should go to the IronPython mailing list (http://mail.python.org/mailman/listinfo/ironpython-users)."----------------- 3. [New comment] unicode() can not deal with buffer object in IronPython http://ironpython.codeplex.com/workitem/23854 User gramana has commented on the issue: "Could not reproduce as of 2.7.0.40: c:\Projects>ipy -c "a=buffer('character buffers are decoded to unicode');print unicode(a,'utf-8','strict')" character buffers are decoded to unicode"----------------- 4. [Status update] unicode() can not deal with buffer object in IronPython http://ironpython.codeplex.com/workitem/23854 User ironpython has updated the issue: Status has changed from Active to Closed with the following comment, "Fixed in 2.7, apparently." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Sun Jun 19 04:41:16 2011 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 18 Jun 2011 22:41:16 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Sat, Jun 18, 2011 at 1:56 PM, Dino Viehland wrote: [snip] >> Is there something I can do to make white accessible with "from ... import >> *"? > > If you mark the field as readonly we'll let you import it using import *. Without > it being read-only we don't put it in Graphics.__all__ and therefore it doesn't > get imported. > Yes, thanks, you answered that, but missed the end of my mail: I ask follow-up questions: Yes, that did it. Is there a way to make public static properties visible? public static int MyValue { get {} set {} }; doesn't seem to appear in "from ... import *". Oh, and what is .all? Can we add things to that in C#? -Doug From jdhardy at gmail.com Sun Jun 19 07:05:08 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 18 Jun 2011 22:05:08 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta 1 now available Message-ID: This is the first beta release of IronPython 2.7. Like IronPython?2.7, this release?requires .NET 4 or Silverlight 4. The highlights of this release are: * Updated the standard library to match CPython 2.7.2. * Add the ast, csv, and unicodedata modules. * Fixed several bugs. * IronPython Tools for Visual Studio are disabled by default. See http://pytools.codeplex.com?for the next generation of Python Visual Studio support. In particular, the updated standard library may have introduced some undetected bugs. Please report any issues at http://ironpython.codeplex.com/workitem/list/basic. You can download IronPython 2.7.1 Beta 1 at http://ironpython.codeplex.com/releases/view/62475. - Jeff From s.j.dower at gmail.com Sun Jun 19 07:11:33 2011 From: s.j.dower at gmail.com (Steve Dower) Date: Sat, 18 Jun 2011 22:11:33 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta 1 now available In-Reply-To: References: Message-ID: Seems the link is actually http://ironpython.codeplex.com/releases/view/68588 And a quick note that this doesn't install side-by-side with 2.7 - the earlier version is uninstalled. (I don't see this as an issue, but it was a surprise.) On Sat, Jun 18, 2011 at 22:05, Jeff Hardy wrote: > This is the first beta release of IronPython 2.7. Like IronPython?2.7, > this release?requires .NET 4 or Silverlight 4. > > The highlights of this release are: > > * Updated the standard library to match CPython 2.7.2. > * Add the ast, csv, and unicodedata modules. > * Fixed several bugs. > * IronPython Tools for Visual Studio are disabled by default. See > http://pytools.codeplex.com?for the next generation of Python Visual > Studio support. > > In particular, the updated standard library may have introduced some > undetected bugs. Please report any issues at > http://ironpython.codeplex.com/workitem/list/basic. > > You can download IronPython 2.7.1 Beta 1 at > http://ironpython.codeplex.com/releases/view/62475. > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From jdhardy at gmail.com Sun Jun 19 07:15:27 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 18 Jun 2011 22:15:27 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta 1 now available In-Reply-To: References: Message-ID: On Sat, Jun 18, 2011 at 10:11 PM, Steve Dower wrote: > Seems the link is actually http://ironpython.codeplex.com/releases/view/68588 Whoops, you're right. > > And a quick note that this doesn't install side-by-side with 2.7 - the > earlier version is uninstalled. (I don't see this as an issue, but it > was a surprise.) I'll add a note to the release page. - Jeff From abubakarm at gmail.com Sun Jun 19 09:06:44 2011 From: abubakarm at gmail.com (Abubakar) Date: Sun, 19 Jun 2011 12:06:44 +0500 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: try reading the following, maybe that'll explain: http://stackoverflow.com/questions/44834/can-someone-explain-all-in-python ..ab On Sun, Jun 19, 2011 at 7:41 AM, Doug Blank wrote: > On Sat, Jun 18, 2011 at 1:56 PM, Dino Viehland > wrote: > > [snip] > > >> Is there something I can do to make white accessible with "from ... > import > >> *"? > > > > If you mark the field as readonly we'll let you import it using import *. > Without > > it being read-only we don't put it in Graphics.__all__ and therefore it > doesn't > > get imported. > > > > Yes, thanks, you answered that, but missed the end of my mail: > > I ask follow-up questions: > > Yes, that did it. Is there a way to make public static properties visible? > > public static int MyValue { > get {} > set {} > }; > > doesn't seem to appear in "from ... import *". > > Oh, and what is .all? Can we add things to that in C#? > > -Doug > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sun Jun 19 13:07:22 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 19 Jun 2011 04:07:22 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/18/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] Chaining LINQ calls fails 2. [Status update] Too many arguments supplied to a variadic function causes clr.CompileModules to fail 3. [Status update] Implement _ast module 4. [Status update] Implement _csv module 5. [Status update] PythonContext.GetEqualSite is missing lock statement 6. [Status update] Implement unicodedata module 7. [Status update] copyright() and license() need updating 8. [Status update] Turkish collation problem 9. [Status update] IronPython doesn't support u'\N{COLON}' string literals ---------------------------------------------- ISSUES 1. [Status update] Chaining LINQ calls fails http://ironpython.codeplex.com/workitem/30379 User DinoViehland has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed"----------------- 2. [Status update] Too many arguments supplied to a variadic function causes clr.CompileModules to fail http://ironpython.codeplex.com/workitem/28934 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 3. [Status update] Implement _ast module http://ironpython.codeplex.com/workitem/21088 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 4. [Status update] Implement _csv module http://ironpython.codeplex.com/workitem/21395 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 5. [Status update] PythonContext.GetEqualSite is missing lock statement http://ironpython.codeplex.com/workitem/30551 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 6. [Status update] Implement unicodedata module http://ironpython.codeplex.com/workitem/21404 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 7. [Status update] copyright() and license() need updating http://ironpython.codeplex.com/workitem/30438 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 8. [Status update] Turkish collation problem http://ironpython.codeplex.com/workitem/13629 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1."----------------- 9. [Status update] IronPython doesn't support u'\N{COLON}' string literals http://ironpython.codeplex.com/workitem/29640 User jdhardy has updated the issue: Status has changed from Fixed to Closed with the following comment, "Fixed in 2.7.1 beta 1." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Sun Jun 19 20:32:51 2011 From: doug.blank at gmail.com (Doug Blank) Date: Sun, 19 Jun 2011 14:32:51 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Sun, Jun 19, 2011 at 3:06 AM, Abubakar wrote: > try reading the following, maybe that'll explain: > http://stackoverflow.com/questions/44834/can-someone-explain-all-in-python > ..ab Well, my question was about how to do that in C#. I can indeed do this: public static class Myro { public readonly static List __all__ = new List() {"robot"}; public static Robot robot { get {} set {} } } but then "robot" is the *only* item imported. I would like add robot to the list of items imported. -Doug From paul.grenyer at gmail.com Sun Jun 19 20:46:28 2011 From: paul.grenyer at gmail.com (Paul Grenyer) Date: Sun, 19 Jun 2011 19:46:28 +0100 Subject: [Ironpython-users] pyodbc Message-ID: Hi All I was wanting to use pyodbc with IronPython, but the googling I've done has suggested that it's not compatible with IronPyton as it's cPython based. Is this still the case? -- Thanks Paul Paul Grenyer e: paul.grenyer at gmail.com b: paulgrenyer.blogspot.com t: pjgrenyer From dblank at cs.brynmawr.edu Sun Jun 19 14:56:26 2011 From: dblank at cs.brynmawr.edu (Douglas S. Blank) Date: Sun, 19 Jun 2011 08:56:26 -0400 (EDT) Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <60688.76.98.34.255.1308488186.squirrel@cs.brynmawr.edu> > try reading the following, maybe that'll explain: > http://stackoverflow.com/questions/44834/can-someone-explain-all-in-python > > ..ab Well, my question was about how to do that in C#. I can indeed do this: public static class Myro { public readonly static List __all__ = new List() {"robot"}; public static Robot robot { get {} set {} } } but then "robot" is the *only* item imported. I would like add robot to the list of items imported. -Doug > On Sun, Jun 19, 2011 at 7:41 AM, Doug Blank wrote: > >> On Sat, Jun 18, 2011 at 1:56 PM, Dino Viehland >> wrote: >> >> [snip] >> >> >> Is there something I can do to make white accessible with "from ... >> import >> >> *"? >> > >> > If you mark the field as readonly we'll let you import it using import >> *. >> Without >> > it being read-only we don't put it in Graphics.__all__ and therefore >> it >> doesn't >> > get imported. >> > >> >> Yes, thanks, you answered that, but missed the end of my mail: >> >> I ask follow-up questions: >> >> Yes, that did it. Is there a way to make public static properties >> visible? >> >> public static int MyValue { >> get {} >> set {} >> }; >> >> doesn't seem to appear in "from ... import *". >> >> Oh, and what is .all? Can we add things to that in C#? >> >> -Doug >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From vernondcole at gmail.com Mon Jun 20 05:44:13 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Sun, 19 Jun 2011 21:44:13 -0600 Subject: [Ironpython-users] pyodbc In-Reply-To: References: Message-ID: Paul: May I humbly suggest http://sourceforge.net/projects/adodbapi ? It is a fully PEP 249 complaint module, and it specifically supports IronPython in addition to CPython 2.n or 3.n. Since ADO runs in ODBC mode by default, you can basically feed it the same connection string you would normally use for pyodbc -- use stored DSN's, third-party odbc drivers, and the like. I normally test it using the odbc drivers for MySQL and PostgreSQL. If there is a "provider=" token in the connection string, then it switches over to ADO mode. I use that when testing Microsoft SQL Server and ACCESS (JET) databases. Many of the api extensions found in pyodbc are also present in adodbapi. Such as "Cursors are iterable" and "Cursor.execute returns the cursor". Some are slightly different: > "Access Values By Name > > The DB API specifies that results must be tuple-like, so columns are normally accessed by indexing into the sequence (e.g. row0) and pyodbc supports this. However, columns can also be accessed by name: > > cursor.execute("select album_id, photo_id from photos where user_id=1") > row = cursor.fetchone() > print row.album_id, row.photo_id > print row[0], row[1] # same as above, but less readable" adodbapi does that too, and also allows: print row['album_id'], row['photo_id'] While pyodbc allows the programmer to specify that column names may be forced to lowercase, adodbapi simply ignores case in column names. so: assert row.album_id == row['Album_ID'] # will pass in adodbapi You cannot write to an adodbapi row object, but you can specify a user-written function to convert column values while you read them, which is what the pyodbc example is used for. Are there any other pyodbc features you were specifically attracted to? (Patches and/or requests are often accepted.) -- Vernon Cole On Sun, Jun 19, 2011 at 12:46 PM, Paul Grenyer wrote: > > Hi All > > I was wanting to use pyodbc with IronPython, but the googling I've > done has suggested that it's not compatible with IronPyton as it's > cPython based. Is this still the case? > > -- > Thanks > Paul > > Paul Grenyer > e: paul.grenyer at gmail.com > b: paulgrenyer.blogspot.com > t: pjgrenyer > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at 3s-software.com Mon Jun 20 08:07:33 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Mon, 20 Jun 2011 08:07:33 +0200 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: Hi, Jeff, > Von: Jeff Hardy [mailto:jdhardy at gmail.com] > >> I figure if MS can do it with the .NET service packs, then we can too. > > :) > > > > .NET service packs run a lower risc of being downgraded silently by an > > installer unconditionally writing the old version into the GAC. :-( > > Only the IronPython installer should be adding them to get GAC. I'll check > to make sure that you can't install 2.7 over 2.7.1 (it should bail with a > "cannot downgrade" message, but getting installers right for these > scenarios is hard :|). Are there no 3rd-party applications which embed and install IronPython with their own installer? Being afraid of such scenarios was the main reason why we build IronPython on our own (with changed assembly name and signing key) and install that customized version with our CoDeSys installer. (The other reason was some suspected collision between the versions compiled for .NET 2.0 and 4.0. We wanted to avoid problems if users install their own IronPython versions. Nowadays, I'm convinced that this problem only arises if you compile an application for .net 4.x which references an IronPython dll compiled for .NET 2.x. > > Maybe the version overriding via manifest or .conf files would work? > > Yeah, binding redirects are an option, but they're horribly ugly. > > This is the same path taken with the IronPython 2.6 series - their version > numbers remained the same throughout, and we didn't get any complaints > that I recall. Worst case, if there are major issues, I'll spin a 2.7.2 > with a new version, but I'm expecting anything. I think I should splash out on a "not" for that last sentence. :-) Regards, Markus From m.schaber at 3s-software.com Mon Jun 20 08:40:39 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Mon, 20 Jun 2011 08:40:39 +0200 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: Hi, Doug, > Von: Doug Blank [> ] > On Sun, Jun 19, 2011 at 3:06 AM, Abubakar wrote: > > try reading the following, maybe that'll explain: > > http://stackoverflow.com/questions/44834/can-someone-explain-all-in-py > > thon > > ..ab > > Well, my question was about how to do that in C#. > > I can indeed do this: > > public static class Myro { > public readonly static List __all__ = new List() {"robot"}; public > static Robot robot { > get {} > set {} > } > } > > but then "robot" is the *only* item imported. I would like add robot to > the list of items imported. Just as in Python itsself, you cannot "add" values to __all__, you have to set the full list of all wanted members. Mit freundlichen Gr??en Markus Schaber ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Entwicklung Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com CoDeSys Internet-Forum: http://forum.3s-software.com Gesch?ftsf?hrer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915 From doug.blank at gmail.com Mon Jun 20 14:16:23 2011 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 20 Jun 2011 08:16:23 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Mon, Jun 20, 2011 at 2:40 AM, Markus Schaber wrote: > Hi, Doug, > >> Von: Doug Blank > > [> ] >> On Sun, Jun 19, 2011 at 3:06 AM, Abubakar wrote: >> > try reading the following, maybe that'll explain: >> > http://stackoverflow.com/questions/44834/can-someone-explain-all-in-py >> > thon >> > ..ab >> >> Well, my question was about how to do that in C#. >> >> I can indeed do this: >> >> public static class Myro { >> ?public readonly static List __all__ = new List() {"robot"}; ?public >> static Robot robot { >> ? ? get {} >> ? ? set {} >> ?} >> } >> >> but then "robot" is the *only* item imported. I would like add robot to >> the list of items imported. > > Just as in Python itsself, you cannot "add" values to __all__, you have to set the full list of all wanted members. Yes, indeed. So, my question is: how to get a "public static property" to be dynamically included with "from x import *"? You can't mark it readonly, right? And it doesn't seem possible without enumerating the static items myself and creating __all__. Perhaps a special DLR method/setting could be added? -Doug > Mit freundlichen Gr??en > > Markus Schaber > > ___________________________ > We software Automation. > > 3S-Smart Software Solutions GmbH > Markus Schaber | Entwicklung > Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50 > > Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com > CoDeSys Internet-Forum: http://forum.3s-software.com > > Gesch?ftsf?hrer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915 > From jdhardy at gmail.com Mon Jun 20 17:53:58 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 08:53:58 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Sun, Jun 19, 2011 at 11:07 PM, Markus Schaber wrote: > Are there no 3rd-party applications which embed and install IronPython > with their own installer? > > Being afraid of such scenarios was the main reason why we build > IronPython on our own (with changed assembly name and signing key) and > install that customized version with our CoDeSys installer. Yes, but I think everyone chooses the same path you do (rebuild/resign). At least, I'm pretty sure that's what Resolver One does (I don't know of any other apps ... maybe we need a "Who's Using?" page). The official installer is downgrade-proof, so other apps should just be using that; if anyone else unconditionally puts the IronPython files in the GAC, I'm not sure there's much we can do about it, sadly. Polite requests and public shaming is about it. For embedding, I would recommend you continue what you're doing - it's just just straight-up safer. It's a shame zipimport doesn't work; we could cut the deployed size of the stdlib down significantly. > > (The other reason was some suspected collision between the versions > compiled for .NET 2.0 and 4.0. We wanted to avoid problems if users > install their own IronPython versions. Nowadays, I'm convinced that this > problem only arises if you compile an application for .net 4.x which > references an IronPython dll compiled for .NET 2.x. Different signing keys for .NET 2 and .NET 4 would solve that. Since we don't build for .NET 2 anymore it shouldn't be an issue, right? - Jeff From jdhardy at gmail.com Mon Jun 20 17:57:02 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 08:57:02 -0700 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Mon, Jun 20, 2011 at 5:16 AM, Doug Blank wrote: > Yes, indeed. So, my question is: how to get a "public static property" > to be dynamically included with "from x import *"? You can't mark it > readonly, right? And it doesn't seem possible without enumerating the > static items myself and creating __all__. Perhaps a special DLR > method/setting could be added? Could you open an issue on CodePlex and attach a self-contained reproduction (the .cs, and a .py file showing what you expect to happen)? It could very well be a bug, or a decision that needs to be revisited. - Jeff From vernondcole at gmail.com Mon Jun 20 18:30:21 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Mon, 20 Jun 2011 10:30:21 -0600 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: We Ubuntu users are still very inconvenienced by that quick "we don't build" answer. Thanks for fixing the builder so that I can _try_ to home-build a .NET 2 version. After killing and reinstalling my Ubuntu system, I gave up trying to actually accomplish it. It requires installing a second version of Mono side-by-side with the supported version in order to do the build. But to do _that_ you have to home-build the newer version of Mono from source and ... [cough. sputter. Huh? ... Oh! ... Sorry! I'm back now...] I note that the IPy daily build script actually does build an appropriate version, but apparently the output gets thrown away. I would be very nice if it were put someplace where one could find it. Hopefully the next release of Ubuntu will have an upgraded .NET 4 compatible version of Mono, and this problem will go away. Until then, I still cannot use a current version of IronPython on my preferred workstation ... and therefore cannot do much IPy testing. (I only use Windows when I must, or when someone pays me to.) -- Vernon Cole (Typed on Ubuntu Linux 11.04) On Mon, Jun 20, 2011 at 9:53 AM, Jeff Hardy wrote: > On Sun, Jun 19, 2011 at 11:07 PM, Markus Schaber > wrote: > > Are there no 3rd-party applications which embed and install IronPython > > with their own installer? > > > > Being afraid of such scenarios was the main reason why we build > > IronPython on our own (with changed assembly name and signing key) and > > install that customized version with our CoDeSys installer. > > Yes, but I think everyone chooses the same path you do > (rebuild/resign). At least, I'm pretty sure that's what Resolver One > does (I don't know of any other apps ... maybe we need a "Who's > Using?" page). > > The official installer is downgrade-proof, so other apps should just > be using that; if anyone else unconditionally puts the IronPython > files in the GAC, I'm not sure there's much we can do about it, sadly. > Polite requests and public shaming is about it. > > For embedding, I would recommend you continue what you're doing - it's > just just straight-up safer. It's a shame zipimport doesn't work; we > could cut the deployed size of the stdlib down significantly. > > > > > (The other reason was some suspected collision between the versions > > compiled for .NET 2.0 and 4.0. We wanted to avoid problems if users > > install their own IronPython versions. Nowadays, I'm convinced that this > > problem only arises if you compile an application for .net 4.x which > > references an IronPython dll compiled for .NET 2.x. > > Different signing keys for .NET 2 and .NET 4 would solve that. Since > we don't build for .NET 2 anymore it shouldn't be an issue, right? > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Mon Jun 20 18:35:50 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Mon, 20 Jun 2011 12:35:50 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> On Jun 20, 2011, at 11:57 AM, Jeff Hardy wrote: > On Mon, Jun 20, 2011 at 5:16 AM, Doug Blank wrote: >> Yes, indeed. So, my question is: how to get a "public static property" >> to be dynamically included with "from x import *"? You can't mark it >> readonly, right? And it doesn't seem possible without enumerating the >> static items myself and creating __all__. Perhaps a special DLR >> method/setting could be added? > > Could you open an issue on CodePlex and attach a self-contained > reproduction (the .cs, and a .py file showing what you expect to > happen)? It could very well be a bug, or a decision that needs to be > revisited. Importing static readonly fields, static methods, and events are supported, while static properties are not (see https://github.com/IronLanguages/main/blob/master/Languages/IronPython/IronPython/Runtime/Importer.cs#L798). A static class's field, methods, and events map nicely onto Python's module variables and module functions. What would static properties map to on a Python module? Python new-style classes have properties, but I don't know of a Python construct on modules that would make to a property. Help me understand your expectations, when would you expect get_SomeStaticProperty to be invoked? // C# class x { static int SomeStaticProperty { get { return new System.Random().Next(); } } } # property import (doesn't work today) from x import SomeStaticProperty print SomeStaticProperty print SomeStaticProperty If we chose to map .NET property imports to module variables, then we'd have to execute the getter when imported, which would break this example (random numbers). We could do some magic of exposing the PropertyInfo itself as the variable, making an getter call look like: SomeStaticProperty() ... and a setter call look like: SomeStaticProperty(val) Thoughts? ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschementi at gmail.com Mon Jun 20 18:43:39 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Mon, 20 Jun 2011 12:43:39 -0400 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Jun 20, 2011, at 11:53 AM, Jeff Hardy wrote: > > For embedding, I would recommend you continue what you're doing - it's > just just straight-up safer. It's a shame zipimport doesn't work; we > could cut the deployed size of the stdlib down significantly. How about pre-compiling your python files into a DLL with clr.CompileModules? That works really well for deployment. Jeff, do you know what's blocking zipimport from working? From jdhardy at gmail.com Mon Jun 20 18:50:04 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 09:50:04 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 9:43 AM, Jimmy Schementi wrote: > > Jeff, do you know what's blocking zipimport from working? Well, zipimport is a C module in CPython. There is a pure-Python version[1], but I've never tried it. Now that zlib is supported it should work fine. - Jeff [1] http://code.google.com/p/googleappengine/issues/detail?id=161#c27 From jdhardy at gmail.com Mon Jun 20 18:57:43 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 09:57:43 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 9:30 AM, Vernon Cole wrote: > We Ubuntu users are still very inconvenienced by that quick "we don't build" > answer. Thanks for fixing the builder so that I can _try_ to home-build a > .NET 2 version.? After killing and reinstalling my Ubuntu system, I gave up > trying to actually accomplish it. It requires installing a second version of > Mono side-by-side with the supported version in order to do the build. But > to do _that_ you have to home-build the newer version of Mono from source > and ... [cough. sputter. Huh? ... Oh! ... Sorry! I'm back now...] > ? I note that the IPy daily build script actually does build an appropriate > version, but apparently the output gets thrown away. I would be very nice if > it were put someplace where one could find it. As you've probably noticed, the build process is less than ideal, especially for releases. It's on my TODO list to overhaul it,someday (every time I do a release, it moves further up the list...). That would also allow the TC server to spit out build artifacts. I can see about building a .zip for .NET 2, though. Might not be too hard. What are the issues with building the .NET 2 version with Ubuntu's built-in Mono? If they're small it might be easier to just patch those, #ifdef'd if necessary. - Jeff From slide.o.mix at gmail.com Mon Jun 20 18:59:11 2011 From: slide.o.mix at gmail.com (Slide) Date: Mon, 20 Jun 2011 09:59:11 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 8:53 AM, Jeff Hardy wrote: > On Sun, Jun 19, 2011 at 11:07 PM, Markus Schaber > wrote: > > Are there no 3rd-party applications which embed and install IronPython > > with their own installer? > > > > Being afraid of such scenarios was the main reason why we build > > IronPython on our own (with changed assembly name and signing key) and > > install that customized version with our CoDeSys installer. > > Yes, but I think everyone chooses the same path you do > (rebuild/resign). At least, I'm pretty sure that's what Resolver One > does (I don't know of any other apps ... maybe we need a "Who's > Using?" page). > > The official installer is downgrade-proof, so other apps should just > be using that; if anyone else unconditionally puts the IronPython > files in the GAC, I'm not sure there's much we can do about it, sadly. > Polite requests and public shaming is about it. > > For embedding, I would recommend you continue what you're doing - it's > just just straight-up safer. It's a shame zipimport doesn't work; we > could cut the deployed size of the stdlib down significantly. > > > > > (The other reason was some suspected collision between the versions > > compiled for .NET 2.0 and 4.0. We wanted to avoid problems if users > > install their own IronPython versions. Nowadays, I'm convinced that this > > problem only arises if you compile an application for .net 4.x which > > references an IronPython dll compiled for .NET 2.x. > > Different signing keys for .NET 2 and .NET 4 would solve that. Since > we don't build for .NET 2 anymore it shouldn't be an issue, right? > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > I didn't see an issue filed for the zimport missing, am I just missing it in the bug tracker? Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Mon Jun 20 19:16:03 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 10:16:03 -0700 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> Message-ID: On Mon, Jun 20, 2011 at 9:35 AM, Jimmy Schementi wrote: > If we chose to map .NET property imports to module variables, then we'd have > to execute the getter when imported, which would break this example (random > numbers). We could do some magic of exposing the PropertyInfo itself as the > variable, making an getter call look like: > ?? ?SomeStaticProperty() > ... and a setter call look like: > ?? ?SomeStaticProperty(val) It's really just a convenience, right? You can still do import Color print Color.White with no issues? If so, I'm also inclined to say we don't support it, because Python has no concept like that at the module level, OTOH, if events are importable, why not properties? If so, they should retain their property nature; otherwise it would be too surprising. I would strongly prefer they still look like fields as well (x = SomeStaticProperty; SomeStaticProperty = y) but I don't know if that's possible. Otherwise I'd prefer .get/.set methods to overloading (). (Too bad descriptors only work as class members ... although we could always change the rules) - Jeff From jdhardy at gmail.com Mon Jun 20 19:18:46 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 10:18:46 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 9:59 AM, Slide wrote: > I didn't see an issue filed for the zimport missing, am I just missing it in > the bug tracker? http://ironpython.codeplex.com/workitem/391 Yikes, that's a low number, and high votes. Anybody want to tackle this one? I've got a big sack of internet points* to give away! (I've got another sack for whoever implements pyexpat, as well). - Jeff * They're like bitcoins, only even more useless :) From slide.o.mix at gmail.com Mon Jun 20 19:35:20 2011 From: slide.o.mix at gmail.com (Slide) Date: Mon, 20 Jun 2011 10:35:20 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 10:18 AM, Jeff Hardy wrote: > On Mon, Jun 20, 2011 at 9:59 AM, Slide wrote: > > I didn't see an issue filed for the zimport missing, am I just missing it > in > > the bug tracker? > > http://ironpython.codeplex.com/workitem/391 > > Yikes, that's a low number, and high votes. > > Anybody want to tackle this one? I've got a big sack of internet > points* to give away! (I've got another sack for whoever implements > pyexpat, as well). > > - Jeff > > * They're like bitcoins, only even more useless :) > I'll see what I can do. slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Mon Jun 20 19:43:23 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 10:43:23 -0700 Subject: [Ironpython-users] High-priority 2.7.1 issues Message-ID: Hi, The following issues are ones I would like fixed for 2.7.1. I'm not expecting all of them to be, of course, but as many as possible. If there's something you want added to the list, or if you want one the issues assigned to you, please reply to this message. 391 Implement zipimport module 16658 1.1.1: Creating an Int64 from a long loses precision 20023 Implement pyexpat module 26852 ssl IE gets disconnected after request, CPython doesn't. 4928 binascii.b2a_qp is present but throws NotImplemented breaking quopri standard module. 24735 HAPI: PythonEngine does not release ScriptScopes in RC1 26177 __getattr__ not called upon module import 26390 IronPython release needs updated Silverlight directory 29077 importing some modules (e.g.'import random') fails in IronPython Interactive window 2169 test_isinstance incompatibilities with CPython 18569 Readme.html in IronPython 2.0B5 is not useful ! 30119 assertRaises ignores CLR exceptions 30274 [2.7 Beta 2] deepcopy(time(9, 0)) != time(9, 0) 30290 io.open after tempfile.mkstemp fails with bad file descriptor 30312 sys.version_info should be namedtuple (or similar) 30386 [2.7] set update raises NullReferenceException 30441 str.format() Fails to Format an Empty Array of Processes 30698 ctypes WINFUNCTYPE prototype fails with 'TypeError: WinFunctionType() takes at most 2 arguments (3 given)' 30805 pickling exceptions is incomplete; attributes get lost You can access the query at http://bit.ly/ipy-271-blockers. - Jeff From jschementi at gmail.com Mon Jun 20 19:45:02 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Mon, 20 Jun 2011 13:45:02 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> Message-ID: On Jun 20, 2011, at 1:16 PM, Jeff Hardy wrote: > On Mon, Jun 20, 2011 at 9:35 AM, Jimmy Schementi wrote: >> If we chose to map .NET property imports to module variables, then we'd have >> to execute the getter when imported, which would break this example (random >> numbers). We could do some magic of exposing the PropertyInfo itself as the >> variable, making an getter call look like: >> SomeStaticProperty() >> ... and a setter call look like: >> SomeStaticProperty(val) > > It's really just a convenience, right? You can still do > import Color > print Color.White > > with no issues? If so, I'm also inclined to say we don't support it, > because Python has no concept like that at the module level, OTOH, if > events are importable, why not properties? > > If so, they should retain their property nature; otherwise it would be > too surprising. > > I would strongly prefer they still look like fields as well (x = > SomeStaticProperty; SomeStaticProperty = y) but I don't know if that's > possible. Otherwise I'd prefer .get/.set methods to overloading (). > (Too bad descriptors only work as class members ... although we could > always change the rules) > > - Jeff This behavior is already documented here: http://ironpython.net/documentation/dotnet/dotnet.html#importing-net-members-from-a-type. Since this is "from x import *" behavior, I say we just make this low-pri feature. ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Jun 20 20:27:41 2011 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 20 Jun 2011 18:27:41 +0000 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> Jeff wrote: > On Mon, Jun 20, 2011 at 9:35 AM, Jimmy Schementi > wrote: > > If we chose to map .NET property imports to module variables, then > > we'd have to execute the getter when imported, which would break this > > example (random numbers). We could do some magic of exposing the > > PropertyInfo itself as the variable, making an getter call look like: > > ?? ?SomeStaticProperty() > > ... and a setter call look like: > > ?? ?SomeStaticProperty(val) > > It's really just a convenience, right? You can still do > import Color > print Color.White > > with no issues? If so, I'm also inclined to say we don't support it, because > Python has no concept like that at the module level, OTOH, if events are > importable, why not properties? I think events were an oversight - of course we could just make the decision to relax this and bring in the value of the property at the time of import *. If it changes you lose. > > If so, they should retain their property nature; otherwise it would be too > surprising. > > I would strongly prefer they still look like fields as well (x = > SomeStaticProperty; SomeStaticProperty = y) but I don't know if that's > possible. Otherwise I'd prefer .get/.set methods to overloading (). > (Too bad descriptors only work as class members ... although we could > always change the rules) > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From jdhardy at gmail.com Mon Jun 20 20:55:01 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 11:55:01 -0700 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: On Mon, Jun 20, 2011 at 11:27 AM, Dino Viehland wrote: > Jeff wrote: >> On Mon, Jun 20, 2011 at 9:35 AM, Jimmy Schementi >> wrote: >> > If we chose to map .NET property imports to module variables, then >> > we'd have to execute the getter when imported, which would break this >> > example (random numbers). We could do some magic of exposing the >> > PropertyInfo itself as the variable, making an getter call look like: >> > ?? ?SomeStaticProperty() >> > ... and a setter call look like: >> > ?? ?SomeStaticProperty(val) >> >> It's really just a convenience, right? You can still do >> ? ? import Color >> ? ? print Color.White >> >> with no issues? If so, I'm also inclined to say we don't support it, because >> Python has no concept like that at the module level, OTOH, if events are >> importable, why not properties? > > I think events were an oversight - of course we could just make the decision > to relax this and bring in the value of the property at the time of import *. If > it changes you lose. Which is what happens when it's imported explicitly, correct? In that case I think it's worthwhile to match them up. - Jeff From rome at Wintellect.com Mon Jun 20 20:59:04 2011 From: rome at Wintellect.com (Keith Rome) Date: Mon, 20 Jun 2011 11:59:04 -0700 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <7737799D90E55E4BB9C9F7E40D161E110E3491BF5E@VA3DIAXVS461.RED001.local> Evaluating a property could potentially introduce unexpected side effects. Best practices in OOP says that a property getter should never alter state, but it happens enough in the wild that I would think it to be dangerous to blindly invoke any getters during an import. Also, presence of a property (as opposed to a field) implies that the code in the getter will be invoked each time the property is accessed. A consumer of such a construct expects this behavior, and might even depend on it. If the auto import of properties is added, then it needs to at least be an opt-in feature. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -----Original Message----- From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Dino Viehland Sent: Monday, June 20, 2011 2:28 PM To: Jeff Hardy; Jimmy Schementi Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] How can IronPython access a public static value defined in C#? Jeff wrote: > On Mon, Jun 20, 2011 at 9:35 AM, Jimmy Schementi > wrote: > > If we chose to map .NET property imports to module variables, then > > we'd have to execute the getter when imported, which would break > > this example (random numbers). We could do some magic of exposing > > the PropertyInfo itself as the variable, making an getter call look like: > > ?? ?SomeStaticProperty() > > ... and a setter call look like: > > ?? ?SomeStaticProperty(val) > > It's really just a convenience, right? You can still do > import Color > print Color.White > > with no issues? If so, I'm also inclined to say we don't support it, > because Python has no concept like that at the module level, OTOH, if > events are importable, why not properties? I think events were an oversight - of course we could just make the decision to relax this and bring in the value of the property at the time of import *. If it changes you lose. > > If so, they should retain their property nature; otherwise it would be > too surprising. > > I would strongly prefer they still look like fields as well (x = > SomeStaticProperty; SomeStaticProperty = y) but I don't know if that's > possible. Otherwise I'd prefer .get/.set methods to overloading (). > (Too bad descriptors only work as class members ... although we could > always change the rules) > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From jschementi at gmail.com Mon Jun 20 21:04:33 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Mon, 20 Jun 2011 15:04:33 -0400 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: <7737799D90E55E4BB9C9F7E40D161E110E3491BF5E@VA3DIAXVS461.RED001.local> References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> <7737799D90E55E4BB9C9F7E40D161E110E3491BF5E@VA3DIAXVS461.RED001.local> Message-ID: On Jun 20, 2011, at 2:59 PM, Keith Rome wrote: > Evaluating a property could potentially introduce unexpected side effects. Best practices in OOP says that a property getter should never alter state, but it happens enough in the wild that I would think it to be dangerous to blindly invoke any getters during an import. > > Also, presence of a property (as opposed to a field) implies that the code in the getter will be invoked each time the property is accessed. A consumer of such a construct expects this behavior, and might even depend on it. > > If the auto import of properties is added, then it needs to at least be an opt-in feature. We already do this with "from Class import StaticProperty". (from DateTime import Now, for example). Making "from StaticClass import *" have the same behavior is what we're going for; right now they behave differently. Using import-star is already a convenience-only feature, so mucking with it's behavior is fair. From jdhardy at gmail.com Mon Jun 20 21:11:31 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 20 Jun 2011 12:11:31 -0700 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> <7737799D90E55E4BB9C9F7E40D161E110E3491BF5E@VA3DIAXVS461.RED001.local> Message-ID: On Mon, Jun 20, 2011 at 12:04 PM, Jimmy Schementi wrote: > On Jun 20, 2011, at 2:59 PM, Keith Rome wrote: >> Evaluating a property could potentially introduce unexpected side effects. Best practices in OOP says that a property getter should never alter state, but it happens enough in the wild that I would think it to be dangerous to blindly invoke any getters during an import. >> >> Also, presence of a property (as opposed to a field) implies that the code in the getter will be invoked each time the property is accessed. A consumer of such a construct expects this behavior, and might even depend on it. >> >> If the auto import of properties is added, then it needs to at least be an opt-in feature. > > We already do this with "from Class import StaticProperty". (from DateTime import Now, for example). Making "from StaticClass import *" have the same behavior is what we're going for; right now they behave differently. Using import-star is already a convenience-only feature, so mucking with it's behavior is fair. Keith's point is that 'from x import *' would be potentially dangerous (as you don't know what the properties might do when get is called), unlike explicit property imports. Unlikely, yes, but possible. If someone provides some code to prove that the property getters are safe, it would be OK, but I'm not counting on it. - Jeff From dinov at microsoft.com Mon Jun 20 22:05:35 2011 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 20 Jun 2011 20:05:35 +0000 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com> <3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com> <6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E2390B@TK5EX14MBXC294.redmond.corp.microsoft.com> Jeff wrote: > > > > I think events were an oversight - of course we could just make the > > decision to relax this and bring in the value of the property at the > > time of import *. If it changes you lose. > > Which is what happens when it's imported explicitly, correct? In that case I > think it's worthwhile to match them up. It is what happens when you import them explicitly, but they do technically match up as well because we add the fake __all__ attribute which excludes properties :) From m.schaber at 3s-software.com Tue Jun 21 07:50:02 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Tue, 21 Jun 2011 07:50:02 +0200 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: Hi, Jeff, > Von: Jeff Hardy [mailto:jdhardy at gmail.com] > On Sun, Jun 19, 2011 at 11:07 PM, Markus Schaber software.com> wrote: > > Are there no 3rd-party applications which embed and install IronPython > > with their own installer? > > > > Being afraid of such scenarios was the main reason why we build > > IronPython on our own (with changed assembly name and signing key) and > > install that customized version with our CoDeSys installer. > > Yes, but I think everyone chooses the same path you do (rebuild/resign). > At least, I'm pretty sure that's what Resolver One does Ok, I see. And I thought what we do is the exception, not the rule. :-) > (I don't know of any other apps ... maybe we need a "Who's Using?" page). I think this could not hurt.... > The official installer is downgrade-proof, so other apps should just be > using that; if anyone else unconditionally puts the IronPython files in > the GAC, I'm not sure there's much we can do about it, sadly. > Polite requests and public shaming is about it. The question is whether we could at least detect this case. But as we use custom-built dlls for now, we can ignore that issue. > For embedding, I would recommend you continue what you're doing - it's > just just straight-up safer. It's a shame zipimport doesn't work; we could > cut the deployed size of the stdlib down significantly. Hmm. Chould zipimport be made possible using the PAL (HAL?) functionality of the DLR? > > (The other reason was some suspected collision between the versions > > compiled for .NET 2.0 and 4.0. We wanted to avoid problems if users > > install their own IronPython versions. Nowadays, I'm convinced that > > this problem only arises if you compile an application for .net 4.x > > which references an IronPython dll compiled for .NET 2.x. > > Different signing keys for .NET 2 and .NET 4 would solve that. Since we > don't build for .NET 2 anymore it shouldn't be an issue, right? Yes. But our first 2 releases did ship with IronPython 2.6, we want to update to 2.7 in the next release, and to 3.x as soon as possible. (The earlier we update, the smaller the user base which has compatibility problems with their scripts. :-) Regards Markus From m.schaber at 3s-software.com Tue Jun 21 07:55:04 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Tue, 21 Jun 2011 07:55:04 +0200 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: Hi, Vernon, Von: Vernon Cole We Ubuntu users are still very inconvenienced by that quick "we don't build" answer. Thanks for fixing the builder so that I can _try_ to home-build a .NET 2 version.? After killing and reinstalling my Ubuntu system, I gave up trying to actually accomplish it. It requires installing a second version of Mono side-by-side with the supported version in order to do the build. But to do _that_ you have to home-build the newer version of Mono from source and ... [cough. sputter. Huh? ... Oh! ... Sorry! I'm back now...] ? I note that the IPy daily build script actually does build an appropriate version, but apparently the output gets thrown away. I would be very nice if it were put someplace where one could find it. ? Hopefully the next release of Ubuntu will have an upgraded .NET 4 compatible version of Mono, and this problem will go away. Until then, I still cannot use a current version of IronPython on my preferred workstation ... and therefore cannot do much IPy testing.? (I only use Windows when I must, or when someone pays me to.) Maybe you can use Windows to build the .NET 2 compatible DLLs, and then use them under Mono? Best Regards, Markus Schaber From m.schaber at 3s-software.com Tue Jun 21 08:16:51 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Tue, 21 Jun 2011 08:16:51 +0200 Subject: [Ironpython-users] How can IronPython access a public static value defined in C#? In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E28E1EBEB@TK5EX14MBXC294.redmond.corp.microsoft.com><3862364A-06D6-40A6-BB08-D03231E981A4@gmail.com><6C7ABA8B4E309440B857D74348836F2E28E23428@TK5EX14MBXC294.redmond.corp.microsoft.com><7737799D90E55E4BB9C9F7E40D161E110E3491BF5E@VA3DIAXVS461.RED001.local> Message-ID: Hi, Von: Jeff Hardy > Keith's point is that 'from x import *' would be potentially dangerous (as > you don't know what the properties might do when get is called), unlike > explicit property imports. Unlikely, yes, but possible. > > If someone provides some code to prove that the property getters are safe, > it would be OK, but I'm not counting on it. In our code, we have a lot of property getters which internally implement lazy initialization for expensive resources. This would be broken by "import *" automatically evaluating them. Regards, Markus Schaber ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Entwicklung Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com CoDeSys Internet-Forum: http://forum.3s-software.com Gesch?ftsf?hrer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915 From no_reply at codeplex.com Tue Jun 21 09:53:58 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 21 Jun 2011 00:53:58 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/20/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Chaining LINQ calls fails 2. [New comment] Chaining LINQ calls fails 3. [Status update] IronPython building against SL4 (from CodePlex) 4. [Status update] Internal changeset 1645923 caused a 23% regression in PyBench Imports 5. [New comment] Readme.html in IronPython 2.0B5 is not useful ! 6. [Status update] IronPython release needs updated Silverlight directory 7. [New comment] IronPython release needs updated Silverlight directory 8. [Status update] IronPython release needs updated Silverlight directory 9. [New comment] Trivial: __add__ with buffer and str is supported 10. [New issue] PythonSha.sha.update missing overload that takes PythonBuffer objects 11. [New issue] zlib.compress missing an overload allowing BufferObjects ---------------------------------------------- ISSUES 1. [New comment] Chaining LINQ calls fails http://ironpython.codeplex.com/workitem/30379 User sopelt has commented on the issue: "Thank you for fixing this issue. Do you have an idea on when the next release is scheduled and if the fix will be included? I was not able to find some kind of release plan on codeplex/github."----------------- 2. [New comment] Chaining LINQ calls fails http://ironpython.codeplex.com/workitem/30379 User OldWarhorse has commented on the issue: "It's fixed. My stuff works. Thanks Dino!"----------------- 3. [Status update] IronPython building against SL4 (from CodePlex) http://ironpython.codeplex.com/workitem/26901 User ironpython has updated the issue: Status has changed from Active to Closed with the following comment, "Fixed 2.7 Beta 1 (the full public release)."----------------- 4. [Status update] Internal changeset 1645923 caused a 23% regression in PyBench Imports http://ironpython.codeplex.com/workitem/26657 User jdhardy has updated the issue: Status has changed from Active to Closed with the following comment, "Without knowing what changeset it maps to, this has to be closed."----------------- 5. [New comment] Readme.html in IronPython 2.0B5 is not useful ! http://ironpython.codeplex.com/workitem/18569 User jdhardy has commented on the issue: "This still needs to be updated for 2.7.1."----------------- 6. [Status update] IronPython release needs updated Silverlight directory http://ironpython.codeplex.com/workitem/26390 User jimmysch has updated the issue: Status has changed from Active to Closed with the following comment, "This is no longer relevant."----------------- 7. [New comment] IronPython release needs updated Silverlight directory http://ironpython.codeplex.com/workitem/26390 User jimmysch has commented on the issue: "This is no longer relevant. ** Closed by jimmysch 6/20/2011 10:34 AM"----------------- 8. [Status update] IronPython release needs updated Silverlight directory http://ironpython.codeplex.com/workitem/26390 User jimmysch has updated the issue: Status has changed from Closed to Proposed with the following comment, "Actually, misunderstood. Let's keep this open"----------------- 9. [New comment] Trivial: __add__ with buffer and str is supported http://ironpython.codeplex.com/workitem/23702 User gramana has commented on the issue: "As of 2.7.0.40, could not reproduce: c:\Projects>ipy -c "print buffer('abc') + 'abc'" abcabc"----------------- 10. [New issue] PythonSha.sha.update missing overload that takes PythonBuffer objects http://ironpython.codeplex.com/workitem/30888 User gramana has proposed the issue: "c:\Projects>"c:\Program Files\IronPython 2.7.rc1\"ipy IronPython 2.7 DEBUG (2.7.0.40) on .NET 4.0.30319.225 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> b = buffer('foo') >>> h = hashlib.sha1('hello') >>> h.update(b) Traceback (most recent call last): File "", line 1, in TypeError: expected str, got buffer c:\Projects>python Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> b = buffer('foo') >>> h = hashlib.sha1('hello') >>> h.update(b) >>>"----------------- 11. [New issue] zlib.compress missing an overload allowing BufferObjects http://ironpython.codeplex.com/workitem/30887 User gramana has proposed the issue: "The following test case fails: c:\Projects>"c:\Program Files\IronPython 2.7\ipy.exe" IronPython 2.7 DEBUG (2.7.0.40) on .NET 4.0.30319.225 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> b = buffer('foo') >>> h = hashlib.sha1() >>> h.update(b) Traceback (most recent call last): File "", line 1, in TypeError: expected str, got buffer c:\Projects>python Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> b = buffer('foo') >>> h = hashlib.sha1() >>> h.update(b) >>>" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Tue Jun 21 14:19:29 2011 From: slide.o.mix at gmail.com (Slide) Date: Tue, 21 Jun 2011 05:19:29 -0700 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: On Mon, Jun 20, 2011 at 10:50 PM, Markus Schaber wrote: > Hi, Jeff, > > > > For embedding, I would recommend you continue what you're doing - it's > > just just straight-up safer. It's a shame zipimport doesn't work; we > could > > cut the deployed size of the stdlib down significantly. > > Hmm. Chould zipimport be made possible using the PAL (HAL?) > functionality of the DLR? > > That is how I was planning on approaching it, using the PlatformAdaptationLayer, I just haven't gotten to it quite yet. > Regards > Markus > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From zgramana at pottsconsultinggroup.com Tue Jun 21 16:29:33 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Tue, 21 Jun 2011 10:29:33 -0400 Subject: [Ironpython-users] IronPython 2.7.1 Beta coming this weekend In-Reply-To: References: Message-ID: <4E00AACD.6040502@pottsconsultinggroup.com> On 6/20/2011 11:53 AM, Jeff Hardy wrote: > Yes, but I think everyone chooses the same path you do > (rebuild/resign). At least, I'm pretty sure that's what Resolver One > does (I don't know of any other apps ... maybe we need a "Who's > Using?" page). > SharpDevelop does the same as well. Not to mention, that seems to be the standard approach for CPython application deployment. From dinov at microsoft.com Tue Jun 21 22:15:00 2011 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 21 Jun 2011 20:15:00 +0000 Subject: [Ironpython-users] High-priority 2.7.1 issues In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E26F0E@TK5EX14MBXC294.redmond.corp.microsoft.com> Also related to 30312 and version number issues in general - it looks like sys.version_info should be updated to be 2.7.1. > -----Original Message----- > From: ironpython-users-bounces+dinov=microsoft.com at python.org > [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On > Behalf Of Jeff Hardy > Sent: Monday, June 20, 2011 10:43 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] High-priority 2.7.1 issues > > Hi, > The following issues are ones I would like fixed for 2.7.1. I'm not expecting all > of them to be, of course, but as many as possible. If there's something you > want added to the list, or if you want one the issues assigned to you, please > reply to this message. > > 391 Implement zipimport module > 16658 1.1.1: Creating an Int64 from a long loses precision > 20023 Implement pyexpat module > 26852 ssl IE gets disconnected after request, CPython doesn't. > 4928 binascii.b2a_qp is present but throws NotImplemented breaking > quopri standard module. > 24735 HAPI: PythonEngine does not release ScriptScopes in RC1 > 26177 __getattr__ not called upon module import > 26390 IronPython release needs updated Silverlight directory > 29077 importing some modules (e.g.'import random') fails in > IronPython Interactive window > 2169 test_isinstance incompatibilities with CPython > 18569 Readme.html in IronPython 2.0B5 is not useful ! > 30119 assertRaises ignores CLR exceptions > 30274 [2.7 Beta 2] deepcopy(time(9, 0)) != time(9, 0) > 30290 io.open after tempfile.mkstemp fails with bad file descriptor > 30312 sys.version_info should be namedtuple (or similar) > 30386 [2.7] set update raises NullReferenceException > 30441 str.format() Fails to Format an Empty Array of Processes > 30698 ctypes WINFUNCTYPE prototype fails with 'TypeError: > WinFunctionType() takes at most 2 arguments (3 given)' > 30805 pickling exceptions is incomplete; attributes get lost > > You can access the query at http://bit.ly/ipy-271-blockers. > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Wed Jun 22 11:11:15 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 22 Jun 2011 02:11:15 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/21/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Chaining LINQ calls fails ---------------------------------------------- ISSUES 1. [New comment] Chaining LINQ calls fails http://ironpython.codeplex.com/workitem/30379 User jdhardy has commented on the issue: "@sopelt: You can try out 2.7.1 Beta 1, which has this fix. The final release of 2.7.1 will happen in 2-3 weeks." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgt_spoon at hotmail.com Wed Jun 22 20:35:47 2011 From: sgt_spoon at hotmail.com (Andrew Harrison) Date: Thu, 23 Jun 2011 06:35:47 +1200 Subject: [Ironpython-users] FW: CreateMethod() replacement In-Reply-To: References: Message-ID: I have recently taken over a c# project that uses IronPython 1.1. I am looking to update the IronPython implementation to 2.7 but having some issues as the api has changed dramatically. The big issue I am having at the moment is finding a replacement for the createMethod() function. The c# code looks like: public static TDelegate SetupDelegate(string code, IList args) { try { return interpreter.CreateMethod(code, args); } catch (Exception) { log.WarnFormat("Failed to compile delegate code:\n{0}", code); throw; } } interpreter was a PythonEngine variable, but I have changed it to a ScriptEngine with the new 2.7 implementation. If it helps at all, this system is used to create delegates for event handlers. There may be some code written to be activated when a button is clicked, which is passed into this function here then the method is created and returned and added to the list of event handlers. I have tried for a day and a half trying to get some code that worked, but can't seem to get anything that works. Any help is greatly appreciated. Thanks, Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Jun 23 13:10:36 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 23 Jun 2011 04:10:36 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/22/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Exception formatting some times isn't as good as it's supposed to be ---------------------------------------------- ISSUES 1. [New issue] Exception formatting some times isn't as good as it's supposed to be http://ironpython.codeplex.com/workitem/30900 User dinov has proposed the issue: ">>> import clr >>> clr.AddReference('System.WIndows') Traceback (most recent call last): File "", line 1, in IOError: System.IO.IOException: Could not add reference to assembly System.WIndows at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Hosting.PythonCommandLine.<>c__DisplayClass1.b__0() >>> We shouldn't display all of these useless frames unless -X:ExceptionDetail is specified." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Jun 24 15:38:15 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 24 Jun 2011 06:38:15 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints ---------------------------------------------- ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints http://ironpython.codeplex.com/workitem/30905 User dinov has proposed the issue: "http://pytools.codeplex.com/workitem/243 public class GenericType where T : IEnumerable { public T ReturnsGenericParam() { return default(T); } } Import the type and do: clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGenericParam').ReturnType) And this throws: SystemError: Method must be called on a Type for which Type.IsGenericParameter is false." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxpatric at gmail.com Fri Jun 24 21:59:56 2011 From: zxpatric at gmail.com (zxpatric) Date: Fri, 24 Jun 2011 15:59:56 -0400 Subject: [Ironpython-users] DynamicObjects.TryConvert not called in IronPython? Message-ID: Hi, I am doing the similar thing as in " http://blogs.msdn.com/b/csharpfaq/archive/2009/10/19/dynamic-in-c-4-0-creating-wrappers-with-dynamicobject.aspx" to first convert any member into an object and then expect the object.TryConvert to handle the final convert. However, what is working in C# as double a = obj.M1.M2.M3 (return instance of Type C3, which has the TryConvert to convert it to double type) doesn't work in IronPython. The last step of converting instance of C3 to double in C3.TryConvert never happens. I am currently using IronPython 2.7.0.40. Is this a known issue that has been addressed in 2.7.1 Beta? Thanks -Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Jun 24 22:17:40 2011 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 24 Jun 2011 20:17:40 +0000 Subject: [Ironpython-users] DynamicObjects.TryConvert not called in IronPython? In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E28E3ABFC@TK5EX14MBXC292.redmond.corp.microsoft.com> In IronPython an assignment to a local/global variable will never perform a conversion. In your C# code the conversion has to happen because the variable you're assigning to is typed as double. To force the conversion you should be able to do float(obj.M1.M2.M3) or you can use the clr.Convert function. From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of zxpatric Sent: Friday, June 24, 2011 1:00 PM To: ironpython-users at python.org Subject: [Ironpython-users] DynamicObjects.TryConvert not called in IronPython? Hi, I am doing the similar thing as in "http://blogs.msdn.com/b/csharpfaq/archive/2009/10/19/dynamic-in-c-4-0-creating-wrappers-with-dynamicobject.aspx" to first convert any member into an object and then expect the object.TryConvert to handle the final convert. However, what is working in C# as double a = obj.M1.M2.M3 (return instance of Type C3, which has the TryConvert to convert it to double type) doesn't work in IronPython. The last step of converting instance of C3 to double in C3.TryConvert never happens. I am currently using IronPython 2.7.0.40. Is this a known issue that has been addressed in 2.7.1 Beta? Thanks -Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxpatric at gmail.com Fri Jun 24 23:24:17 2011 From: zxpatric at gmail.com (zxpatric) Date: Fri, 24 Jun 2011 17:24:17 -0400 Subject: [Ironpython-users] DynamicObjects.TryConvert not called in IronPython? In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E28E3ABFC@TK5EX14MBXC292.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E28E3ABFC@TK5EX14MBXC292.redmond.corp.microsoft.com> Message-ID: Thanks Dino for the explanation. float(obj.M1.M2.M3) leads to Message: 'xxx' object has no attribute '__float__' clr.Convert(obj.M1.M2.M3, float) *does *work. Interesting observation: For imported .NET function C.SetFloat(float a), C.SetFloat(obj.M1.M2.M3) won't trigger the conversion as well. On Fri, Jun 24, 2011 at 4:17 PM, Dino Viehland wrote: > In IronPython an assignment to a local/global variable will never perform > a conversion. In your C# code the conversion has to happen because the > variable you?re assigning to is typed as double. **** > > ** ** > > To force the conversion you should be able to do float(obj.M1.M2.M3) or you > can use the clr.Convert function.**** > > ** ** > > *From:* ironpython-users-bounces+dinov=microsoft.com at python.org [mailto: > ironpython-users-bounces+dinov=microsoft.com at python.org] *On Behalf Of * > zxpatric > *Sent:* Friday, June 24, 2011 1:00 PM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] DynamicObjects.TryConvert not called in > IronPython?**** > > ** ** > > Hi,**** > > ** ** > > I am doing the similar thing as in " > http://blogs.msdn.com/b/csharpfaq/archive/2009/10/19/dynamic-in-c-4-0-creating-wrappers-with-dynamicobject.aspx" > to first convert any member into an object and then expect the > object.TryConvert to handle the final convert. However, what is working in > C# as double a = obj.M1.M2.M3 (return instance of Type C3, which has the > TryConvert to convert it to double type) doesn't work in IronPython. The > last step of converting instance of C3 to double in C3.TryConvert never > happens. I am currently using IronPython 2.7.0.40. Is this a known issue > that has been addressed in 2.7.1 Beta?**** > > ** ** > > Thanks**** > > -Patrick**** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Jun 25 09:53:02 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 25 Jun 2011 00:53:02 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/24/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Getting f_builtins from frame while tracing throws null ref exception ---------------------------------------------- ISSUES 1. [New issue] Getting f_builtins from frame while tracing throws null ref exception http://ironpython.codeplex.com/workitem/30908 User dinov has proposed the issue: "def f(frame, event, arg): print frame.f_locals print frame.f_globals print frame.f_builtins import sys sys.settrace(f) def g(): print 'hi' Object reference not set to an instance of an object. at IronPython.Runtime.Exceptions.TraceBackFrame.get_f_builtins() at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Invoke(Object arg0) at IronPython.Runtime.Binding.PythonGetMemberBinder.FastPropertyGet`1.GetProperty(CallSite site, TSelfType target, CodeContext context) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at _Scripting_(Object[] , TraceBackFrame , String , Object ) at IronPython.Runtime.PythonTracebackListener.DispatchTrace(List`1 thread, TraceEventKind kind, Object payload, TracebackDelegate traceDispatch, Object trace DispatchObject, TraceBackFrame pyFrame) at IronPython.Runtime.PythonTracebackListener.OnTraceEvent(TraceEventKind kind, String name, String sourceFileName, SourceSpan sourceSpan, Func`1 scopeCallba ck, Object payload, Object customPayload)" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis at camfex.cz Sun Jun 26 13:23:08 2011 From: denis at camfex.cz (Denis) Date: Sun, 26 Jun 2011 13:23:08 +0200 Subject: [Ironpython-users] Automating Visual Studio with IronPython In-Reply-To: References: Message-ID: Hi I am trying to automating some boring task by writing macros for Visual Studio 2010. I am not a .NET nor C# expert, I work with C++ and have some Python background. So Python seemed more comfortable for me to do the task. What I got stuck on is receiving Visual Studio events. Some of them can be handled well but other are not. By irony, the latters events are the ones that needed to be handled. Ok, let us start from IronPython console in Visual Studio 2010. >> import clr >> clr.AddReference("EnvDTE") >> import EnvDTE, System.Runtime.InteropServices.Marshal >> dte = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE") >> def onopen(): print 'solution opened!' >> EnvDTE._dispSolutionEvents_Event.add_Opened(dte.Events.SolutionEvents, onopen) Ok, the event installed and even works fine. Lets go on. >> def onupdated(): print 'pane updated!' >> EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(dte.Events.OutputWindowEvents, onupdated) Traceback (most recent call last): ?File "", line 1, in TypeError: expected _dispOutputWindowEvents_Event, got DispCallable >? print type(dte.Events.OutputWindowEvents) >? print type(dte.Events.SolutionEvents) Oops. Seems like dte.Events.SolutionEvents and dte.Events.OutputWindowEvents are not similar at all. Why do they have so different type? Both events works similar way with VisualBasic. Thinking that DispCallable may have something todo with IDispatch, lets try another way: > dte.Events.OutputWindowEvents("add_PaneUpdated", onupdated) Traceback (most recent call last): ?File "", line 1, in StandardError: Error while invoking OutputWindowEvents. Oops again :( So how to deal with DispCallable? How to query interface _dispOutputWindowEvents_Event on it? Thanks in advance. From s.j.dower at gmail.com Sun Jun 26 17:06:56 2011 From: s.j.dower at gmail.com (Steve Dower) Date: Sun, 26 Jun 2011 08:06:56 -0700 Subject: [Ironpython-users] Automating Visual Studio with IronPython In-Reply-To: References: Message-ID: The MSDN docs show the difference between the two: http://msdn.microsoft.com/en-us/library/envdte.events.solutionevents.aspx http://msdn.microsoft.com/en-us/library/envdte.events.outputwindowevents.aspx In short, OutputWindowEvents takes an (optional) parameter. You don't see this in C# because it doesn't support parameterised properties, but neither does Python (though you can fake it with __getitem__). If you 'call' the property (or is that call the 'property'?) it will get the value: EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(dte.Events.OutputWindowEvents(), onupdated) The other thing to keen in mind with EnvDTE events is that you have to keep the event objects alive or you will stop receiving notifications, so you will at least need to do: Events_OutputWindowEvents = dte.Events.OutputWindowEvents() EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(Events_OutputWindowEvents, onupdated) and make sure that Events_OutputWindowEvents doesn't get collected. On Sun, Jun 26, 2011 at 04:23, Denis wrote: > Hi > I am trying to automating some boring task by writing macros for > Visual Studio 2010. > I am not a .NET nor C# expert, I work with C++ and have some Python background. > So Python seemed more comfortable for me to do the task. > > What I got stuck on is receiving Visual Studio events. > Some of them can be handled well but other are not. > By irony, the latters events are the ones that needed to be handled. > > Ok, let us start from IronPython console in Visual Studio 2010. > > >>> import clr >>> clr.AddReference("EnvDTE") >>> import EnvDTE, System.Runtime.InteropServices.Marshal >>> dte = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE") > >>> def onopen(): print 'solution opened!' >>> EnvDTE._dispSolutionEvents_Event.add_Opened(dte.Events.SolutionEvents, onopen) > > > Ok, the event installed and even works fine. > Lets go on. > > >>> def onupdated(): print 'pane updated!' >>> EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(dte.Events.OutputWindowEvents, onupdated) > Traceback (most recent call last): > ?File "", line 1, in > TypeError: expected _dispOutputWindowEvents_Event, got DispCallable > >>? print type(dte.Events.OutputWindowEvents) > > >>? print type(dte.Events.SolutionEvents) > > > > Oops. > Seems like dte.Events.SolutionEvents and dte.Events.OutputWindowEvents > are not similar at all. > Why do they have so different type? > Both events works similar way with VisualBasic. > > Thinking that DispCallable may have something todo with IDispatch, > lets try another way: > > >> dte.Events.OutputWindowEvents("add_PaneUpdated", onupdated) > Traceback (most recent call last): > ?File "", line 1, in > StandardError: Error while invoking OutputWindowEvents. > > > Oops again :( > So how to deal with DispCallable? > How to query interface _dispOutputWindowEvents_Event on it? > > Thanks in advance. > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From denis at camfex.cz Mon Jun 27 04:00:56 2011 From: denis at camfex.cz (Denis) Date: Mon, 27 Jun 2011 06:00:56 +0400 Subject: [Ironpython-users] Automating Visual Studio with IronPython In-Reply-To: References: Message-ID: Hi Thank you! BTW, why 'dte' is not implicitly available in Visual Studio console? I found in some old (2006-2008) docs that 'dte' preexists in the console. On Sun, Jun 26, 2011 at 7:06 PM, Steve Dower wrote: > The MSDN docs show the difference between the two: > > http://msdn.microsoft.com/en-us/library/envdte.events.solutionevents.aspx > http://msdn.microsoft.com/en-us/library/envdte.events.outputwindowevents.aspx > > In short, OutputWindowEvents takes an (optional) parameter. You don't > see this in C# because it doesn't support parameterised properties, > but neither does Python (though you can fake it with __getitem__). If > you 'call' the property (or is that call the 'property'?) it will get > the value: > > EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(dte.Events.OutputWindowEvents(), > onupdated) > > The other thing to keen in mind with EnvDTE events is that you have to > keep the event objects alive or you will stop receiving notifications, > so you will at least need to do: > > Events_OutputWindowEvents = dte.Events.OutputWindowEvents() > EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(Events_OutputWindowEvents, > onupdated) > > and make sure that Events_OutputWindowEvents doesn't get collected. > > On Sun, Jun 26, 2011 at 04:23, Denis wrote: >> Hi >> I am trying to automating some boring task by writing macros for >> Visual Studio 2010. >> I am not a .NET nor C# expert, I work with C++ and have some Python background. >> So Python seemed more comfortable for me to do the task. >> >> What I got stuck on is receiving Visual Studio events. >> Some of them can be handled well but other are not. >> By irony, the latters events are the ones that needed to be handled. >> >> Ok, let us start from IronPython console in Visual Studio 2010. >> >> >>>> import clr >>>> clr.AddReference("EnvDTE") >>>> import EnvDTE, System.Runtime.InteropServices.Marshal >>>> dte = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE") >> >>>> def onopen(): print 'solution opened!' >>>> EnvDTE._dispSolutionEvents_Event.add_Opened(dte.Events.SolutionEvents, onopen) >> >> >> Ok, the event installed and even works fine. >> Lets go on. >> >> >>>> def onupdated(): print 'pane updated!' >>>> EnvDTE._dispOutputWindowEvents_Event.add_PaneUpdated(dte.Events.OutputWindowEvents, onupdated) >> Traceback (most recent call last): >> ?File "", line 1, in >> TypeError: expected _dispOutputWindowEvents_Event, got DispCallable >> >>>? print type(dte.Events.OutputWindowEvents) >> >> >>>? print type(dte.Events.SolutionEvents) >> >> >> >> Oops. >> Seems like dte.Events.SolutionEvents and dte.Events.OutputWindowEvents >> are not similar at all. >> Why do they have so different type? >> Both events works similar way with VisualBasic. >> >> Thinking that DispCallable may have something todo with IDispatch, >> lets try another way: >> >> >>> dte.Events.OutputWindowEvents("add_PaneUpdated", onupdated) >> Traceback (most recent call last): >> ?File "", line 1, in >> StandardError: Error while invoking OutputWindowEvents. >> >> >> Oops again :( >> So how to deal with DispCallable? >> How to query interface _dispOutputWindowEvents_Event on it? >> >> Thanks in advance. >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > From no_reply at codeplex.com Mon Jun 27 13:13:19 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 27 Jun 2011 04:13:19 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/26/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp 2. [New comment] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp 3. [New comment] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp ---------------------------------------------- ISSUES 1. [New issue] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp http://ironpython.codeplex.com/workitem/30912 User StanislavS has proposed the issue: "2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp"----------------- 2. [New comment] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp http://ironpython.codeplex.com/workitem/30912 User StanislavS has commented on the issue: "this is iron python tools integration with vs 2010"----------------- 3. [New comment] 2.7.1 beta 4 does not installs with vs 2010 c# express on windows xp http://ironpython.codeplex.com/workitem/30912 User slide_o_mix has commented on the issue: "The express versions of VS do not support add-ons like the full version. You need to install the VS Shell if you want IronPython tools." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Larry.Jones at aspentech.com Mon Jun 27 15:01:36 2011 From: Larry.Jones at aspentech.com (Jones, Larry) Date: Mon, 27 Jun 2011 09:01:36 -0400 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 Message-ID: Hi y?all, Is anyone else getting a daily digest in addition to individual emails since moving to the new mailing list? --- Larry Jones ||| Senior Level Development Engineer Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 ||| www.aspentech.com From: ironpython-users-bounces+larry.jones=aspentech.com at python.org [mailto:ironpython-users-bounces+larry.jones=aspentech.com at python.org] On Behalf Of no_reply at codeplex.com Sent: Friday, June 24, 2011 8:38 AM To: ironpython-users at python.org Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 Hi ironpython, Here's your Daily Digest of new issues for project "IronPython ". In today's digest: ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints ? ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints view online User dinov has proposed the issue: "http://pytools.codeplex.com/workitem/243 public class GenericType where T : IEnumerable { public T ReturnsGenericParam() { return default(T); } } Import the type and do: clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGenericParam').ReturnType) And this throws: SystemError: Method must be called on a Type for which Type.IsGenericParameter is false." You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker . You can unsubscribe or change your issue notification settings on CodePlex.com. This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10525 bytes Desc: image001.png URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT336236.txt URL: From davidf at sjsoft.com Mon Jun 27 15:21:12 2011 From: davidf at sjsoft.com (David Fraser) Date: Mon, 27 Jun 2011 08:21:12 -0500 (CDT) Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: Message-ID: Yes, me too... ----- Original Message ----- From: "Larry Jones" To: ironpython-users at python.org Sent: Monday, June 27, 2011 3:01:36 PM Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 Hi y?all, Is anyone else getting a daily digest in addition to individual emails since moving to the new mailing list? --- Larry Jones ||| Senior Level Development Engineer Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 ||| www.aspentech.com 30th_logo_RGB_ppt.png From: ironpython-users-bounces+larry.jones=aspentech.com at python.org [mailto:ironpython-users-bounces+larry.jones=aspentech.com at python.org] On Behalf Of no_reply at codeplex.com Sent: Friday, June 24, 2011 8:38 AM To: ironpython-users at python.org Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 Hi ironpython, Here's your Daily Digest of new issues for project " IronPython ". In today's digest: ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints ? ISSUES 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints view online User dinov has proposed the issue: "http://pytools.codeplex.com/workitem/243 public class GenericType where T : IEnumerable { public T ReturnsGenericParam() { return default(T); } } Import the type and do: clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGenericParam').ReturnType) And this throws: SystemError: Method must be called on a Type for which Type.IsGenericParameter is false." You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker . You can unsubscribe or change your issue notification settings on CodePlex.com. ****************************************************************** This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. [Text File:ATT336236.txt] _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From jschementi at gmail.com Mon Jun 27 15:45:37 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Mon, 27 Jun 2011 09:45:37 -0400 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: It's a daily digest of the issues on ironpython.codeplex.com, not of this mailing list. If it's not of interest we can put it on a smaller dev list. ~Jimmy On Jun 27, 2011, at 9:21 AM, David Fraser wrote: > Yes, me too... > > ----- Original Message ----- > From: "Larry Jones" > To: ironpython-users at python.org > Sent: Monday, June 27, 2011 3:01:36 PM > Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 > > > > > > Hi y?all, > > > > Is anyone else getting a daily digest in addition to individual emails since moving to the new mailing list? > > > > > --- > > Larry Jones > ||| Senior Level Development Engineer > Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 ||| www.aspentech.com > > > > 30th_logo_RGB_ppt.png > > > > > > From: ironpython-users-bounces+larry.jones=aspentech.com at python.org [mailto:ironpython-users-bounces+larry.jones=aspentech.com at python.org] On Behalf Of no_reply at codeplex.com > Sent: Friday, June 24, 2011 8:38 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 > > > > > Hi ironpython, > > Here's your Daily Digest of new issues for project " IronPython ". > > In today's digest: ISSUES > > > > > 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints ? ISSUES > > > > > 1. [New issue] Cannot create PythonType for generic parameter which has interface constraints view online > > User dinov has proposed the issue: > > "http://pytools.codeplex.com/workitem/243 > > public class GenericType where T : IEnumerable { > public T ReturnsGenericParam() { > return default(T); > } > } > > Import the type and do: > > clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGenericParam').ReturnType) > > And this throws: > > SystemError: Method must be called on a Type for which Type.IsGenericParameter is false." > > > You are receiving this email because you subscribed to notifications on CodePlex. > > To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker . You can unsubscribe or change your issue notification settings on CodePlex.com. > ****************************************************************** > This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. > > [Text File:ATT336236.txt] > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From jdhardy at gmail.com Mon Jun 27 17:19:26 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 27 Jun 2011 08:19:26 -0700 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: On Mon, Jun 27, 2011 at 6:45 AM, Jimmy Schementi wrote: > It's a daily digest of the issues on ironpython.codeplex.com, not of this mailing list. If it's not of interest we can put it on a smaller dev list. I turned it on as an experiment, in an attempt to get a little more visibility on the bug tracker. Unfortunately the only option is daily - I would have preferred weekly, and I'll open a CodePlex issue to see if that can be changed. I can redirect these to a different list if people don't want to get them; any opinions one way or the other? - Jeff From slide.o.mix at gmail.com Mon Jun 27 17:22:00 2011 From: slide.o.mix at gmail.com (Slide) Date: Mon, 27 Jun 2011 08:22:00 -0700 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: On Mon, Jun 27, 2011 at 8:19 AM, Jeff Hardy wrote: > On Mon, Jun 27, 2011 at 6:45 AM, Jimmy Schementi > wrote: > > It's a daily digest of the issues on ironpython.codeplex.com, not of > this mailing list. If it's not of interest we can put it on a smaller dev > list. > > I turned it on as an experiment, in an attempt to get a little more > visibility on the bug tracker. Unfortunately the only option is daily > - I would have preferred weekly, and I'll open a CodePlex issue to see > if that can be changed. > > I can redirect these to a different list if people don't want to get > them; any opinions one way or the other? > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > Would you be creating a new list? The only list I see on the python.orgmailing list list (haha!) is the ironpython-users. Just want to make sure I am not missing out on some excellent developer discussions. Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Mon Jun 27 17:24:03 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 27 Jun 2011 08:24:03 -0700 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: On Mon, Jun 27, 2011 at 8:22 AM, Slide wrote: > Would you be creating a new list? The only list I see on the python.org > mailing list list (haha!) is the ironpython-users. Just want to make sure I > am not missing out on some excellent developer discussions. Yes, this is currently the only list. There have been discussions about a -dev list in the past, but I personally don't feel the traffic is high enough to warrant it. - Jeff From rome at Wintellect.com Mon Jun 27 16:27:29 2011 From: rome at Wintellect.com (Keith Rome) Date: Mon, 27 Jun 2011 07:27:29 -0700 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: <7737799D90E55E4BB9C9F7E40D161E110E349D9AA8@VA3DIAXVS461.RED001.local> I don't mind seeing them. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -----Original Message----- From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Jimmy Schementi Sent: Monday, June 27, 2011 9:46 AM To: David Fraser Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 It's a daily digest of the issues on ironpython.codeplex.com, not of this mailing list. If it's not of interest we can put it on a smaller dev list. ~Jimmy On Jun 27, 2011, at 9:21 AM, David Fraser wrote: > Yes, me too... > > ----- Original Message ----- > From: "Larry Jones" > To: ironpython-users at python.org > Sent: Monday, June 27, 2011 3:01:36 PM > Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 > > > > > > Hi y?all, > > > > Is anyone else getting a daily digest in addition to individual emails since moving to the new mailing list? > > > > > --- > > Larry Jones > ||| Senior Level Development Engineer > Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 ||| > www.aspentech.com > > > > 30th_logo_RGB_ppt.png > > > > > > From: ironpython-users-bounces+larry.jones=aspentech.com at python.org > [mailto:ironpython-users-bounces+larry.jones=aspentech.com at python.org] > On Behalf Of no_reply at codeplex.com > Sent: Friday, June 24, 2011 8:38 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 > > > > > Hi ironpython, > > Here's your Daily Digest of new issues for project " IronPython ". > > In today's digest: ISSUES > > > > > 1. [New issue] Cannot create PythonType for generic parameter which > has interface constraints ? ISSUES > > > > > 1. [New issue] Cannot create PythonType for generic parameter which > has interface constraints view online > > User dinov has proposed the issue: > > "http://pytools.codeplex.com/workitem/243 > > public class GenericType where T : IEnumerable { public T > ReturnsGenericParam() { return default(T); } } > > Import the type and do: > > clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGeneri > cParam').ReturnType) > > And this throws: > > SystemError: Method must be called on a Type for which Type.IsGenericParameter is false." > > > You are receiving this email because you subscribed to notifications on CodePlex. > > To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker . You can unsubscribe or change your issue notification settings on CodePlex.com. > ****************************************************************** > This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. > > [Text File:ATT336236.txt] > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From jdhardy at gmail.com Mon Jun 27 17:29:28 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 27 Jun 2011 08:29:28 -0700 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: On Mon, Jun 27, 2011 at 8:19 AM, Jeff Hardy wrote: > I turned it on as an experiment, in an attempt to get a little more > visibility on the bug tracker. Unfortunately the only option is daily > - I would have preferred weekly, and I'll open a CodePlex issue to see > if that can be changed. CodePlex issue #25895 (http://codeplex.codeplex.com/workitem/25895) Please vote, in the hopes that it will get changed soon. - Jeff From vernondcole at gmail.com Mon Jun 27 22:19:50 2011 From: vernondcole at gmail.com (Vernon Cole) Date: Mon, 27 Jun 2011 14:19:50 -0600 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: <7737799D90E55E4BB9C9F7E40D161E110E349D9AA8@VA3DIAXVS461.RED001.local> References: <7737799D90E55E4BB9C9F7E40D161E110E349D9AA8@VA3DIAXVS461.RED001.local> Message-ID: +1 ... I like to see the digest, too. On Mon, Jun 27, 2011 at 8:27 AM, Keith Rome wrote: > I don't mind seeing them. > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > -----Original Message----- > From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto: > ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of > Jimmy Schementi > Sent: Monday, June 27, 2011 9:46 AM > To: David Fraser > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 > > It's a daily digest of the issues on ironpython.codeplex.com, not of this > mailing list. If it's not of interest we can put it on a smaller dev list. > > ~Jimmy > > > On Jun 27, 2011, at 9:21 AM, David Fraser wrote: > > > Yes, me too... > > > > ----- Original Message ----- > > From: "Larry Jones" > > To: ironpython-users at python.org > > Sent: Monday, June 27, 2011 3:01:36 PM > > Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 > > > > > > > > > > > > Hi y?all, > > > > > > > > Is anyone else getting a daily digest in addition to individual emails > since moving to the new mailing list? > > > > > > > > > > --- > > > > Larry Jones > > ||| Senior Level Development Engineer > > Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 ||| > > www.aspentech.com > > > > > > > > 30th_logo_RGB_ppt.png > > > > > > > > > > > > From: ironpython-users-bounces+larry.jones=aspentech.com at python.org > > [mailto:ironpython-users-bounces+larry.jones=aspentech.com at python.org] > > On Behalf Of no_reply at codeplex.com > > Sent: Friday, June 24, 2011 8:38 AM > > To: ironpython-users at python.org > > Subject: [Ironpython-users] IronPython, Daily Digest 6/23/2011 > > > > > > > > > > Hi ironpython, > > > > Here's your Daily Digest of new issues for project " IronPython ". > > > > In today's digest: ISSUES > > > > > > > > > > 1. [New issue] Cannot create PythonType for generic parameter which > > has interface constraints ? ISSUES > > > > > > > > > > 1. [New issue] Cannot create PythonType for generic parameter which > > has interface constraints view online > > > > User dinov has proposed the issue: > > > > "http://pytools.codeplex.com/workitem/243 > > > > public class GenericType where T : IEnumerable { public T > > ReturnsGenericParam() { return default(T); } } > > > > Import the type and do: > > > > clr.GetPythonType(clr.GetClrType(GenericType).GetMethod('ReturnsGeneri > > cParam').ReturnType) > > > > And this throws: > > > > SystemError: Method must be called on a Type for which > Type.IsGenericParameter is false." > > > > > > You are receiving this email because you subscribed to notifications on > CodePlex. > > > > To report a bug, request a feature, or add a comment, visit IronPython > Issue Tracker . You can unsubscribe or change your issue notification > settings on CodePlex.com. > > ****************************************************************** > > This e-mail and any attachments are intended only for use by the > addressee(s) named herein and may contain legally privileged and/or > confidential information. If you are not the intended recipient of this > e-mail, you are hereby notified any dissemination, distribution or copying > of this email, and any attachments thereto, is strictly prohibited. If you > receive this email in error please immediately notify the sender and > permanently delete the original copy and any copy of any e-mail, and any > printout thereof. > > > > [Text File:ATT336236.txt] > > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zgramana at pottsconsultinggroup.com Mon Jun 27 22:34:31 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Mon, 27 Jun 2011 16:34:31 -0400 Subject: [Ironpython-users] FW: IronPython, Daily Digest 6/23/2011 In-Reply-To: References: Message-ID: <4E08E957.7010506@pottsconsultinggroup.com> On 6/27/2011 11:19 AM, Jeff Hardy wrote: > On Mon, Jun 27, 2011 at 6:45 AM, Jimmy Schementi wrote: >> It's a daily digest of the issues on ironpython.codeplex.com, not of this mailing list. If it's not of interest we can put it on a smaller dev list. > > I turned it on as an experiment, in an attempt to get a little more > visibility on the bug tracker. Unfortunately the only option is daily > - I would have preferred weekly, and I'll open a CodePlex issue to see > if that can be changed. > > I can redirect these to a different list if people don't want to get > them; any opinions one way or the other? I like the daily digests coming here. They promote responsiveness to the users of the issue tracker (especially the end users who take the time to report) and keep the size of the digest down. Plus, we're sure to get the entire discussion here in a timely way. If a big comment thread breaks out on Codeplex, we'll only be 24-hours behind here. With weekly digests, we might not know a conversation happened until it is over and the participants have moved on. From stephen.baugh1 at ntlworld.com Mon Jun 27 23:26:29 2011 From: stephen.baugh1 at ntlworld.com (Steve Baugh) Date: Mon, 27 Jun 2011 22:26:29 +0100 Subject: [Ironpython-users] SQLite3 Message-ID: <1309209989.2017.9.camel@steve-EP35C-DS3R> I am trying to port a Linux Python program to IronPython and WPF. This program makes use of sqlite3. I am not trying to use data aware contols, I just want to issue SQL commands and get the results from SELECT statements. I have been getting conflicting, and in some cases contradictory, information from my web searches. Has anyone done this with IronPython 2.7 on .NET 4? I am am using SharpStudio in Windows 7 64 bit (but I am not trying to build a 64 bit application). Thanks, Steve From dpeterson at broadwaytechnology.com Tue Jun 28 15:25:00 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Tue, 28 Jun 2011 08:25:00 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Jun 28 15:59:34 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 28 Jun 2011 06:59:34 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/27/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] sys.version_info should be namedtuple (or similar) 2. [New issue] PEP 380: Syntax for Delegating to a Subgenerator 3. [Status update] 1.1.1: Creating an Int64 from a long loses precision 4. [New comment] [2.7] set update raises NullReferenceException ---------------------------------------------- ISSUES 1. [New comment] sys.version_info should be namedtuple (or similar) http://ironpython.codeplex.com/workitem/30312 User jdhardy has commented on the issue: "Fixed in ipy-2.7-maint (bd3d988)."----------------- 2. [New issue] PEP 380: Syntax for Delegating to a Subgenerator http://ironpython.codeplex.com/workitem/30924 User jdhardy has proposed the issue: "Implement PEP 380 (http://www.python.org/dev/peps/pep-0380/): "A syntax is proposed for a generator to delegate part of its operations to another generator. This allows a section of code containing 'yield' to be factored out and placed in another generator. Additionally, the subgenerator is allowed to return with a value, and the value is made available to the delegating generator. The new syntax also opens up some opportunities for optimisation when one generator re-yields values produced by another.""----------------- 3. [Status update] 1.1.1: Creating an Int64 from a long loses precision http://ironpython.codeplex.com/workitem/16658 User jdhardy has updated the issue: Status has changed from Active to Closed with the following comment, "This is fixed in (at least) 2.7."----------------- 4. [New comment] [2.7] set update raises NullReferenceException http://ironpython.codeplex.com/workitem/30386 User jdhardy has commented on the issue: "Fixed in 7a2f756." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Tue Jun 28 19:31:06 2011 From: slide.o.mix at gmail.com (Slide) Date: Tue, 28 Jun 2011 10:31:06 -0700 Subject: [Ironpython-users] location for zipimport.cs Message-ID: I am working on an implementation of zipimport.cs, there are some changes needed to sys.cs in order to add the zipimporter to sys path_hooks. I currently have zipimport.cs in the IronPython class library, but am wondering if I should put it into IronPython.Modules. Are there any guidelines for this sort of thing? Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jamal.Mazrui at fcc.gov Tue Jun 28 19:57:13 2011 From: Jamal.Mazrui at fcc.gov (Jamal Mazrui) Date: Tue, 28 Jun 2011 13:57:13 -0400 Subject: [Ironpython-users] Building a COM server with IronPython 2.7 Message-ID: <9E3F9A88A3F4A54F81C9BC47D87A17A401F172F0@P2PXMB01S1.fccnet.win.fcc.gov> In the past, I have built a COM server with C# and the RegAsm.exe utility of the .NET Framework. If I use pyc.py to create a DLL with IronPython, will I be able to build a COM server in a similar manner? Are there any particular issues to be aware of? Jamal -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Wed Jun 29 03:12:29 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 28 Jun 2011 18:12:29 -0700 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> Message-ID: Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson < dpeterson at broadwaytechnology.com> wrote: > Hi Curt,**** > > ** ** > > I had actually tried ( 1 ) below first. That is, change my sample code to > this:**** > > import sys**** > > sys.path.append(r?D:\path\to\my?)**** > > import clr**** > > clr.AddReference(?dll?)**** > > ** ** > > Which, while it changes the error message, still fails. Here?s the new > error message:**** > > IOError: System.IO.IOException: Could not add reference to > assembly dll**** > > at IronPython.Runtime.ClrModule.AddReference(CodeContext > context, String name)**** > > at IronPython.Runtime.ClrModule.AddReference(CodeContext > context, Object reference)**** > > at IronPython.Runtime.ClrModule.AddReference(CodeContext > context, Object[] references)**** > > at > Microsoft.Scripting.Interpreter.ActionCallInstruction?2.Run(InterpretedFrame > frame)**** > > ?. **** > > ** ** > > I?ve tried ( 2 ) as well, and while some of the known dependencies load > successfully ? showing that the process works ? some do not. This could > mean I?m confused on my dependencies ? is there a tool which will show what > assemblies a given assembly requires?**** > > ** ** > > -- Dave**** > > ** ** > > *From:* Curt Hagenlocher [mailto:curt at hagenlocher.org] > *Sent:* Tuesday, June 28, 2011 3:11 PM > *To:* Dave Peterson > *Subject:* Re: [Ironpython-users] Assembly references: file does not > exist?**** > > ** ** > > .NET doesn't generally load dependent assemblies just because they're in > the same directory from which you're doing a LoadFrom. I seem to recall that > there are two ways of handling this:**** > > **** > > 1) Add the directory to sys.path and then use clr.AddReference (without the > full path)**** > > 2) Explicitly load the dependencies first before loading the dependents.** > ** > > On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson < > dpeterson at broadwaytechnology.com> wrote:**** > > Hello,**** > > **** > > I?m relatively new to IronPython and .Net, but reasonably familiar with > Python. I?m trying to write a .py script to use one of my employer?s .NET > dlls but whenever I try to AddReferenceToFileAndPath() I get an error:**** > > IOError: System.IO.IOException: file does not exists: > D:\path\to\my\dll**** > > However, the DLL definitely exists at D:\path\to\my\dll and indeed works > from there using my employer?s app. **** > > **** > > I?m using the newest IronPython (just downloaded from the site and > installed today using the installer):**** > > IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225**** > > **** > > My latest attempted code is as below, though I?ve tried a lot of various > combinations:**** > > import sys**** > > sys.path.append(r?D:\path\to\my?)**** > > import clr**** > > clr.AddReferenceToFileAndPath(r?D:\path\to\my\dll?)**** > > **** > > That last line raises the exception mentioned above with a stack trace > where the first two lines are both from the IronPython?s ClrModule. I may > be barking up the wrong tree here, but it leads me to believe that my entry > DLL is trying to load another DLL and the system can?t find the other one, > even though it is in the same directory as the first dll. Here?s the first > two lines of the stack trace (I can?t copy?n?paste off the work machine > where this is happening due to security constraints.)**** > > **** > > at > IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, > String file)**** > > at > IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, > String[] files)**** > > **** > > **** > > Thanks in advance,**** > > **** > > -- Dave**** > > **** > > **** > > **** > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users**** > > ** ** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Jun 29 07:40:07 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 28 Jun 2011 22:40:07 -0700 Subject: [Ironpython-users] location for zipimport.cs In-Reply-To: References: Message-ID: On Tue, Jun 28, 2011 at 10:31 AM, Slide wrote: > I am working on an implementation of zipimport.cs, there are some changes > needed to sys.cs in order to add the zipimporter to sys path_hooks. I > currently have zipimport.cs in the IronPython class library, but am > wondering if I should put it into IronPython.Modules. Are there any > guidelines for this sort of thing? IronPython.dll should not be calling into IronPython.Modules.dll; if it needs to be called from sys.cs, it should go into Languages\IronPython\IronPython\Modules. - Jeff From slide.o.mix at gmail.com Wed Jun 29 07:43:32 2011 From: slide.o.mix at gmail.com (Slide) Date: Tue, 28 Jun 2011 22:43:32 -0700 Subject: [Ironpython-users] location for zipimport.cs In-Reply-To: References: Message-ID: Ok, that was the direction I was going, just wanted to make sure. Thanks Slide On Jun 28, 2011 10:40 PM, "Jeff Hardy" wrote: > On Tue, Jun 28, 2011 at 10:31 AM, Slide wrote: >> I am working on an implementation of zipimport.cs, there are some changes >> needed to sys.cs in order to add the zipimporter to sys path_hooks. I >> currently have zipimport.cs in the IronPython class library, but am >> wondering if I should put it into IronPython.Modules. Are there any >> guidelines for this sort of thing? > > IronPython.dll should not be calling into IronPython.Modules.dll; if > it needs to be called from sys.cs, it should go into > Languages\IronPython\IronPython\Modules. > > - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpeterson at broadwaytechnology.com Wed Jun 29 13:04:07 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 06:04:07 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. :) The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson > wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson > wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpeterson at broadwaytechnology.com Wed Jun 29 13:33:00 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 06:33:00 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> Thanks Markus! Any chance you have any thoughts about why my assembly dll fails to load in ipy given all the referenced assemblies can be loaded (beyond the msvcr80.dll)? Note that I verified that clr.References shows each of these referenced assemblies having been loaded when I test loading them all explicitly. I'm kinda lost. -- Dave -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:26 PM To: Dave Peterson; Curt Hagenlocher; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. :) The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson > wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson > wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at 3s-software.com Wed Jun 29 13:40:11 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Wed, 29 Jun 2011 13:40:11 +0200 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> Message-ID: Hi, Dave, As I wrote, it is not a managed library, and thus cannot be loaded like a .NET library. You can use p/Invoke or cTypes to access it., or write a wrapper library in C++/CLI. Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:33 An: Markus Schaber; Curt Hagenlocher; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Thanks Markus! Any chance you have any thoughts about why my assembly dll fails to load in ipy given all the referenced assemblies can be loaded (beyond the msvcr80.dll)? Note that I verified that clr.References shows each of these referenced assemblies having been loaded when I test loading them all explicitly. I'm kinda lost. -- Dave -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:26 PM To: Dave Peterson; Curt Hagenlocher; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. J The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at 3s-software.com Wed Jun 29 13:25:56 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Wed, 29 Jun 2011 13:25:56 +0200 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> Message-ID: Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. J The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at 3s-software.com Wed Jun 29 15:30:22 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Wed, 29 Jun 2011 15:30:22 +0200 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> Message-ID: Hi, Dave, Do you want to say that ILSpy won't load your assembly.dll, or it won't load MSVCR80.dll? The latter one is a native DLL, not an assembly, and thus cannot be loaded by ILSpy. I re-read the thread, and my current Guess is that the "AddReference" is unable to find your "assembly.dll". Did you specify the assembly name correctly? (Case? Without the ".dll" suffix?) Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 14:32 An: Markus Schaber; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Hi Markus, I am only trying to clr.AddReference() to it because I was advised to try pre-loading all the things my assembly referenced. The MSVCR80.dll is listed as a reference by ILSpy. I'm new to .NET, and don't know if that means I need to pre-load it or not. Definitely if I don't (because I can't seem to find out how to do so) then I still get the same error as before when trying to clr.AddReference() to my assembly even when all the other listed references are pre-loaded. I cannot say that my assembly isn't loading because the MSVCR80.dll isn't found. For all I know the issue is something else. Definitely, the MSVCR80.dll file exists. A C# app that uses the same assembly I'm trying to use runs just fine with no similar assembly loading error -when launched from the same command prompt with the same Windows environment. The issue I'm having is ipy.exe won't load the assembly and I don't know why or how to solve it. See below in the thread for the error messages I've been getting and the code I'm running. Your help is greatly appreciated! -- Dave [Context cut to protect the innocent] -------------- next part -------------- An HTML attachment was scrubbed... URL: From zgramana at pottsconsultinggroup.com Wed Jun 29 15:36:59 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Wed, 29 Jun 2011 09:36:59 -0400 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> Message-ID: <4E0B2A7B.9020100@pottsconsultinggroup.com> On 6/28/2011 9:25 AM, Dave Peterson wrote: > Hello, > I?m relatively new to IronPython and .Net, but reasonably familiar with > Python. I?m trying to write a .py script to use one of my employer?s > .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: > IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll > However, the DLL definitely exists at D:\path\to\my\dll and indeed works > from there using my employer?s app. In the .NET platform, we have a tool called fusionlogw.exe that you can use to troubleshoot your issue. This utility provides additional information on why the CLR cannot load an assembly. It's reasonably easy to use, as well. The official documentation is at http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx From dpeterson at broadwaytechnology.com Wed Jun 29 16:48:23 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 09:48:23 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <4E0B2A7B.9020100@pottsconsultinggroup.com> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <4E0B2A7B.9020100@pottsconsultinggroup.com> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D543344@AUSP01VMBX05.collaborationhost.net> Thanks Zachary, But I'm confused. Doesn't the fact that a C# app loads the assembly just fine mean that the CLR can load it ok? And given that fuslogw is part of VS or Win SDK, I'm thinking it won't help with figuring out why ipy.exe won't. Then again, I can't explain why ipy would be doing anything special to load an assembly either, so it can't hurt to try this tool. I'll see if I can copy fuslogw.exe over from a dev machine to the machine I'm planning to run ipy scripts on (can't install VS or WinSDK there directly.) -- Dave -----Original Message----- From: ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org [mailto:ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org] On Behalf Of Zachary Gramana Sent: Wednesday, June 29, 2011 2:37 PM To: ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? On 6/28/2011 9:25 AM, Dave Peterson wrote: > Hello, > I'm relatively new to IronPython and .Net, but reasonably familiar with > Python. I'm trying to write a .py script to use one of my employer's > .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: > IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll > However, the DLL definitely exists at D:\path\to\my\dll and indeed works > from there using my employer's app. In the .NET platform, we have a tool called fusionlogw.exe that you can use to troubleshoot your issue. This utility provides additional information on why the CLR cannot load an assembly. It's reasonably easy to use, as well. The official documentation is at http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From curt at hagenlocher.org Wed Jun 29 16:55:24 2011 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 29 Jun 2011 07:55:24 -0700 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D543344@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <4E0B2A7B.9020100@pottsconsultinggroup.com> <1BD88FDBEB33C748914B20AA5E8CC6CB791D543344@AUSP01VMBX05.collaborationhost.net> Message-ID: If the C# app is in the same directory as the assembly you're trying to load from Python, it would automatically find dependent assemblies in that directory. ipy.exe probably isn't in that directory, so the managed loader (which is largely driven by the directory containing the launching executable, though that is something of an oversimplification) wouldn't find it. I'd forgotten fuslogvw.exe, but that's usually the penultimate thing I do when troubleshooting loading problems. On Wed, Jun 29, 2011 at 7:48 AM, Dave Peterson < dpeterson at broadwaytechnology.com> wrote: > Thanks Zachary, > > But I'm confused. Doesn't the fact that a C# app loads the assembly just > fine mean that the CLR can load it ok? And given that fuslogw is part of > VS or Win SDK, I'm thinking it won't help with figuring out why ipy.exe > won't. Then again, I can't explain why ipy would be doing anything special > to load an assembly either, so it can't hurt to try this tool. > > I'll see if I can copy fuslogw.exe over from a dev machine to the machine > I'm planning to run ipy scripts on (can't install VS or WinSDK there > directly.) > > > -- Dave > > > -----Original Message----- > From: ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org[mailto: > ironpython-users-bounces+dpeterson=broadwaytechnology.com at python.org] On > Behalf Of Zachary Gramana > Sent: Wednesday, June 29, 2011 2:37 PM > To: ironpython-users at python.org > Subject: Re: [Ironpython-users] Assembly references: file does not exist? > > On 6/28/2011 9:25 AM, Dave Peterson wrote: > > Hello, > > I'm relatively new to IronPython and .Net, but reasonably familiar with > > Python. I'm trying to write a .py script to use one of my employer's > > .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an > error: > > IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll > > However, the DLL definitely exists at D:\path\to\my\dll and indeed works > > from there using my employer's app. > > In the .NET platform, we have a tool called fusionlogw.exe that you can > use to troubleshoot your issue. This utility provides additional > information on why the CLR cannot load an assembly. It's reasonably easy > to use, as well. The official documentation is at > http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zgramana at pottsconsultinggroup.com Wed Jun 29 17:00:03 2011 From: zgramana at pottsconsultinggroup.com (Zachary Gramana) Date: Wed, 29 Jun 2011 11:00:03 -0400 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D543344@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <4E0B2A7B.9020100@pottsconsultinggroup.com> <1BD88FDBEB33C748914B20AA5E8CC6CB791D543344@AUSP01VMBX05.collaborationhost.net> Message-ID: <4E0B3DF3.9060208@pottsconsultinggroup.com> On 6/29/2011 10:48 AM, Dave Peterson wrote: > But I'm confused. Doesn't the fact that a C# app loads the assembly just fine mean that the CLR can load it ok? Not necessarily. This is a complicated topic in .NET development, and is beyond what I can bang out in a quick email. Here are some links that you might find helpful: "How the Runtime Locates Assemblies" http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx "Tips for debugging assembly load/bind errors, strong name problems, and manual IL code changes" http://social.msdn.microsoft.com/Forums/en/clr/thread/4cbff9e8-758e-4c0c-9997-2e656f3eb22d > And given that fuslogw is part of VS or Win SDK, I'm thinking it won't help with figuring out why ipy.exe won't. >Then again, I can't explain why ipy would be doing anything special to load an assembly either, so it can't hurt to try this tool. ipy runs on the CLR, so the CLR is responsible for loading assemblies. fusionlogw allows you to get more information about all CLR binding errors (i.e. assembly load errors) on a machine, so it works with ipy. From dpeterson at broadwaytechnology.com Wed Jun 29 13:49:21 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 06:49:21 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> Hi Markus, But *I* don't need to access it, only the assembly I'm trying to load does. Surely you're not suggesting that I wrap that DLL so a pre-built assembly (linked with that DLL!) can call into it? -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:40 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As I wrote, it is not a managed library, and thus cannot be loaded like a .NET library. You can use p/Invoke or cTypes to access it., or write a wrapper library in C++/CLI. Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:33 An: Markus Schaber; Curt Hagenlocher; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Thanks Markus! Any chance you have any thoughts about why my assembly dll fails to load in ipy given all the referenced assemblies can be loaded (beyond the msvcr80.dll)? Note that I verified that clr.References shows each of these referenced assemblies having been loaded when I test loading them all explicitly. I'm kinda lost. -- Dave -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:26 PM To: Dave Peterson; Curt Hagenlocher; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. :) The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson > wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson > wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at 3s-software.com Wed Jun 29 14:22:11 2011 From: m.schaber at 3s-software.com (Markus Schaber) Date: Wed, 29 Jun 2011 14:22:11 +0200 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> Message-ID: Hi, Dave, If you (rsp. your scripts) do not need to access the MSVCRT80.dll, why do you want to AddReference() it? So if I understand correctly: You want to load an assembly which depends on the native MSVCRT80.dll, and that former assembly does not load because the latter native library is not found? Some points to check: - Is the MSVCRT80.dll in the library search path? - Can your assembly.dll be loaded via "normal" .NET means (e. G. C# code)? Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:49 An: Markus Schaber; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Hi Markus, But *I* don't need to access it, only the assembly I'm trying to load does. Surely you're not suggesting that I wrap that DLL so a pre-built assembly (linked with that DLL!) can call into it? -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:40 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As I wrote, it is not a managed library, and thus cannot be loaded like a .NET library. You can use p/Invoke or cTypes to access it., or write a wrapper library in C++/CLI. Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:33 An: Markus Schaber; Curt Hagenlocher; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Thanks Markus! Any chance you have any thoughts about why my assembly dll fails to load in ipy given all the referenced assemblies can be loaded (beyond the msvcr80.dll)? Note that I verified that clr.References shows each of these referenced assemblies having been loaded when I test loading them all explicitly. I'm kinda lost. -- Dave -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:26 PM To: Dave Peterson; Curt Hagenlocher; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. J The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpeterson at broadwaytechnology.com Wed Jun 29 14:32:12 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 07:32:12 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> Hi Markus, I am only trying to clr.AddReference() to it because I was advised to try pre-loading all the things my assembly referenced. The MSVCR80.dll is listed as a reference by ILSpy. I'm new to .NET, and don't know if that means I need to pre-load it or not. Definitely if I don't (because I can't seem to find out how to do so) then I still get the same error as before when trying to clr.AddReference() to my assembly even when all the other listed references are pre-loaded. I cannot say that my assembly isn't loading because the MSVCR80.dll isn't found. For all I know the issue is something else. Definitely, the MSVCR80.dll file exists. A C# app that uses the same assembly I'm trying to use runs just fine with no similar assembly loading error -when launched from the same command prompt with the same Windows environment. The issue I'm having is ipy.exe won't load the assembly and I don't know why or how to solve it. See below in the thread for the error messages I've been getting and the code I'm running. Your help is greatly appreciated! -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 1:22 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, If you (rsp. your scripts) do not need to access the MSVCRT80.dll, why do you want to AddReference() it? So if I understand correctly: You want to load an assembly which depends on the native MSVCRT80.dll, and that former assembly does not load because the latter native library is not found? Some points to check: - Is the MSVCRT80.dll in the library search path? - Can your assembly.dll be loaded via "normal" .NET means (e. G. C# code)? Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:49 An: Markus Schaber; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Hi Markus, But *I* don't need to access it, only the assembly I'm trying to load does. Surely you're not suggesting that I wrap that DLL so a pre-built assembly (linked with that DLL!) can call into it? -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:40 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As I wrote, it is not a managed library, and thus cannot be loaded like a .NET library. You can use p/Invoke or cTypes to access it., or write a wrapper library in C++/CLI. Gr??e, Markus Von: Dave Peterson [mailto:dpeterson at broadwaytechnology.com] Gesendet: Mittwoch, 29. Juni 2011 13:33 An: Markus Schaber; Curt Hagenlocher; ironpython-users at python.org Betreff: RE: [Ironpython-users] Assembly references: file does not exist? Thanks Markus! Any chance you have any thoughts about why my assembly dll fails to load in ipy given all the referenced assemblies can be loaded (beyond the msvcr80.dll)? Note that I verified that clr.References shows each of these referenced assemblies having been loaded when I test loading them all explicitly. I'm kinda lost. -- Dave -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 12:26 PM To: Dave Peterson; Curt Hagenlocher; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, As far as I know, the MSVCR (MicroSoft Visual C Runtime) library is not a managed library, but a native library. Thus, it cannot be loaded like a .NET library, and ILSpy cannot parse it. Gr??e, Markus Von: ironpython-users-bounces+m.schaber=3s-software.com at python.org [mailto:ironpython-users-bounces+m.schaber=3s-software.com at python.org] Im Auftrag von Dave Peterson Gesendet: Mittwoch, 29. Juni 2011 13:04 An: Curt Hagenlocher; ironpython-users at python.org Betreff: Re: [Ironpython-users] Assembly references: file does not exist? Thanks Curt. ILSpy shows only the following references for my assembly dll. // mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MSVCR80.dll // I can use 'clr.AddReference' to load all of them in ipy just fine EXCEPT for the listed MSVCR80.dll. Is the VS 2005 C runtime really an assembly or does this reference mean something else? (Sorry for being a .NET noob) Definitely no matter what paths I append or insert to the front of sys.path, or add the the windows env PATH -AND- no matter how I try to load this DLL using clr., it refuses to load and I just get an error. FWIW, if I try to load the msvcr80.dll directly in ILSpy, it displays an error about "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. However, I don't believe the file is corrupt as I've tried the same on other versions of msvcr80.dll on my system and they all give this error though the programs the dll files are in seem to run just fine. I'm guessing this isn't an 'assembly'. :) The other thing I note is that there appears to be an empty line in the references. Could this be causing the error I'm seeing? ILSpy seems to show in the tree under references a blank tree item that corresponds to this, so perhaps ipy's clr is just not coping well with this? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Wednesday, June 29, 2011 2:12 AM To: Dave Peterson; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Arg; I see we've now adopted the annoying python.org convention of replies not going to the list by default. :( You can use ILDASM, ILSpy or Reflector to see what assemblies yours is dependent on. Now that Reflector costs money, ILSpy is probably the best option for a quick check (though Reflector may be worth paying for if you do a lot of .NET development). On Tue, Jun 28, 2011 at 8:52 AM, Dave Peterson > wrote: Hi Curt, I had actually tried ( 1 ) below first. That is, change my sample code to this: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReference('dll') Which, while it changes the error message, still fails. Here's the new error message: IOError: System.IO.IOException: Could not add reference to assembly dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction'2.Run(InterpretedFrame frame) .... I've tried ( 2 ) as well, and while some of the known dependencies load successfully - showing that the process works - some do not. This could mean I'm confused on my dependencies - is there a tool which will show what assemblies a given assembly requires? -- Dave From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Tuesday, June 28, 2011 3:11 PM To: Dave Peterson Subject: Re: [Ironpython-users] Assembly references: file does not exist? .NET doesn't generally load dependent assemblies just because they're in the same directory from which you're doing a LoadFrom. I seem to recall that there are two ways of handling this: 1) Add the directory to sys.path and then use clr.AddReference (without the full path) 2) Explicitly load the dependencies first before loading the dependents. On Tue, Jun 28, 2011 at 6:25 AM, Dave Peterson > wrote: Hello, I'm relatively new to IronPython and .Net, but reasonably familiar with Python. I'm trying to write a .py script to use one of my employer's .NET dlls but whenever I try to AddReferenceToFileAndPath() I get an error: IOError: System.IO.IOException: file does not exists: D:\path\to\my\dll However, the DLL definitely exists at D:\path\to\my\dll and indeed works from there using my employer's app. I'm using the newest IronPython (just downloaded from the site and installed today using the installer): IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.225 My latest attempted code is as below, though I've tried a lot of various combinations: import sys sys.path.append(r"D:\path\to\my") import clr clr.AddReferenceToFileAndPath(r"D:\path\to\my\dll") That last line raises the exception mentioned above with a stack trace where the first two lines are both from the IronPython's ClrModule. I may be barking up the wrong tree here, but it leads me to believe that my entry DLL is trying to load another DLL and the system can't find the other one, even though it is in the same directory as the first dll. Here's the first two lines of the stack trace (I can't copy'n'paste off the work machine where this is happening due to security constraints.) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) Thanks in advance, -- Dave _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpeterson at broadwaytechnology.com Wed Jun 29 16:31:56 2011 From: dpeterson at broadwaytechnology.com (Dave Peterson) Date: Wed, 29 Jun 2011 09:31:56 -0500 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> Message-ID: <1BD88FDBEB33C748914B20AA5E8CC6CB791D54332D@AUSP01VMBX05.collaborationhost.net> Hi Markus, ILSpy loads my assembly dll just fine. As does a C# app. Only ipy.exe complains about an error. I think the missing file error is bogus and something else is going on. But I'm not sure what. Hopefully the below code and output will explain the situation better than English verbiage. Note that I verify the file actually exists very earlier in the script! -- Dave IN test.py: #!/bin/python import clr import os import sys FULLPATH = r"D:\path\to\my\Assembley.Net.dll" if os.path.exists(FULLPATH): pathDir = os.path.dirname(FULLPATH) pathBase = os.path.basename(FULLPATH) # First load all assemblies ours depends on. for dep in ["mscorlib", "Microsoft.VisualC", "System", "System.Windows.Forms", "System.Data", ]: clr.AddReference(dep) print 'After %s: clr.References=%s' % (dep, clr.References) # Now try our assembly try: print 'Trying AddReferenceToFileAndPath(%s)' % FULLPATH clr.AddReferenceToFileAndPath(FULLPATH) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' try: print 'Trying AddReference(%s)' % pathBase clr.AddReference(pathBase) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' # Now try with the dir to the assembly DLL on sys.path sys.path.append(pathDir) try: print 'Trying AddReferenceToFileAndPath(%s)' % FULLPATH clr.AddReferenceToFileAndPath(FULLPATH) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' try: print 'Trying AddReference(%s)' % pathBase clr.AddReference(pathBase) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' else: print '%s does not exist' % FULLPATH SAMPLE OUTPUT: D:\src\local>ipy test.py After mscorlib: clr.References=(, , ) After Microsoft.VisualC: clr.References=(, , , ) After System: clr.References=(, , , ) After System.Windows.Forms: clr.References=(, , , , ) After System.Data: clr.References=(, , , , , ) Trying AddReferenceToFileAndPath(D:\path\to\my\Assembley.Net.dll) FAILED! Exception=System.IO.IOException: file does not exist: D:\path\to\my\Assembley.Net.dll at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReference(Assembly.Net.dll) FAILED! Exception=System.IO.IOException: Could not add reference to assembly Assembly.Net.dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReferenceToFileAndPath(D:\path\to\my\Assembley.Net.dll) FAILED! Exception=System.IO.IOException: file does not exist: D:\path\to\my\Assembley.Net.dll at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReference(Assembly.Net.dll) FAILED! Exception=System.IO.IOException: Could not add reference to assembly Assembly.Net.dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) D:\src\local> -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 2:30 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, Do you want to say that ILSpy won't load your assembly.dll, or it won't load MSVCR80.dll? The latter one is a native DLL, not an assembly, and thus cannot be loaded by ILSpy. I re-read the thread, and my current Guess is that the "AddReference" is unable to find your "assembly.dll". Did you specify the assembly name correctly? (Case? Without the ".dll" suffix?) Gr??e, Markus [Context cut to protect the innocent] -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Jun 29 18:33:42 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 29 Jun 2011 09:33:42 -0700 Subject: [Ironpython-users] SQLite3 In-Reply-To: <1309209989.2017.9.camel@steve-EP35C-DS3R> References: <1309209989.2017.9.camel@steve-EP35C-DS3R> Message-ID: You should be able to use IronPython.SQLite (https://bitbucket.org/jdhardy/ironpython.sqlite/). There's a 2.7-compatible build on the downloads page. It's not 100% compatible with CPython sqlite, but it's pretty darn close. - Jeff On Mon, Jun 27, 2011 at 2:26 PM, Steve Baugh wrote: > I am trying to port a Linux Python program to IronPython and WPF. This > program makes use of sqlite3. I am not trying to use data aware contols, > I just want to issue SQL commands and get the results from SELECT > statements. > > I have been getting conflicting, and in some cases contradictory, > information from my web searches. > > Has anyone done this with IronPython 2.7 on .NET 4? I am am using > SharpStudio in Windows 7 64 bit (but I am not trying to build a 64 bit > application). > > Thanks, > > Steve > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From jdhardy at gmail.com Wed Jun 29 18:36:06 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 29 Jun 2011 09:36:06 -0700 Subject: [Ironpython-users] Building a COM server with IronPython 2.7 In-Reply-To: <9E3F9A88A3F4A54F81C9BC47D87A17A401F172F0@P2PXMB01S1.fccnet.win.fcc.gov> References: <9E3F9A88A3F4A54F81C9BC47D87A17A401F172F0@P2PXMB01S1.fccnet.win.fcc.gov> Message-ID: On Tue, Jun 28, 2011 at 10:57 AM, Jamal Mazrui wrote: > In the past, I have built a COM server with C# and the RegAsm.exe utility of > the .NET Framework.? If I use pyc.py to create a DLL with IronPython, will I > be able to build a COM server in a similar manner?? Are there any particular > issues to be aware of? It's unlikely that it will work. pyc.py doesn't generate assemblies that can be used directly by other .NET programs (i.e., they're not CLS-compliant). You should be able to write a very thin shim in C# that hosts IronPython and stores the python files as resources, and then register the shim with regasm.exe. - Jeff From jdhardy at gmail.com Wed Jun 29 18:44:03 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 29 Jun 2011 09:44:03 -0700 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D54332D@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54332D@AUSP01VMBX05.collaborationhost.net> Message-ID: Hi Dave, Are you running on a 64-bit OS by any chance? Is the Assembly.Net.dll a x64 assembly? (the fact that it depends on the native runtime leads me to think it's not an AnyCPU assembly.) If so, can you try running it with ipy64.exe instead of ipy.exe? I'm kind of reaching, here, because if this is the case you should be getting a BadImageFormatException, not an IOException, but it's worth a shot. - Jeff On Wed, Jun 29, 2011 at 7:31 AM, Dave Peterson wrote: > Hi Markus, > > > > ILSpy loads my assembly dll just fine.? As does a C# app.?? Only ipy.exe > complains about an error. > > > > I think the missing file error is bogus and something else is going on. > But I?m not sure what.?? Hopefully the below code and output will explain > the situation better than English verbiage.? Note that I verify the file > actually exists very earlier in the script! > > > > -- Dave From stephen.baugh1 at ntlworld.com Thu Jun 30 05:00:34 2011 From: stephen.baugh1 at ntlworld.com (Steve Baugh) Date: Thu, 30 Jun 2011 04:00:34 +0100 Subject: [Ironpython-users] SQLite3 In-Reply-To: References: <1309209989.2017.9.camel@steve-EP35C-DS3R> Message-ID: <1309402834.2765.3.camel@steve-EP35C-DS3R> Jeff, Thank you for your reply. I have downloaded IronPython.SQLite-2.7.0_ipy-2.7_clr-v4.0.zip but can't make it work. I have put the IronPython.SQLite.dll in the DLLs folder and put the sqlite3 folder under Lib. When I try: import sqlite3 in either ipy or ipy64 I get: ImportError: No module named _sqlite3 I have put copies of sqlite.dll in both the IronPython 2.7 folder and the DLLs folder. When I import clr and try clr.AddReference("IronPython.SQLite") it seems to add the refrence (when the default path is right) but I still get the No module named _sqlite3 error with an import statement. The IronPython 2.7 installed to Program Files (x86) as it is a 64 bit system. I have also tried with with a Win XP 32 bit system. I am encouraged that you said it should work, but I seem to be doing something wrong.... Steve On Wed, 2011-06-29 at 09:33 -0700, Jeff Hardy wrote: > You should be able to use IronPython.SQLite > (https://bitbucket.org/jdhardy/ironpython.sqlite/). There's a > 2.7-compatible build on the downloads page. It's not 100% compatible > with CPython sqlite, but it's pretty darn close. > > - Jeff > > On Mon, Jun 27, 2011 at 2:26 PM, Steve Baugh > wrote: > > I am trying to port a Linux Python program to IronPython and WPF. This > > program makes use of sqlite3. I am not trying to use data aware contols, > > I just want to issue SQL commands and get the results from SELECT > > statements. > > > > I have been getting conflicting, and in some cases contradictory, > > information from my web searches. > > > > Has anyone done this with IronPython 2.7 on .NET 4? I am am using > > SharpStudio in Windows 7 64 bit (but I am not trying to build a 64 bit > > application). > > > > Thanks, > > > > Steve > > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > From jdhardy at gmail.com Thu Jun 30 06:00:02 2011 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 29 Jun 2011 21:00:02 -0700 Subject: [Ironpython-users] SQLite3 In-Reply-To: <1309402834.2765.3.camel@steve-EP35C-DS3R> References: <1309209989.2017.9.camel@steve-EP35C-DS3R> <1309402834.2765.3.camel@steve-EP35C-DS3R> Message-ID: Hi Steve, Please download a new copy of the file. The old one was built against a beta version of IronPython 2.7. It works in my quick testing. - Jeff On Wed, Jun 29, 2011 at 8:00 PM, Steve Baugh wrote: > > Jeff, > > Thank you for your reply. > > I have downloaded > > IronPython.SQLite-2.7.0_ipy-2.7_clr-v4.0.zip > > but can't make it work. > > I have put the IronPython.SQLite.dll in the DLLs folder and put the > sqlite3 folder under Lib. > > When I try: > > import sqlite3 > > in either ipy or ipy64 I get: > > ImportError: No module named _sqlite3 > > I have put copies of sqlite.dll in both the IronPython 2.7 folder and > the DLLs folder. > > When I import clr and try clr.AddReference("IronPython.SQLite") it seems > to add the refrence (when the default path is right) but I still get the > No module named _sqlite3 error with an import statement. > > The IronPython 2.7 installed to Program Files (x86) as it is a 64 bit > system. I have also tried with with a Win XP 32 bit system. > > I am encouraged that you said it should work, but I seem to be doing > something wrong.... > > Steve > On Wed, 2011-06-29 at 09:33 -0700, Jeff Hardy wrote: >> You should be able to use IronPython.SQLite >> (https://bitbucket.org/jdhardy/ironpython.sqlite/). There's a >> 2.7-compatible build on the downloads page. It's not 100% compatible >> with CPython sqlite, but it's pretty darn close. >> >> - Jeff >> >> On Mon, Jun 27, 2011 at 2:26 PM, Steve Baugh >> wrote: >> > I am trying to port a Linux Python program to IronPython and WPF. This >> > program makes use of sqlite3. I am not trying to use data aware contols, >> > I just want to issue SQL commands and get the results from SELECT >> > statements. >> > >> > I have been getting conflicting, and in some cases contradictory, >> > information from my web searches. >> > >> > Has anyone done this with IronPython 2.7 on .NET 4? I am am using >> > SharpStudio in Windows 7 64 bit (but I am not trying to build a 64 bit >> > application). >> > >> > Thanks, >> > >> > Steve >> > >> > _______________________________________________ >> > Ironpython-users mailing list >> > Ironpython-users at python.org >> > http://mail.python.org/mailman/listinfo/ironpython-users >> > > > > From wolfgang.grinfeld at credit-suisse.com Thu Jun 30 08:56:08 2011 From: wolfgang.grinfeld at credit-suisse.com (Grinfeld Wolfgang (KVYS 1)) Date: Thu, 30 Jun 2011 08:56:08 +0200 Subject: [Ironpython-users] Assembly references: file does not exist? In-Reply-To: <1BD88FDBEB33C748914B20AA5E8CC6CB791D54332D@AUSP01VMBX05.collaborationhost.net> References: <1BD88FDBEB33C748914B20AA5E8CC6CB791CAA32B4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791CAA3345@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791D54329F@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A2@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791D5432A4@AUSP01VMBX05.collaborationhost.net><1BD88FDBEB33C748914B20AA5E8CC6CB791D5432B4@AUSP01VMBX05.collaborationhost.net> <1BD88FDBEB33C748914B20AA5E8CC6CB791D54332D@AUSP01VMBX05.collaborationhost.net> Message-ID: <921B048B28DCE048B2E2E365B6B86A18787667@chsa8223.share.beluni.net> Hi Dave, I am not sure what the underlying problem is, but it may be better to start in C# and call Python from this environment, if you are going to mix languages. Following works in my Silverlight app, so it will need small changes to get it working in .net 4.0. Loading the dlls this way worked better for me than loading them in Python directly for some reason. public class ScriptData { public ScriptRuntimeSetup setup { get; set; } public ScriptRuntime runtime { get; set; } public ScriptEngine pe { get; set; } public ScriptScope scope { get; set; } public dynamic codeBehindPage { get; set; } internal ScriptData(string code, string xaml, DynamicPageContentLoader dynamicPageContentLoaderInstance) { setup = Python.CreateRuntimeSetup(null); setup.HostType = typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost); setup.Options["SearchPaths"] = new string[] { string.Empty }; runtime = new ScriptRuntime(setup); pe = Python.GetEngine(runtime); // load platform assemblies so you don't need to call LoadAssembly in script code. foreach (string name in new string[] { "mscorlib" , "System" , "System.Windows" , "System.Windows.Browser" , "System.Net" , "Microsoft.Scripting" , "Microsoft.Scripting.Silverlight" }) { runtime.LoadAssembly(runtime.Host.PlatformAdaptationLayer.LoadAssembly(name)); } runtime.LoadAssembly(typeof(Page).Assembly); runtime.LoadAssembly(typeof(VisualTreeHelper).Assembly); runtime.LoadAssembly(typeof(Microsoft.Scripting.Silverlight.BrowserScriptHost).Assembly); pe.ImportModule("clrtype"); pe.ImportModule("pyevent"); scope = pe.CreateScope(); ScriptSource codeSource = pe.CreateScriptSourceFromString(code, SourceCodeKind.Statements); codeSource.Execute(scope); dynamic start = scope.GetVariable("start"); start(xaml, this, dynamicPageContentLoaderInstance); } } ________________________________ From: ironpython-users-bounces+wolfgang.grinfeld=credit-suisse.com at python.org [mailto:ironpython-users-bounces+wolfgang.grinfeld=credit-suisse.com at python.org] On Behalf Of Dave Peterson Sent: Mittwoch, 29. Juni 2011 16:32 To: Markus Schaber; ironpython-users at python.org Subject: Re: [Ironpython-users] Assembly references: file does not exist? Hi Markus, ILSpy loads my assembly dll just fine. As does a C# app. Only ipy.exe complains about an error. I think the missing file error is bogus and something else is going on. But I'm not sure what. Hopefully the below code and output will explain the situation better than English verbiage. Note that I verify the file actually exists very earlier in the script! -- Dave IN test.py: #!/bin/python import clr import os import sys FULLPATH = r"D:\path\to\my\Assembley.Net.dll" if os.path.exists(FULLPATH): pathDir = os.path.dirname(FULLPATH) pathBase = os.path.basename(FULLPATH) # First load all assemblies ours depends on. for dep in ["mscorlib", "Microsoft.VisualC", "System", "System.Windows.Forms", "System.Data", ]: clr.AddReference(dep) print 'After %s: clr.References=%s' % (dep, clr.References) # Now try our assembly try: print 'Trying AddReferenceToFileAndPath(%s)' % FULLPATH clr.AddReferenceToFileAndPath(FULLPATH) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' try: print 'Trying AddReference(%s)' % pathBase clr.AddReference(pathBase) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' # Now try with the dir to the assembly DLL on sys.path sys.path.append(pathDir) try: print 'Trying AddReferenceToFileAndPath(%s)' % FULLPATH clr.AddReferenceToFileAndPath(FULLPATH) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' try: print 'Trying AddReference(%s)' % pathBase clr.AddReference(pathBase) print '\tWORKED! clr.References=%s' % clr.References except IOError as e: print '\tFAILED! Exception=%s' % e print '' else: print '%s does not exist' % FULLPATH SAMPLE OUTPUT: D:\src\local>ipy test.py After mscorlib: clr.References=(, , ) After Microsoft.VisualC: clr.References=(, , , ) After System: clr.References=(, , , ) After System.Windows.Forms: clr.References=(, , , , ) After System.Data: clr.References=(, , , , , ) Trying AddReferenceToFileAndPath(D:\path\to\my\Assembley.Net.dll) FAILED! Exception=System.IO.IOException: file does not exist: D:\path\to\my\Assembley.Net.dll at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReference(Assembly.Net.dll) FAILED! Exception=System.IO.IOException: Could not add reference to assembly Assembly.Net.dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReferenceToFileAndPath(D:\path\to\my\Assembley.Net.dll) FAILED! Exception=System.IO.IOException: file does not exist: D:\path\to\my\Assembley.Net.dll at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String file) at IronPython.Runtime.ClrModule.AddReferenceToFileAndPath(CodeContext context, String[] files) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) Trying AddReference(Assembly.Net.dll) FAILED! Exception=System.IO.IOException: Could not add reference to assembly Assembly.Net.dll at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object reference) at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references) at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) D:\src\local> -- Dave From: Markus Schaber [mailto:m.schaber at 3s-software.com] Sent: Wednesday, June 29, 2011 2:30 PM To: Dave Peterson; ironpython-users at python.org Subject: AW: [Ironpython-users] Assembly references: file does not exist? Hi, Dave, Do you want to say that ILSpy won't load your assembly.dll, or it won't load MSVCR80.dll? The latter one is a native DLL, not an assembly, and thus cannot be loaded by ILSpy. I re-read the thread, and my current Guess is that the "AddReference" is unable to find your "assembly.dll". Did you specify the assembly name correctly? (Case? Without the ".dll" suffix?) Gr??e, Markus [Context cut to protect the innocent] -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Jun 30 12:27:29 2011 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 30 Jun 2011 03:27:29 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 6/29/2011 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] compile('#foo\n', '', 'single') throws null ref exception 2. [New issue] compile('#foo\n', '', 'single') throws null ref exception 3. [New issue] compile('#foo\n', '', 'single') throws null ref exception ---------------------------------------------- ISSUES 1. [New issue] compile('#foo\n', '', 'single') throws null ref exception http://ironpython.codeplex.com/workitem/30940 User dinov has proposed the issue: "compile('#foo\n', '', 'single') IronPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in SystemError: Object reference not set to an instance of an object. CPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in File "", line 1 #foo ^ SyntaxError: unexpected EOF while parsing"----------------- 2. [New issue] compile('#foo\n', '', 'single') throws null ref exception http://ironpython.codeplex.com/workitem/30941 User dinov has proposed the issue: "compile('#foo\n', '', 'single') IronPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in SystemError: Object reference not set to an instance of an object. CPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in File "", line 1 #foo ^ SyntaxError: unexpected EOF while parsing"----------------- 3. [New issue] compile('#foo\n', '', 'single') throws null ref exception http://ironpython.codeplex.com/workitem/30942 User dinov has proposed the issue: "compile('#foo\n', '', 'single') IronPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in SystemError: Object reference not set to an instance of an object. CPython: >>> compile('#foo\n', '', 'single') Traceback (most recent call last): File "", line 1, in File "", line 1 #foo ^ SyntaxError: unexpected EOF while parsing" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: