From christopher at baus.net Wed Nov 1 18:50:26 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 1 Nov 2006 17:50:26 -0000 (GMT) Subject: [IronPython] Rewrite of WSGI handler In-Reply-To: References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> Message-ID: <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> I spent the night hacking on the WSGI handler. Frankly the performance I was getting wasn't very good, and I'm making a grab at some low hanging fruit. Primarily the changes involves loading IronPython and the modules once at startup (rather than per instance). The code is a bit strange because to get the application's physical root you have to wait until a request is handled, so the first handler does most of the work. I had to put some thread synchronization in there for this reason. I hated to do that as it creates contention on every request, but I tried to keep the synchronization block short. It might be worthwhile to pass the lib path in via an appSettings parameter to avoid this contention. The tradeoff is more configuration for improved performance. This could make a difference on loaded servers (if we get that far). I also refactored the two seperate handlers into one, which is now configured via the appSettings in the web.config. I also changed the way the Python WSGI app modules are loaded. I don't dynamically load modules based on the path. Instead the module is specified in the appSettings. This is similar to how mod_python works. I think this maps more closely to how WSGI frameworks view themselves. Most handle their own dispatching and expect to be the application root. Plus the previous method made it difficult to set the SCRIPT_NAME WSGI environ variable correctly. This is important for dispatching to work correctly with most WSGI frameworks. I am now also loading site.py (which allowed me to load in my codecs hack). I'm looking for feedback and bug reports, and I'd like to roll this into IPCE. I setup a local subversion repo with anonymous checkout for my changes here: http://svn3.cvsdude.com/baus/s2/ The performance is a bit better, but still not where I want to be. I'll need to look around for some other obvious problems. Thanks, Christopher http://baus.net/ From fuzzyman at voidspace.org.uk Thu Nov 2 01:16:44 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 02 Nov 2006 00:16:44 +0000 Subject: [IronPython] IronPython, Unmanaged Code and Ascii Art Message-ID: <454938EC.2040407@voidspace.org.uk> Hello all, I've just posted another IronPython example to my blog. I thought you might like to know. Windows only this one, as it uses umanaged code. IronPython, Unmanaged Code and Ascii Art http://www.voidspace.org.uk/python/weblog/arch_d7_2006_10_28.shtml#e530 The main point of the post is how to use IronPython to create funky pixel art, but along the way it illustrates : * Taking a screenshot with IronPython * Creating a class in C# and using it from IronPython * Using unmanaged code from IronPython and C# All the best, Michael Foord http://www.voidspace.org.uk -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.13.21/509 - Release Date: 31/10/2006 From kevin.gadd at gmail.com Thu Nov 2 02:26:11 2006 From: kevin.gadd at gmail.com (Kevin Gadd) Date: Wed, 1 Nov 2006 17:26:11 -0800 Subject: [IronPython] No use Process.Start() , How to execute these command line? In-Reply-To: <8c8dcbe30610302252m7ee24084x6736147f3aa99bcb@mail.gmail.com> References: <8c8dcbe30610302252m7ee24084x6736147f3aa99bcb@mail.gmail.com> Message-ID: Try invoking cmd.exe with Process.Start and either passing it a .bat file that executes the desired commands or feeding it input via stdin. There's no real easier way to do this due to the complexity of executing multiple command line statements - you'll probably find that SET won't even work unless you're running a cmd session. The total code necessary to do this is about 20-30 lines at most (I do it all the time), so you should be able to wrap it up in a function once and never worry about it again. On 10/30/06, Kevien Lee wrote: > > Hi,guys > I want to excute some command line to get CVS information.But use the > Process.Start() is very burden . > > Now,if i want to do like these: > > set path=C:\Program Files\WinCvs\cvsnt > set CVSROOT=:pserver:test:test123 at 192.168.0.4:2401:/test/CVS > > CVS status -d "E:\Project\Test\Test\Document" > > It could i use ironpython make it simple? > > Thanks > Kevien > > _______________________________________________ > 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 mark.john.rees at gmail.com Thu Nov 2 06:31:50 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Thu, 2 Nov 2006 16:31:50 +1100 Subject: [IronPython] Rewrite of WSGI handler In-Reply-To: <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> Message-ID: Nice job Christopher. I have no problem with combining WSGI and WSGI-SI into one handler. Also testing with my simple wsgi apps under your code and xsp2 works ok so far. Have a more complex app which I will try later tonight. In wsgi.py you comment "There isn't an obvious way to get request protocol from HTTPRequest object". In the wsgi.py under fepy CVS that was checked in after IPCEr3 I used request.ServerVariables['SERVER_PROTOCOL'] which seems to return the correct string. Yes performance under mono and xsp2 is not the best, I am hoping that using mod_mono may improve it but haven't had the time to set this up yet. Running under IIS seems alot faster. Mark On 11/2/06, Christopher Baus wrote: > > > I spent the night hacking on the WSGI handler. Frankly the performance I > was getting wasn't very good, and I'm making a grab at some low hanging > fruit. Primarily the changes involves loading IronPython and the modules > once at startup (rather than per instance). > > The code is a bit strange because to get the application's physical root > you have to wait until a request is handled, so the first handler does > most of the work. I had to put some thread synchronization in there for > this reason. I hated to do that as it creates contention on every > request, but I tried to keep the synchronization block short. > > It might be worthwhile to pass the lib path in via an appSettings > parameter to avoid this contention. The tradeoff is more configuration > for improved performance. This could make a difference on loaded servers > (if we get that far). > > I also refactored the two seperate handlers into one, which is now > configured via the appSettings in the web.config. I also changed the way > the Python WSGI app modules are loaded. I don't dynamically load modules > based on the path. Instead the module is specified in the appSettings. > This is similar to how mod_python works. I think this maps more closely > to how WSGI frameworks view themselves. Most handle their own dispatching > and expect to be the application root. > > Plus the previous method made it difficult to set the SCRIPT_NAME WSGI > environ variable correctly. This is important for dispatching to work > correctly with most WSGI frameworks. > > I am now also loading site.py (which allowed me to load in my codecs > hack). > > I'm looking for feedback and bug reports, and I'd like to roll this into > IPCE. I setup a local subversion repo with anonymous checkout for my > changes here: http://svn3.cvsdude.com/baus/s2/ > > The performance is a bit better, but still not where I want to be. I'll > need to look around for some other obvious problems. > > Thanks, > > Christopher > http://baus.net/ > > _______________________________________________ > 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 christopher at baus.net Thu Nov 2 07:46:23 2006 From: christopher at baus.net (Christopher Baus) Date: Thu, 2 Nov 2006 06:46:23 -0000 (GMT) Subject: [IronPython] Rewrite of WSGI handler In-Reply-To: References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> Message-ID: <1610.24.182.26.162.1162449983.squirrel@webmail.tuffmail.net> > In wsgi.py you comment "There isn't an obvious way to get request protocol > from HTTPRequest object". In the wsgi.py under fepy CVS that was checked > in > after IPCEr3 I used request.ServerVariables['SERVER_PROTOCOL'] which seems > to return the correct string. Mark, I updated my code to look more like yours, but I got the incorrect result for the SERVER_PROTOCOL from XSP2. I documented that in my code. I am setting SCRIPT_NAME, PATH_INFO, and SERVER_SOFTWARE manually to work with the rootpath which I pass in from the appSettings. http://baus.net/ From christopher at baus.net Thu Nov 2 18:29:37 2006 From: christopher at baus.net (Christopher Baus) Date: Thu, 2 Nov 2006 17:29:37 -0000 (GMT) Subject: [IronPython] Rewrite of WSGI handler In-Reply-To: References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> Message-ID: <1206.24.182.26.162.1162488577.squirrel@webmail.tuffmail.net> I'm beginning to wonder if we really need the reload IronPython functionality in WSGI. It adds some complexity for not a lot of real gain. I thought one reason for reloading the interpreter would be to reload all the modules, but that can be done via WSGI middlewear. Also I ran into a problem with the flup session middlewear. It uses the third, exec_info, parameter of start_response, which isn't supported in our current implementation. I will admit I am not totally sure how to properly implement this. According to the pep it has something to do with not sending the headers of the response twice. http://baus.net/ From Mahesh.Prakriya at microsoft.com Thu Nov 2 22:02:45 2006 From: Mahesh.Prakriya at microsoft.com (Mahesh Prakriya) Date: Thu, 2 Nov 2006 13:02:45 -0800 Subject: [IronPython] IronPython for ASP.net CTP is now live @ www.asp.net/ironpython Message-ID: <8DD6D7B47848B24F972C23F274C6E56849103CDF@NA-EXMSG-C112.redmond.corp.microsoft.com> We just went live with our Community Technology Preview of IronPython for ASP.net. There's a splash on www.asp.net and links to CTP download/whitepaper/walkthroughs/upcoming talks etc. on www.asp.net/ironpython >From the team, in particular, David Ebbo and Qing Ye deserve special kudos for getting this together. The CTP works with both VS and VWD and I encourage folks to take a minute to install and check it out and provide us feedback. Thanks, Merlin Web Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Nov 2 22:19:59 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 2 Nov 2006 13:19:59 -0800 Subject: [IronPython] IronPython for ASP.net CTP is now live @www.asp.net/ironpython Message-ID: I wondered when the announcement was going to happen... ________________________________ From: users-bounces at lists.ironpython.com on behalf of Mahesh Prakriya Sent: Thu 11/2/2006 1:02 PM To: users at lists.ironpython.com Subject: [IronPython] IronPython for ASP.net CTP is now live @www.asp.net/ironpython We just went live with our Community Technology Preview of IronPython for ASP.net. There's a splash on www.asp.net and links to CTP download/whitepaper/walkthroughs/upcoming talks etc. on www.asp.net/ironpython >From the team, in particular, David Ebbo and Qing Ye deserve special kudos for getting this together. The CTP works with both VS and VWD and I encourage folks to take a minute to install and check it out and provide us feedback. Thanks, Merlin Web Team -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 4480 bytes Desc: not available URL: From almondb at gmail.com Thu Nov 2 23:45:53 2006 From: almondb at gmail.com (Brian) Date: Thu, 2 Nov 2006 14:45:53 -0800 Subject: [IronPython] IronPython for ASP.net CTP is now live @www.asp.net/ironpython In-Reply-To: References: Message-ID: <21f1e2700611021445u641b318cp4f5acabe9da2f69@mail.gmail.com> On 11/2/06, Keith J. Farmer wrote: > > I wondered when the announcement was going to happen... > With days left spare between the CTP release and David Ebbo's presentation at ASP.NET connections in Las Vegas next Tuesday! ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.john.rees at gmail.com Fri Nov 3 00:19:16 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Fri, 3 Nov 2006 10:19:16 +1100 Subject: [IronPython] Rewrite of WSGI handler In-Reply-To: <1206.24.182.26.162.1162488577.squirrel@webmail.tuffmail.net> References: <5b0248170610301704h347f64d5i8a20836861cdca77@mail.gmail.com> <1432.24.182.26.162.1162403426.squirrel@webmail.tuffmail.net> <1206.24.182.26.162.1162488577.squirrel@webmail.tuffmail.net> Message-ID: On 11/3/06, Christopher Baus wrote: > > I'm beginning to wonder if we really need the reload IronPython > functionality in WSGI. It adds some complexity for not a lot of real > gain. I thought one reason for reloading the interpreter would be to > reload all the modules, but that can be done via WSGI middlewear. The reload IronPython functionality I think needs to be there for completeness but I feel the single long running IP instance should be enabled by deafult in the example web.config. Also I ran into a problem with the flup session middlewear. It uses the > third, exec_info, parameter of start_response, which isn't supported in > our current implementation. I will admit I am not totally sure how to > properly implement this. According to the pep it has something to do with > not sending the headers of the response twice. Let me look into this http://baus.net/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hrh1818 at comcast.net Wed Nov 1 05:11:46 2006 From: hrh1818 at comcast.net (Howard R. Hansen) Date: Tue, 31 Oct 2006 22:11:46 -0600 Subject: [IronPython] Importing NMathCore into Iron Python Message-ID: <45481E82.9000903@comcast.net> When I use the following procedure to import a dynamic link math library into Iron Python I get the error show in the last 4 lines of the procedure. What am I doing wrong and what should I do to import the NMathCore math library into Iron Python? Howard >>> import clr >>> clr.AddReferenceToFile("NMathCore.dll") >>> clr.References (( mscorlib, .... ), (System, ... ), (NMathCore, Version=2.2.3.0, Culture=neutral, PublicKeyToken=2064076cc7895eab)) >>> from NMathCore import * Traceback (most recent call last): File, line 0, in (stdin)##15 File, line 0, in __import__##7 ImportError: No module named NMathCore From b.Kriszio at gmx.de Wed Nov 1 21:17:34 2006 From: b.Kriszio at gmx.de (B Kriszio) Date: Wed, 01 Nov 2006 21:17:34 +0100 Subject: [IronPython] Problem with KeyboardInterrupt by raw_input Message-ID: <454900DE.6010202@gmx.de> Hello IronPython people I try to port a little read commands loop from C Python to IronPython while 1: try: line = raw_input('>') if line == 'quit': break print line except KeyboardInterrupt: print 'Canceled' With CPython typing asdf and then ^C I get >asdf Canceled > trying the same with IronPython, I get >asdf > and after some CR's following complete output is >asdf > Canceled Traceback (most recent call last): File C:\D\py\basics\cmdloop_1.py, line 16, in Initialize KeyboardInterrupt: Batchvorgang abbrechen (J/N)? Any suggestions how I can use ^C to cancel some input and not my loop. Thanks, Bernd From dinov at exchange.microsoft.com Fri Nov 3 00:32:37 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 2 Nov 2006 15:32:37 -0800 Subject: [IronPython] Importing NMathCore into Iron Python In-Reply-To: <45481E82.9000903@comcast.net> References: <45481E82.9000903@comcast.net> Message-ID: <7AD436E4270DD54A94238001769C222748C8D8D292@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Could the namespaces be something other than NMathCore? You could do: asm = clr.LoadAssemblyFromFile('NMathCore.dll') dir(asm) and you should see the namespaces in the assembly and those should work in the import statement. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Howard R. Hansen Sent: Tuesday, October 31, 2006 8:12 PM To: users at lists.ironpython.com Subject: [IronPython] Importing NMathCore into Iron Python When I use the following procedure to import a dynamic link math library into Iron Python I get the error show in the last 4 lines of the procedure. What am I doing wrong and what should I do to import the NMathCore math library into Iron Python? Howard >>> import clr >>> clr.AddReferenceToFile("NMathCore.dll") >>> clr.References (( mscorlib, .... ), (System, ... ), (NMathCore, Version=2.2.3.0, Culture=neutral, PublicKeyToken=2064076cc7895eab)) >>> from NMathCore import * Traceback (most recent call last): File, line 0, in (stdin)##15 File, line 0, in __import__##7 ImportError: No module named NMathCore _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Fri Nov 3 00:34:01 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 02 Nov 2006 23:34:01 +0000 Subject: [IronPython] Importing NMathCore into Iron Python In-Reply-To: <45481E82.9000903@comcast.net> References: <45481E82.9000903@comcast.net> Message-ID: <454A8069.9070101@voidspace.org.uk> Howard R. Hansen wrote: > When I use the following procedure to import a dynamic link math library > into Iron Python I get the error show in the last 4 lines of the > procedure. What am I doing wrong and what should I do to import the > NMathCore math library into Iron Python? > > The namespace isn't always the same name as the assembly. According to this : http://www.centerspace.net/doc/NMath/Core/ref/CenterSpace.NMath.CoreHierarchy.html it could be CenterSpace.NMath.Core - try that. Michael Foord http://www.voidspace.org.uk/python/index.shtml > Howard > > >>> import clr > >>> clr.AddReferenceToFile("NMathCore.dll") > >>> clr.References > (( mscorlib, .... ), > (System, ... ), > (NMathCore, Version=2.2.3.0, Culture=neutral, > PublicKeyToken=2064076cc7895eab)) > >>> from NMathCore import * > Traceback (most recent call last): > File, line 0, in (stdin)##15 > File, line 0, in __import__##7 > ImportError: No module named NMathCore > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.13.23/513 - Release Date: 02/11/2006 From kfarmer at thuban.org Fri Nov 3 00:54:22 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 2 Nov 2006 15:54:22 -0800 Subject: [IronPython] IronPython for ASP.net CTP is now live@www.asp.net/ironpython Message-ID: So how long until they port Zope to ASP.NET? ;) ________________________________ From: users-bounces at lists.ironpython.com on behalf of Brian Sent: Thu 11/2/2006 2:45 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.net CTP is now live at www.asp.net/ironpython On 11/2/06, Keith J. Farmer wrote: I wondered when the announcement was going to happen... With days left spare between the CTP release and David Ebbo's presentation at ASP.NET connections in Las Vegas next Tuesday! ;-) -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3923 bytes Desc: not available URL: From hrh1818 at comcast.net Fri Nov 3 01:18:10 2006 From: hrh1818 at comcast.net (Howard R. Hansen) Date: Thu, 02 Nov 2006 18:18:10 -0600 Subject: [IronPython] Importing NMathCore into Iron Python In-Reply-To: <7AD436E4270DD54A94238001769C222748C8D8D292@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <45481E82.9000903@comcast.net> <7AD436E4270DD54A94238001769C222748C8D8D292@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <454A8AC2.1050609@comcast.net> Dino, Yes the namespace is not NMathCore. About 2 hours after I posted my message I stumbled onto the actually namespace CenterSpace.NMath.Core. Thank you for providing a method for determining an assembly's namespace. Your method will save me a lot of time in the future. Howard Dino Viehland wrote: > Could the namespaces be something other than NMathCore? You could do: > > asm = clr.LoadAssemblyFromFile('NMathCore.dll') > dir(asm) > > and you should see the namespaces in the assembly and those should work in the import statement. > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Howard R. Hansen > Sent: Tuesday, October 31, 2006 8:12 PM > To: users at lists.ironpython.com > Subject: [IronPython] Importing NMathCore into Iron Python > > When I use the following procedure to import a dynamic link math library > into Iron Python I get the error show in the last 4 lines of the > procedure. What am I doing wrong and what should I do to import the > NMathCore math library into Iron Python? > > Howard > > >>> import clr > >>> clr.AddReferenceToFile("NMathCore.dll") > >>> clr.References > (( mscorlib, .... ), > (System, ... ), > (NMathCore, Version=2.2.3.0, Culture=neutral, > PublicKeyToken=2064076cc7895eab)) > >>> from NMathCore import * > Traceback (most recent call last): > File, line 0, in (stdin)##15 > File, line 0, in __import__##7 > ImportError: No module named NMathCore > _______________________________________________ > 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 hrh1818 at comcast.net Fri Nov 3 01:26:25 2006 From: hrh1818 at comcast.net (Howard R. Hansen) Date: Thu, 02 Nov 2006 18:26:25 -0600 Subject: [IronPython] Importing NMathCore into Iron Python In-Reply-To: <454A8069.9070101@voidspace.org.uk> References: <45481E82.9000903@comcast.net> <454A8069.9070101@voidspace.org.uk> Message-ID: <454A8CB1.7070703@comcast.net> Michael, You are correct. I should have been using CenterSpace.NMath.Core for the namespace. Thank you for your reply. Howard Michael Foord wrote: > Howard R. Hansen wrote: > >> When I use the following procedure to import a dynamic link math library >> into Iron Python I get the error show in the last 4 lines of the >> procedure. What am I doing wrong and what should I do to import the >> NMathCore math library into Iron Python? >> >> >> > The namespace isn't always the same name as the assembly. > > According to this : > > > http://www.centerspace.net/doc/NMath/Core/ref/CenterSpace.NMath.CoreHierarchy.html > > it could be CenterSpace.NMath.Core - try that. > > Michael Foord > http://www.voidspace.org.uk/python/index.shtml > > >> Howard >> >> >>> import clr >> >>> clr.AddReferenceToFile("NMathCore.dll") >> >>> clr.References >> (( mscorlib, .... ), >> (System, ... ), >> (NMathCore, Version=2.2.3.0, Culture=neutral, >> PublicKeyToken=2064076cc7895eab)) >> >>> from NMathCore import * >> Traceback (most recent call last): >> File, line 0, in (stdin)##15 >> File, line 0, in __import__##7 >> ImportError: No module named NMathCore >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> >> > > > > From redmoon17 at gmail.com Fri Nov 3 04:21:54 2006 From: redmoon17 at gmail.com (Kevin Chu) Date: Fri, 3 Nov 2006 11:21:54 +0800 Subject: [IronPython] IronPython for ASP.net CTP is now live@www.asp.net/ironpython In-Reply-To: References: Message-ID: <41d7f4a90611021921q7a278692rf79142e2226da6b2@mail.gmail.com> I found that IronPython for ASP.NET CTP use IronPython.dll is 1.0.60816.1877 but IronPython 1.0's IronPython.dll is 1.0.61005.1977. why IronPython for ASP.NET CTP not use lastest build On 11/3/06, Keith J. Farmer wrote: > So how long until they port Zope to ASP.NET? ;) > > ________________________________ > > From: users-bounces at lists.ironpython.com on behalf of Brian > Sent: Thu 11/2/2006 2:45 PM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython for ASP.net CTP is now live at www.asp.net/ironpython > > > On 11/2/06, Keith J. Farmer wrote: > > I wondered when the announcement was going to happen... > > > > With days left spare between the CTP release and David Ebbo's presentation at ASP.NET connections in Las Vegas next Tuesday! ;-) > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- Once in a Redmoon From sanxiyn at gmail.com Fri Nov 3 04:28:12 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 3 Nov 2006 12:28:12 +0900 Subject: [IronPython] svn:externals for SOAPpy Message-ID: <5b0248170611021928l52ac0f3ameedd99b59fc1e6f8@mail.gmail.com> I added svn:externals reference to wstools under SOAPpy/SOAPpy, just as under zsi/ZSI. I hope this is okay! http://svn.sourceforge.net/viewvc/pywebsvcs?view=rev&revision=1291 -- Seo Sanghyeon From sanxiyn at gmail.com Fri Nov 3 04:28:35 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 3 Nov 2006 12:28:35 +0900 Subject: [IronPython] svn:externals for SOAPpy In-Reply-To: <5b0248170611021928l52ac0f3ameedd99b59fc1e6f8@mail.gmail.com> References: <5b0248170611021928l52ac0f3ameedd99b59fc1e6f8@mail.gmail.com> Message-ID: <5b0248170611021928o21bb94a7m22ca8988de6fb248@mail.gmail.com> 2006/11/3, Sanghyeon Seo : > I added svn:externals reference to wstools under SOAPpy/SOAPpy, just > as under zsi/ZSI. I hope this is okay! Sorry, wrong list. -- Seo Sanghyeon From ironpythonster at gmail.com Fri Nov 3 07:02:46 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Fri, 3 Nov 2006 14:02:46 +0800 Subject: [IronPython] Is there any IronPython or CPython lib for CVS? Message-ID: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> Hi everyone, Is there any lib for call the API of CVS? I only found that there just a lib for SVN (PySvn),but not for CVS Thaneks Kevien -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Fri Nov 3 07:46:35 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 3 Nov 2006 15:46:35 +0900 Subject: [IronPython] Is there any IronPython or CPython lib for CVS? In-Reply-To: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> References: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> Message-ID: <5b0248170611022246p682aa719l1cf95796e1d27c2a@mail.gmail.com> 2006/11/3, Kevien Lee : > Hi everyone, > > Is there any lib for call the API of CVS? > I only found that there just a lib for SVN (PySvn),but not for CVS Google for "python cvs". First hit. -- Seo Sanghyeon From sanxiyn at gmail.com Fri Nov 3 10:17:46 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 3 Nov 2006 18:17:46 +0900 Subject: [IronPython] IronPython for ASP.net CTP is now live @ www.asp.net/ironpython In-Reply-To: <8DD6D7B47848B24F972C23F274C6E56849103CDF@NA-EXMSG-C112.redmond.corp.microsoft.com> References: <8DD6D7B47848B24F972C23F274C6E56849103CDF@NA-EXMSG-C112.redmond.corp.microsoft.com> Message-ID: <5b0248170611030117k312c46s64b6733666253140@mail.gmail.com> 2006/11/3, Mahesh Prakriya : > We just went live with our Community Technology Preview of IronPython for > ASP.net. The download page mentions ".NET Framework 2.0 hotfix (KB927128)" but I can't locate this KB in http://support.microsoft.com/ -- where can I find it? -- Seo Sanghyeon From mark.john.rees at gmail.com Fri Nov 3 10:46:59 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Fri, 3 Nov 2006 20:46:59 +1100 Subject: [IronPython] IronPython for ASP.net CTP is now live @ www.asp.net/ironpython In-Reply-To: <5b0248170611030117k312c46s64b6733666253140@mail.gmail.com> References: <8DD6D7B47848B24F972C23F274C6E56849103CDF@NA-EXMSG-C112.redmond.corp.microsoft.com> <5b0248170611030117k312c46s64b6733666253140@mail.gmail.com> Message-ID: The CTP installer will download the hotfix and offer to install it if your system needs it. Mark On 11/3/06, Sanghyeon Seo wrote: > > 2006/11/3, Mahesh Prakriya : > > We just went live with our Community Technology Preview of IronPython > for > > ASP.net. > > The download page mentions ".NET Framework 2.0 hotfix (KB927128)" but > I can't locate this KB in http://support.microsoft.com/ -- where can I > find it? > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Fri Nov 3 11:19:13 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 3 Nov 2006 19:19:13 +0900 Subject: [IronPython] clr.GetString, clr.GetBytes In-Reply-To: <5b0248170610231724y4ba4ed3cpfa1317e1a4d6a7a3@mail.gmail.com> References: <5b0248170610202358ned03862s5f5dcbd67b242396@mail.gmail.com> <7AD436E4270DD54A94238001769C22274593B2128B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170610231724y4ba4ed3cpfa1317e1a4d6a7a3@mail.gmail.com> Message-ID: <5b0248170611030219w5de0718bl73795aa33be655f1@mail.gmail.com> 2006/10/24, Sanghyeon Seo : > 2006/10/24, Dino Viehland : > > Or are these helper methods to go from string -> byte array and back again > > (presumably w/ some encoding as a parameter?). > > If that's the case I'm not sure how this differs from System.Text.Encoding.GetString / GetBytes. > > It doesn't. But which encoding? ASCII is not appropriate, since it > doesn't convert some byte arrays. > > Let's say this way. clr.GetString would be equivalent to > StringOps.FromByteArray already in IronPython. clr.GetBytes would be > its reverse. What do others think about this? -- Seo Sanghyeon From christian.muirhead at resolversystems.com Fri Nov 3 12:24:44 2006 From: christian.muirhead at resolversystems.com (Christian Muirhead) Date: Fri, 03 Nov 2006 11:24:44 +0000 Subject: [IronPython] Singles not comparing properly Message-ID: <454B26FC.90406@resolversystems.com> Hi guys - We encountered a strange bug today, which we eventually worked out was being caused by the fact that a number we thought was a float (a Double) was actually a Single. The problem was this: >>> from System import Double, Single >>> d = Double(8.0) >>> d 8.0 >>> 5 <= d <= 500 True >>> s = Single(8.0) >>> s 8.0 >>> 5 <= s <= 500 False There's no real analogue to this in CPython, but it feels like Single and Double should behave the same here. Is this a bug? Thanks, Christian From David.Ebbo at microsoft.com Fri Nov 3 20:09:09 2006 From: David.Ebbo at microsoft.com (David Ebbo) Date: Fri, 3 Nov 2006 11:09:09 -0800 Subject: [IronPython] IronPython for ASP.net CTP is now live@www.asp.net/ironpython In-Reply-To: <41d7f4a90611021921q7a278692rf79142e2226da6b2@mail.gmail.com> References: <41d7f4a90611021921q7a278692rf79142e2226da6b2@mail.gmail.com> Message-ID: 1.0.61005.1977 is actually 1.0.1, while 1.0.60816.1877 is 1.0. But you're right, we should have included the latest in the ASP.NET CTP. We'll fix that in a later release. For now, feel free to just copy the newer one over into the app's 'bin' folder. David -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kevin Chu Sent: Thursday, November 02, 2006 7:22 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython for ASP.net CTP is now live at www.asp.net/ironpython I found that IronPython for ASP.NET CTP use IronPython.dll is 1.0.60816.1877 but IronPython 1.0's IronPython.dll is 1.0.61005.1977. why IronPython for ASP.NET CTP not use lastest build On 11/3/06, Keith J. Farmer wrote: > So how long until they port Zope to ASP.NET? ;) > > ________________________________ > > From: users-bounces at lists.ironpython.com on behalf of Brian > Sent: Thu 11/2/2006 2:45 PM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython for ASP.net CTP is now live at www.asp.net/ironpython > > > On 11/2/06, Keith J. Farmer wrote: > > I wondered when the announcement was going to happen... > > > > With days left spare between the CTP release and David Ebbo's presentation at ASP.NET connections in Las Vegas next Tuesday! ;-) > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- Once in a Redmoon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From christopher at baus.net Sat Nov 4 17:46:31 2006 From: christopher at baus.net (Christopher Baus) Date: Sat, 4 Nov 2006 16:46:31 -0000 (GMT) Subject: [IronPython] Visual studio "edit and continue" Message-ID: <1222.69.181.106.91.1162658791.squirrel@webmail.tuffmail.net> Is there any "edit and continue" functionality for the VS IronPython integration? I don't know if I have the IP integration installed correctly, but I couldn't get it to work. I think this would be the killer feature for IronPython since theoretically code completion could work with the dynamic type information. Plus writing code while executing it is a huge advantage of dynamic languages. Overall though I'm impressed with the platform. The work to allow both pure python development and python/.net development (eg import clr) is appreciated. It makes me feel confident that the project is heading in a direction I can be happy with over the longer term. Thanks, Chris http://baus.net/ From sh at defuze.org Sat Nov 4 22:58:14 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Sat, 04 Nov 2006 21:58:14 +0000 Subject: [IronPython] ANN: bridge 0.1.0 a general Python and IronPython XML library Message-ID: <454D0CF6.9030802@defuze.org> Hi all, I'm happy to introduce the first release of bridge. A general purpose XML library for Python and IronPython (and ultimately Jython). bridge is very simple and light. It basically let you load an XML document via a set of different parsers (xml.dom, Amara, lxml, System.Xml) and creates a tree of Elements and Attributes before releasing the parser resources. This means that once the document is loaded it is independent from the underlying parser. bridge then provides a straightforward interface to navigate through the tree and manipulate it. bridge does not try to replace underlying XML engines but offer a common API so that your applications are less dependent of those engines. bridge offers a couple of other goodies however to play with the tree of elements (see the documentation). == Download == * easy_install -U bridge * Tarballs http://www.defuze.org/oss/bridge/ * svn co https://svn.defuze.org/oss/bridge/ == Documentation == http://trac.defuze.org/wiki/bridge Hope this will help a few people in working with XML without worrying on which engine they choose to use. Have fun, -- Sylvain Hellegouarch http://www.defuze.org From sanxiyn at gmail.com Mon Nov 6 07:30:08 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 6 Nov 2006 15:30:08 +0900 Subject: [IronPython] Singles not comparing properly In-Reply-To: <454B26FC.90406@resolversystems.com> References: <454B26FC.90406@resolversystems.com> Message-ID: <5b0248170611052230l1e9fa25fyd71ad2003265d78f@mail.gmail.com> Simpler examle: >>> Single(0) < 1 False 2006/11/3, Christian Muirhead : > There's no real analogue to this in CPython, but it feels like Single > and Double should behave the same here. Is this a bug? Yes, I think this is a bug. -- Seo Sanghyeon From Martin.Maly at microsoft.com Mon Nov 6 18:59:14 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 6 Nov 2006 09:59:14 -0800 Subject: [IronPython] Visual studio "edit and continue" In-Reply-To: <1222.69.181.106.91.1162658791.squirrel@webmail.tuffmail.net> References: <1222.69.181.106.91.1162658791.squirrel@webmail.tuffmail.net> Message-ID: No, the Visual Studio IronPython integration does not support edit and continue, unfortunately. It is certainly a valid scenario that is, as you point out, extremely valuable especially for dynamic languages. Hopefully, we'll be able to address this in the future. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christopher Baus Sent: Saturday, November 04, 2006 8:47 AM To: users at lists.ironpython.com Subject: [IronPython] Visual studio "edit and continue" Is there any "edit and continue" functionality for the VS IronPython integration? I don't know if I have the IP integration installed correctly, but I couldn't get it to work. I think this would be the killer feature for IronPython since theoretically code completion could work with the dynamic type information. Plus writing code while executing it is a huge advantage of dynamic languages. Overall though I'm impressed with the platform. The work to allow both pure python development and python/.net development (eg import clr) is appreciated. It makes me feel confident that the project is heading in a direction I can be happy with over the longer term. Thanks, Chris http://baus.net/ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Tue Nov 7 01:50:34 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 7 Nov 2006 09:50:34 +0900 Subject: [IronPython] SOAPpy client running on IronPython! In-Reply-To: <5b0248170610290014g6e5c34c4p44be6af0de019eee@mail.gmail.com> References: <5b0248170610290014g6e5c34c4p44be6af0de019eee@mail.gmail.com> Message-ID: <5b0248170611061650s3b3ed932r7977905e53e7b46b@mail.gmail.com> 2006/10/29, Sanghyeon Seo : > SOAPpy is a part of Python Web Services project. It helps you writing > web services servers and clients. > http://pywebsvcs.sourceforge.net/ > > Today I got the above client program running on IronPython. All > related files are available here: > https://svn.sourceforge.net/svnroot/fepy/trunk/seasoap/ I got accepted as a pywebsvcs developer, so I pushed above patches. All patches against SOAPpy are now available in SOAPpy SVN. -- Seo Sanghyeon From ironpythonster at gmail.com Tue Nov 7 09:17:06 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Tue, 07 Nov 2006 00:17:06 -0800 Subject: [IronPython] Is there any IronPython or CPython lib for CVS? In-Reply-To: <5b0248170611022246p682aa719l1cf95796e1d27c2a@mail.gmail.com> References: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> <5b0248170611022246p682aa719l1cf95796e1d27c2a@mail.gmail.com> Message-ID: <1162887426.343879.36390@h54g2000cwb.googlegroups.com> Hi Seo Sanghyeon, I had google that,but it seem that there not such lib. Anyone could advice? Thanks Kevin Lee On Nov 3, 2:46 pm, "Sanghyeon Seo" wrote: > 2006/11/3, Kevien Lee : > > > Hi everyone, > > > Is there any lib for call the API of CVS? > > I only found that there just a lib for SVN (PySvn),but not for CVSGoogle for "python cvs". First hit. > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com From mark.john.rees at gmail.com Tue Nov 7 12:43:16 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Tue, 7 Nov 2006 22:43:16 +1100 Subject: [IronPython] Is there any IronPython or CPython lib for CVS? In-Reply-To: <1162887426.343879.36390@h54g2000cwb.googlegroups.com> References: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> <5b0248170611022246p682aa719l1cf95796e1d27c2a@mail.gmail.com> <1162887426.343879.36390@h54g2000cwb.googlegroups.com> Message-ID: I google'd as Sanghyeon said, and the first link pointed me to this: http://rhaptos.org/downloads/python/pycvs/ >From the README.txt "pycvs is a python module that wraps the command-line cvs executable." You asked for an IronPython or CPython library for cvs. It is CPython only as it uses the popen2 module but I think it's what you are after. Of course if someone wants to create a popen2 module for IronPython, I am sure Sanghyeon would include it as part of fepy and then pycvs would be suitable for IronPython. Mark On 11/7/06, Kevien Lee wrote: > > Hi Seo Sanghyeon, > I had google that,but it seem that there not such lib. > Anyone could advice? > > Thanks > Kevin Lee > > > On Nov 3, 2:46 pm, "Sanghyeon Seo" wrote: > > 2006/11/3, Kevien Lee : > > > > > Hi everyone, > > > > > Is there any lib for call the API of CVS? > > > I only found that there just a lib for SVN (PySvn),but not for > CVSGoogle for "python cvs". First hit. > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > users mailing list > > u... at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users- > ironpython.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue Nov 7 12:53:56 2006 From: fuzzyman at voidspace.org.uk (Fuzzyman) Date: Tue, 07 Nov 2006 11:53:56 +0000 Subject: [IronPython] Is there any IronPython or CPython lib for CVS? In-Reply-To: References: <8c8dcbe30611022202o6d88abfdjc43ce3c519f1ced8@mail.gmail.com> <5b0248170611022246p682aa719l1cf95796e1d27c2a@mail.gmail.com> <1162887426.343879.36390@h54g2000cwb.googlegroups.com> Message-ID: <455073D4.5000106@voidspace.org.uk> Mark Rees wrote: > I google'd as Sanghyeon said, and the first link pointed me to this: > > http://rhaptos.org/downloads/python/pycvs/ > > From the README.txt > > "pycvs is a python module that wraps the command-line cvs executable." > > You asked for an IronPython or CPython library for cvs. It is CPython > only as it uses the popen2 module but I think it's what you are after. If popen2 is the only incompatibility, then it should be easy to convert to IronPython using the System.Diagnostics.Process class. We recently built a simple script that runs continuous integration by executing svn commands as subprocesses. Creating something custom should be fairly simple even if this module can't be made to work. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Of course if someone wants to create a popen2 module for IronPython, I > am sure Sanghyeon would include it as part of fepy and then pycvs > would be suitable for IronPython. > > Mark > > > On 11/7/06, *Kevien Lee* > wrote: > > Hi Seo Sanghyeon, > I had google that,but it seem that there not such lib. > Anyone could advice? > > Thanks > Kevin Lee > > > On Nov 3, 2:46 pm, "Sanghyeon Seo" < sanx... at gmail.com > > wrote: > > 2006/11/3, Kevien Lee >: > > > > > Hi everyone, > > > > > Is there any lib for call the API of CVS? > > > I only found that there just a lib for SVN (PySvn),but not for > CVSGoogle for "python cvs". First hit. > > > > -- > > Seo Sanghyeon > > _______________________________________________ > > users mailing list > > > u... at lists.ironpython.comhttp://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 sanxiyn at gmail.com Wed Nov 8 03:21:45 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 8 Nov 2006 11:21:45 +0900 Subject: [IronPython] IronPython URLs Message-ID: <5b0248170611071821l20d3fd55p8ad0ea6fb3d10071@mail.gmail.com> Unless you have slept in the cave, you heard about IronPython for ASP.NET by now. http://www.asp.net/ironpython/ IronPython is mentioned in "Joint letter to the Open Source Community", from Novell and Microsoft, as an example of community project from Microsoft. http://www.novell.com/linux/microsoft/openletter.html Ivan Porto Carrero tries IronPython by porting his nblogr setup. He found the lack of attribute support to be showstopper, and likes Boo better. http://www.flanders.co.nz/Blog/2006/11/07/BooIronpythonScriptaculousMSAjaxAndMe.aspx -- Seo Sanghyeon From sanxiyn at gmail.com Wed Nov 8 03:25:09 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 8 Nov 2006 11:25:09 +0900 Subject: [IronPython] IronPython URLs In-Reply-To: <5b0248170611071821l20d3fd55p8ad0ea6fb3d10071@mail.gmail.com> References: <5b0248170611071821l20d3fd55p8ad0ea6fb3d10071@mail.gmail.com> Message-ID: <5b0248170611071825j50ad03aaj2ec88779b96f844b@mail.gmail.com> 2006/11/8, Sanghyeon Seo : > Ivan Porto Carrero tries IronPython by porting his nblogr setup. By the way, nblogr is another nice project hosted on CodePlex. Take a look! http://www.codeplex.com/Nblogr -- Seo Sanghyeon From sanxiyn at gmail.com Wed Nov 8 03:29:50 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 8 Nov 2006 11:29:50 +0900 Subject: [IronPython] CodePlex redirection oddity Message-ID: <5b0248170611071829x5ae337c7gd5df91f10947e105@mail.gmail.com> I noticed that http://www.codeplex.com/Phalanger doesn't redirect and gives a nice URL, while http://www.codeplex.com/IronPython redirects. Any idea? -- Seo Sanghyeon From Mujtaba.Syed at microsoft.com Fri Nov 3 22:55:12 2006 From: Mujtaba.Syed at microsoft.com (Mujtaba Syed) Date: Fri, 3 Nov 2006 13:55:12 -0800 Subject: [IronPython] Singles not comparing properly In-Reply-To: <454B26FC.90406@resolversystems.com> References: <454B26FC.90406@resolversystems.com> Message-ID: Also note that: >>> 5.0 <= s <= 500.0 True >>> 5.0 <= d <= 500.0 True -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christian Muirhead Sent: Friday, November 03, 2006 3:25 AM To: users at lists.ironpython.com Subject: [IronPython] Singles not comparing properly Hi guys - We encountered a strange bug today, which we eventually worked out was being caused by the fact that a number we thought was a float (a Double) was actually a Single. The problem was this: >>> from System import Double, Single >>> d = Double(8.0) >>> d 8.0 >>> 5 <= d <= 500 True >>> s = Single(8.0) >>> s 8.0 >>> 5 <= s <= 500 False There's no real analogue to this in CPython, but it feels like Single and Double should behave the same here. Is this a bug? Thanks, Christian _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kitikat at wp.pl Sat Nov 4 22:59:08 2006 From: kitikat at wp.pl (komes) Date: Sat, 4 Nov 2006 13:59:08 -0800 (PST) Subject: [IronPython] Problem with IP & Eclipse & PyDev Message-ID: <7179369.post@talk.nabble.com> I installed pydev 1.2.5 on eclipse 3.2.1. Code completion worked greatly. Later, I added ironpython as an interpreter (with set ironpythonpath and without any problems). Unfortunately, I can't display code completion. Eclipse logs show, that ironpython can't find builtin module 'parser'. I tried to find it, but it's not implemented in IronPython :( Is there any way to make my eclipse work and complete the code? Thx, Komes -- View this message in context: http://www.nabble.com/Problem-with-IP---Eclipse---PyDev-tf2575394.html#a7179369 Sent from the IronPython mailing list archive at Nabble.com. From Mujtaba.Syed at microsoft.com Tue Nov 7 02:11:54 2006 From: Mujtaba.Syed at microsoft.com (Mujtaba Syed) Date: Mon, 6 Nov 2006 17:11:54 -0800 Subject: [IronPython] [ ] -> System.Array In-Reply-To: <5b0248170611061650s3b3ed932r7977905e53e7b46b@mail.gmail.com> References: <5b0248170610290014g6e5c34c4p44be6af0de019eee@mail.gmail.com> <5b0248170611061650s3b3ed932r7977905e53e7b46b@mail.gmail.com> Message-ID: How can I convert a IronPython list ([ ]) into a CLR array (System.Array)? Thanks, Mujtaba From Mujtaba.Syed at microsoft.com Tue Nov 7 05:57:46 2006 From: Mujtaba.Syed at microsoft.com (Mujtaba Syed) Date: Mon, 6 Nov 2006 20:57:46 -0800 Subject: [IronPython] [ ] -> System.Array Message-ID: How can I convert a IronPython list ([ ]) into a CLR array (System.Array)? Thanks, Mujtaba From Mujtaba.Syed at microsoft.com Tue Nov 7 06:01:37 2006 From: Mujtaba.Syed at microsoft.com (Mujtaba Syed) Date: Mon, 6 Nov 2006 21:01:37 -0800 Subject: [IronPython] [ ] -> System.Array Message-ID: How can I convert a IronPython list ([ ]) into a CLR array (System.Array)? Thanks, Mujtaba From Mujtaba.Syed at microsoft.com Tue Nov 7 21:26:03 2006 From: Mujtaba.Syed at microsoft.com (Mujtaba Syed) Date: Tue, 7 Nov 2006 12:26:03 -0800 Subject: [IronPython] [] <-> System.Array Message-ID: How can one program System.Array in IronPython? mujtaba syed | software development engineer virtual earth microsoft corporation mujtaba.syed at microsoft.com (425) 706-8340 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.moore at centrify.com Wed Nov 8 19:11:34 2006 From: paul.moore at centrify.com (Paul Moore) Date: Wed, 8 Nov 2006 10:11:34 -0800 Subject: [IronPython] embedded debugging Message-ID: I have an app that embedds IP runtime. I can set break points in the IP code but the debugger does not show any variables. The only variable is $line. All I can do is step through the code. I have set the debuggable option on the engine It is using CompiledCode -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Wed Nov 8 22:13:14 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 8 Nov 2006 21:13:14 -0000 (GMT) Subject: [IronPython] socket._fileobject In-Reply-To: <5b0248170611071829x5ae337c7gd5df91f10947e105@mail.gmail.com> References: <5b0248170611071829x5ae337c7gd5df91f10947e105@mail.gmail.com> Message-ID: <1239.69.181.106.91.1163020394.squirrel@webmail.tuffmail.net> I'm getting closer to having a usable web development stack based on IronPython. The biggest issue I have right now is that the socket._fileobject interface isn't implemented either by the builtin socket class or FePy's. I don't think it is even supposed to be a public interface, but it is used urllib2. I'm thinking about implementing it. Any thoughts? http://baus.net/ From propadovic.nenad at debitel.net Wed Nov 8 22:22:55 2006 From: propadovic.nenad at debitel.net (Nenad) Date: Wed, 8 Nov 2006 22:22:55 +0100 Subject: [IronPython] COM Question Message-ID: <173768315.20061108222255@debitel.net> Hello everybody, I'm using IronPython to automate Enterprise Architect (an UML Tool) via COM. I've translated the VB.Net code from their examples to Python, in order to get hold of some objects (diagrams and elements in diagrams etc.). from System import Console, Object import clr clr.AddReference("EA.dll") from EA import AppClass def RunAll(): App = AppClass() m_Repository = App.Repository m_Repository.OpenFile(r"d:\Projekti\UML\Automotive Testing Exploration.eap") #use the Repository in any way required DumpModel(m_Repository) m_Repository.Exit() m_Repository = None def DumpModel(m_Repository): for idx in range (0, m_Repository.Models.Count): DumpPackage("",m_Repository.Models.GetAt(idx)) Console.WriteLine("" + m_Repository.Models.GetAt(idx).Name) def DumpPackage(Indent, Package): """output package name, then element contents, then process child packages""" Console.WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) for idx in range(0,Package.Packages.Count): DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) ..... I get the following error: File C:\IronPython-1.0\Tutorial\ea_go.py, line 35, in Initialize File C:\IronPython-1.0\Tutorial\ea_go.py, line 11, in RunAll File C:\IronPython-1.0\Tutorial\ea_go.py, line 18, in DumpModel File C:\IronPython-1.0\Tutorial\ea_go.py, line 23, in DumpPackage SystemError: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. So basically it says, m_Repository.Models.GetAt(idx) is not Object, because m_Repository.Models is not initialized. Uuups. It seems IronPython doesn't cope with all COM nuances as well as VB.Net does? I'd bee greatefull for a clue. Thanks to all in advance! Nenad P.S. The corresponding VB.Net code works just fine: Module Module1 Dim f As Object Sub Main() Call Run() End Sub ''class level variable for Repository Public m_Repository As Object Public Sub Run() 'Microsoft.VisualBasic.FileOpen(1, "c:\Temp\ea_mdl.txt", OpenMode.Append) ''create the repository object m_Repository = CreateObject("EA.Repository") ''open an EAP file m_Repository.OpenFile("d:\Projekti\UML\Automotive Testing Exploration.eap") ''use the Repository in any way required DumpModel() ''close the repository and tidy up m_Repository.Exit() m_Repository = Nothing Console.WriteLine("Wir sind durch") End Sub Sub DumpModel() Dim idx As Integer For idx = 0 To m_Repository.Models.Count - 1 DumpPackage("", m_Repository.Models.GetAt(idx)) Next End Sub 'output package name, then element contents, then process child packages Sub DumpPackage(ByVal Indent As String, ByVal Package As Object) Dim idx As Integer Console.WriteLine(Indent + Package.Name) 'WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) For idx = 0 To Package.Packages.Count - 1 DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) Next End Sub ..... End Module From Martin.Maly at microsoft.com Wed Nov 8 22:33:38 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 8 Nov 2006 13:33:38 -0800 Subject: [IronPython] [ ] -> System.Array In-Reply-To: References: <5b0248170610290014g6e5c34c4p44be6af0de019eee@mail.gmail.com> <5b0248170611061650s3b3ed932r7977905e53e7b46b@mail.gmail.com>, Message-ID: This could be what you are looking for: >>> import System >>> System.Array[int]([1,2,3]) System.Int32[](1, 2, 3) >>> System.Array[str](["Hello", "World"]) System.String[]('Hello', 'World') >>> ________________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Mujtaba Syed [Mujtaba.Syed at microsoft.com] Sent: Monday, November 06, 2006 5:11 PM To: Discussion of IronPython Subject: [IronPython] [ ] -> System.Array How can I convert a IronPython list ([ ]) into a CLR array (System.Array)? Thanks, Mujtaba _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From alex at syzmk.com Wed Nov 8 22:52:05 2006 From: alex at syzmk.com (Alex Henderson) Date: Thu, 9 Nov 2006 10:52:05 +1300 Subject: [IronPython] COM Question In-Reply-To: <173768315.20061108222255@debitel.net> References: <173768315.20061108222255@debitel.net> Message-ID: <006201c70380$21c081f0$654185d0$@com> So is your problem that the instance returned by the repository for your Model is just an uninitalized COM object i.e., if you went: model = m_Repository.Models.GetAt(0) help(model) Do you end up seeing something like: Help on __ComObject in module System in mscorlib, Version=2.0.0.0, Culture=neutr al, PublicKeyToken=b77a5c561934e089 | CreateObjRef(...) | ObjRef CreateObjRef(self, Type requestedType) | Equals(...) | bool Equals(self, object obj) | Finalize(...) | Finalize(self) | GetHashCode(...) | int GetHashCode(self) | GetLifetimeService(...) | object GetLifetimeService(self) | GetType(...) | Type GetType(self) | InitializeLifetimeService(...) | object InitializeLifetimeService(self) | MemberwiseClone(...) | MarshalByRefObject MemberwiseClone(self, bool cloneIdentity) | object MemberwiseClone(self) | ToString(...) | str ToString(self) | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | x.__init__(...) initializes x; see x.__class__.__doc__ for signature With none of the additional members you expected that Model to expose...? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Nenad Sent: Thursday, 9 November 2006 10:23 a.m. To: users at lists.ironpython.com Subject: [IronPython] COM Question Hello everybody, I'm using IronPython to automate Enterprise Architect (an UML Tool) via COM. I've translated the VB.Net code from their examples to Python, in order to get hold of some objects (diagrams and elements in diagrams etc.). from System import Console, Object import clr clr.AddReference("EA.dll") from EA import AppClass def RunAll(): App = AppClass() m_Repository = App.Repository m_Repository.OpenFile(r"d:\Projekti\UML\Automotive Testing Exploration.eap") #use the Repository in any way required DumpModel(m_Repository) m_Repository.Exit() m_Repository = None def DumpModel(m_Repository): for idx in range (0, m_Repository.Models.Count): DumpPackage("",m_Repository.Models.GetAt(idx)) Console.WriteLine("" + m_Repository.Models.GetAt(idx).Name) def DumpPackage(Indent, Package): """output package name, then element contents, then process child packages""" Console.WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) for idx in range(0,Package.Packages.Count): DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) ..... I get the following error: File C:\IronPython-1.0\Tutorial\ea_go.py, line 35, in Initialize File C:\IronPython-1.0\Tutorial\ea_go.py, line 11, in RunAll File C:\IronPython-1.0\Tutorial\ea_go.py, line 18, in DumpModel File C:\IronPython-1.0\Tutorial\ea_go.py, line 23, in DumpPackage SystemError: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. So basically it says, m_Repository.Models.GetAt(idx) is not Object, because m_Repository.Models is not initialized. Uuups. It seems IronPython doesn't cope with all COM nuances as well as VB.Net does? I'd bee greatefull for a clue. Thanks to all in advance! Nenad P.S. The corresponding VB.Net code works just fine: Module Module1 Dim f As Object Sub Main() Call Run() End Sub ''class level variable for Repository Public m_Repository As Object Public Sub Run() 'Microsoft.VisualBasic.FileOpen(1, "c:\Temp\ea_mdl.txt", OpenMode.Append) ''create the repository object m_Repository = CreateObject("EA.Repository") ''open an EAP file m_Repository.OpenFile("d:\Projekti\UML\Automotive Testing Exploration.eap") ''use the Repository in any way required DumpModel() ''close the repository and tidy up m_Repository.Exit() m_Repository = Nothing Console.WriteLine("Wir sind durch") End Sub Sub DumpModel() Dim idx As Integer For idx = 0 To m_Repository.Models.Count - 1 DumpPackage("", m_Repository.Models.GetAt(idx)) Next End Sub 'output package name, then element contents, then process child packages Sub DumpPackage(ByVal Indent As String, ByVal Package As Object) Dim idx As Integer Console.WriteLine(Indent + Package.Name) 'WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) For idx = 0 To Package.Packages.Count - 1 DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) Next End Sub ..... End Module _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From alex at syzmk.com Wed Nov 8 23:04:17 2006 From: alex at syzmk.com (Alex Henderson) Date: Thu, 9 Nov 2006 11:04:17 +1300 Subject: [IronPython] COM Question In-Reply-To: <006201c70380$21c081f0$654185d0$@com> References: <173768315.20061108222255@debitel.net> <006201c70380$21c081f0$654185d0$@com> Message-ID: <006601c70381$d5fe0f10$81fa2d30$@com> And incidentally, if that is the problem... I think you can to use Marshal to change its type... let me know if this would work for you: from System.Runtime.InteropServices import Marshal package = Marshal.CreateWrapperOfType(model, EA.PackageClass) print package.Name In my case (I just happen to have EA installed ;o) it printed out "Project Models" ... which looks hopeful :) Though obviously it's not particularly elegant... I'm not sure if there is a better way to do this... there's generally more than one way to solve a problem like this in IP - seems like a good excuse to create a python wrapper around EA so that the experience is a little more natural. Chez, - Alex -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Alex Henderson Sent: Thursday, 9 November 2006 10:52 a.m. To: 'Discussion of IronPython' Subject: Re: [IronPython] COM Question So is your problem that the instance returned by the repository for your Model is just an uninitalized COM object i.e., if you went: model = m_Repository.Models.GetAt(0) help(model) Do you end up seeing something like: Help on __ComObject in module System in mscorlib, Version=2.0.0.0, Culture=neutr al, PublicKeyToken=b77a5c561934e089 | CreateObjRef(...) | ObjRef CreateObjRef(self, Type requestedType) | Equals(...) | bool Equals(self, object obj) | Finalize(...) | Finalize(self) | GetHashCode(...) | int GetHashCode(self) | GetLifetimeService(...) | object GetLifetimeService(self) | GetType(...) | Type GetType(self) | InitializeLifetimeService(...) | object InitializeLifetimeService(self) | MemberwiseClone(...) | MarshalByRefObject MemberwiseClone(self, bool cloneIdentity) | object MemberwiseClone(self) | ToString(...) | str ToString(self) | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | x.__init__(...) initializes x; see x.__class__.__doc__ for signature With none of the additional members you expected that Model to expose...? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Nenad Sent: Thursday, 9 November 2006 10:23 a.m. To: users at lists.ironpython.com Subject: [IronPython] COM Question Hello everybody, I'm using IronPython to automate Enterprise Architect (an UML Tool) via COM. I've translated the VB.Net code from their examples to Python, in order to get hold of some objects (diagrams and elements in diagrams etc.). from System import Console, Object import clr clr.AddReference("EA.dll") from EA import AppClass def RunAll(): App = AppClass() m_Repository = App.Repository m_Repository.OpenFile(r"d:\Projekti\UML\Automotive Testing Exploration.eap") #use the Repository in any way required DumpModel(m_Repository) m_Repository.Exit() m_Repository = None def DumpModel(m_Repository): for idx in range (0, m_Repository.Models.Count): DumpPackage("",m_Repository.Models.GetAt(idx)) Console.WriteLine("" + m_Repository.Models.GetAt(idx).Name) def DumpPackage(Indent, Package): """output package name, then element contents, then process child packages""" Console.WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) for idx in range(0,Package.Packages.Count): DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) ..... I get the following error: File C:\IronPython-1.0\Tutorial\ea_go.py, line 35, in Initialize File C:\IronPython-1.0\Tutorial\ea_go.py, line 11, in RunAll File C:\IronPython-1.0\Tutorial\ea_go.py, line 18, in DumpModel File C:\IronPython-1.0\Tutorial\ea_go.py, line 23, in DumpPackage SystemError: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. So basically it says, m_Repository.Models.GetAt(idx) is not Object, because m_Repository.Models is not initialized. Uuups. It seems IronPython doesn't cope with all COM nuances as well as VB.Net does? I'd bee greatefull for a clue. Thanks to all in advance! Nenad P.S. The corresponding VB.Net code works just fine: Module Module1 Dim f As Object Sub Main() Call Run() End Sub ''class level variable for Repository Public m_Repository As Object Public Sub Run() 'Microsoft.VisualBasic.FileOpen(1, "c:\Temp\ea_mdl.txt", OpenMode.Append) ''create the repository object m_Repository = CreateObject("EA.Repository") ''open an EAP file m_Repository.OpenFile("d:\Projekti\UML\Automotive Testing Exploration.eap") ''use the Repository in any way required DumpModel() ''close the repository and tidy up m_Repository.Exit() m_Repository = Nothing Console.WriteLine("Wir sind durch") End Sub Sub DumpModel() Dim idx As Integer For idx = 0 To m_Repository.Models.Count - 1 DumpPackage("", m_Repository.Models.GetAt(idx)) Next End Sub 'output package name, then element contents, then process child packages Sub DumpPackage(ByVal Indent As String, ByVal Package As Object) Dim idx As Integer Console.WriteLine(Indent + Package.Name) 'WriteLine(Indent + Package.Name) DumpElements(Indent + " ", Package) For idx = 0 To Package.Packages.Count - 1 DumpPackage(Indent + " ", Package.Packages.GetAt(idx)) Next End Sub ..... End Module _______________________________________________ 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 sh at defuze.org Wed Nov 8 23:59:19 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Wed, 08 Nov 2006 22:59:19 +0000 Subject: [IronPython] ANN: Amplee 0.3.2 Message-ID: <45526147.5030802@defuze.org> Hi all, I'm happy to introduce the release of Amplee 0.3.2, a Python implementation of the Atom Publishing Protocol. This release is a bug fixes but with a few new features as well: * Support of the Amazon S3 service as a storage * Support for the Hachoir library which should offer more format supported as members * Better support for Atom members * Updated demo code showing more functionalities of amplee (not yet updated on the wiki though so please look at: http://trac.defuze.org/browser/oss/amplee/amplee/demo == Download == * easy_install -U amplee * Tarballs http://www.defuze.org/oss/amplee/ * svn co https://svn.defuze.org/oss/amplee/ == Documentation == http://trac.defuze.org/wiki/amplee == TODO == * Add tests * Fix the WSGI handler to use the new routing_args spec. * Improve documentation This release is still a little rough around the edges but it's getting better :) Have fun, -- Sylvain Hellegouarch http://www.defuze.org From propadovic.nenad at debitel.net Thu Nov 9 17:08:43 2006 From: propadovic.nenad at debitel.net (propadovic.nenad at debitel.net) Date: 9 Nov 2006 17:08:43 +0100 Subject: [IronPython] COM Question Message-ID: <1163088523.4553528b0a917@www.debitel.net> Hello Alex, thanx for your help. It seems to work out. So this Marschal is some kind of casting for COM objects? Anyway, I just got several lines of reasonable output. Cheers, Nenad ------------------------------------------------- debitel.net Webmail From myeates at jpl.nasa.gov Thu Nov 9 23:57:36 2006 From: myeates at jpl.nasa.gov (Mathew Yeates) Date: Thu, 09 Nov 2006 14:57:36 -0800 Subject: [IronPython] garbage in the source file Message-ID: <4553B260.5050805@jpl.nasa.gov> Hi I just tried compiling the source code but it has random characters in it. See IronPython/Runtime/PythonModule.cs line 57 public static PythonModule MakeModule(ICallerContext context, DynamicType cls, params object[] args\u03c4) Mathew From alex at syzmk.com Thu Nov 9 21:18:00 2006 From: alex at syzmk.com (Alex Henderson) Date: Fri, 10 Nov 2006 09:18:00 +1300 Subject: [IronPython] COM Question In-Reply-To: <1163088523.4553528b0a917@www.debitel.net> References: <1163088523.4553528b0a917@www.debitel.net> Message-ID: <009901c7043c$282e72b0$788b5810$@com> Marshal is a static class in InteropServices (part of the .Net framework, nothing to do with IronPython) which is a bit of a dumping ground for useful methods that assist in marshalling data back and forth between managed and the unmanaged world... it'd be worth investigating invoking Marshal.ReleaseComObject/Marshal.FinalReleaseComObject on any RCW (runtime callable wrappers, i.e. the com objects your getting back from the EA interop) so that you can free up resources immediately when you no longer need them... It might not be necessary in most cases, but it's at least worth being aware of how these things behave. Chez, - Alex -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of propadovic.nenad at debitel.net Sent: Friday, 10 November 2006 5:09 a.m. To: users at lists.ironpython.com Subject: Re: [IronPython] COM Question Hello Alex, thanx for your help. It seems to work out. So this Marschal is some kind of casting for COM objects? Anyway, I just got several lines of reasonable output. Cheers, Nenad ------------------------------------------------- debitel.net Webmail _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Fri Nov 10 03:40:08 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 9 Nov 2006 18:40:08 -0800 Subject: [IronPython] garbage in the source file In-Reply-To: <4553B260.5050805@jpl.nasa.gov> References: <4553B260.5050805@jpl.nasa.gov> Message-ID: <7AD436E4270DD54A94238001769C22274AF02C42F2@DF-GRTDANE-MSG.exchange.corp.microsoft.com> The characters are there to ensure that we don't have a clash between these argument names and a users named argument names. For example if it was just "args" and you attempted to pass a keyword argument named "args" we would think we got two values for args. The characters are specified using the \u.... syntax so that the files don't have to be stored as Unicode files with a specified BOM. This compiles just fine w/ csc (there was a report that Mono was having problems with it - not sure if that's still the case). We recently ran into an internal tool that didn't like it and we've switched to using a Latin-1 character I believe instead although I'm not sure if that'd help you. You can always remove the characters from the file if you're having issues with some other tool and change the argument name to something really long and strange. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mathew Yeates Sent: Thursday, November 09, 2006 2:58 PM To: users at lists.ironpython.com Subject: [IronPython] garbage in the source file Hi I just tried compiling the source code but it has random characters in it. See IronPython/Runtime/PythonModule.cs line 57 public static PythonModule MakeModule(ICallerContext context, DynamicType cls, params object[] args\u03c4) Mathew _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Fri Nov 10 04:27:42 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 10 Nov 2006 12:27:42 +0900 Subject: [IronPython] garbage in the source file In-Reply-To: <4553B260.5050805@jpl.nasa.gov> References: <4553B260.5050805@jpl.nasa.gov> Message-ID: <5b0248170611091927p47e0aab4jdd0e6f600ced6389@mail.gmail.com> 2006/11/10, Mathew Yeates : > I just tried compiling the source code but it has random characters in > it. See IronPython/Runtime/PythonModule.cs line 57 > public static PythonModule MakeModule(ICallerContext context, > DynamicType cls, params object[] args\u03c4) It is intentional. It is to avoid name collision. -- Seo Sanghyeon From sanxiyn at gmail.com Fri Nov 10 04:31:22 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 10 Nov 2006 12:31:22 +0900 Subject: [IronPython] garbage in the source file In-Reply-To: <4553B260.5050805@jpl.nasa.gov> References: <4553B260.5050805@jpl.nasa.gov> Message-ID: <5b0248170611091931k4f5ce506gf6f31e9b5d05fccf@mail.gmail.com> 2006/11/10, Mathew Yeates : > I just tried compiling the source code but it has random characters in > it. See IronPython/Runtime/PythonModule.cs line 57 > public static PythonModule MakeModule(ICallerContext context, > DynamicType cls, params object[] args\u03c4) You should have no trouble compiling the source code, since this is legal C#. If you get an error, you are most likely bitten by Mono C# compiler tokenizer bug #52019, which is fixed in recent versions. If you can't upgrade for some reasons, apply the patch attached to the bug. http://bugzilla.ximian.com/show_bug.cgi?id=52019 -- Seo Sanghyeon From sanxiyn at gmail.com Fri Nov 10 06:38:05 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 10 Nov 2006 14:38:05 +0900 Subject: [IronPython] IronPython URLs Message-ID: <5b0248170611092138j68a72534gc05cf0866c7c45e1@mail.gmail.com> GQ Adonis thinks IronPython is a part of Microsoft's world domination plan. http://gqadonis.com/archive/2006/11/06/5.aspx On the other hand, Gareth Rushgrobe and Sam Sun view IronPython and JRuby in terms of rivalry of Python and Ruby in .NET and Java world. Quote: "Ruby is for Java shops. Python is for .NET." http://morethanseven.net/posts/jruby-vs-pythonnet http://substantiality.net/articles/2006/11/05/ruby-is-radioactive /n software releases RSSBus Beta 3, adding a plug-in architecture to support scripting in other languages. The release note mentions IronPython as an example. http://www.rssbus.com/blog/ -- Seo Sanghyeon From sanxiyn at gmail.com Fri Nov 10 06:59:33 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 10 Nov 2006 14:59:33 +0900 Subject: [IronPython] CodePlex redirection oddity In-Reply-To: <5b0248170611071829x5ae337c7gd5df91f10947e105@mail.gmail.com> References: <5b0248170611071829x5ae337c7gd5df91f10947e105@mail.gmail.com> Message-ID: <5b0248170611092159l59c3e9a3w1d6fe94b899f5061@mail.gmail.com> 2006/11/8, Sanghyeon Seo : > http://www.codeplex.com/Phalanger doesn't redirect and gives a nice URL, > while http://www.codeplex.com/IronPython redirects. This seems to be fixed now. -- Seo Sanghyeon From myeates at jpl.nasa.gov Fri Nov 10 22:24:51 2006 From: myeates at jpl.nasa.gov (Mathew Yeates) Date: Fri, 10 Nov 2006 13:24:51 -0800 Subject: [IronPython] garbage in the source file In-Reply-To: <5b0248170611091931k4f5ce506gf6f31e9b5d05fccf@mail.gmail.com> References: <4553B260.5050805@jpl.nasa.gov> <5b0248170611091931k4f5ce506gf6f31e9b5d05fccf@mail.gmail.com> Message-ID: <4554EE23.2060304@jpl.nasa.gov> Yes, I was indeed using the Mono compiler. Thanks for all the replies. Mathew Sanghyeon Seo wrote: > 2006/11/10, Mathew Yeates : > >> I just tried compiling the source code but it has random characters in >> it. See IronPython/Runtime/PythonModule.cs line 57 >> public static PythonModule MakeModule(ICallerContext context, >> DynamicType cls, params object[] args\u03c4) >> > > You should have no trouble compiling the source code, since this is legal C#. > > If you get an error, you are most likely bitten by Mono C# compiler > tokenizer bug #52019, which is fixed in recent versions. If you can't > upgrade for some reasons, apply the patch attached to the bug. > > http://bugzilla.ximian.com/show_bug.cgi?id=52019 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Sat Nov 11 09:14:26 2006 From: christopher at baus.net (Christopher Baus) Date: Sat, 11 Nov 2006 08:14:26 -0000 (GMT) Subject: [IronPython] re.MatchObject.lastmatch Message-ID: <2107.69.181.106.91.1163232866.squirrel@webmail.tuffmail.net> It appears that the lastmatch attribute of re.MatchObject isn't implemented. I'm hitting a lot of small bugs in core library implementations. Is the status of these modules available? http://baus.net/ From christopher at baus.net Sat Nov 11 18:49:52 2006 From: christopher at baus.net (Christopher Baus) Date: Sat, 11 Nov 2006 17:49:52 -0000 (GMT) Subject: [IronPython] re.MatchObject.lastmatch In-Reply-To: <2107.69.181.106.91.1163232866.squirrel@webmail.tuffmail.net> References: <2107.69.181.106.91.1163232866.squirrel@webmail.tuffmail.net> Message-ID: <2325.69.181.106.91.1163267392.squirrel@webmail.tuffmail.net> > It appears that the lastmatch attribute of re.MatchObject isn't > implemented. I'm hitting a lot of small bugs in core library > implementations. Is the status of these modules available? > > Actually make that re.MatchObject.lastgroup that isn't implemented. http://baus.net/ From christopher at baus.net Sat Nov 11 19:10:40 2006 From: christopher at baus.net (Christopher Baus) Date: Sat, 11 Nov 2006 18:10:40 -0000 (GMT) Subject: [IronPython] FePy socket.py w/ _fileobject Message-ID: <2363.69.181.106.91.1163268640.squirrel@webmail.tuffmail.net> I copied the _fileobject class directly from the standard library and added it to socket.py. The end result is here: https://svn3.cvsdude.com/baus/s2/webapp/bin/Lib/s2/socket.py As I mentioned in a previous post, _fileobject is used by urllib2. I think urllib2 is doing something fishy, but a lot of other packages depend on urllib2. It seemed like the easiest thing to do was to provide the class for compatibility with CPython. http://baus.net/ From rcs1000 at amoral.org Sat Nov 11 19:50:16 2006 From: rcs1000 at amoral.org (Robert Smithson) Date: Sat, 11 Nov 2006 13:50:16 -0500 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: Message-ID: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> Hi, I read that Mono now has - some - support for WinForms. Has anyone gotten this working? And does this mean that we'll be able to use IronPython to produce some nice cross-platform apps? Regards, Robert From christopher at baus.net Sun Nov 12 01:07:30 2006 From: christopher at baus.net (Christopher Baus) Date: Sun, 12 Nov 2006 00:07:30 -0000 (GMT) Subject: [IronPython] re incompatible with CPython? Message-ID: <1260.69.181.106.91.1163290050.squirrel@webmail.tuffmail.net> I'm running into problems with modules that use regex. Does anybody have a good idea how close the IronPython regex library mimics CPython? I'm getting close to the point of giving up and going back to CPython. Chris http://baus.net/ From Shri.Borde at microsoft.com Sun Nov 12 02:15:51 2006 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sat, 11 Nov 2006 17:15:51 -0800 Subject: [IronPython] embedded debugging In-Reply-To: References: Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E4E4173F517@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I believe your breakpoint is in top-level global code of the module. In that case, this is a known limitation. VisualStudio will display local variables of functions defined in IronPython. However, if you are executing top-level global code, the Python global variables are implemented as CLR static variables or sometimeas as a dictionary object held in a CLR static variable. The Locals window in VisualStudio does not display CLR global variables. As a result, you will not see the Python global variables. What is needed is a visualizer to display CLR global variables. VisualStudio does support such a plug-in architecture. However, such a plug-in has not yet been implemented. We do want to improve such support in the future, but we have not gotten to this yet. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paul Moore Sent: Wednesday, November 08, 2006 10:12 AM To: users at lists.ironpython.com Subject: [IronPython] embedded debugging I have an app that embedds IP runtime. I can set break points in the IP code but the debugger does not show any variables. The only variable is $line. All I can do is step through the code. I have set the debuggable option on the engine It is using CompiledCode -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Nov 12 02:45:59 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 12 Nov 2006 10:45:59 +0900 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> References: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> Message-ID: <5b0248170611111745n379f12e8ia0032223ba26c594@mail.gmail.com> 2006/11/12, Robert Smithson : > I read that Mono now has - some - support for WinForms. Has anyone > gotten this working? And does this mean that we'll be able to use > IronPython to produce some nice cross-platform apps? I'd say Mono has *good* support for WinForms. Of course, numerous people have it working. And yes, it does mean that one will be able to use IronPython to produce cross-platform GUI apps. -- Seo Sanghyeon From sanxiyn at gmail.com Sun Nov 12 02:51:12 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 12 Nov 2006 10:51:12 +0900 Subject: [IronPython] FePy socket.py w/ _fileobject In-Reply-To: <2363.69.181.106.91.1163268640.squirrel@webmail.tuffmail.net> References: <2363.69.181.106.91.1163268640.squirrel@webmail.tuffmail.net> Message-ID: <5b0248170611111751q3c64558fi3441feb30d0d58f5@mail.gmail.com> 2006/11/12, Christopher Baus : > I copied the _fileobject class directly from the standard library and > added it to socket.py. > > The end result is here: > https://svn3.cvsdude.com/baus/s2/webapp/bin/Lib/s2/socket.py Thank you for doing this. I should have done this long time ago. > As I mentioned in a previous post, _fileobject is used by urllib2. I > think urllib2 is doing something fishy, but a lot of other packages depend > on urllib2. Yes, urllib2 is "wrong" here. In my opinion, the best solution is to refactor "buffering and file emulation" part of socket.py to separate module (say, UserFile?) and use that. Nobody bothered to do that. > It seemed like the easiest thing to do was to provide the class for > compatibility with CPython. Yes, it is the easiest solution right now. -- Seo Sanghyeon From sanxiyn at gmail.com Sun Nov 12 03:00:30 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 12 Nov 2006 11:00:30 +0900 Subject: [IronPython] re incompatible with CPython? In-Reply-To: <1260.69.181.106.91.1163290050.squirrel@webmail.tuffmail.net> References: <1260.69.181.106.91.1163290050.squirrel@webmail.tuffmail.net> Message-ID: <5b0248170611111800q5bc6a7devf85b059fd2382827@mail.gmail.com> 2006/11/12, Christopher Baus : > > I'm running into problems with modules that use regex. Does anybody have > a good idea how close the IronPython regex library mimics CPython? I'm > getting close to the point of giving up and going back to CPython. I know the pain. :( I have a good idea how heroically IronPython mimics CPython re using System.Text.RegularExpression. I also know that it's not there. I have a good faith that it will be there someday. Before giving up, you may want to try PyPy's regex implementation. http://codespeak.net/svn/pypy/dist/pypy/lib/_sre.py You may need to edit a few places :(, but it works. I have tried it long time ago, and went back to IronPython's re, because it needs to be fixed anyway. You need to delete IronPython's implementation in C# and recompile before using PyPy's pure Python implementation. _sre.py is *not* slow, and I am confident it's 100% compatible for all realistic cases. -- Seo Sanghyeon From christopher at baus.net Sun Nov 12 06:27:33 2006 From: christopher at baus.net (Christopher Baus) Date: Sat, 11 Nov 2006 21:27:33 -0800 Subject: [IronPython] re incompatible with CPython? Message-ID: <20061112052716.073D85190F@mxout-03.mxes.net> System.Text.RegularExpression. I also know that it's not there. I have a good faith that it will be there someday. ===== How willing is MS to take patches to IP core? Is it worth spending time on this? I'd rather just have a re module that worked :( I'm concerned that there are still a ton of incompatabilities. This feels more like a beta than a 1.x release. From mark.john.rees at gmail.com Sun Nov 12 12:45:14 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Sun, 12 Nov 2006 22:45:14 +1100 Subject: [IronPython] re incompatible with CPython? In-Reply-To: <20061112052716.073D85190F@mxout-03.mxes.net> References: <20061112052716.073D85190F@mxout-03.mxes.net> Message-ID: Sadly it would appear that Microsoft are not accepting code contributions yet (for example, in this mail thread back in Sept 2006 Dino says this), hopefully it will change. Microsoft dynamic language team, please correct me if I am wrong. In the past, if someone reports any regex bug with a self-contained and obvious test case, and it's normally is quickly fixed. Mark On 11/12/06, Christopher Baus wrote: > > System.Text.RegularExpression. I also know that it's not there. I have > a good faith that it will be there someday. > > ===== > > How willing is MS to take patches to IP core? Is it worth spending time > on this? I'd rather just have a re module that worked :( I'm concerned > that there are still a ton of incompatabilities. This feels more like a > beta than a 1.x release. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Nov 12 12:18:53 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 12 Nov 2006 20:18:53 +0900 Subject: [IronPython] base64 bug Message-ID: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> IronPython 1.0 (1.0) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import base64 >>> base64.decodestring('w/==') u'\xff' Python 2.4.4 (#2, Oct 20 2006, 00:23:25) [GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import base64 >>> base64.decodestring('w/==') '\xc3' Now, imagine, what kind of debugging hell the above bug entailed. I don't want to sound too harsh, but some parts of me are crying out loud, "Python implementation with broken re, socket, and base64? And they call it 1.0? What the hell? Are they serious?" No Python programmers expect to debug re, socket, or base64 problems. They are expected to just work. I can only agree with following quotes of Baus: "I'd rather just have a re module that worked :( I'm concerned that there are still a ton of incompatabilities. This feels more like a beta than a 1.x release." Sorry. -- Seo Sanghyeon From christopher at baus.net Mon Nov 13 00:45:10 2006 From: christopher at baus.net (Christopher Baus) Date: Sun, 12 Nov 2006 23:45:10 -0000 (GMT) Subject: [IronPython] base64 bug In-Reply-To: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> Message-ID: <1369.69.181.106.91.1163375110.squirrel@webmail.tuffmail.net> > Now, imagine, what kind of debugging hell the above bug entailed. > > I don't want to sound too harsh, but some parts of me are crying out > loud, "Python implementation with broken re, socket, and base64? And > they call it 1.0? What the hell? Are they serious?" > I concur. I'm sold on the concept of integrating Python and .NET, but in implementation, this is not 1.0 quality (unless no compatibility with CPython is claimed, but I'd have to question the value of IronPython w/out CPython compatibility). I've spent a lot of my free time chasing down bugs. The os exception type mismatches about drove me to brink. The regular expression problems are a deciding factor for me. I REALLY, REALLY do not want to get involved with debugging the re module, but there is a ton of code out there that needs a decent re package. Anyway, I wrote more about this on my blog here: http://baus.net/ironpython-are-the-batteries-included From sanxiyn at gmail.com Mon Nov 13 04:34:28 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 13 Nov 2006 12:34:28 +0900 Subject: [IronPython] base64 bug In-Reply-To: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> Message-ID: <5b0248170611121934g4096d1fsd765fb3dc9393d46@mail.gmail.com> 2006/11/12, Sanghyeon Seo : > IronPython 1.0 (1.0) on .NET 2.0.50727.42 > Copyright (c) Microsoft Corporation. All rights reserved. > >>> import base64 > >>> base64.decodestring('w/==') > u'\xff' Filed as #5566. http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5566 -- Seo Sanghyeon From sanxiyn at gmail.com Mon Nov 13 04:35:13 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 13 Nov 2006 12:35:13 +0900 Subject: [IronPython] re.MatchObject.lastmatch In-Reply-To: <2325.69.181.106.91.1163267392.squirrel@webmail.tuffmail.net> References: <2107.69.181.106.91.1163232866.squirrel@webmail.tuffmail.net> <2325.69.181.106.91.1163267392.squirrel@webmail.tuffmail.net> Message-ID: <5b0248170611121935o53edb74fgd7fff21cc4f73d87@mail.gmail.com> 2006/11/12, Christopher Baus : > Actually make that re.MatchObject.lastgroup that isn't implemented. Filed as #5518. http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5518 -- Seo Sanghyeon From fredrik at pythonware.com Mon Nov 13 02:13:30 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon, 13 Nov 2006 02:13:30 +0100 Subject: [IronPython] base64 bug In-Reply-To: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> Message-ID: <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> > >>> import base64 > >>> base64.decodestring('w/==') > '\xc3' > > Now, imagine, what kind of debugging hell the above bug entailed. on the other hand: >>> base64.encodestring("\xc3") 'ww==\n' so it's really the encoder that's broken. unless I'm mistaken, the "w/==" string use the wrong padding (ones in- stead of zeros), and the relevant RFC doesn't specify how to deal with that situation. as far as the specification is concerned, the decoder is free to do whatever it wants when it gets bogus data. (as for the "this is not 1.0" argumentation, I think you're all overestimating how well Python is specified. different CPython releases aren't even com- patible with themselves on things like this, so it's a bit naive to expect an independent implementation to be compatible at a bug-by-bug level) From sanxiyn at gmail.com Mon Nov 13 05:21:57 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 13 Nov 2006 13:21:57 +0900 Subject: [IronPython] base64 bug In-Reply-To: <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> Message-ID: <5b0248170611122021o4b65e387rf229990e2e18f21c@mail.gmail.com> I wrote: > >>> import base64 > >>> base64.decodestring('w/==') > '\xc3' > > Now, imagine, what kind of debugging hell the above bug entailed. 2006/11/13, Fredrik Lundh : > on the other hand: > > >>> base64.encodestring("\xc3") > 'ww==\n' > > so it's really the encoder that's broken. Okay. Here's the valid case IronPython is misbehaving: >>> base64.decodestring('w/A=') '\xc0' Correct decoding is '\xc3\xf0'. The real issue here is that IronPython ignores slashes. -- Seo Sanghyeon From sanxiyn at gmail.com Mon Nov 13 06:30:26 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 13 Nov 2006 14:30:26 +0900 Subject: [IronPython] Some patches Message-ID: <5b0248170611122130g20ce1c4cj4af4717d0f24af2c@mail.gmail.com> I wrote some patches. http://fepy.sourceforge.net/patches.html patch-ironpython-base64-slash This patch fixes an issue that strings with slashes are incorrectly decoded by base64 module. patch-ironpython-re-lastgroup This patch implements lastgroup attribute of match objects produced by regular expression matching. patch-stdlib-logging-getframe This patch prevents sys._getframe() from being called in logging because it's not implemented on IronPython. I will submit the last one to CPython. I will create a new release of the community edition with above patches ASAP. Thanks. -- Seo Sanghyeon From christopher at baus.net Mon Nov 13 06:55:06 2006 From: christopher at baus.net (Christopher Baus) Date: Mon, 13 Nov 2006 05:55:06 -0000 (GMT) Subject: [IronPython] base64 bug In-Reply-To: <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> Message-ID: <2563.69.181.106.91.1163397306.squirrel@webmail.tuffmail.net> > (as for the "this is not 1.0" argumentation, I think you're all > overestimating > how well Python is specified. different CPython releases aren't even com- > patible with themselves on things like this, so it's a bit naive to expect > an > independent implementation to be compatible at a bug-by-bug level) Maybe, although the same could be said about .NET, but the mono folks are working pretty hard to emulate even under speced parts of .NET. From christopher at baus.net Mon Nov 13 06:56:29 2006 From: christopher at baus.net (Christopher Baus) Date: Mon, 13 Nov 2006 05:56:29 -0000 (GMT) Subject: [IronPython] Some patches In-Reply-To: <5b0248170611122130g20ce1c4cj4af4717d0f24af2c@mail.gmail.com> References: <5b0248170611122130g20ce1c4cj4af4717d0f24af2c@mail.gmail.com> Message-ID: <2567.69.181.106.91.1163397389.squirrel@webmail.tuffmail.net> > patch-ironpython-base64-slash > This patch fixes an issue that strings with slashes are incorrectly > decoded by base64 module. > > patch-ironpython-re-lastgroup > This patch implements lastgroup attribute of match objects produced by > regular expression matching. > > patch-stdlib-logging-getframe > This patch prevents sys._getframe() from being called in logging > because it's not implemented on IronPython. > > I will submit the last one to CPython. > I will create a new release of the community edition with above patches > ASAP. > Wow, great work. Maybe I shouldn't give up yet. From mark.john.rees at gmail.com Mon Nov 13 08:19:26 2006 From: mark.john.rees at gmail.com (Mark Rees) Date: Mon, 13 Nov 2006 18:19:26 +1100 Subject: [IronPython] Some patches In-Reply-To: <2567.69.181.106.91.1163397389.squirrel@webmail.tuffmail.net> References: <5b0248170611122130g20ce1c4cj4af4717d0f24af2c@mail.gmail.com> <2567.69.181.106.91.1163397389.squirrel@webmail.tuffmail.net> Message-ID: This is why we need to give Sanghyeon more help with his FePy project. fepy.sourceforge.net provides an avenue for us to make IronPython more useful for people who want to use it with the CPython libraries or need fixes to problems in a rapid timeframe. Imho IronPython in it's current form is get for scripting or developing .NET/Mono apps as long as you are content to use the .NET/Mono framework libraries. If you want to start utilising the wonderful CPython libraries, the things that Microsoft consider minor incompatibilities with CPython can be showstoppers. So even if Microsoft cannot accept patches from outside sources, fepy certainly will. And to Microsoft and the Dynamic Languages team, you have created a good implementation of Python for CLI, but there is the opportunity make it even better and more powerful. Mark On 11/13/06, Christopher Baus wrote: > > > > patch-ironpython-base64-slash > > This patch fixes an issue that strings with slashes are incorrectly > > decoded by base64 module. > > > > patch-ironpython-re-lastgroup > > This patch implements lastgroup attribute of match objects produced by > > regular expression matching. > > > > patch-stdlib-logging-getframe > > This patch prevents sys._getframe() from being called in logging > > because it's not implemented on IronPython. > > > > I will submit the last one to CPython. > > I will create a new release of the community edition with above patches > > ASAP. > > > > Wow, great work. Maybe I shouldn't give up yet. > > _______________________________________________ > 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 giles.thomas at resolversystems.com Mon Nov 13 13:41:52 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Mon, 13 Nov 2006 12:41:52 +0000 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: <5b0248170611111745n379f12e8ia0032223ba26c594@mail.gmail.com> References: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> <5b0248170611111745n379f12e8ia0032223ba26c594@mail.gmail.com> Message-ID: <45586810.4030407@resolversystems.com> Seo, Does that extend to support for WinForms 2.0? Last time I tried running one of my .NET apps under Mono, it could not find the System.Windows.Forms 2.0.0.0 DLL. I may well have been missing something obvious, however. Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com Sanghyeon Seo wrote: > 2006/11/12, Robert Smithson : > >> I read that Mono now has - some - support for WinForms. Has anyone >> gotten this working? And does this mean that we'll be able to use >> IronPython to produce some nice cross-platform apps? >> > > I'd say Mono has *good* support for WinForms. Of course, numerous > people have it working. And yes, it does mean that one will be able to > use IronPython to produce cross-platform GUI apps. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Mon Nov 13 18:35:00 2006 From: christopher at baus.net (Christopher Baus) Date: Mon, 13 Nov 2006 17:35:00 -0000 (GMT) Subject: [IronPython] [Fwd: RE: Some patches] Message-ID: <3138.69.181.106.91.1163439300.squirrel@webmail.tuffmail.net> > This is why we need to give Sanghyeon more help with his FePy project. ==== No doubt. I was getting grumpy after spending a good part of my weekend getting the OpenID consumer working. It seemed everywhere I turned I was hitting a problem. Turns out I was had problems with the CPython on windows as well. With 2 cutting edge technologies it is difficult to know where the actual problem is. I do think there is a lot of genius in the language implementation, that's why I keep hanging in there. Maybe with a fresh look this week the situation won't seem so dour. Chris http://baus.net/ From michael_sweeney at agilent.com Mon Nov 13 23:59:32 2006 From: michael_sweeney at agilent.com (michael_sweeney at agilent.com) Date: Mon, 13 Nov 2006 15:59:32 -0700 Subject: [IronPython] 1.1 Alpha Release Plan? Message-ID: <64B0479F895F194587EE70276364C5C6017AEFA4@wcosmb02.cos.agilent.com> When I look at the following page: http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=IronPython&ReleaseId=161 I see lots of open issues planned to be fixed for the 1.1 alpha release. Is this list current and up to date? Is the release date of December 1st close? Thanks in advance... ------------------------------------------------------------ Michael A. Sweeney email: michael_sweeney at agilent.com Agilent Technologies ------------------------------------------------------------ From dinov at exchange.microsoft.com Tue Nov 14 00:28:52 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 13 Nov 2006 15:28:52 -0800 Subject: [IronPython] 1.1 Alpha Release Plan? In-Reply-To: <64B0479F895F194587EE70276364C5C6017AEFA4@wcosmb02.cos.agilent.com> References: <64B0479F895F194587EE70276364C5C6017AEFA4@wcosmb02.cos.agilent.com> Message-ID: <7AD436E4270DD54A94238001769C22274AF02C48A9@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Our very tentative thinking is that the date is close, but the list of fixes that make it into 1.1 Alpha will probably be much smaller than what you see there. Alpha will primarily have the new features and a small handful of fixes. Then the 1.1 Beta release will be almost entirely bug fixes on top of 1.1 Alpha probably with no new feature additions. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of michael_sweeney at agilent.com Sent: Monday, November 13, 2006 3:00 PM To: users at lists.ironpython.com Subject: [IronPython] 1.1 Alpha Release Plan? When I look at the following page: http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=IronPython&ReleaseId=161 I see lots of open issues planned to be fixed for the 1.1 alpha release. Is this list current and up to date? Is the release date of December 1st close? Thanks in advance... ------------------------------------------------------------ Michael A. Sweeney email: michael_sweeney at agilent.com Agilent Technologies ------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From paul.moore at centrify.com Tue Nov 14 00:37:58 2006 From: paul.moore at centrify.com (Paul Moore) Date: Mon, 13 Nov 2006 15:37:58 -0800 Subject: [IronPython] Sys.exit request Message-ID: I did ask before but I guess it got lost. Can the PythonSystemExitException please have the parameter passed to exit in it So if I do exit(12) Then I can do Catch(PythonSystemExitException ex) { if((int)ex.ExitCode == 12) ....... } From dinov at exchange.microsoft.com Tue Nov 14 00:47:27 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 13 Nov 2006 15:47:27 -0800 Subject: [IronPython] Sys.exit request In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C22274AF02C48BB@DF-GRTDANE-MSG.exchange.corp.microsoft.com> There's a int GetExitCode(out object nonIntegerCode) API on PythonSystemExitException that will return you the integer exit code or a Python object if the user did sys.exit('foo') or something easily insane. In that what you're looking for? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paul Moore Sent: Monday, November 13, 2006 3:38 PM To: Discussion of IronPython Subject: [IronPython] Sys.exit request I did ask before but I guess it got lost. Can the PythonSystemExitException please have the parameter passed to exit in it So if I do exit(12) Then I can do Catch(PythonSystemExitException ex) { if((int)ex.ExitCode == 12) ....... } _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From paul.moore at centrify.com Tue Nov 14 00:50:10 2006 From: paul.moore at centrify.com (Paul Moore) Date: Mon, 13 Nov 2006 15:50:10 -0800 Subject: [IronPython] Sys.exit request Message-ID: Duuh - I must have missed it. Thanks v much. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, November 13, 2006 3:47 PM To: Discussion of IronPython Subject: Re: [IronPython] Sys.exit request There's a int GetExitCode(out object nonIntegerCode) API on PythonSystemExitException that will return you the integer exit code or a Python object if the user did sys.exit('foo') or something easily insane. In that what you're looking for? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paul Moore Sent: Monday, November 13, 2006 3:38 PM To: Discussion of IronPython Subject: [IronPython] Sys.exit request I did ask before but I guess it got lost. Can the PythonSystemExitException please have the parameter passed to exit in it So if I do exit(12) Then I can do Catch(PythonSystemExitException ex) { if((int)ex.ExitCode == 12) ....... } _______________________________________________ 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 luismg at gmx.net Thu Nov 9 09:48:23 2006 From: luismg at gmx.net (=?Windows-1252?Q?Luis_M._Gonz=E1lez?=) Date: Thu, 9 Nov 2006 05:48:23 -0300 Subject: [IronPython] Secret project: Simplified Data Scenarios (?) Message-ID: <000e01c703db$d2714bf0$6e00a8c0@averatecdda041> I just read an article in eWeek entitled "Secret Microsoft Project Ties IronPython to ASP.NET": http://www.eweek.com/article2/0,1759,2053498,00.asp?kc=EWRSS03119TX1K0000594 It mentions a secret project called "Simplified Data Scenarios" where developers can "easily build data-bound applications from scratch" starting only with a database. The prototype enables users to customize applications programmatically using IronPython. Sounds great, but I couldn't find more information about this... Anybody knows what is it about? Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From likwoka at gmail.com Fri Nov 10 17:31:54 2006 From: likwoka at gmail.com (Alex Li) Date: Fri, 10 Nov 2006 16:31:54 -0000 Subject: [IronPython] Receiving command line arguments Message-ID: <1163176314.184540.235850@i42g2000cwa.googlegroups.com> Hi all, I am on Windows XP. I wrote a IronPython script that I want to run from anywhere on my file system. So I associated the extension (I use .ipy since I already have .py asscoiated with python.exe) with ipy.exe, and put my IronPython script into the search PATH. Now when I open a command line console anywhere in the file system, I can called my script directly without typing ipy.exe in front. However the command line arguments are not being passed to either sys.argv or System.Environment.CommandLine. Now if I call my script with ipy.exe (and with full path to my script), then those command line arguments would show up. Am I doing something wrong or is this a bug? Thanks, Alex From guru.grace at gmail.com Fri Nov 10 17:52:37 2006 From: guru.grace at gmail.com (erase_ego) Date: Fri, 10 Nov 2006 08:52:37 -0800 (PST) Subject: [IronPython] Reading configuration file from Interpreter Message-ID: <7280789.post@talk.nabble.com> I have a .NET DLL which reads a configuration file using classes in System.Configuration namespace. I am running methods in this DLL from IronPython interpreter. It is working fine except that it is not able to read the configuration file. I have the configuration file in the same folder as the DLL. I have used AddReferenceToFileAndPath to add a reference to this DLL. Any ideas. Thanks -- View this message in context: http://www.nabble.com/Reading-configuration-file-from-Interpreter-tf2609018.html#a7280789 Sent from the IronPython mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luismgz at gmail.com Thu Nov 9 02:03:57 2006 From: luismgz at gmail.com (luismg) Date: Thu, 09 Nov 2006 01:03:57 -0000 Subject: [IronPython] Simplified Data Scenarios framework? Message-ID: <1163034237.521560.170360@b28g2000cwb.googlegroups.com> I read this article about a "secret" project that is tied to Ironpython: http://www.eweek.com/article2/0,1759,2053498,00.asp?kc=EWRSS03119TX1K0000594 Does anyone know about this? Luis From luismg at gmx.net Thu Nov 9 10:36:27 2006 From: luismg at gmx.net (=?iso-8859-1?Q?Luis_M._Gonz=E1lez?=) Date: Thu, 9 Nov 2006 06:36:27 -0300 Subject: [IronPython] Secret project: Simplified Data Scenarios (?) Message-ID: <000d01c703e2$897336f0$6e00a8c0@averatecdda041> I just read an article in eWeek entitled "Secret Microsoft Project Ties IronPython to ASP.NET": http://www.eweek.com/article2/0,1759,2053498,00.asp?kc=EWRSS03119TX1K0000594 It mentions a secret project called "Simplified Data Scenarios" where developers can "easily build data-bound applications from scratch" starting only with a database. The prototype enables users to customize applications programmatically using IronPython. Sounds great, but I couldn't find more information about this... Anybody knows what is this about? Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From bittercoder at gmail.com Mon Nov 13 06:13:41 2006 From: bittercoder at gmail.com (Alex Henderson) Date: Mon, 13 Nov 2006 18:13:41 +1300 Subject: [IronPython] base64 bug In-Reply-To: <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> References: <5b0248170611120318u74b6a908gd53cc841bf8cea94@mail.gmail.com> <368a5cd50611121713v1ba43966p47649548570e5108@mail.gmail.com> Message-ID: <001801c706e2$7ede1e50$7c9a5af0$@com> I tend to agree about the 1.0 Argument, the lack of a true specification for this functionality makes these things a trial and error process, and until the Iron python user base grows, there just simply isn't enough user coverage to have ironed out the obvious wrinkles (or in some cases, forgetting to iron the wrinkles in ;o) that are cropping up day to day with this support functionality (considering how inactive this list is lately). Just my two cents though... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fredrik Lundh Sent: Monday, 13 November 2006 2:14 p.m. To: Discussion of IronPython Subject: Re: [IronPython] base64 bug > >>> import base64 > >>> base64.decodestring('w/==') > '\xc3' > > Now, imagine, what kind of debugging hell the above bug entailed. on the other hand: >>> base64.encodestring("\xc3") 'ww==\n' so it's really the encoder that's broken. unless I'm mistaken, the "w/==" string use the wrong padding (ones in- stead of zeros), and the relevant RFC doesn't specify how to deal with that situation. as far as the specification is concerned, the decoder is free to do whatever it wants when it gets bogus data. (as for the "this is not 1.0" argumentation, I think you're all overestimating how well Python is specified. different CPython releases aren't even com- patible with themselves on things like this, so it's a bit naive to expect an independent implementation to be compatible at a bug-by-bug level) _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From christian.muirhead at resolversystems.com Tue Nov 14 18:33:52 2006 From: christian.muirhead at resolversystems.com (Christian Muirhead) Date: Tue, 14 Nov 2006 17:33:52 +0000 Subject: [IronPython] co_name in code objects Message-ID: <4559FE00.5010501@resolversystems.com> Hi - We noticed a small difference between CPython and IronPython: CPython: >>> c = compile("x = 2", "test", "exec") >>> c.co_filename 'test' IronPython 1.0.1 >>> c = compile("x = 2", "test", "exec") >>> c.co_filename >>> (That is, it was None) It would be handy for us if IP's behaviour matched CPython's here. Can you please add a bug for this? Thanks, Christian From David.Ebbo at microsoft.com Tue Nov 14 18:45:29 2006 From: David.Ebbo at microsoft.com (David Ebbo) Date: Tue, 14 Nov 2006 09:45:29 -0800 Subject: [IronPython] Secret project: Simplified Data Scenarios (?) In-Reply-To: <000d01c703e2$897336f0$6e00a8c0@averatecdda041> References: <000d01c703e2$897336f0$6e00a8c0@averatecdda041> Message-ID: Hi Luis, This was a prototype of something that we're working on. It is still at a very early stage, so we're not ready to give bits out yet. We will definitely announce it to this list when we are ready for an external testing phase, so stay tune! Thanks, David From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Luis M. Gonz?lez Sent: Thursday, November 09, 2006 1:36 AM To: users at lists.ironpython.com Subject: [IronPython] Secret project: Simplified Data Scenarios (?) I just read an article in eWeek entitled "Secret Microsoft Project Ties IronPython to ASP.NET": http://www.eweek.com/article2/0,1759,2053498,00.asp?kc=EWRSS03119TX1K0000594 It mentions a secret project called "Simplified Data Scenarios" where developers can "easily build data-bound applications from scratch" starting only with a database. The prototype enables users to customize applications programmatically using IronPython. Sounds great, but I couldn't find more information about this... Anybody knows what is this about? Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 14 19:13:48 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 14 Nov 2006 10:13:48 -0800 Subject: [IronPython] co_name in code objects In-Reply-To: <4559FE00.5010501@resolversystems.com> References: <4559FE00.5010501@resolversystems.com> Message-ID: <7AD436E4270DD54A94238001769C22274C4016B0EC@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report! I've filed this as CodePlex bug 5641 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5641) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christian Muirhead Sent: Tuesday, November 14, 2006 9:34 AM To: users at lists.ironpython.com Subject: [IronPython] co_name in code objects Hi - We noticed a small difference between CPython and IronPython: CPython: >>> c = compile("x = 2", "test", "exec") >>> c.co_filename 'test' IronPython 1.0.1 >>> c = compile("x = 2", "test", "exec") >>> c.co_filename >>> (That is, it was None) It would be handy for us if IP's behaviour matched CPython's here. Can you please add a bug for this? Thanks, Christian _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Tue Nov 14 19:37:31 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 14 Nov 2006 10:37:31 -0800 Subject: [IronPython] Receiving command line arguments In-Reply-To: <1163176314.184540.235850@i42g2000cwa.googlegroups.com> References: <1163176314.184540.235850@i42g2000cwa.googlegroups.com> Message-ID: <7AD436E4270DD54A94238001769C22274C4016B11A@DF-GRTDANE-MSG.exchange.corp.microsoft.com> If System.Environment.CommandLine isn't reporting the arguments then it sounds like the arguments aren't getting passed to ipy.exe. I just tried this on both XP, Server 2k3, and Vista and it worked on all three. Steps I followed: Create .ipy file: copy con foo.ipy import sys print sys.argv raw_input() ^Z Start explorer: start . Open foo.ipy Get the prompt to choose a program, find ipy.exe and start it. That gives me a new console window that outputs the filename being started and waits for me to hit enter. Starting it from the console also works. My guess would be that there's something wrong w/ the file extension association - did you create it through some other means? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Alex Li Sent: Friday, November 10, 2006 8:32 AM To: users at lists.ironpython.com Subject: [IronPython] Receiving command line arguments Hi all, I am on Windows XP. I wrote a IronPython script that I want to run from anywhere on my file system. So I associated the extension (I use .ipy since I already have .py asscoiated with python.exe) with ipy.exe, and put my IronPython script into the search PATH. Now when I open a command line console anywhere in the file system, I can called my script directly without typing ipy.exe in front. However the command line arguments are not being passed to either sys.argv or System.Environment.CommandLine. Now if I call my script with ipy.exe (and with full path to my script), then those command line arguments would show up. Am I doing something wrong or is this a bug? Thanks, Alex _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From likwoka at gmail.com Tue Nov 14 20:19:33 2006 From: likwoka at gmail.com (Alex Li) Date: Tue, 14 Nov 2006 19:19:33 -0000 Subject: [IronPython] Receiving command line arguments References: <1163176314.184540.235850@i42g2000cwa.googlegroups.com> <7AD436E4270DD54A94238001769C22274C4016B11A@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <1163531973.512380.246290@b28g2000cwb.googlegroups.com> Thanks Dino, You are right, my file extension association wasn't created properly.... I missed the %* at the end of the open action. Regards, Alex From garage_dba at hotmail.com Tue Nov 14 20:47:21 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Tue, 14 Nov 2006 13:47:21 -0600 Subject: [IronPython] vs integration Message-ID: I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 14 21:03:30 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 14 Nov 2006 12:03:30 -0800 Subject: [IronPython] vs integration In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) -------------- next part -------------- An HTML attachment was scrubbed... URL: From garage_dba at hotmail.com Tue Nov 14 22:36:09 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Tue, 14 Nov 2006 15:36:09 -0600 Subject: [IronPython] vs integration References: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: File->New Web Site was used in an example I looked at. But I tried it your way, and File->New Project does not show anything about IronPython. ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 2:03 PM Subject: Re: [IronPython] vs integration Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) ------------------------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 14 22:44:37 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 14 Nov 2006 13:44:37 -0800 Subject: [IronPython] vs integration In-Reply-To: References: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <7AD436E4270DD54A94238001769C22274C4016B1FE@DF-GRTDANE-MSG.exchange.corp.microsoft.com> How are you starting VS after the installation, are you starting the experimental hive? The way I typically start this is in %ProgramFiles% (%ProgramFiles(x86)% if yo're on 64-bit) there's a Visual Studio 2005 SDK folder that has a year.month folder (I don't remember what v3 is off the top of my head) that has VisualStudioIntegration\Samples\IronPythonIntegration\IronPython.sln below it. If you open this solution, hit F5 in VS, then another copy of VS opens. It's this "inner" copy of VS which contains the IronPython integration support. Once you've done that once you should be able to start the experimental hive of VS directly w/ IronPython support by starting the same command IronPython.sln runs when you hit F5. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration File->New Web Site was used in an example I looked at. But I tried it your way, and File->New Project does not show anything about IronPython. ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 2:03 PM Subject: Re: [IronPython] vs integration Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) ________________________________ _______________________________________________ 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 Mahesh.Prakriya at microsoft.com Wed Nov 15 02:01:54 2006 From: Mahesh.Prakriya at microsoft.com (Mahesh Prakriya) Date: Tue, 14 Nov 2006 17:01:54 -0800 Subject: [IronPython] Need authors for IronPython books In-Reply-To: <7857D979C1E90441822DDD13520B062245A30CE9@NA-EXMSG-C112.redmond.corp.microsoft.com> Message-ID: <8DD6D7B47848B24F972C23F274C6E5684929B29D@NA-EXMSG-C112.redmond.corp.microsoft.com> Couples of publishers have ping'ed me about whether anyone is interested in writing a book on IronPython and they're currently bottlenecked on finding qualified authors. If you can write/explain well and have strong Python and .NET background, this is a great opportunity to consider. Please reply back to me and I'll get you in touch. Thanks, Mahesh PS: I'm currently out of town so will be delayed a bit in my responses. -------------- next part -------------- An HTML attachment was scrubbed... URL: From garage_dba at hotmail.com Wed Nov 15 02:08:32 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Tue, 14 Nov 2006 19:08:32 -0600 Subject: [IronPython] vs integration References: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <7AD436E4270DD54A94238001769C22274C4016B1FE@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: That works. Thanks! Do you remember what "command IronPython.sln runs when you hit F5." ? ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 3:44 PM Subject: Re: [IronPython] vs integration How are you starting VS after the installation, are you starting the experimental hive? The way I typically start this is in %ProgramFiles% (%ProgramFiles(x86)% if yo're on 64-bit) there's a Visual Studio 2005 SDK folder that has a year.month folder (I don't remember what v3 is off the top of my head) that has VisualStudioIntegration\Samples\IronPythonIntegration\IronPython.sln below it. If you open this solution, hit F5 in VS, then another copy of VS opens. It's this "inner" copy of VS which contains the IronPython integration support. Once you've done that once you should be able to start the experimental hive of VS directly w/ IronPython support by starting the same command IronPython.sln runs when you hit F5. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration File->New Web Site was used in an example I looked at. But I tried it your way, and File->New Project does not show anything about IronPython. ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 2:03 PM Subject: Re: [IronPython] vs integration Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) ---------------------------------------------------------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ------------------------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Wed Nov 15 06:36:50 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 15 Nov 2006 05:36:50 -0000 (GMT) Subject: [IronPython] fepy socket seek Message-ID: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> I found a problem with the fepy socket module. Seek operations aren't supported, but they are supported in CPython (not totally sure how they do that). Here's an example. import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("baus.net", 80)) file = s.makefile('wb', 1500) file.write("%s %s %s\r\n" % ("HTTP", "GET", "/")) From christopher at baus.net Wed Nov 15 07:38:08 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 15 Nov 2006 06:38:08 -0000 (GMT) Subject: [IronPython] fepy socket seek In-Reply-To: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> Message-ID: <1907.24.182.26.162.1163572688.squirrel@webmail.tuffmail.net> > Here's an example. > > import socket > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.connect(("baus.net", 80)) > file = s.makefile('wb', 1500) > file.write("anything\r\n") The problem only occurs with the binary mode set, which is very strange. The following: file = s.makefile('w', 1500) file.write("anything\r\n") seems to work. http://baus.net/ From fredrik at pythonware.com Wed Nov 15 07:43:35 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed, 15 Nov 2006 07:43:35 +0100 Subject: [IronPython] fepy socket seek In-Reply-To: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> Message-ID: <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> Christopher Baus wrote: > I found a problem with the fepy socket module. Seek operations aren't > supported, but they are supported in CPython (not totally sure how they do > that). > > Here's an example. > > import socket > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.connect(("baus.net", 80)) > file = s.makefile('wb', 1500) > file.write("%s %s %s\r\n" % ("HTTP", "GET", "/")) where's the seek ? the second argument to makefile is the requested buffer size. From sanxiyn at gmail.com Wed Nov 15 09:44:33 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 15 Nov 2006 17:44:33 +0900 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: <45586810.4030407@resolversystems.com> References: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> <5b0248170611111745n379f12e8ia0032223ba26c594@mail.gmail.com> <45586810.4030407@resolversystems.com> Message-ID: <5b0248170611150044m620cde0andf67923b46b4c9ba@mail.gmail.com> 2006/11/13, Giles Thomas : > > Seo, > > Does that extend to support for WinForms 2.0? Last time I tried running one > of my .NET apps under Mono, it could not find the System.Windows.Forms > 2.0.0.0 DLL. I may well have been missing something obvious, however. Mono includes System.Windows.Forms 2.0.0.0 DLL too. I am not sure why you had problems. -- Seo Sanghyeon From sanxiyn at gmail.com Wed Nov 15 11:12:57 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 15 Nov 2006 19:12:57 +0900 Subject: [IronPython] Need authors for IronPython books In-Reply-To: <8DD6D7B47848B24F972C23F274C6E5684929B29D@NA-EXMSG-C112.redmond.corp.microsoft.com> References: <7857D979C1E90441822DDD13520B062245A30CE9@NA-EXMSG-C112.redmond.corp.microsoft.com> <8DD6D7B47848B24F972C23F274C6E5684929B29D@NA-EXMSG-C112.redmond.corp.microsoft.com> Message-ID: <5b0248170611150212p2b848096wba9b08cadcd8d215@mail.gmail.com> 2006/11/15, Mahesh Prakriya : > Couples of publishers have ping'ed me about whether anyone is interested in > writing a book on IronPython and they're currently bottlenecked on finding > qualified authors. I know that Michael Foord is already writing a book on IronPython. -- Seo Sanghyeon From sanxiyn at gmail.com Wed Nov 15 13:43:36 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 15 Nov 2006 21:43:36 +0900 Subject: [IronPython] Python Cryptographic Toolkit for IronPython Message-ID: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> Python Cryptographic Toolkit is what you expect it to be. http://www.amk.ca/python/code/crypto One part of it is block encryption algorithms, like AES and DES. It follows PEP 272, API for Block Encryption Algorithms. http://www.python.org/dev/peps/pep-0272/ I wrote a simple wrapper transforming any .NET classes subclassing SymmetricAlgorithm in System.Security.Cryptography to PEP 272-compliant block encryption module. Here it is: https://svn.sourceforge.net/svnroot/fepy/trunk/cli/cipher.py And here is a test script I used to test it: https://svn.sourceforge.net/svnroot/fepy/trunk/example/cipher_test.py To use it, import cli cli.install('cipher') That's all! This performs some magic to insert modules created from Rijndael, DES, TripleDES classes to Crypto.Cipher package namespace as AES, DES, DES3, as you would expect from pycrypto. So you don't need to modify your existing Python sources! This will be included in the next IPCE release. Thanks! -- Seo Sanghyeon From fuzzyman at voidspace.org.uk Wed Nov 15 16:12:35 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Wed, 15 Nov 2006 15:12:35 +0000 Subject: [IronPython] Need authors for IronPython books In-Reply-To: <5b0248170611150212p2b848096wba9b08cadcd8d215@mail.gmail.com> References: <7857D979C1E90441822DDD13520B062245A30CE9@NA-EXMSG-C112.redmond.corp.microsoft.com> <8DD6D7B47848B24F972C23F274C6E5684929B29D@NA-EXMSG-C112.redmond.corp.microsoft.com> <5b0248170611150212p2b848096wba9b08cadcd8d215@mail.gmail.com> Message-ID: <455B2E63.6090806@voidspace.org.uk> Sanghyeon Seo wrote: > 2006/11/15, Mahesh Prakriya : > >> Couples of publishers have ping'ed me about whether anyone is interested in >> writing a book on IronPython and they're currently bottlenecked on finding >> qualified authors. >> > > I know that Michael Foord is already writing a book on IronPython. > > I guess my cover is blown now... ;-) Michael http://www.voidspace.org.uk/index2.shtml From giles.thomas at resolversystems.com Wed Nov 15 16:19:43 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Wed, 15 Nov 2006 15:19:43 +0000 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: <455B1E87.2050100@voidspace.org.uk> References: <455B1E87.2050100@voidspace.org.uk> Message-ID: <455B300F.7050303@resolversystems.com> Thanks, Seo - I'll give it another go and will report any results to the list. Cheers, Giles > > 2006/11/13, Giles Thomas : >> >> Seo, >> >> Does that extend to support for WinForms 2.0? Last time I tried >> running one >> of my .NET apps under Mono, it could not find the System.Windows.Forms >> 2.0.0.0 DLL. I may well have been missing something obvious, however. > > Mono includes System.Windows.Forms 2.0.0.0 DLL too. I am not sure why > you had problems. > -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com From christopher at baus.net Wed Nov 15 17:03:30 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 15 Nov 2006 16:03:30 -0000 (GMT) Subject: [IronPython] fepy socket seek In-Reply-To: <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> Message-ID: <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> > where's the seek ? > > the second argument to makefile is the requested buffer size. > Good question. The seek must be in the binary write. I'm not calling it directly. Again, the error only occurs when the binary flag is set. Any write on a socket file with the binary flag set causes a seek error. http://baus.net/ From sanxiyn at gmail.com Wed Nov 15 18:34:37 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 16 Nov 2006 02:34:37 +0900 Subject: [IronPython] fepy socket seek In-Reply-To: <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> Message-ID: <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> 2006/11/16, Christopher Baus : > Good question. The seek must be in the binary write. I'm not calling it > directly. Again, the error only occurs when the binary flag is set. Any > write on a socket file with the binary flag set causes a seek error. Let's see what's going on here... There is no socket.makefile in IronPython. socket.makefile in FePy is implemented by creating NetworkStream from .NET socket and "open" it using file() built-in. NetworkStream is not seekable! Internally, file() built-in is implemented by PythonFile class. It has two important members, reader of type PythonStreamReader, and writer of type PythonStreamWriter. If underlying system is not readable, reader is null, and if it is not writable, writer is null. N.B. file mode you pass to file() is not used. As NetworkStream is readable and writable, reader and writer are instantiated. Exactly which reader or writer is determined by file mode. There are PythonBinaryReader, PythonText{CRLF,CR,LF}Reader, and PythonUniversalReader, and they do what you can guess from the name. There are also corresponding writers. When you write to file, 1. writer is checked for null. If it is, stream is not writable. Raise exception. 2. string is passed to the writer. 3. The writer does appropriate newline translation and write it. 4. The number of bytes written, after newline translation, is returned. 5. reader is checked for null. If it is, some steps are skipped. 6. reader's position is read. 7. The number of bytes written is added to the current position. 8. reader's position is set to the sum in 7 in order to syncrhonise. 6 will cause seek error if stream is not seekable. This doesn't happen, because reader implementations maintain position by themselves instead of reading underlying stream's position. It does read underlying stream's position in the constructor, but only if it's seekable. Bah, except PythonBinaryReader, that is. So seek error is inevitable, whenever all of following conditions are met: 1. write() is called 2. underlying stream is writable 3. underlying stream is readable 4. binary reader is used 5. underlying stream is not seekable Solution: Check if stream is seekable in PythonBinaryReader too. If it's not seekable, it doesn't make much sense to set Position "to synchronise" anyway. -- Seo Sanghyeon From christopher at baus.net Wed Nov 15 20:09:53 2006 From: christopher at baus.net (Christopher Baus) Date: Wed, 15 Nov 2006 19:09:53 -0000 (GMT) Subject: [IronPython] fepy socket seek In-Reply-To: <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> Message-ID: <42443.12.146.21.162.1163617793.squirrel@webmail.tuffmail.net> > When you write to file, > 1. writer is checked for null. If it is, stream is not writable. Raise > exception. > 2. string is passed to the writer. > 3. The writer does appropriate newline translation and write it. > 4. The number of bytes written, after newline translation, is returned. > 5. reader is checked for null. If it is, some steps are skipped. > 6. reader's position is read. > 7. The number of bytes written is added to the current position. > 8. reader's position is set to the sum in 7 in order to syncrhonise. > > 6 will cause seek error if stream is not seekable. This doesn't > happen, because reader implementations maintain position by themselves > instead of reading underlying stream's position. It does read > underlying stream's position in the constructor, but only if it's > seekable. Bah, except PythonBinaryReader, that is. > > So seek error is inevitable, whenever all of following conditions are met: > 1. write() is called > 2. underlying stream is writable > 3. underlying stream is readable > 4. binary reader is used > 5. underlying stream is not seekable > Great analysis Seo. What I don't understand is why this happens only in binary mode, and when the write flag is set. Why is there a PythonBinaryReader created at all? I'm setting up my development environment to trace the IP code. http://baus.net/ From jorgen.stenarson at bostream.nu Wed Nov 15 21:15:58 2006 From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=) Date: Wed, 15 Nov 2006 21:15:58 +0100 Subject: [IronPython] Differences between cpython and ironpython In-Reply-To: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> References: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> Message-ID: <455B757E.4020707@bostream.nu> Hi, Sorry my announcement message on the ironpython pyreadline port got the wrong subject. This mail contains the differences I found between cpython and ironpython when working on the pyreadline port. 1) import time is much higher in ironpython than cpython 2) Had to patch source to be able to replace readline function: in PythonCommandLine.cs change class definition: class PythonCommandLine to: public class PythonCommandLine 3) Defaultprompt, in cpython the prompt is printed by readline (it is passed as a parameter to readline). In ironpython the interpreter prints it before calling readline. 4) mode string for open: in cpython does not react to unknown characters like "rt"=="r" 5) It seems I'm unable to catch KeyboardInterrupts properly. It looks like the except logic is executed but the KeyboardInterrupt is reraised automatically. 6) rlcompleter had to be patched line 85: self.namespace = __main__.__dict__ should read self.namespace = __main__.__dict__.copy() I think it is related to the following difference in behaviour C:\IronPython-1.0.1>ipy IronPython 1.0 (1.0) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import __main__ >>> w=10 >>> for w in __main__.__dict__: ... print w ... [__name__, __main__] Traceback (most recent call last): File , line 0, in ##105 File mscorlib, line unknown, in MoveNext File mscorlib, line unknown, in ThrowInvalidOperationException SystemError: Collection was modified; enumeration operation may not execute. >>> compared to cpython: C:\IronPython-1.0.1>python Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import __main__ >>> w=10 >>> for w in __main__.__dict__: ... print w ... quit __builtins__ __file__ exit w __main__ __name__ __doc__ >>> From dfugate at microsoft.com Wed Nov 15 21:54:57 2006 From: dfugate at microsoft.com (Dave Fugate) Date: Wed, 15 Nov 2006 12:54:57 -0800 Subject: [IronPython] Singles not comparing properly In-Reply-To: References: <454B26FC.90406@resolversystems.com> Message-ID: <7346A825E148B049A9AD1D3ED46A2D910CBE46FC70@NA-EXMSG-C106.redmond.corp.microsoft.com> Thanks for reporting this! The bug is that <, <=, >, and >= do not work when the left operand is a System.Single and the right operand is just about any integer type (CLR or Python). The CodePlex Work Item for this is http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5682 -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mujtaba Syed Sent: Friday, November 03, 2006 1:55 PM To: Discussion of IronPython Subject: Re: [IronPython] Singles not comparing properly Also note that: >>> 5.0 <= s <= 500.0 True >>> 5.0 <= d <= 500.0 True -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christian Muirhead Sent: Friday, November 03, 2006 3:25 AM To: users at lists.ironpython.com Subject: [IronPython] Singles not comparing properly Hi guys - We encountered a strange bug today, which we eventually worked out was being caused by the fact that a number we thought was a float (a Double) was actually a Single. The problem was this: >>> from System import Double, Single >>> d = Double(8.0) >>> d 8.0 >>> 5 <= d <= 500 True >>> s = Single(8.0) >>> s 8.0 >>> 5 <= s <= 500 False There's no real analogue to this in CPython, but it feels like Single and Double should behave the same here. Is this a bug? Thanks, Christian _______________________________________________ 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 jorgen.stenarson at bostream.nu Wed Nov 15 21:05:46 2006 From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=) Date: Wed, 15 Nov 2006 21:05:46 +0100 Subject: [IronPython] Python Cryptographic Toolkit for IronPython In-Reply-To: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> References: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> Message-ID: <455B731A.6030704@bostream.nu> Hi I'm happy to announce that my attempt to port pyreadline to ironpython finally has reached a state where I think it can be used. A new feature of this version of pyreadline is that you can select text using shift-Left/Right. Copy is bound to ctrl-shift-x (I might move it to ctrl-c but right now ctrl-c generates KeyboardInterupt so that will probably take some work) It has not been too difficult to get it to work. Most work was spent trying to understand and work around the differences between plain win32 console functions and .NET System.Console. In this post I will describe how you can try it out for your self, in another post I will describe the differences I found between how cpython and ironpython use readline. 1) You will need to compile your own version of ironpython because there is need for a patch to allow pyreadline to insert itself as a new readline. Download ironpython source and make sure you can compile it. then in the file PythonCommandLine.cs patch the class definition: change: class PythonCommandLine to: public class PythonCommandLine Now recompile 2) you will also need to patch rlcompleter.py in the cpython lib if you want tab completion to work for global variables line 85: self.namespace = __main__.__dict__ should read self.namespace = __main__.__dict__.copy() 3) get pyreadline using svn from: svn co http://ipython.scipy.org/svn/ipython/pyreadline/branches/refactor localpath/pyreadline_branch 4) copy pyreadlineconfig.ini from localpath/pyreadline_branch/pyreadline/configuration/ to your c:/documents and settings/USERNAME copy startup.py from localpath/pyreadline_branch/pyreadline/configuration/ to your pythonpath 5) launch ipy and do import startup. Now you should have pyreadline active with tabcompletion /J?rgen From dinov at exchange.microsoft.com Wed Nov 15 22:32:05 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 15 Nov 2006 13:32:05 -0800 Subject: [IronPython] vs integration In-Reply-To: References: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <7AD436E4270DD54A94238001769C22274C4016B1FE@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <7AD436E4270DD54A94238001769C22274C74B0EA6B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> I didn't know it off the top of my head, but it looks like this is devenv.exe /rootsuffix Exp (devenv is in (in %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\)). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 5:09 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration That works. Thanks! Do you remember what "command IronPython.sln runs when you hit F5." ? ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 3:44 PM Subject: Re: [IronPython] vs integration How are you starting VS after the installation, are you starting the experimental hive? The way I typically start this is in %ProgramFiles% (%ProgramFiles(x86)% if yo're on 64-bit) there's a Visual Studio 2005 SDK folder that has a year.month folder (I don't remember what v3 is off the top of my head) that has VisualStudioIntegration\Samples\IronPythonIntegration\IronPython.sln below it. If you open this solution, hit F5 in VS, then another copy of VS opens. It's this "inner" copy of VS which contains the IronPython integration support. Once you've done that once you should be able to start the experimental hive of VS directly w/ IronPython support by starting the same command IronPython.sln runs when you hit F5. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration File->New Web Site was used in an example I looked at. But I tried it your way, and File->New Project does not show anything about IronPython. ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 2:03 PM Subject: Re: [IronPython] vs integration Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) ________________________________ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ________________________________ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher at baus.net Thu Nov 16 09:36:15 2006 From: christopher at baus.net (Christopher Baus) Date: Thu, 16 Nov 2006 08:36:15 -0000 (GMT) Subject: [IronPython] fepy socket seek In-Reply-To: <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> Message-ID: <1715.24.182.26.162.1163666175.squirrel@webmail.tuffmail.net> > Solution: Check if stream is seekable in PythonBinaryReader too. If > it's not seekable, it doesn't make much sense to set Position "to > synchronise" anyway. I've been tracing this bug tonight, and I feel concerned about it. The CRLF reader allows seeking even when the underlying stream doesn't. That doesn't make much sense. If a socket file is created with CRLF endlines, and a write operation is performed, some data will be missed on subsequent reads because the read position has been advanced by the number of bytes that have been written. Here are the issues I see. 1) As Seo mentioned, before attempting to advance the read position following write, check if the reader is not NULL and seekable. If not do nothing. 2) PythonTextCRLFReader should not allow seeking when the underlying stream is not seekable. 3) This might apply to other readers which manage their own position. 4) This code doesn't appear to be reentrant. If multiple threads write and/or read to a file, position will be in an unstable state. End result: Files based on non-seekable streams don't work. File operations are not thread safe. I have some concerns about the implemetation of this module. This might be a deal killer for me. http://baus.net/ From garage_dba at hotmail.com Thu Nov 16 17:22:34 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Thu, 16 Nov 2006 10:22:34 -0600 Subject: [IronPython] vs integration References: <7AD436E4270DD54A94238001769C22274C4016B191@DF-GRTDANE-MSG.exchange.corp.microsoft.com><7AD436E4270DD54A94238001769C22274C4016B1FE@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <7AD436E4270DD54A94238001769C22274C74B0EA6B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: That works. Thanks much! ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Wednesday, November 15, 2006 3:32 PM Subject: Re: [IronPython] vs integration I didn't know it off the top of my head, but it looks like this is devenv.exe /rootsuffix Exp (devenv is in (in %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\)). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 5:09 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration That works. Thanks! Do you remember what "command IronPython.sln runs when you hit F5." ? ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 3:44 PM Subject: Re: [IronPython] vs integration How are you starting VS after the installation, are you starting the experimental hive? The way I typically start this is in %ProgramFiles% (%ProgramFiles(x86)% if yo're on 64-bit) there's a Visual Studio 2005 SDK folder that has a year.month folder (I don't remember what v3 is off the top of my head) that has VisualStudioIntegration\Samples\IronPythonIntegration\IronPython.sln below it. If you open this solution, hit F5 in VS, then another copy of VS opens. It's this "inner" copy of VS which contains the IronPython integration support. Once you've done that once you should be able to start the experimental hive of VS directly w/ IronPython support by starting the same command IronPython.sln runs when you hit F5. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 1:36 PM To: Discussion of IronPython Subject: Re: [IronPython] vs integration File->New Web Site was used in an example I looked at. But I tried it your way, and File->New Project does not show anything about IronPython. ----- Original Message ----- From: Dino Viehland To: Discussion of IronPython Sent: Tuesday, November 14, 2006 2:03 PM Subject: Re: [IronPython] vs integration Are you doing File->New Web Site? I think you need to do File->New Project Then choose IronPython->Web from the tree view and then there are options for ASP.NET Web Application. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Tuesday, November 14, 2006 11:47 AM To: users at lists.ironpython.com Subject: [IronPython] vs integration I installed the Visual Studio 2005 SDK "v3" on my box (win2000 server) but when I create a new web_site, IronPython is not given as a choice under "language". Do I have to do something else to make it work? (yes, IronPython-1.0.1 is installed) -------------------------------------------------------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ---------------------------------------------------------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ------------------------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Thu Nov 16 20:48:30 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 16 Nov 2006 11:48:30 -0800 Subject: [IronPython] Differences between cpython and ironpython In-Reply-To: <455B757E.4020707@bostream.nu> References: <5b0248170611150443l4f93757dl5f4f8ac4d20f0e2@mail.gmail.com> <455B757E.4020707@bostream.nu> Message-ID: <7AD436E4270DD54A94238001769C22274D1DB94D87@DF-GRTDANE-MSG.exchange.corp.microsoft.com> #1 is (largely) due to compilation time. I suspect we may look at something around this for v2.0 (for example maybe caching compiled files - which won't make it faster the 1st time, but at least additional times it'll be better). I've added #2 & #3 to bug 697 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=697). For #4 could you vote for this bug? http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=2988 With CodePlex's new voting system this is a great way to raise visibility of bugs. #5) We ran into this one internally recently too. I've opened bug 5711 http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5711 #6) I've opened bug 5712 for this one: http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5712 I'll need to look at this one closer. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J?rgen Stenarson Sent: Wednesday, November 15, 2006 12:16 PM To: Discussion of IronPython Subject: [IronPython] Differences between cpython and ironpython Hi, Sorry my announcement message on the ironpython pyreadline port got the wrong subject. This mail contains the differences I found between cpython and ironpython when working on the pyreadline port. 1) import time is much higher in ironpython than cpython 2) Had to patch source to be able to replace readline function: in PythonCommandLine.cs change class definition: class PythonCommandLine to: public class PythonCommandLine 3) Defaultprompt, in cpython the prompt is printed by readline (it is passed as a parameter to readline). In ironpython the interpreter prints it before calling readline. 4) mode string for open: in cpython does not react to unknown characters like "rt"=="r" 5) It seems I'm unable to catch KeyboardInterrupts properly. It looks like the except logic is executed but the KeyboardInterrupt is reraised automatically. 6) rlcompleter had to be patched line 85: self.namespace = __main__.__dict__ should read self.namespace = __main__.__dict__.copy() I think it is related to the following difference in behaviour C:\IronPython-1.0.1>ipy IronPython 1.0 (1.0) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import __main__ >>> w=10 >>> for w in __main__.__dict__: ... print w ... [__name__, __main__] Traceback (most recent call last): File , line 0, in ##105 File mscorlib, line unknown, in MoveNext File mscorlib, line unknown, in ThrowInvalidOperationException SystemError: Collection was modified; enumeration operation may not execute. >>> compared to cpython: C:\IronPython-1.0.1>python Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import __main__ >>> w=10 >>> for w in __main__.__dict__: ... print w ... quit __builtins__ __file__ exit w __main__ __name__ __doc__ >>> _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sanxiyn at gmail.com Fri Nov 17 10:33:02 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 17 Nov 2006 18:33:02 +0900 Subject: [IronPython] exec and star import Message-ID: <5b0248170611170133h7923d1b1w3536afa0232f5252@mail.gmail.com> How to reproduce: # a.py d = {} exec 'from b import *' in d print d['b'] # b.py b = 1 Run a.py with CPython and IronPython. -- Seo Sanghyeon From dinov at exchange.microsoft.com Fri Nov 17 18:52:16 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 17 Nov 2006 09:52:16 -0800 Subject: [IronPython] exec and star import In-Reply-To: <5b0248170611170133h7923d1b1w3536afa0232f5252@mail.gmail.com> References: <5b0248170611170133h7923d1b1w3536afa0232f5252@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274D1EB675F7@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report! I've opened CodePlex bug 5755 for this (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5755). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Friday, November 17, 2006 1:33 AM To: Discussion of IronPython Subject: [IronPython] exec and star import How to reproduce: # a.py d = {} exec 'from b import *' in d print d['b'] # b.py b = 1 Run a.py with CPython and IronPython. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Fri Nov 17 19:20:57 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 17 Nov 2006 10:20:57 -0800 Subject: [IronPython] fepy socket seek In-Reply-To: <1715.24.182.26.162.1163666175.squirrel@webmail.tuffmail.net> References: <1552.24.182.26.162.1163569010.squirrel@webmail.tuffmail.net> <368a5cd50611142243q5563dd01ve875a9c5934c4f2b@mail.gmail.com> <2057.24.182.26.162.1163606610.squirrel@webmail.tuffmail.net> <5b0248170611150934g6da8c1b9j36b708fedb936263@mail.gmail.com> <1715.24.182.26.162.1163666175.squirrel@webmail.tuffmail.net> Message-ID: <7AD436E4270DD54A94238001769C22274D1EB67617@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks both of you for looking into this so deeply. Sorry we haven't been more responsive to this - I originally tuned out this thread thinking it wasn't related to the core. I've opened CodePlex bug #5756 for the seekable check (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5756). This is definitely just broken. I've marked this as a 1.1 bug. I've opened CodePlex bug #5757 for the thread-safety issue (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5757). I agree this is broken in principle, but I wonder why this would be a shop-stopper. Do you have a scenario where you can reliably have multiple writers to a single stream w/o any external synchronization necessary? For example what if the resulting I/O could be interleaved but the file still correctly tracked it's position information? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christopher Baus Sent: Thursday, November 16, 2006 12:36 AM To: Discussion of IronPython Subject: Re: [IronPython] fepy socket seek > Solution: Check if stream is seekable in PythonBinaryReader too. If > it's not seekable, it doesn't make much sense to set Position "to > synchronise" anyway. I've been tracing this bug tonight, and I feel concerned about it. The CRLF reader allows seeking even when the underlying stream doesn't. That doesn't make much sense. If a socket file is created with CRLF endlines, and a write operation is performed, some data will be missed on subsequent reads because the read position has been advanced by the number of bytes that have been written. Here are the issues I see. 1) As Seo mentioned, before attempting to advance the read position following write, check if the reader is not NULL and seekable. If not do nothing. 2) PythonTextCRLFReader should not allow seeking when the underlying stream is not seekable. 3) This might apply to other readers which manage their own position. 4) This code doesn't appear to be reentrant. If multiple threads write and/or read to a file, position will be in an unstable state. End result: Files based on non-seekable streams don't work. File operations are not thread safe. I have some concerns about the implemetation of this module. This might be a deal killer for me. http://baus.net/ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fredrik at pythonware.com Sun Nov 19 11:06:38 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sun, 19 Nov 2006 11:06:38 +0100 Subject: [IronPython] fix for fepy's pyexpat.py Message-ID: <368a5cd50611190206x528730dct741c438e636cc532@mail.gmail.com> pyexpat.py's "parse" method treats all calls as "final", which means that it simply doesn't work for files larger than a few kilobytes (32k for ET, 16k for minidom). here's a workaround: > diff -u ironexpat.bak ironexpat.py --- pyexpat.bak Sun Nov 19 11:01:04 2006 +++ pyexpat.py Sun Nov 19 11:01:21 2006 @@ -38,6 +38,7 @@ __slots__ = [ # Internal + "_data", "_separator", "_reader", "_ns_stack", @@ -79,13 +80,17 @@ intern = {} def __init__(self, separator): + self._data = [] self._separator = separator self._ns_stack = [] self.ordered_attributes = False self.namespace_prefixes = False def Parse(self, data, isfinal=False): - if data: + self._data.append(data) + if isfinal: + data = "".join(self._data) + self._data = None self._parse(data) def _qname(self): cheers /F From miguel at ximian.com Sun Nov 19 16:12:46 2006 From: miguel at ximian.com (Miguel de Icaza) Date: Sun, 19 Nov 2006 10:12:46 -0500 Subject: [IronPython] Mono, ironPython and WinForms In-Reply-To: <45586810.4030407@resolversystems.com> References: <9BD8AA83B7777E478DA1EAFAFA133B1E0199AE15@CL4EXBE03.ad2.softcom.biz> <5b0248170611111745n379f12e8ia0032223ba26c594@mail.gmail.com> <45586810.4030407@resolversystems.com> Message-ID: <1163949166.4704.129.camel@erandi.dom> Hello, > Does that extend to support for WinForms 2.0? Last time I tried > running one of my .NET apps under Mono, it could not find the > System.Windows.Forms 2.0.0.0 DLL. I may well have been missing > something obvious, however. That sounds like you did not have a full Mono installation, Mono comes with a 2.0 DLL. But Mono only supports Windows.Forms 1.1 at this point, there are *some* controls, methods and properties from 2.0 supported, but they are in their infancy, and you will likely you get exceptions if you try using those. From sanxiyn at gmail.com Mon Nov 20 05:16:50 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 20 Nov 2006 13:16:50 +0900 Subject: [IronPython] fix for fepy's pyexpat.py In-Reply-To: <368a5cd50611190206x528730dct741c438e636cc532@mail.gmail.com> References: <368a5cd50611190206x528730dct741c438e636cc532@mail.gmail.com> Message-ID: <5b0248170611192016p25bfc630k15ed48414f0b4741@mail.gmail.com> 2006/11/19, Fredrik Lundh : > pyexpat.py's "parse" method treats all calls as "final", which means that it > simply doesn't work for files larger than a few kilobytes (32k for ET, 16k for > minidom). here's a workaround: > (snip) Applied. Thanks! http://svn.sourceforge.net/viewvc/fepy?view=rev&revision=310 -- Seo Sanghyeon From sanxiyn at gmail.com Mon Nov 20 05:54:32 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 20 Nov 2006 13:54:32 +0900 Subject: [IronPython] PythonFile and non-seekable streams Message-ID: <5b0248170611192054j1121e2c1p8e3ce4fc5919cd6d@mail.gmail.com> Dino Viehland wrote: > I've opened CodePlex bug #5756 for the seekable check > http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5756 > This is definitely just broken. I've marked this as a 1.1 bug. Here is a minimal patch in the mean time: http://fepy.sourceforge.net/patches.html (patch-ironpython-file-canseek) -- Seo Sanghyeon From sanxiyn at gmail.com Mon Nov 20 11:52:47 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 20 Nov 2006 19:52:47 +0900 Subject: [IronPython] UnicodeError's object attribute Message-ID: <5b0248170611200252v26677161n68385051027452a0@mail.gmail.com> Run test.py. UnicodeError objects don't have "object" attribute. It turns out that, they have, "@object" attribute instead! (To Mono users who don't get the same result: it's normal. Mono ignores .NET encoding/decoding fallbacks, so Python codec error handling callbacks are completely broken on Mono. I should file a bug report on this, but bah, I am lazy.) CPython u'\uac00' '' IronPython AttributeError: 'instance' object has no attribute 'object' # test.py def handler(exc): print repr(exc.object) return u'', exc.end import _codecs _codecs.register_error('example', handler) text = unichr(0xac00) encoded = text.encode('ascii', 'example') print repr(encoded) -- Seo Sanghyeon From sanxiyn at gmail.com Mon Nov 20 12:26:33 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Mon, 20 Nov 2006 20:26:33 +0900 Subject: [IronPython] [ANN] IronPython Community Edition r4 Message-ID: <5b0248170611200326n40124dd9h90f6a3a7b0b3ad06@mail.gmail.com> This is the fourth release of IronPython Community Edition (IPCE). You can download it from SourceForge. http://sourceforge.net/projects/fepy FePy project aims to provide enhancements and add-ons for IronPython. Visit the project's homepage for more informations. http://fepy.sourceforge.net/ Changes in this release follow. Some changes are credited. Uncredited changes are from me. Regular expression _sre.py from PyPy, a pure Python implementation of Python's regular expression, is included and enabled by default, overriding IronPython's implementation based on System.Text.RegularExpression. You can comment out "install_sre_py()" line from site.py to disable this. Library Block encryption algorithms wrappers compatible with pycrypto are added. New array module based on codes from PyPy, but using .NET array as storage. pyexpat module is enhanced to run SOAPpy. pyexpat module handls multiple calls to Parse(). (Fredrik Lundh) hashlib module accepts arrays as arguments. ctypes module includes correct c_float and c_double. ctypes module handles functions taking variable argument list (like printf). site module initializes support for .pth files and site-packages directory. (Mark Rees) Missing built-in codec error handling callbacks are taken from PyPy and registered. Namely, ignore, xmlcharrefreplace, backslashreplace. (Christopher Baus) _fileobject class is taken from CPython and included in socket module. (Christopher Baus) WSGI WSGI gateway is rewritten to use wsgiref library and is a lot more compatible as a result. (Mark Rees) C# side of WSGI avoids creating new IronPython engine every request. (Mark Rees) C# side of WSGI gains various options configurable from web.config, including whether to reload IronPython engine every request. (Christopher Baus) Bundles url2path modules are now included from Python Standard Library. (Liyu Liu) wsgiref package is included from CPython 2.5, as needed by new WSGI gateway. pycrypto and paramiko are included. (paramiko doesn't work yet, although it imports.) Patches You can read the summary of applied patches here. http://fepy.sourceforge.net/patches.html New in this release: patch-ironpython-base64-slash patch-ironpython-file-canseek patch-ironpython-re-lastgroup patch-ironpython-unicodeerror-object patch-stdlib-logging-getframe -- Seo Sanghyeon From marcel.vandendungen at gmail.com Sun Nov 19 18:16:23 2006 From: marcel.vandendungen at gmail.com (Marcel) Date: Sun, 19 Nov 2006 17:16:23 -0000 Subject: [IronPython] Visual Studio integration and site.py Message-ID: <1163956583.496289.119950@h48g2000cwc.googlegroups.com> Hi, I'm using IronPython from Visual Studio (VS 2005 SDK Nov. 06) and I want to use the standard Python library. Where do I put the 'site.py' file with the 'sys.path.append()' in it? I also have IronPython installed in 'C:\IronPython'. Can I make IronPython from Visual Studio use the same 'lib' folder? TIA, -- Marcel From szport at gmail.com Mon Nov 20 12:53:08 2006 From: szport at gmail.com (Andrew) Date: Mon, 20 Nov 2006 14:53:08 +0300 Subject: [IronPython] How to implement in C# ironpython extension? Message-ID: How to implement in C# ironpython extension which trully behaves as ironpython class instance? -------------- next part -------------- An HTML attachment was scrubbed... URL: From luismg at gmx.net Mon Nov 20 20:32:43 2006 From: luismg at gmx.net (=?iso-8859-1?Q?Luis_M._Gonz=E1lez?=) Date: Mon, 20 Nov 2006 16:32:43 -0300 Subject: [IronPython] How to implement in C# ironpython extension? References: Message-ID: <004101c70cda$a84841a0$03b6a8c0@averatecdda041> 1) Just write your class or classes in C# and compile them as a .dll. 2) Create a "DLLs" folder into your ironpython directory (where ipy.exe is located). 3) Throw your dll into this folder. 4) from your program, simply type "import MyClass" or "from MyNamespace import MyClass". Once you put your compiled dlls into the "DLLs" folder, the namespaces and classes defined in them are available for being imported into your programs, as if they were writen in python. Note that this is a new feature of the latest distribution. Hope this helps... Luis ----- Original Message ----- From: Andrew To: users at lists.ironpython.com Sent: Monday, November 20, 2006 8:53 AM Subject: [IronPython] How to implement in C# ironpython extension? How to implement in C# ironpython extension which trully behaves as ironpython class instance? ------------------------------------------------------------------------------ _______________________________________________ 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 sum.ergo.code at gmail.com Mon Nov 20 21:13:01 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Mon, 20 Nov 2006 14:13:01 -0600 Subject: [IronPython] Add error attribute to zlib.py in IPCE? Message-ID: <1d39a8340611201213r5dcedb09icd37fb43c3970fee@mail.gmail.com> I'm slowing working my way through all the things keeping Schevo from working with IronPython. For one case I needed to import error from zlib, and it isn't defined in the zlib.py provided by IPCE (aka, fepy). I added the following to zlib.py, but something better would obviously be an improvement: class error(Exception): pass Bonus points if compress and decompress actually raised error... ;-) P.S. fepy has been a lifesaver, tyvm. :-) -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Mon Nov 20 21:22:16 2006 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 21 Nov 2006 09:22:16 +1300 Subject: [IronPython] Help.. I need decorators In-Reply-To: References: Message-ID: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> Hi I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods Eg. [Transaction(Required)][Cache("cache.Store")] public void SaveVeryComplexObject(object veryComplex) What should i do ? Do you guys have support planned for it ? Cheers Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sum.ergo.code at gmail.com Mon Nov 20 21:33:04 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Mon, 20 Nov 2006 14:33:04 -0600 Subject: [IronPython] How to lock a file like win32file.LockFileEx()? Message-ID: <1d39a8340611201233u1eb374d6q9d51f67b5003f8dd@mail.gmail.com> What would one use in IronPython to get the equivalent of fcntl.flock() or win32file.LockFileEx()? -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sum.ergo.code at gmail.com Mon Nov 20 21:57:36 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Mon, 20 Nov 2006 14:57:36 -0600 Subject: [IronPython] Unpickler.persistent_load, please... Message-ID: <1d39a8340611201257g4da279c9v50b0d35745f871f1@mail.gmail.com> Will there be support for Unpickler.persistent_load any time soon? -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sum.ergo.code at gmail.com Mon Nov 20 23:25:01 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Mon, 20 Nov 2006 16:25:01 -0600 Subject: [IronPython] "exec in" is broken Message-ID: <1d39a8340611201425k22c0adf1j1bf6f3918298d368@mail.gmail.com> There is a problem doing an "import *" within code that is exec'd in a dictionary: >>> from sys import * >>> print platform cli >>> import imp >>> module = imp.new_module('foo') >>> source = 'from sys import *\nprint platform\n' >>> code = compile(source, 'foo', 'exec') >>> exec code in module.__dict__ Traceback (most recent call last): File , line 0, in ##97 File , line 0, in foo##96 NameError: name 'platform' not defined >>> I created a ticket for this: http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5800 -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Tue Nov 21 01:29:18 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 21 Nov 2006 09:29:18 +0900 Subject: [IronPython] "exec in" is broken In-Reply-To: <1d39a8340611201425k22c0adf1j1bf6f3918298d368@mail.gmail.com> References: <1d39a8340611201425k22c0adf1j1bf6f3918298d368@mail.gmail.com> Message-ID: <5b0248170611201629p71393b40k8422f4d6dafe959b@mail.gmail.com> 2006/11/21, Patrick O'Brien : > There is a problem doing an "import *" within code that is exec'd in a > dictionary: > (snip) This is a duplicate of #5755. -- Seo Sanghyeon From sum.ergo.code at gmail.com Tue Nov 21 01:35:38 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Mon, 20 Nov 2006 18:35:38 -0600 Subject: [IronPython] Class with slots and getattr not compatible Message-ID: <1d39a8340611201635p7bb977e1o64823d0f395c65a4@mail.gmail.com> Ticket: http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5801 IronPython: >>> class Foo(object): ... __slots__ = ['bar'] ... def __getattr__(self, name): ... return name.upper() ... >>> foo = Foo() >>> foo.bar Traceback (most recent call last): File , line 0, in ##2163 File , line 0, in get_bar##2164 AttributeError: '' object has no attribute 'bar' >>> foo.baz 'BAZ' >>> CPython: PyCrust 0.9.5 - The Flakiest Python Shell Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class Foo(object): ... __slots__ = ['bar'] ... def __getattr__(self, name): ... return name.upper() ... >>> foo = Foo() >>> foo.bar 'BAR' >>> foo.baz 'BAZ' >>> -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Wed Nov 22 11:52:55 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 22 Nov 2006 19:52:55 +0900 Subject: [IronPython] How to lock a file like win32file.LockFileEx()? In-Reply-To: <1d39a8340611201233u1eb374d6q9d51f67b5003f8dd@mail.gmail.com> References: <1d39a8340611201233u1eb374d6q9d51f67b5003f8dd@mail.gmail.com> Message-ID: <5b0248170611220252x5626c698r951ff71241226c54@mail.gmail.com> 2006/11/21, Patrick O'Brien : > What would one use in IronPython to get the equivalent of fcntl.flock() or > win32file.LockFileEx()? .NET's FileStream has Lock() and Unlock() methods, but I don't know how to apply these to IronPython file object. Any idea? One could use P/Invoke too. Example IronPython code: from System.IO import FileStream, FileMode f = FileStream('test', FileMode.Open) f.Lock(0, f.Length) raw_input() f.Unlock(0, f.Length) Above is roughly equivalent to following CPython/Unix code: import fcntl f = open('test', 'w') fcntl.lockf(f, fcntl.LOCK_EX|fcntl.LOCK_NB) raw_input() fcntl.lockf(f, fcntl.LOCK_UN) -- Seo Sanghyeon From giles.thomas at resolversystems.com Wed Nov 22 15:07:11 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Wed, 22 Nov 2006 14:07:11 +0000 Subject: [IronPython] Very strange problem with ExecuteFile Message-ID: <4564598F.2050304@resolversystems.com> When the attached test.py is executed using ExecuteFile (sample .cs file also attached), we get the following exception: System.InvalidProgramException: Common Language Runtime detected an invalid program. The problem does not occur under the IP Console (which I guess doesn't use ExecuteFile). My best guess is that the problem occurs when the complexity of the parse tree exceeds some particular limit. Does anyone have any ideas for a workaround or a fix? This one is causing us serious problems, so any thoughts would be much appreciated. Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.py URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Program.cs URL: From Martin.Maly at microsoft.com Wed Nov 22 17:06:16 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 22 Nov 2006 08:06:16 -0800 Subject: [IronPython] Very strange problem with ExecuteFile In-Reply-To: <4564598F.2050304@resolversystems.com> References: <4564598F.2050304@resolversystems.com> Message-ID: I believe in this case the exception is result of what seems to be a CLR limitation. The code (in this case one static method) IronPython needs to generate to handle this input is too big and CLR/Jit then throws invalid program exception. The only workaround I am aware of is to split the code up to multiple functions. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Wednesday, November 22, 2006 6:07 AM To: Discussion of IronPython Subject: [IronPython] Very strange problem with ExecuteFile When the attached test.py is executed using ExecuteFile (sample .cs file also attached), we get the following exception: System.InvalidProgramException: Common Language Runtime detected an invalid program. The problem does not occur under the IP Console (which I guess doesn't use ExecuteFile). My best guess is that the problem occurs when the complexity of the parse tree exceeds some particular limit. Does anyone have any ideas for a workaround or a fix? This one is causing us serious problems, so any thoughts would be much appreciated. Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com From giles.thomas at resolversystems.com Wed Nov 22 17:12:01 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Wed, 22 Nov 2006 16:12:01 +0000 Subject: [IronPython] Very strange problem with ExecuteFile In-Reply-To: References: <4564598F.2050304@resolversystems.com> Message-ID: <456476D1.7070502@resolversystems.com> Martin, We don't see the same problem in the IronPython console; is this because it is executing the file somehow differently - perhaps line-by-line, maintaining a context dictionary? Regards, Giles Martin Maly wrote: > I believe in this case the exception is result of what seems to be a CLR limitation. The code (in this case one static method) IronPython needs to generate to handle this input is too big and CLR/Jit then throws invalid program exception. > > The only workaround I am aware of is to split the code up to multiple functions. > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Wednesday, November 22, 2006 6:07 AM > To: Discussion of IronPython > Subject: [IronPython] Very strange problem with ExecuteFile > > When the attached test.py is executed using ExecuteFile (sample .cs file also attached), we get the following exception: > > System.InvalidProgramException: Common Language Runtime detected an invalid program. > > The problem does not occur under the IP Console (which I guess doesn't use ExecuteFile). My best guess is that the problem occurs when the complexity of the parse tree exceeds some particular limit. > > Does anyone have any ideas for a workaround or a fix? This one is causing us serious problems, so any thoughts would be much appreciated. > > > Regards, > > Giles > > -- > Giles Thomas > Resolver Systems > giles.thomas at resolversystems.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com From Martin.Maly at microsoft.com Wed Nov 22 17:51:59 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 22 Nov 2006 08:51:59 -0800 Subject: [IronPython] Very strange problem with ExecuteFile In-Reply-To: <456476D1.7070502@resolversystems.com> References: <4564598F.2050304@resolversystems.com> <456476D1.7070502@resolversystems.com> Message-ID: Exactly. In console, each statement is compiled into its own CLR method so you won't hit this problem. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Wednesday, November 22, 2006 8:12 AM To: Discussion of IronPython Subject: Re: [IronPython] Very strange problem with ExecuteFile Martin, We don't see the same problem in the IronPython console; is this because it is executing the file somehow differently - perhaps line-by-line, maintaining a context dictionary? Regards, Giles Martin Maly wrote: > I believe in this case the exception is result of what seems to be a CLR limitation. The code (in this case one static method) IronPython needs to generate to handle this input is too big and CLR/Jit then throws invalid program exception. > > The only workaround I am aware of is to split the code up to multiple functions. > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Wednesday, November 22, 2006 6:07 AM > To: Discussion of IronPython > Subject: [IronPython] Very strange problem with ExecuteFile > > When the attached test.py is executed using ExecuteFile (sample .cs file also attached), we get the following exception: > > System.InvalidProgramException: Common Language Runtime detected an invalid program. > > The problem does not occur under the IP Console (which I guess doesn't use ExecuteFile). My best guess is that the problem occurs when the complexity of the parse tree exceeds some particular limit. > > Does anyone have any ideas for a workaround or a fix? This one is causing us serious problems, so any thoughts would be much appreciated. > > > Regards, > > Giles > > -- > Giles Thomas > Resolver Systems > giles.thomas at resolversystems.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From giles.thomas at resolversystems.com Wed Nov 22 18:50:41 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Wed, 22 Nov 2006 17:50:41 +0000 Subject: [IronPython] Very strange problem with ExecuteFile In-Reply-To: References: <4564598F.2050304@resolversystems.com> <456476D1.7070502@resolversystems.com> Message-ID: <45648DF1.6030808@resolversystems.com> Thanks, that makes sense. The code we have that was showing the problem is auto-generated, so we should be able to get our generator to split it up into smaller chunks and execute them separately. Regards, Giles Martin Maly wrote: > Exactly. In console, each statement is compiled into its own CLR method so you won't hit this problem. > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Wednesday, November 22, 2006 8:12 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Very strange problem with ExecuteFile > > Martin, > > We don't see the same problem in the IronPython console; is this because > it is executing the file somehow differently - perhaps line-by-line, > maintaining a context dictionary? > > > Regards, > > Giles > > > > Martin Maly wrote: > >> I believe in this case the exception is result of what seems to be a CLR limitation. The code (in this case one static method) IronPython needs to generate to handle this input is too big and CLR/Jit then throws invalid program exception. >> >> The only workaround I am aware of is to split the code up to multiple functions. >> >> Martin >> >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas >> Sent: Wednesday, November 22, 2006 6:07 AM >> To: Discussion of IronPython >> Subject: [IronPython] Very strange problem with ExecuteFile >> >> When the attached test.py is executed using ExecuteFile (sample .cs file also attached), we get the following exception: >> >> System.InvalidProgramException: Common Language Runtime detected an invalid program. >> >> The problem does not occur under the IP Console (which I guess doesn't use ExecuteFile). My best guess is that the problem occurs when the complexity of the parse tree exceeds some particular limit. >> >> Does anyone have any ideas for a workaround or a fix? This one is causing us serious problems, so any thoughts would be much appreciated. >> >> >> Regards, >> >> Giles >> >> -- >> Giles Thomas >> Resolver Systems >> giles.thomas at resolversystems.com >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > -- > Giles Thomas > Resolver Systems > giles.thomas at resolversystems.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 > -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ironpythonster at gmail.com Thu Nov 23 08:29:33 2006 From: ironpythonster at gmail.com (Kevien Lee) Date: Thu, 23 Nov 2006 07:29:33 -0000 Subject: [IronPython] Is any one use IronPython in your project? Message-ID: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> Hi, Now ,Ironpython had release some time,but i want to konw is any one use IronPython in your project? As a dynamic language ,what it will bring us some advantage for project,which the advantage C#,VB.net couldn't have? From sh at defuze.org Thu Nov 23 08:46:55 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 23 Nov 2006 07:46:55 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> Message-ID: <456551EF.2050707@defuze.org> Kevien Lee wrote: > Hi, > Now ,Ironpython had release some time,but i want to konw is any one use > IronPython in your project? > As a dynamic language ,what it will bring us some advantage for > project,which the advantage C#,VB.net couldn't have? >From a Python user POV, IP is far from being good enough as it is now. I have actually hard times understanding why it went in version 1.0 so fast. Don't get me wrong IP is stable and is good implementation of Python but it is only a milestone towards a truly useful platform. Basically it seems IP only implements the language itself but as we have seen on this list since it was released only a handful of Python modules can be run as-is within IP. I do hope the next milestone will focus on a much better support of those external packages. To achieve this goal the IP team will have to look at IPCE and understand what needs to be done first (support more of the stdlib and third-party modules). IP as a language is cool but we cannot run most of our common Python packages on it, making it as useful as a cherry on top of a cake. Nice but not essential. Make IP a cake in itself and you'll have a winner. However I have a feeling IP has been more relevant to regular .NET users coming from C# who wanted to keep their platform while making a step towards dynamic languages. That's great and I'm sure once they'll start they won't be able to stop, but for now I have not found IP entirely satisfying coming from Python itself and I hardly do anything productive with it (while I'd really like to). - Sylvain http://www.defuze.org From raathm at gmail.com Thu Nov 23 08:53:28 2006 From: raathm at gmail.com (Mike Raath) Date: Thu, 23 Nov 2006 09:53:28 +0200 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <456551EF.2050707@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> Message-ID: <664260580611222353r467055e0hf7b1048143d18124@mail.gmail.com> There will be different reasons amongst all developers of Iron Python. For my point of view I needed to be able to use existing Python Libraries in a .Net environment. I could well have rewritten the Python code in .Net classes but then I would have meant 2 separate code bases to maintain. I found IronPython to be the perfect solution to this problem - I could make the calls I needed in the .Net code to the Python class, and maintain the Python codebase separately. On 11/23/06, Sylvain Hellegouarch wrote: > > Kevien Lee wrote: > > Hi, > > Now ,Ironpython had release some time,but i want to konw is any one use > > IronPython in your project? > > As a dynamic language ,what it will bring us some advantage for > > project,which the advantage C#,VB.net couldn't have? > > >From a Python user POV, IP is far from being good enough as it is now. I > have actually hard times understanding why it went in version 1.0 so > fast. Don't get me wrong IP is stable and is good implementation of > Python but it is only a milestone towards a truly useful platform. > > Basically it seems IP only implements the language itself but as we have > seen on this list since it was released only a handful of Python modules > can be run as-is within IP. I do hope the next milestone will focus on a > much better support of those external packages. To achieve this goal the > IP team will have to look at IPCE and understand what needs to be done > first (support more of the stdlib and third-party modules). > > IP as a language is cool but we cannot run most of our common Python > packages on it, making it as useful as a cherry on top of a cake. Nice > but not essential. Make IP a cake in itself and you'll have a winner. > > However I have a feeling IP has been more relevant to regular .NET users > coming from C# who wanted to keep their platform while making a step > towards dynamic languages. That's great and I'm sure once they'll start > they won't be able to stop, but for now I have not found IP entirely > satisfying coming from Python itself and I hardly do anything productive > with it (while I'd really like to). > > - Sylvain > http://www.defuze.org > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredrik at pythonware.com Thu Nov 23 09:36:31 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 23 Nov 2006 09:36:31 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> Message-ID: <368a5cd50611230036h54d3e2dck824bb51f45c1e0a5@mail.gmail.com> Kevien Lee wrote: > Now ,Ironpython had release some time,but i want to konw is any one use > IronPython in your project? absolutely. we used it to "drive" a big C# application, where a C# "frame- work" application provides functionality, and IronPython scripts provide con- figuration and behaviour (including customer-provided behaviour). works like a charm. (and following the pattern from when I first started to use CPython in existing C/C++ applications, the framework developers have started doing things in Python instead of C#, because they work much faster in Python... totally messes up our project planning.) > As a dynamic language ,what it will bring us some advantage for > project,which the advantage C#,VB.net couldn't have? the same advantages that CPython has over those languages, but on a tightly integrated platform. speed of development, flexibility, fast turn- around, prototyping as a design tool, etc, etc. From fredrik at pythonware.com Thu Nov 23 09:55:54 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 23 Nov 2006 09:55:54 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <456551EF.2050707@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> Message-ID: <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> Sylvain Hellegouarch wrote: > From a Python user POV, IP is far from being good enough as it is > now. so you're saying that I'm not a Python user? given how long I've worked full time with Python, that's news to me ;-) > IP as a language is cool but we cannot run most of our common Python > packages on it, making it as useful as a cherry on top of a cake. Nice > but not essential. sounds like you're confusing "Python" with "the stuff I get when I download the CPython 2.5 installer from python.org". don't do that; it only muddles the water for people who can distinguish between a language and a given im- plementation of it, and scares away people who haven't used either Python implementation. (and what's the point running your existing Python stuff on IronPython? don't you already have CPython for that purpose? what I love with IronPython is all the *new* things I can do with it, and all the *new* projects I can bring Python into. not that I get yet another platform to run my old crap on.) as for the standard library, I suggest spending a little time reading up on the DotNet libraries. they're full of useful stuff, and surprisingly Pythonic in their design. and if you need to run an existing program or component on top of them, you quite often only need a little glue code. which you'll write in Python, of course. From eyvind.axelsen at profdoc.no Thu Nov 23 10:15:44 2006 From: eyvind.axelsen at profdoc.no (Eyvind Axelsen) Date: Thu, 23 Nov 2006 10:15:44 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> Message-ID: Yes, we use it in a large C# WinForms application to build dynamic forms from XML definitions with inline python snipes. These snippets are executed at runtime and can be configured/altered by the user. Eyvind. -----Opprinnelig melding----- Fra: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] P? vegne av Kevien Lee Sendt: 23. november 2006 08:30 Til: users at lists.ironpython.com Emne: [IronPython] Is any one use IronPython in your project? Hi, Now ,Ironpython had release some time,but i want to konw is any one use IronPython in your project? As a dynamic language ,what it will bring us some advantage for project,which the advantage C#,VB.net couldn't have? From sh at defuze.org Thu Nov 23 10:18:44 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 23 Nov 2006 09:18:44 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> Message-ID: <45656774.8050401@defuze.org> Fredrik Lundh wrote: > Sylvain Hellegouarch wrote: > >> From a Python user POV, IP is far from being good enough as it is >> now. > > so you're saying that I'm not a Python user? given how long I've worked full > time with Python, that's news to me ;-) I've been speaking French since I was little... does that give me any authority on the language in itself? ;-) > >> IP as a language is cool but we cannot run most of our common Python >> packages on it, making it as useful as a cherry on top of a cake. Nice >> but not essential. > > sounds like you're confusing "Python" with "the stuff I get when I download > the CPython 2.5 installer from python.org". don't do that; it only muddles the > water for people who can distinguish between a language and a given im- > plementation of it, and scares away people who haven't used either Python > implementation. I don't muddle anything. But you are being harsh. If IP was only meant for .NET developers to move to dynamic languages such as Python then either the project is half useful or you've missed something. IP has a platform will only achieve its goal if it allows Python developers to try the .NET environment AND if .NET developers understand that some things are much easier with the Python environment (language+stdlib). Ultimately we will see applications written in Python (the language) but using the best of both worlds in each case. Funny enough what has made Python a success is also its stdlib. Given that ElementTree is now part of that same stdlib I assume you know that it will make it an even bigger success. > > (and what's the point running your existing Python stuff on IronPython? don't > you already have CPython for that purpose? what I love with IronPython is all > the *new* things I can do with it, and all the *new* projects I can bring Python > into. not that I get yet another platform to run my old crap on.) That's stupid reasoning I'm sorry. The all point is to be able to use the best of both worlds and you only look at one side. You want to limit yourself fine. But don't blame me for finding IP limited in its current context. I don't want to have to re-write all my code because IP is not complete. Instead I'd like to open my code to people outside the regular Python community and offer those new comers a chance to see how code can be written in a Python spirit. Again if .NET developers start using ElementTree they will understand how libraries built using dynamic languages can change the way you develop. Maybe .NET developers could have ideas on how to extend projects such as TurboGears or Django using the .NET platform. Considering the amount of people interested in IPCE it seems that lots and lots of Python developers want to carry on with their own projects by making them runnable from Python and IP at the same time. Currently this is not possible without lots of efforts (or not at all). > > as for the standard library, I suggest spending a little time reading up on the > DotNet libraries. they're full of useful stuff, and surprisingly > Pythonic in their > design. ... - Sylvain From fredrik at pythonware.com Thu Nov 23 10:54:04 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 23 Nov 2006 10:54:04 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <45656774.8050401@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> <45656774.8050401@defuze.org> Message-ID: <368a5cd50611230154r6b09d69fq198af50dcc6582f7@mail.gmail.com> > > sounds like you're confusing "Python" with "the stuff I get when I download > > the CPython 2.5 installer from python.org". don't do that; it only muddles the > > water for people who can distinguish between a language and a given im- > > plementation of it, and scares away people who haven't used either Python > > implementation. > > I don't muddle anything. But you are being harsh. > If IP was only meant for .NET developers to move to dynamic languages > such as Python then either the project is half useful or you've missed > something. you're stuck in the "Python is CPython 2.5 as packaged by python.org" mode of thinking. snap out of it. > IP has a platform will only achieve its goal if it allows Python > developers to try the .NET environment AND if .NET developers understand > that some things are much easier with the Python environment > (language+stdlib). it's not obvious to me that Python's standard library is, in any way, better than the DotNet standard library. it's obvious that the Python language is better than other languages for lots of tasks. > Funny enough what has made Python a success is also its stdlib. the standard library was a lot more important when Python was competing with languages didn't have extensive standard libraries too. > Given that ElementTree is now part of that same stdlib I assume you know that > it will make it an even bigger success. as of 1.2.7, ElementTree also supports IronPython 1.0 natively, right out of the box. thanks to careful design of the XMLReader stuff in the DotNet standard library, and careful modular design on the ET side of things. took me minutes to find the right DotNet API, and figure out how to use it. I'm not sure I can say the same about many Python XML API:s. > > (and what's the point running your existing Python stuff on IronPython? don't > > you already have CPython for that purpose? what I love with IronPython is all > > the *new* things I can do with it, and all the *new* projects I can bring Python > > into. not that I get yet another platform to run my old crap on.) > > That's stupid reasoning I'm sorry. > The all point is to be able to use the best of both worlds and you only > look at one side. I could have sworn that *I* was the one who said that IronPython success- fully fuses Python the language with DotNet the platform, and you were the one who kept repeating that "CPython is the one true Python, and Iron- Python is not CPython, so it's broken", but maybe I missed some post in this thread. doesn't matter, really: among my customers, IronPython has done more for Python's visibility and marketability than *any* other Python project in recent times, and I'm learning a *lot* from integrating IronPython in existing DotNet projects. I could of course ignore that, and sit in a corner by myself muttering that "it's not real Python, and they're not using it the right way, so why are they so darn happy with it" in a Homer Simpson voice, but that would be more religion than engineering, and it would definitely not be Pythonic. From sh at defuze.org Thu Nov 23 11:13:36 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 23 Nov 2006 10:13:36 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <368a5cd50611230154r6b09d69fq198af50dcc6582f7@mail.gmail.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> <45656774.8050401@defuze.org> <368a5cd50611230154r6b09d69fq198af50dcc6582f7@mail.gmail.com> Message-ID: <45657450.3050602@defuze.org> Fredrik Lundh wrote: >>> sounds like you're confusing "Python" with "the stuff I get when I download >>> the CPython 2.5 installer from python.org". don't do that; it only muddles the >>> water for people who can distinguish between a language and a given im- >>> plementation of it, and scares away people who haven't used either Python >>> implementation. >> I don't muddle anything. But you are being harsh. >> If IP was only meant for .NET developers to move to dynamic languages >> such as Python then either the project is half useful or you've missed >> something. > > you're stuck in the "Python is CPython 2.5 as packaged by python.org" > mode of thinking. snap out of it. It's funny because then you are tsuck in the .NET as framework mode of thinking since the beginning of this thread. Not once have you mentioned C# or Vb#. So one hand you don't want people to mix between Python the language and Python the environment but you quite happily do it with .NET. > >> IP has a platform will only achieve its goal if it allows Python >> developers to try the .NET environment AND if .NET developers understand >> that some things are much easier with the Python environment >> (language+stdlib). > > it's not obvious to me that Python's standard library is, in any way, > better than > the DotNet standard library. it's obvious that the Python language is > better than > other languages for lots of tasks. I did not say the stdlib was better than the .NET framework I said it was also part of Python's (the language) success. Python without its stdlib would not have arrived where it is now without it IMO. So the fact IP does not support it really well in a 1.0 release is annoying *to me*. > >> Funny enough what has made Python a success is also its stdlib. > > the standard library was a lot more important when Python was competing with > languages didn't have extensive standard libraries too. True. And? > >> Given that ElementTree is now part of that same stdlib I assume you know that >> it will make it an even bigger success. > > as of 1.2.7, ElementTree also supports IronPython 1.0 natively, right out of the > box. thanks to careful design of the XMLReader stuff in the DotNet standard > library, and careful modular design on the ET side of things. took me minutes > to find the right DotNet API, and figure out how to use it. I'm not > sure I can say > the same about many Python XML API:s. You are right. It took me no time to incorporate it into bridge either. But so what? I mean what do you proove? In my previous message I said the goal of IP was to allow people to use the best of *both* world. Have you noticed how painful it was to serialize to a string from XmlWriter while it was a one line job in xml.dom. I agree this is thanks to the Python language but Again I agree with you. Not everything in the stdlib is great but neither is the .NET framework (and I have worked on a large project with .NET and C#... not everything is great and I wish I had had IP back then). > >>> (and what's the point running your existing Python stuff on IronPython? don't >>> you already have CPython for that purpose? what I love with IronPython is all >>> the *new* things I can do with it, and all the *new* projects I can bring Python >>> into. not that I get yet another platform to run my old crap on.) >> That's stupid reasoning I'm sorry. >> The all point is to be able to use the best of both worlds and you only >> look at one side. > > I could have sworn that *I* was the one who said that IronPython success- > fully fuses Python the language with DotNet the platform, and you were the > one who kept repeating that "CPython is the one true Python, and Iron- > Python is not CPython, so it's broken", but maybe I missed some post in > this thread. No you just want to read what you want to read and make me look like the daft Python coder who has just arrived into the game. I will repeat it. IP goal should be to allow developers of both sides to see how to make the best of both environments > > doesn't matter, really: It does not matter but you like showing it, don't you? among my customers, IronPython has done more for > Python's visibility and marketability than *any* other Python project in recent > times, and I'm learning a *lot* from integrating IronPython in existing DotNet > projects. I could of course ignore that, and sit in a corner by > myself muttering > that "it's not real Python, and they're not using it the right way, so why are > they so darn happy with it" in a Homer Simpson voice, but that would be more > religion than engineering, and it would definitely not be Pythonic. For Christ's sake. Did you even read what I said? I never said IP was a bastard project not worth the penny. I said that in its current state it was limited. Right maybe it could only be for my sole purpose and not the whole Python community. I'll give you that. But when did I say that Python was the one and only? Stop making others look like they are the bad guys please. This is annoying. Where I wholeheartedly agree with you however is on the positive impact IP had on Python itself. That's completely true. But did I deny that anyway? - Sylvain From fredrik at pythonware.com Thu Nov 23 11:44:37 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 23 Nov 2006 11:44:37 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <45657450.3050602@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <368a5cd50611230055y7d804762k1d970b8d50093d08@mail.gmail.com> <45656774.8050401@defuze.org> <368a5cd50611230154r6b09d69fq198af50dcc6582f7@mail.gmail.com> <45657450.3050602@defuze.org> Message-ID: <368a5cd50611230244w4251db65g45d4071e51ba857f@mail.gmail.com> > Right maybe it could only be for my sole purpose and not the whole > Python community. exactly. and now that you've finally realized it's not all about you and how you use Python, go back and read your own posts. do they still look correct, or do you perhaps sense a little bit of FUD in there? From giles.thomas at resolversystems.com Thu Nov 23 11:52:47 2006 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Thu, 23 Nov 2006 10:52:47 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> Message-ID: <45657D7F.8080105@resolversystems.com> Kevien Lee wrote: > Hi, > Now ,Ironpython had release some time,but i want to konw is any one use > IronPython in your project? > Absolutely. At Resolver Systems, we're building a new desktop application for .NET. When we started, back in November 2005, we knew that we wanted our users to be able to write Python scripts to run within the app, so we decided to use IronPython as an embedded scripting language. We were about to start cutting code for the main body of our application in C#, but we decided to try an experiment. We had found IronPython a very productive language to work in while we were evaluating it, so we decided to start writing our core application itself in it. Our plan was to see how far we got, and then to switch to C# when we hit whatever limits IP had. We've now been using it for a year, and - with a couple of tiny exceptions, mostly involving calls down into unmanaged code - we haven't hit those limits yet. I would say about 95% of our codebase in terms of lines of code - and 99% in terms of functionality - is IronPython. > As a dynamic language ,what it will bring us some advantage for > project,which the advantage C#,VB.net couldn't have? As a long-time Java coder who's been working in IP for a year now, I would say that Python is just easier to program in; you have to spend less time trying to work out how to express the algorithms and structures you want to write, at least in part because there is less code to write when you don't have to put in typing information everywhere. On the other hand, we are an Extreme Programming shop, so we write tests for all of our code; I'm not sure how comfortable I'd be with the lack of type-safety without that. Regards, Giles -- Giles Thomas Resolver Systems giles.thomas at resolversystems.com From blssnvarghese at yahoo.co.in Thu Nov 23 14:59:31 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Thu, 23 Nov 2006 13:59:31 +0000 (GMT) Subject: [IronPython] Regarding sys.LoadFromAssemblyName() Message-ID: <20061123135931.85770.qmail@web8714.mail.in.yahoo.com> Initially sys.LoadFromAssemblyName was used in IronPython 0.6 which was developed for .NET 1.1. Can anyone please tell me how I can replace this statement in IronPython 1.0.1 developed for .NET 2.0 --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From luismg at gmx.net Thu Nov 23 18:19:21 2006 From: luismg at gmx.net (=?gb2312?B?THVpcyBNLiBHb256qKJsZXo=?=) Date: Thu, 23 Nov 2006 14:19:21 -0300 Subject: [IronPython] Is any one use IronPython in your project? References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> Message-ID: <228401c70f23$876df1f0$05b6a8c0@averatecdda041> >>>From a Python user POV, IP is far from being good enough as it is now. I > have actually hard times understanding why it went in version 1.0 so > fast. Don't get me wrong IP is stable and is good implementation of > Python but it is only a milestone towards a truly useful platform. > > Basically it seems IP only implements the language itself but as we have > seen on this list since it was released only a handful of Python modules > can be run as-is within IP. I do hope the next milestone will focus on a > much better support of those external packages. To achieve this goal the > IP team will have to look at IPCE and understand what needs to be done > first (support more of the stdlib and third-party modules). > > IP as a language is cool but we cannot run most of our common Python > packages on it, making it as useful as a cherry on top of a cake. Nice > but not essential. Make IP a cake in itself and you'll have a winner. > > However I have a feeling IP has been more relevant to regular .NET users > coming from C# who wanted to keep their platform while making a step > towards dynamic languages. That's great and I'm sure once they'll start > they won't be able to stop, but for now I have not found IP entirely > satisfying coming from Python itself and I hardly do anything productive > with it (while I'd really like to). > > - Sylvain Sylvain, What you say is true, but I don't think the job of the IP team is to port all the python libraries. They've done an excellent job writing the whole language in C#, and some libraries. But there are also some users who are working hard to port many useful libraries too. Do not forget that this is also a community project, where everybody can collaborate. Look at Seo Sangyeong work for example. Is there any library you would like to see ported to .Net? Well, why don't you work on it? Nothing prevents you from doing it. In fact, it's just a matter of time until every useful library is ported to .NET. The real value of IP is that it (will) let you use the best of both worlds, always using the same nice syntax we like so much. If you are only interested in using IP libraries, I don't see the point of using IP. But having all the .NET libraries available to you from IP, plus all the other libraries that overtime will be ported to .Net, that's just great. I would be happy if the IP team concentrates all their efforts in just making IP rock solid, stable and (whenever possible), speedy. The libraries can be writen by the community, but if the language is not complete, buggy or performs bad, they won't be useful at all. Luis > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Martin.Maly at microsoft.com Thu Nov 23 18:38:51 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 23 Nov 2006 09:38:51 -0800 Subject: [IronPython] Regarding sys.LoadFromAssemblyName() In-Reply-To: <20061123135931.85770.qmail@web8714.mail.in.yahoo.com> References: <20061123135931.85770.qmail@web8714.mail.in.yahoo.com> Message-ID: You want to use one of the functions available in the new "clr" module: 'AddReferenceToFile' 'AddReferenceToFileAndPath' There are others available now as well: 'AddReference' 'AddReferenceByName' 'AddReferenceByPartialName' You can find detailed explanation of all these functions in the tutorial. Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Blesson Varghese Sent: Thursday, November 23, 2006 6:00 AM To: users at lists.ironpython.com Subject: [IronPython] Regarding sys.LoadFromAssemblyName() Initially sys.LoadFromAssemblyName was used in IronPython 0.6 which was developed for .NET 1.1. Can anyone please tell me how I can replace this statement in IronPython 1.0.1 developed for .NET 2.0 ________________________________ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From blssnvarghese at yahoo.co.in Thu Nov 23 18:54:28 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Thu, 23 Nov 2006 17:54:28 +0000 (GMT) Subject: [IronPython] Regarding Loading Assemblies Message-ID: <20061123175428.56035.qmail@web8702.mail.in.yahoo.com> I have loaded assemblies and now when I try to execute a script it gives errors like: No module like Windows No Module like Drawing along with stack trace Could anyone suggest what could have gone wrong in my code. --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From sh at defuze.org Thu Nov 23 19:32:21 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 23 Nov 2006 18:32:21 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <228401c70f23$876df1f0$05b6a8c0@averatecdda041> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <228401c70f23$876df1f0$05b6a8c0@averatecdda041> Message-ID: <4565E935.20207@defuze.org> Luis, I think the topic has been somehow polluted by the little exchange this morning. I'd like to set things straight. I've never suggested the IP team had done a bad job. If I thought so I would not share my views today. No the problem I think comes from a somehow wrong feeling (as it appears only from my part) that because IP has gone beyond a 1.0 version it would safely be used when coming from the Python land. I'm not saying this is the message the IP team has passed but I don't think they have explained enough the fact that IP was more oriented towards .NET developers wishing to have a try at Python rather than providing a stable implementation of Python that Python developers could use safely to extend their own applications. [By the way the page indicating differences between the implementations is broken on codeplex and none of the link works.] Unlike what Fredrik kept repeating ad libitum this morning this is not a pray. Simply an explanation of why I got frustrated at IP. Because of the wrong impression that the environment was complete enough to port my own code or others'. Fredrik and I haven't the same purpose at using IP and we could not understand each other. > What you say is true, but I don't think the job of the IP team is to > port all the python libraries. > They've done an excellent job writing the whole language in C#, and some > libraries. > But there are also some users who are working hard to port many useful > libraries too. > Do not forget that this is also a community project, where everybody can > collaborate. > Look at Seo Sangyeong work for example. Yes I have and I do use IPCE rather than IP but that actually backs-up my point. Have you looked at the number of modules Seo has added to IPCE to make it useful enough for Python developers wishing to move slowly to .NET while keeping many modules they've been using for so long? You cannot expect developers will learn the whole .NET framework that quickly or even like it, can you? There is a demand. Again I assume that it would also attract some .NET developers to play with TurboGears or Django as much it could attract Python developers to incorporate the huge .NET framework functionalities into their application. When IP 1.0.1 was released I naively thought it wouldn't be such a long way to get those Python packages working (they don't by the way). Maybe a few of them to tweak but not much more. But I was wrong. My fault maybe but this thread was about to say whether or not we were using IP. Currently I'd love to but I can't because my goal is not to re-write my entire code. Fredrik was inviting me to use IP for new code rather than bothering with existing one. Sure this would work but I have no will to drop them, instead I'd like to propose them to the .NET developers and maybe learn from their point of views. > > Is there any library you would like to see ported to .Net? > Well, why don't you work on it? Nothing prevents you from doing it. > In fact, it's just a matter of time until every useful library is ported > to .NET. I had started a few month ago based on Seo's work but there was so many things preventing me to succeed that I had to stop for the time being until IP would get a little more mature. Besides my time is as limited as anyone else and I already work on many projects. Does that I mean I have to shut it down? > > The real value of IP is that it (will) let you use the best of both > worlds, always using the same nice syntax we like so much. > If you are only interested in using IP libraries, I don't see the point > of using IP. I think I can't explain myself correctly today :( I would reply however that if the point of IP was solely to let .NET developers play with a Python syntax and type less code then effectively I have nothing to do with IP. I assume of course I'm wrong here in the fact that the IP teams aims at providing an implementation that both communities feel safe to engage for their own project and slowly open their door to the other side. > But having all the .NET libraries available to you from IP, plus all the > other libraries that overtime will be ported to .Net, that's just great. Yes. That was exactly my point, wasn't it? Overtime it will get just great. The question was as IP stands today and I answered as it is today stating exactly what you just said. > > I would be happy if the IP team concentrates all their efforts in just > making IP rock solid, stable and (whenever possible), speedy. So would I. I guess that's what they do everyday. Now before I get flamed again, I repeat that I very much love the work done so far by the IP team and I am sure I will enjoy IP as it grows but currently for my purpose (although I assume I'm not the only one) the current status of the project does not make me feel confident enough to support it (well I do support it in some limited areas). - Sylvain From luismg at gmx.net Thu Nov 23 20:23:44 2006 From: luismg at gmx.net (=?GB2312?B?THVpcyBNLiBHb256qKJsZXo=?=) Date: Thu, 23 Nov 2006 16:23:44 -0300 Subject: [IronPython] Is any one use IronPython in your project? References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org><228401c70f23$876df1f0$05b6a8c0@averatecdda041> <4565E935.20207@defuze.org> Message-ID: <002501c70f34$e86508c0$6e00a8c0@averatecdda041> >> Is there any library you would like to see ported to .Net? >> Well, why don't you work on it? Nothing prevents you from doing it. >> In fact, it's just a matter of time until every useful library is ported >> to .NET. > > I had started a few month ago based on Seo's work but there was so many > things preventing me to succeed that I had to stop for the time being > until IP would get a little more mature. > > Besides my time is as limited as anyone else and I already work on many > projects. Does that I mean I have to shut it down? > Sylvain, I'm sorry if the above comment sound harsh, believe me it wasn't my intention (I'm not good at making myself clear, specially when writing in english). What I meant is that we should separate the language from the libraries, and that all it takes to use python libraries with IP is that someone port them (I didn't mean to suggest that you take on that challenge, I just wanted to say that if you wanted, you could do it, but now that I read this sentence again, it sounds like I was challenging you...). Also, I believe that naming the current version as 1.0 is ok. At this point, is the language completness and stability what counts, not the availability of libraries (INHO). LUIS From ken.manheimer at gmail.com Thu Nov 23 20:28:29 2006 From: ken.manheimer at gmail.com (Ken Manheimer) Date: Thu, 23 Nov 2006 14:28:29 -0500 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <4565E935.20207@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <228401c70f23$876df1f0$05b6a8c0@averatecdda041> <4565E935.20207@defuze.org> Message-ID: <2cd46e7f0611231128i5bc4a7a9k8287d79a90d54bb7@mail.gmail.com> On 11/23/06, Sylvain Hellegouarch wrote: > Now before I get flamed again, I repeat that I very much love the work > done so far by the IP team and I am sure I will enjoy IP as it grows but > currently for my purpose (although I assume I'm not the only one) the > current status of the project does not make me feel confident enough to > support it (well I do support it in some limited areas). i think the objections are because you seem to be saying (practically did say) that anyone coming to FePy from CPython and expecting the standard libraries is going to be disappointed, as you have been, and that FePy is not ready for such users. what i learned from frederik and luis' responses is that there may be some porting effort, but the core provided is solid enough to make porting/compatibility provisions *possible*, and in some cases, easy or unnecessary. this is valuable information, particularly for someone like me who is interested in FePy, but doesn't have time to explore it and discover the practical considerations, myself. so ultimately i'm glad you spoke up - but have the impression, from the discussion, that you overstated your case, in a way that could convince some that FePy is less generally useful than it actually is. (reading through the thread, i was wishing that both you and frederik would have gotten less wrapped up in trying to prove the other wrong, and worked more to identify what the reasons were for the different perspectives - you both had legitimate reasons for your statements. i would then, as a reader, have had to work less hard to wade through the other stuff and see what the real issues were.) -- ken ken.manheimer at gmail.com http://myriadicity.net From sh at defuze.org Thu Nov 23 20:41:19 2006 From: sh at defuze.org (Sylvain Hellegouarch) Date: Thu, 23 Nov 2006 19:41:19 +0000 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <2cd46e7f0611231128i5bc4a7a9k8287d79a90d54bb7@mail.gmail.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <228401c70f23$876df1f0$05b6a8c0@averatecdda041> <4565E935.20207@defuze.org> <2cd46e7f0611231128i5bc4a7a9k8287d79a90d54bb7@mail.gmail.com> Message-ID: <4565F95F.3080401@defuze.org> > this is valuable information, particularly for someone like me who is > interested in FePy, but doesn't have time to explore it and discover > the practical considerations, myself. so ultimately i'm glad you > spoke up - but have the impression, from the discussion, that you > overstated your case, in a way that could convince some that FePy is > less generally useful than it actually is. > > (reading through the thread, i was wishing that both you and frederik > would have gotten less wrapped up in trying to prove the other wrong, > and worked more to identify what the reasons were for the different > perspectives - you both had legitimate reasons for your statements. i > would then, as a reader, have had to work less hard to wade through > the other stuff and see what the real issues were.) > I have to admit then that I poorly explained myself. Apology then. However my comments were targetting IP not IPCE. In fact IPCE is the reason why I can play with IP currently so definitely I would not shoot at IPCE. From rodolfoconde at saitosoft.com Thu Nov 23 20:51:34 2006 From: rodolfoconde at saitosoft.com (Rodolfo Conde) Date: Thu, 23 Nov 2006 13:51:34 -0600 Subject: [IronPython] Is any one use IronPython in your project? References: Message-ID: <008f01c70f38$c799d040$2d16a8c0@RCONDE> Yes, i use it in a project where an electronical device makes phone calls to a server (this is the one that uses IP) telling it a client needs a service...Also, i did a server prototipe that listens in an UDP port for vehicles to send their GPS position. the server stores those positions inside a BD server... Greetings... ----- Original Message ----- From: "Eyvind Axelsen" To: "Discussion of IronPython" Sent: Thursday, November 23, 2006 3:15 AM Subject: Re: [IronPython] Is any one use IronPython in your project? Yes, we use it in a large C# WinForms application to build dynamic forms from XML definitions with inline python snipes. These snippets are executed at runtime and can be configured/altered by the user. Eyvind. -----Opprinnelig melding----- Fra: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] P? vegne av Kevien Lee Sendt: 23. november 2006 08:30 Til: users at lists.ironpython.com Emne: [IronPython] Is any one use IronPython in your project? Hi, Now ,Ironpython had release some time,but i want to konw is any one use IronPython in your project? As a dynamic language ,what it will bring us some advantage for project,which the advantage C#,VB.net couldn't have? _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com __________ Informaci?n de NOD32, revisi?n 1876 (20061121) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com From ken.manheimer at gmail.com Thu Nov 23 20:55:37 2006 From: ken.manheimer at gmail.com (Ken Manheimer) Date: Thu, 23 Nov 2006 14:55:37 -0500 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <4565F95F.3080401@defuze.org> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <228401c70f23$876df1f0$05b6a8c0@averatecdda041> <4565E935.20207@defuze.org> <2cd46e7f0611231128i5bc4a7a9k8287d79a90d54bb7@mail.gmail.com> <4565F95F.3080401@defuze.org> Message-ID: <2cd46e7f0611231155k1c26f271mab90d2f00499f7a2@mail.gmail.com> On 11/23/06, Sylvain Hellegouarch wrote: > I have to admit then that I poorly explained myself. Apology then. > However my comments were targetting IP not IPCE. In fact IPCE is the > reason why I can play with IP currently so definitely I would not shoot > at IPCE. well, i think it would be interesting to continue to hear from anyone who is using iron python for practical projects, per kevien lee's original question. i'd curious to know more about who's using it - what the mix is of those concentrating primarily on windows applications, those working with combinations of os environments, etc. (of course, those the busiest looking to benefit from the opportunities may have the least time to respond, so i'm not sure a poll like this will expose the real story...) -- ken ken.manheimer at gmail.com http://myriadicity.net From fredrik at pythonware.com Thu Nov 23 21:25:04 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 23 Nov 2006 21:25:04 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <2cd46e7f0611231155k1c26f271mab90d2f00499f7a2@mail.gmail.com> References: <1164266973.043632.59050@e3g2000cwe.googlegroups.com> <456551EF.2050707@defuze.org> <228401c70f23$876df1f0$05b6a8c0@averatecdda041> <4565E935.20207@defuze.org> <2cd46e7f0611231128i5bc4a7a9k8287d79a90d54bb7@mail.gmail.com> <4565F95F.3080401@defuze.org> <2cd46e7f0611231155k1c26f271mab90d2f00499f7a2@mail.gmail.com> Message-ID: <368a5cd50611231225q3453eb3fjb5477921b9468a9f@mail.gmail.com> Ken Manheimer wrote: > (of course, those the busiest looking to benefit from the > opportunities may have the least time to respond assuming they're even subscribed to this list. most IP hackers I know aren't. From Martin.Maly at microsoft.com Thu Nov 23 22:12:47 2006 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 23 Nov 2006 13:12:47 -0800 Subject: [IronPython] Regarding Loading Assemblies In-Reply-To: <20061123175428.56035.qmail@web8702.mail.in.yahoo.com> References: <20061123175428.56035.qmail@web8702.mail.in.yahoo.com> Message-ID: I am only guessing here because I haven't seen your code, but you may need to add the following into your script: clr.AddReference("System.Windows.Forms") clr.AddReference("System.Drawing") I believe IronPython 0.6 used to automatically load the Windows forms and Drawing namespaces, but 1.0.1 no longer does that. Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Blesson Varghese Sent: Thursday, November 23, 2006 9:54 AM To: users at lists.ironpython.com Subject: [IronPython] Regarding Loading Assemblies I have loaded assemblies and now when I try to execute a script it gives errors like: No module like Windows No Module like Drawing along with stack trace Could anyone suggest what could have gone wrong in my code. ________________________________ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwiles at webworks.com Fri Nov 24 04:57:44 2006 From: jwiles at webworks.com (Jesse Wiles) Date: Thu, 23 Nov 2006 22:57:44 -0500 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <368a5cd50611231225q3453eb3fjb5477921b9468a9f@mail.gmail.com> Message-ID: <3e2f4c0bf75f525c41eed3fbad3bd21f@jampa> We are currently using IronPython as a hook for scripting our .NET application. This is extremely valuable since, to my knowledge, there is no other comparable facility for this purpose in .NET. On 2006-11-23 15:25:04 -0500 Fredrik Lundh wrote: > Ken Manheimer wrote: > >> (of course, those the busiest looking to benefit from the >> opportunities may have the least time to respond > > assuming they're even subscribed to this list. most IP hackers I know > aren't. > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From blssnvarghese at yahoo.co.in Fri Nov 24 06:11:41 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Fri, 24 Nov 2006 05:11:41 +0000 (GMT) Subject: [IronPython] No moduled named Exception Message-ID: <20061124051141.47235.qmail@web8714.mail.in.yahoo.com> Hi, Thanks a lot for the previous help. Again getting into some other trouble. I have loaded a few dll's from a directory using Reflection. Once I have loaded the dll's (the assemblies), then I should be able to use its components in the IronPython script. But even after loading the dll's an exception like No module named rises. Could you please suggest me some help. Thanks. --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Nov 24 11:38:09 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 24 Nov 2006 10:38:09 +0000 Subject: [IronPython] No moduled named Exception In-Reply-To: <20061124051141.47235.qmail@web8714.mail.in.yahoo.com> References: <20061124051141.47235.qmail@web8714.mail.in.yahoo.com> Message-ID: <4566CB91.4010001@voidspace.org.uk> Blesson Varghese wrote: > Hi, > > Thanks a lot for the previous help. > Again getting into some other trouble. I have loaded a few dll's from > a directory using Reflection. Once I have loaded the dll's (the > assemblies), then I should be able to use its components in the > IronPython script. But even after loading the dll's an exception like > No module named rises. > > Could you please suggest me some help. Having added the reference you *then* need to import them. E.g. import clr clr.AddReference('System.Windows.Forms') import System.Windows.Forms HTH Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Thanks. > > > ------------------------------------------------------------------------ > Find out what India is talking about on - Yahoo! Answers India > > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. > Get it NOW > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From blssnvarghese at yahoo.co.in Fri Nov 24 12:30:51 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Fri, 24 Nov 2006 11:30:51 +0000 (GMT) Subject: [IronPython] No module named Exception - unresolved still In-Reply-To: <4566CB91.4010001@voidspace.org.uk> Message-ID: <20061124113051.63947.qmail@web8702.mail.in.yahoo.com> No I am trying to load some other .NET dll's. These dll's are related to some devices, on the project that I am working on. Though I load the assemblies and they get loaded without any exceptions. I cannot run a command like : from import * It throws exception No module named wrote: Blesson Varghese wrote: > Hi, > > Thanks a lot for the previous help. > Again getting into some other trouble. I have loaded a few dll's from > a directory using Reflection. Once I have loaded the dll's (the > assemblies), then I should be able to use its components in the > IronPython script. But even after loading the dll's an exception like > No module named rises. > > Could you please suggest me some help. Having added the reference you *then* need to import them. E.g. import clr clr.AddReference('System.Windows.Forms') import System.Windows.Forms HTH Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Thanks. > > > ------------------------------------------------------------------------ > Find out what India is talking about on - Yahoo! Answers India > > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. > Get it NOW > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From blssnvarghese at yahoo.co.in Fri Nov 24 15:29:49 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Fri, 24 Nov 2006 14:29:49 +0000 (GMT) Subject: [IronPython] How to bring modules in same scope?? Message-ID: <20061124142949.51906.qmail@web8708.mail.in.yahoo.com> Hi, I have loaded a few dll's using Reflection from a particular library. I have used the sys.path.append(directory name) also. I have handled all the exceptions too. Now I want to run some scripts that make use of these assemblies loaded. For this I execute the script file using ExecuteFile. But I understand that though the modules were loaded previously it raises exception stating that no modules. After reading a few documents I understand that the possible problem is that they could have been executed on different module scopes. I am pretty new to IronPython... Pls suggest a way.... Thanks for all help --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Nov 24 15:30:08 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 24 Nov 2006 14:30:08 +0000 Subject: [IronPython] No module named Exception - unresolved still In-Reply-To: <20061124113051.63947.qmail@web8702.mail.in.yahoo.com> References: <20061124113051.63947.qmail@web8702.mail.in.yahoo.com> Message-ID: <456701F0.8030102@voidspace.org.uk> Blesson Varghese wrote: > No I am trying to load some other .NET dll's. These dll's are related > to some devices, on the project that I am working on. > Though I load the assemblies and they get loaded without any > exceptions. I cannot run a command like : > from import * > It throws exception No module named > > */Michael Foord /* wrote: > > Blesson Varghese wrote: > > Hi, > > > > Thanks a lot for the previous help. > > Again getting into some other trouble. I have loaded a few dll's > from > > a directory using Reflection. Once I have loaded the dll's (the > > assemblies), then I should be able to use its components in the > > IronPython script. But even after loading the dll's an exception > like > > No module named rises. > > > > Could you please suggest me some help. > Having added the reference you *then* need to import them. > > E.g. > > import clr > clr.AddReference('System.Windows.Forms') > > import System.Windows.Forms > > HTH > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml > > > > > Thanks. > > > > > > > ------------------------------------------------------------------------ > > Find out what India is talking about on - Yahoo! Answers India > > > > Send FREE SMS to your friend's mobile from Yahoo! Messenger > Version 8. > > Get it NOW > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 > > > ------------------------------------------------------------------------ > Find out what India is talking about on - Yahoo! Answers India > > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. > Get it NOW > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From simon.dahlbacka at gmail.com Fri Nov 24 18:28:45 2006 From: simon.dahlbacka at gmail.com (Simon Dahlbacka) Date: Fri, 24 Nov 2006 19:28:45 +0200 Subject: [IronPython] How to bring modules in same scope?? In-Reply-To: <20061124142949.51906.qmail@web8708.mail.in.yahoo.com> References: <20061124142949.51906.qmail@web8708.mail.in.yahoo.com> Message-ID: <57124720611240928r5d469160v66857fac7551f660@mail.gmail.com> so what about reading the responses you've got, and skip Reflection and do use clr.AddReference ? On 11/24/06, Blesson Varghese wrote: > > Hi, > > I have loaded a few dll's using Reflection from a particular library. I > have used the sys.path.append(directory name) also. I have handled all the > exceptions too. Now I want to run some scripts that make use of these > assemblies loaded. For this I execute the script file using ExecuteFile. But > I understand that though the modules were loaded previously it raises > exception stating that no modules. After reading a few documents I > understand that the possible problem is that they could have been executed > on different module scopes. I am pretty new to IronPython... > Pls suggest a way.... > > Thanks for all help > > ------------------------------ > Find out what India is talking about on - Yahoo! Answers India > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get > it NOW > > > _______________________________________________ > 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 garage_dba at hotmail.com Fri Nov 24 20:15:51 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Fri, 24 Nov 2006 13:15:51 -0600 Subject: [IronPython] one click Message-ID: Suppose you want to deploy a Wndow Forms app written in IronPython thoughout an organization via a web page using "one-click deployment". Is it easy to install the IP distribution on each pc with that same "click" ? . -------------- next part -------------- An HTML attachment was scrubbed... URL: From riltim at gmail.com Fri Nov 24 20:23:59 2006 From: riltim at gmail.com (Tim Riley) Date: Fri, 24 Nov 2006 14:23:59 -0500 Subject: [IronPython] one click In-Reply-To: References: Message-ID: You don't need to package the IronPython distribution if you compile your code to a stand alone executable using Pyc from the samples. See: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython&title=Samples On 11/24/06, Bill64bits wrote: > > Suppose you want to deploy a Wndow Forms app written in IronPython > thoughout an organization via a web page > using "one-click deployment". > Is it easy to install the IP distribution on each pc with that same > "click" ? > . > > _______________________________________________ > 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 garage_dba at hotmail.com Fri Nov 24 21:59:08 2006 From: garage_dba at hotmail.com (Bill64bits) Date: Fri, 24 Nov 2006 14:59:08 -0600 Subject: [IronPython] one click References: Message-ID: Thanks, but the documentation states "The compiled executable requires the presence of IronPython.dll and IronMath.dll in the same directory from which the compiled assembly is being executed." So you still have to install the dlls on every box in the corporation that will run your application. And you still have a .NET exe to install. So what is the advantage of the Pyc approach? (sorry if this is a dumb question) ----- Original Message ----- From: Tim Riley To: Discussion of IronPython Sent: Friday, November 24, 2006 1:23 PM Subject: Re: [IronPython] one click You don't need to package the IronPython distribution if you compile your code to a stand alone executable using Pyc from the samples. See: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython&title=Samples On 11/24/06, Bill64bits < garage_dba at hotmail.com> wrote: Suppose you want to deploy a Wndow Forms app written in IronPython thoughout an organization via a web page using "one-click deployment". Is it easy to install the IP distribution on each pc with that same "click" ? . _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ------------------------------------------------------------------------------ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From blssnvarghese at yahoo.co.in Sat Nov 25 06:11:02 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Sat, 25 Nov 2006 05:11:02 +0000 (GMT) Subject: [IronPython] How to bring modules in same scope?? In-Reply-To: <57124720611240928r5d469160v66857fac7551f660@mail.gmail.com> Message-ID: <20061125051102.45660.qmail@web8706.mail.in.yahoo.com> I know it will work if I use clr. AddReference..... But my project has to do all this from C# code. Via reflection I load all assemblies from a directory. These are loaded by using the statement clrmodule.AddReference(assembly name). And then when I get the IronPython Exception stating No moduled named assembly was found....... Simon Dahlbacka wrote: so what about reading the responses you've got, and skip Reflection and do use clr.AddReference ? On 11/24/06, Blesson Varghese < blssnvarghese at yahoo.co.in> wrote: Hi, I have loaded a few dll's using Reflection from a particular library. I have used the sys.path.append(directory name) also. I have handled all the exceptions too. Now I want to run some scripts that make use of these assemblies loaded. For this I execute the script file using ExecuteFile. But I understand that though the modules were loaded previously it raises exception stating that no modules. After reading a few documents I understand that the possible problem is that they could have been executed on different module scopes. I am pretty new to IronPython... Pls suggest a way.... Thanks for all help --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW _______________________________________________ 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 --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Sun Nov 26 11:59:06 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 26 Nov 2006 19:59:06 +0900 Subject: [IronPython] Mono and CollectionCount Message-ID: <5b0248170611260259u2b97b5c0u36f83660930ad121@mail.gmail.com> Dear IronPython users on Mono, If you get an error similar to this: Traceback (most recent call last): File mscorlib, line unknown, in CollectionCount NotImplementedError: The requested feature is not implemented. Please upgrade to Mono 1.2.1 or better. Mono versions below 1.2 will suffer this. I can't pinpoint exact conditions to reproduce this, but it tends to happen if I try to do some complex things. To IronPython team: where in IronPython is this feature (CollectionCount) used, and for what purposes? -- Seo Sanghyeon From sanxiyn at gmail.com Sun Nov 26 12:17:21 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Sun, 26 Nov 2006 20:17:21 +0900 Subject: [IronPython] Blatant bug Message-ID: <5b0248170611260317q5357be0cl3a9ceb48ada09a8e@mail.gmail.com> def f(*a, **b): print a, b f(0, x=1, *[2]) TypeError: Cannot cast from source type to destination type. Since this is part of Python standard library and not part of Python the language, I think it's very obvious that this bug is irrelevant for 1.0-matureness of IronPython. Bwahaha. Sorry. I haven't tested this on MS.NET. Safeguarding. Just in case. -- Seo Sanghyeon From xmlhacker at gmail.com Sun Nov 26 12:29:05 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Sun, 26 Nov 2006 04:29:05 -0700 Subject: [IronPython] Blatant bug In-Reply-To: <5b0248170611260317q5357be0cl3a9ceb48ada09a8e@mail.gmail.com> References: <5b0248170611260317q5357be0cl3a9ceb48ada09a8e@mail.gmail.com> Message-ID: Hey Seo, >From an MS.NET console, TypeError: Unable to cast object of type 'IronPython.Runtime.List' to type ' IronPython.Runtime.Tuple'. On 11/26/06, Sanghyeon Seo wrote: > > def f(*a, **b): print a, b > f(0, x=1, *[2]) > > TypeError: Cannot cast from source type to destination type. > > Since this is part of Python standard library and not part of Python > the language, I think it's very obvious that this bug is irrelevant > for 1.0-matureness of IronPython. Bwahaha. > > Sorry. > > I haven't tested this on MS.NET. Safeguarding. Just in case. > > -- > Seo Sanghyeon > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Mon Nov 27 11:04:42 2006 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 27 Nov 2006 02:04:42 -0800 Subject: [IronPython] one click Message-ID: Would this help, then? http://research.microsoft.com/~mbarnett/ILMerge.aspx ----- Keith J. Farmer kfarmer at thuban.org From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill64bits Sent: Friday, 24 November 2006 12:59 To: Discussion of IronPython Subject: Re: [IronPython] one click Thanks, but the documentation states "The compiled executable requires the presence of IronPython.dll and IronMath.dll in the same directory from which the compiled assembly is being executed." So you still have to install the dlls on every box in the corporation that will run your application. And you still have a .NET exe to install. So what is the advantage of the Pyc approach? (sorry if this is a dumb question) ----- Original Message ----- From: Tim Riley To: Discussion of IronPython Sent: Friday, November 24, 2006 1:23 PM Subject: Re: [IronPython] one click You don't need to package the IronPython distribution if you compile your code to a stand alone executable using Pyc from the samples. See: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython&title=Samp les On 11/24/06, Bill64bits < garage_dba at hotmail.com > wrote: Suppose you want to deploy a Wndow Forms app written in IronPython thoughout an organization via a web page using "one-click deployment". Is it easy to install the IP distribution on each pc with that same "click" ? . _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ________________________________ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From xmlhacker at gmail.com Mon Nov 27 15:07:20 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Mon, 27 Nov 2006 07:07:20 -0700 Subject: [IronPython] one click In-Reply-To: References: Message-ID: One-Click apps work just fine with IronPython e.g. -> http://pypod.net/Console/ (requires access via Internet Explorer to properly install -- not my bug, btw... An existing issue with Click-Once apps in general) On 11/27/06, Keith J. Farmer wrote: > > Would this help, then? > > > > http://research.microsoft.com/~mbarnett/ILMerge.aspx > > > > ----- > > Keith J. Farmer > > kfarmer at thuban.org > -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Nov 27 15:53:11 2006 From: slide.o.mix at gmail.com (Slide) Date: Mon, 27 Nov 2006 07:53:11 -0700 Subject: [IronPython] one click In-Reply-To: References: Message-ID: There is a Firefox extension (http://www.softwarepunk.com/ffclickonce/) that will let you install and run ClickOnce apps. slide On 11/27/06, M. David Peterson wrote: > One-Click apps work just fine with IronPython e.g. -> > http://pypod.net/Console/ (requires access via Internet Explorer to properly > install -- not my bug, btw... An existing issue with Click-Once apps in > general) > > > On 11/27/06, Keith J. Farmer wrote: > > > > > > > > > > Would this help, then? > > > > > > > > http://research.microsoft.com/~mbarnett/ILMerge.aspx > > > > > > > > > > ----- > > > > Keith J. Farmer > > > > kfarmer at thuban.org > > > -- > /M:D > > M. David Peterson > http://mdavid.name | http://www.oreillynet.com/pub/au/2354 > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From xmlhacker at gmail.com Mon Nov 27 16:43:28 2006 From: xmlhacker at gmail.com (M. David Peterson) Date: Mon, 27 Nov 2006 08:43:28 -0700 Subject: [IronPython] one click In-Reply-To: References: Message-ID: On 11/27/06, Slide wrote: > > There is a Firefox extension > (http://www.softwarepunk.com/ffclickonce/) that will let you install > and run ClickOnce apps. > > slide Oh, NICE! Thanks for the link, slide! -- /M:D M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ivan.Chelubeev at nival.com Mon Nov 27 17:19:50 2006 From: Ivan.Chelubeev at nival.com (Ivan Chelubeev) Date: Mon, 27 Nov 2006 19:19:50 +0300 Subject: [IronPython] embedded debugging In-Reply-To: <50B69702CA6E6D4E849D30CD4989AB8E4E4173F517@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <50B69702CA6E6D4E849D30CD4989AB8E4E4173F517@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <456B1026.40505@nival.com> Shri Borde wrote: > I believe your breakpoint is in top-level global code of the module. In > that case, this is a known limitation. > > What is needed is a visualizer to display CLR global variables. > VisualStudio does support such a plug-in architecture. However, such a > plug-in has not yet been implemented. We do want to improve such support > in the future, but we have not gotten to this yet. Are there any plans to do this anytime soon? -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.moore at centrify.com Mon Nov 27 18:23:02 2006 From: paul.moore at centrify.com (Paul Moore) Date: Mon, 27 Nov 2006 09:23:02 -0800 Subject: [IronPython] Is any one use IronPython in your project? Message-ID: Same here. I don't care that its python, perl, cobol, ... I just want a .NET scripting language that I can embed in an app -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jesse Wiles Sent: Thursday, November 23, 2006 7:58 PM To: Discussion of IronPython Subject: Re: [IronPython] Is any one use IronPython in your project? We are currently using IronPython as a hook for scripting our .NET application. This is extremely valuable since, to my knowledge, there is no other comparable facility for this purpose in .NET. On 2006-11-23 15:25:04 -0500 Fredrik Lundh wrote: > Ken Manheimer wrote: > >> (of course, those the busiest looking to benefit from the >> opportunities may have the least time to respond > > assuming they're even subscribed to this list. most IP hackers I know > aren't. > > > _______________________________________________ > 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 slide.o.mix at gmail.com Mon Nov 27 18:32:49 2006 From: slide.o.mix at gmail.com (Slide) Date: Mon, 27 Nov 2006 10:32:49 -0700 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: References: Message-ID: I use JScript.NET to "script" my application, although it just uses the CodeProvider to compile the code on the fly, which is why "script" is in quotes. On 11/27/06, Paul Moore wrote: > Same here. I don't care that its python, perl, cobol, ... I just want a > .NET scripting language that I can embed in an app > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jesse Wiles > Sent: Thursday, November 23, 2006 7:58 PM > To: Discussion of IronPython > Subject: Re: [IronPython] Is any one use IronPython in your project? > > We are currently using IronPython as a hook for scripting our .NET > application. > This is extremely valuable since, to my knowledge, there is no other > comparable facility for this purpose in .NET. > > On 2006-11-23 15:25:04 -0500 Fredrik Lundh > wrote: > > > Ken Manheimer wrote: > > > >> (of course, those the busiest looking to benefit from the > >> opportunities may have the least time to respond > > > > assuming they're even subscribed to this list. most IP hackers I know > > > aren't. > > > > > > _______________________________________________ > > 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 SFOX2 at dot.state.tx.us Mon Nov 27 19:31:59 2006 From: SFOX2 at dot.state.tx.us (Shawn Fox) Date: Mon, 27 Nov 2006 12:31:59 -0600 Subject: [IronPython] Is any one use IronPython in your project? Message-ID: <20061127T123159Z_8C13000C0000@dot.state.tx.us> I use IronPython in several projects. I use it primarily for cutomizations and validations, or actions and events that are likely to change. Overall, I find it easier to implement business rules in the python language than in C# or C++... Python just seems to "jive" with the way I think. While I would certainly like greater compatibility with the many third-party libraries in existence, I recognize that IronPython is a separate product from CPython or JPython. Compared to CPython and JPython it is also fairly young. As it matures, I imagine that the most desired features will be implemented, but I see no reason not to use a great, functional product just because it is not 100% compatible with a different implementation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Mon Nov 27 23:02:38 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 27 Nov 2006 14:02:38 -0800 Subject: [IronPython] Mono and CollectionCount In-Reply-To: <5b0248170611260259u2b97b5c0u36f83660930ad121@mail.gmail.com> References: <5b0248170611260259u2b97b5c0u36f83660930ad121@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E32019787@DF-GRTDANE-MSG.exchange.corp.microsoft.com> CollectionCount is used for the IdDispenser and for any weak hashtables we maintain. I suspect the reason you're hitting it would be the id dispsenser. You can probably repro it with something as simple as: while True: id(object()) After we hand out a certain number of IDs we will check the GC statistics and attempt to cleanup this table of weak references removing any unused IDs if a GC has occurred (if a collection hasn't occurred then all the weak refs will still be alive). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Sunday, November 26, 2006 2:59 AM To: Discussion of IronPython Subject: [IronPython] Mono and CollectionCount Dear IronPython users on Mono, If you get an error similar to this: Traceback (most recent call last): File mscorlib, line unknown, in CollectionCount NotImplementedError: The requested feature is not implemented. Please upgrade to Mono 1.2.1 or better. Mono versions below 1.2 will suffer this. I can't pinpoint exact conditions to reproduce this, but it tends to happen if I try to do some complex things. To IronPython team: where in IronPython is this feature (CollectionCount) used, and for what purposes? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From daftspaniel at gmail.com Mon Nov 27 23:11:24 2006 From: daftspaniel at gmail.com (Davy Mitchell) Date: Mon, 27 Nov 2006 22:11:24 +0000 Subject: [IronPython] Subclassing a Control Message-ID: <20253b0c0611271411s18fc15d0yfebfd006f659e69a@mail.gmail.com> Hi Folks, I was doing some IronPython for the first time in ages so forgive me if I am being dumb :-) Anyway I am trying to make a transparent label WinForm control: class TransLabel(Label): def CreateParams(self): cp = super(TransLabel,self).CreateParams cp.ExStyle = cp.ExStyle | 0x20 return cp def OnPaintBackground(self,e): pass The problem is the super call fails with: Traceback (most recent call last): File K:\MyDev\PyLP\helloWorld1.py, line 69, in Initialize File K:\MyDev\PyLP\helloWorld1.py, line 22, in __init__ File , line 0, in DefaultNew##12 File , line 0, in .ctor##26 File System.Windows.Forms, line unknown, in .ctor File System.Windows.Forms, line unknown, in .ctor TypeError: issubclass: arg 1 must be a class line22 is only self.label = TransLabel() Thanks and take care, Davy Mitchell -- Davy Mitchell Blog - http://www.latedecember.com/sites/personal/davy/ Mood News - BBC News Headlines Auto-Classified as Good, Bad or Neutral. http://www.latedecember.com/sites/moodnews/ From dinov at exchange.microsoft.com Mon Nov 27 23:12:11 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 27 Nov 2006 14:12:11 -0800 Subject: [IronPython] Blatant bug In-Reply-To: <5b0248170611260317q5357be0cl3a9ceb48ada09a8e@mail.gmail.com> References: <5b0248170611260317q5357be0cl3a9ceb48ada09a8e@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E3201978E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for reporting this. I've opened bug # 5974 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5974). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Sunday, November 26, 2006 3:17 AM To: Discussion of IronPython Subject: [IronPython] Blatant bug def f(*a, **b): print a, b f(0, x=1, *[2]) TypeError: Cannot cast from source type to destination type. Since this is part of Python standard library and not part of Python the language, I think it's very obvious that this bug is irrelevant for 1.0-matureness of IronPython. Bwahaha. Sorry. I haven't tested this on MS.NET. Safeguarding. Just in case. -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Mon Nov 27 23:37:41 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 27 Nov 2006 14:37:41 -0800 Subject: [IronPython] How to bring modules in same scope?? In-Reply-To: <20061125051102.45660.qmail@web8706.mail.in.yahoo.com> References: <57124720611240928r5d469160v66857fac7551f660@mail.gmail.com> <20061125051102.45660.qmail@web8706.mail.in.yahoo.com> Message-ID: <7AD436E4270DD54A94238001769C22274E320197B7@DF-GRTDANE-MSG.exchange.corp.microsoft.com> You are passing the assembly name to AddReference? You should be able to pass the actual Assembly object you get back from reflection instead. Then if you import the namespaces in the file you're executing it should use the assembly objects you actually loaded yourself. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Blesson Varghese Sent: Friday, November 24, 2006 9:11 PM To: Discussion of IronPython Subject: Re: [IronPython] How to bring modules in same scope?? I know it will work if I use clr. AddReference..... But my project has to do all this from C# code. Via reflection I load all assemblies from a directory. These are loaded by using the statement clrmodule.AddReference(assembly name). And then when I get the IronPython Exception stating No moduled named assembly was found....... Simon Dahlbacka wrote: so what about reading the responses you've got, and skip Reflection and do use clr.AddReference ? On 11/24/06, Blesson Varghese < blssnvarghese at yahoo.co.in> wrote: Hi, I have loaded a few dll's using Reflection from a particular library. I have used the sys.path.append(directory name) also. I have handled all the exceptions too. Now I want to run some scripts that make use of these assemblies loaded. For this I execute the script file using ExecuteFile. But I understand that though the modules were loaded previously it raises exception stating that no modules. After reading a few documents I understand that the possible problem is that they could have been executed on different module scopes. I am pretty new to IronPython... Pls suggest a way.... Thanks for all help ________________________________ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW _______________________________________________ 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 ________________________________ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Tue Nov 28 04:16:15 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Tue, 28 Nov 2006 12:16:15 +0900 Subject: [IronPython] UnicodeError's object attribute In-Reply-To: <5b0248170611200252v26677161n68385051027452a0@mail.gmail.com> References: <5b0248170611200252v26677161n68385051027452a0@mail.gmail.com> Message-ID: <5b0248170611271916udc7b682l9ea0e6c487627fde@mail.gmail.com> 2006/11/20, Sanghyeon Seo : > UnicodeError objects don't have "object" attribute. It turns out that, > they have, "@object" attribute instead! Any idea on this? -- Seo Sanghyeon From blssnvarghese at yahoo.co.in Tue Nov 28 07:58:09 2006 From: blssnvarghese at yahoo.co.in (Blesson Varghese) Date: Tue, 28 Nov 2006 06:58:09 +0000 (GMT) Subject: [IronPython] Do we have any option for Intellisense?? Message-ID: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> I want to write code to provide Intellisense to an IDE for Iron Python...Do we have any options within the Python Engine to do that??? --------------------------------- Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From thane at magna-capital.com Tue Nov 28 16:40:26 2006 From: thane at magna-capital.com (Thane Plummer) Date: Tue, 28 Nov 2006 10:40:26 -0500 Subject: [IronPython] Do we have any option for Intellisense?? In-Reply-To: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> Message-ID: <001d01c71303$87126db0$6603a8c0@Dell9150> Have you looked at the code for tab completion? Ipy.exe -X:TabCompletion On the other hand, why not write it in Python? It works for me. _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Blesson Varghese Sent: Tuesday, November 28, 2006 1:58 AM To: users at lists.ironpython.com Subject: [IronPython] Do we have any option for Intellisense?? I want to write code to provide Intellisense to an IDE for Iron Python...Do we have any options within the Python Engine to do that??? _____ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From thane at magna-capital.com Tue Nov 28 18:03:15 2006 From: thane at magna-capital.com (Thane Plummer) Date: Tue, 28 Nov 2006 12:03:15 -0500 Subject: [IronPython] Intellisense in Python In-Reply-To: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> Message-ID: <003401c7130f$1900f9c0$6603a8c0@Dell9150> Here's how I implement intellisense in Python. This is very easy for an interactive command line, and a bit trickier for an editor. The code was gleaned from an Idle implementation, and I haven't changed it in years. It works fine with both CPython and IronPython, returning both the stdlib and .NET methods in IronPython. (This is greatly simplified, but it's the general approach) 1. Load the functions _find_constructor() and get_arg_text() into Python - see code below or refer to Idle source code. 2. When the user presses the period key, look to see if there's a valid Python object directly preceding the period. a. If a valid object is found, e.g. myobject, temporarily redirect Python output to a string and call dir(myobject) on the object to get a list of methods/properties. b. Remove double underscore methods from the string, and populate a list box with the methods. c. Pop up the listbox in front of the period and let the user select one via mouse or keystroke. 3. When the user presses the left-bracket, temporarily redirect Python output to a string and call get_arg_text(object) on the object immediately preceding the bracket. a. If text is returned, display it in a tooltip window. HTH -------------- Python code below ---------------------- def _find_constructor(class_ob): # Given a class object, return a function object used for the # constructor (ie, __init__() ) or None if we can't find one. try: return class_ob.__init__.im_func except AttributeError: for base in class_ob.__bases__: rc = _find_constructor(base) if rc is not None: return rc return None def get_arg_text(ob): import types argText = '' if ob is not None: argOffset = 0 if type(ob)==types.ClassType: fob = _find_constructor(ob) if fob is None: fob = lambda: None else: argOffset = 1 elif type(ob)==types.MethodType: fob = ob.im_func argOffset = 1 else: fob = ob # Try and build one for Python defined functions if type(fob) in [types.FunctionType, types.LambdaType]: try: realArgs = fob.func_code.co_varnames[argOffset:fob.func_code.co_argcount] defaults = fob.func_defaults or [] defaults = list(map(lambda name: '=%s' % name, defaults)) defaults = [''] * (len(realArgs)-len(defaults)) + defaults items = map(lambda arg, dflt: arg+dflt, realArgs, defaults) if fob.func_code.co_flags & 0x4: items.append('...') if fob.func_code.co_flags & 0x8: items.append('***') argText = string.join(items , ', ') argText = '(%s)' % argText except: pass # See if we can use the docstring doc = getattr(ob, '__doc__', '') if doc: while doc[:1] in ' \t\n': doc = doc[1:] pos = doc.find('\n') if pos < 0 or pos > 70: pos = 70 if argText: argText += '\n' argText += doc[:pos] return argText _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Blesson Varghese Sent: Tuesday, November 28, 2006 1:58 AM To: users at lists.ironpython.com Subject: [IronPython] Do we have any option for Intellisense?? I want to write code to provide Intellisense to an IDE for Iron Python...Do we have any options within the Python Engine to do that??? _____ Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW -------------- next part -------------- An HTML attachment was scrubbed... URL: From sum.ergo.code at gmail.com Tue Nov 28 19:15:13 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Tue, 28 Nov 2006 12:15:13 -0600 Subject: [IronPython] Do we have any option for Intellisense?? In-Reply-To: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> References: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> Message-ID: <1d39a8340611281015o357afe58m6987db606fb60fa7@mail.gmail.com> On 11/28/06, Blesson Varghese wrote: > > I want to write code to provide Intellisense to an IDE for Iron > Python...Do we have any options within the Python Engine to do that??? > > ------------------------------ > I'm not sure I'd have time to do it, but I'm thinking about rewriting PyCrust for IronPython. When I wrote it for wxPython I made a pretty decent separation between the GUI code and the rest, so it shouldn't be too difficult to convert. I did take advantage of Scintilla quite a bit, but I seem to recall seeing that Scintilla is available for .NET as well. So many ideas, so little time... :-) -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 28 19:35:11 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 10:35:11 -0800 Subject: [IronPython] UnicodeError's object attribute In-Reply-To: <5b0248170611271916udc7b682l9ea0e6c487627fde@mail.gmail.com> References: <5b0248170611200252v26677161n68385051027452a0@mail.gmail.com> <5b0248170611271916udc7b682l9ea0e6c487627fde@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E320199F8@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Still catching up on e-mail after last week (it was Thanksgiving here). Thanks for reporting this and following up. This is just a silly copy & paste error in ExceptionConverter.cs. UnicodeErrorInit has the line: Ops.SetAttr(DefaultContext.Default, self, SymbolTable.StringToId("@object"), @object); Which should be: Ops.SetAttr(DefaultContext.Default, self, SymbolTable.StringToId("object"), @object); I've opened bug #6010 (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=6010). -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Monday, November 27, 2006 7:16 PM To: Discussion of IronPython Subject: Re: [IronPython] UnicodeError's object attribute 2006/11/20, Sanghyeon Seo : > UnicodeError objects don't have "object" attribute. It turns out that, > they have, "@object" attribute instead! Any idea on this? -- Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From luismgz at gmail.com Mon Nov 20 20:13:54 2006 From: luismgz at gmail.com (luismg) Date: Mon, 20 Nov 2006 19:13:54 -0000 Subject: [IronPython] How to implement in C# ironpython extension? References: Message-ID: <1164050034.457198.117010@h48g2000cwc.googlegroups.com> Look into the "Tutorial" folder of the ironpython distribution. There are examples in C# and in VB.Net. If you know C# or any other .Net language, it's just a matter of writing your classes and compile them as .dll. Then you can create a "DLLs" directory into the same folder where your ipy.exe is located, and put all your extensions there. Lets say you defined a "Person" class into "MyExtension.dll". You simply add MyExtension.dll to your DLLs folder, and type "import Person" in your program. Luis From szport at gmail.com Tue Nov 21 19:35:47 2006 From: szport at gmail.com (Andrew) Date: Tue, 21 Nov 2006 21:35:47 +0300 Subject: [IronPython] How to implement in C# ironpython extension? In-Reply-To: References: Message-ID: Thank you for answer! I should to be more acurate. How to implement in C# extension special methods: __getitem__, __setitem__, __getattr__, __setattr__ and other special methods? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluxtah at hotmail.com Wed Nov 22 12:58:57 2006 From: fluxtah at hotmail.com (Ian Warwick) Date: Wed, 22 Nov 2006 11:58:57 +0000 Subject: [IronPython] IronPython in a web application Message-ID: Hi, New guy here. I am developing a web application that uses the Front Controller pattern, the idea was that it would provide rich functionality for mapping UI Elements to business objects. It came to the point where it would be nice to have content parts that I could write up in a text file, just a few html snippets for customizing certain areas. I then decided to add IronPython support within these snippets, it works really well and very fast but I wanted to confirm it by talking to other developers using IronPython. In a nutshell I have a class that encapsulates PythonEngine and executes code written in the snippet file outputing the result back into the snippet file, I use the <% %> and <%= %> style markup for code blocks. The only concern I have is that I create a PythonEngine for every http request. The PythonEngine instantiates really quickly. I would appreciate any advice on this. best regards Ian (Fluxtah) _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.niemaz at xrce.xerox.com Fri Nov 24 12:49:20 2006 From: michael.niemaz at xrce.xerox.com (Michael Niemaz) Date: Fri, 24 Nov 2006 12:49:20 +0100 Subject: [IronPython] calling python module from C# Message-ID: <1164368960.25225.26.camel@frugy> Hi all, I'd like to invoke python modules from C#. I'm using the PythonEngine and ExecuteFile method but it looks like it does not handle python imports correctly. The python module I execute imports the famous libxml2. It seems to crash on its initilisation: from libxmlmods import libxml2mod I did 'addtopath' the libxml2 dlls to the pe engine. Is this a bug or am I doing something wrong? Thanx, --mike From mike.niemaz at gmail.com Fri Nov 24 15:46:45 2006 From: mike.niemaz at gmail.com (mike) Date: Fri, 24 Nov 2006 06:46:45 -0800 Subject: [IronPython] Calling python script from c# Message-ID: <1164379605.258690.221210@k70g2000cwa.googlegroups.com> Hi, I'm trying to run python script from c# using the executeFile pe method. It's works to some extent ... that is if the script does not make any local import such as: import libxml2 Having this would crash on an import from the libxml2 script: from libxmlmods import libml2 I didtry to play with the pE addPath functions but it has no effect regarding this problem ... Any idea? From mike.niemaz at gmail.com Mon Nov 27 14:39:18 2006 From: mike.niemaz at gmail.com (miken) Date: Mon, 27 Nov 2006 05:39:18 -0800 Subject: [IronPython] Calling python script from c# Message-ID: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> Hi, I'm trying to run a python script from c# using the executeFile method. The debugger seems to stop on an import statement (libxml2) : import libxml2 I did used AddToPath to add the related modules. Is there another way to tell the CLR where the imported modules are? Am I missing something else? Thanx for your help. --mike From michael.niemaz at xrce.xerox.com Mon Nov 27 16:27:54 2006 From: michael.niemaz at xrce.xerox.com (Michael Niemaz) Date: Mon, 27 Nov 2006 16:27:54 +0100 Subject: [IronPython] Calling python script from c# Message-ID: <1164641274.25225.67.camel@frugy> Hi, I'm trying to run a python script from c# using the executeFile method. The debugger seems to stop on an import statement (libxml2) : import libxml2 I did used AddToPath to add the related modules. Is there another way to tell the CLR where the imported modules are? Am I missing something else? Thanx for your help. --mike From dinov at exchange.microsoft.com Tue Nov 28 19:43:53 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 10:43:53 -0800 Subject: [IronPython] Help.. I need decorators In-Reply-To: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> Message-ID: <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero Sent: Monday, November 20, 2006 12:22 PM To: Discussion of IronPython Subject: [IronPython] Help.. I need decorators Hi I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods Eg. [Transaction(Required)][Cache("cache.Store")] public void SaveVeryComplexObject(object veryComplex) What should i do ? Do you guys have support planned for it ? Cheers Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Tue Nov 28 19:45:06 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 28 Nov 2006 18:45:06 +0000 Subject: [IronPython] Do we have any option for Intellisense?? In-Reply-To: <1d39a8340611281015o357afe58m6987db606fb60fa7@mail.gmail.com> References: <20061128065809.95850.qmail@web8708.mail.in.yahoo.com> <1d39a8340611281015o357afe58m6987db606fb60fa7@mail.gmail.com> Message-ID: <456C83B2.9000405@voidspace.org.uk> Patrick O'Brien wrote: > On 11/28/06, Blesson Varghese wrote: >> >> I want to write code to provide Intellisense to an IDE for Iron >> Python...Do we have any options within the Python Engine to do that??? >> >> ------------------------------ >> > > I'm not sure I'd have time to do it, but I'm thinking about rewriting > PyCrust for IronPython. When I wrote it for wxPython I made a pretty > decent > separation between the GUI code and the rest, so it shouldn't be too > difficult to convert. I did take advantage of Scintilla quite a bit, but I > seem to recall seeing that Scintilla is available for .NET as well. So > many > ideas, so little time... :-) +1 :-) Fuzzyman http://www.voidspace.org.uk/index2.shtml > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 From fuzzyman at voidspace.org.uk Tue Nov 28 19:53:34 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 28 Nov 2006 18:53:34 +0000 Subject: [IronPython] Help.. I need decorators In-Reply-To: <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <456C85AE.9010900@voidspace.org.uk> Dino Viehland wrote: > This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. > Can I ask what the difficulty with it is ? It surely isn't just a syntax issue, is it very difficult to implement ? Fuzzyman http://www.voidspace.org.uk/index2.shtml > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero > Sent: Monday, November 20, 2006 12:22 PM > To: Discussion of IronPython > Subject: [IronPython] Help.. I need decorators > > Hi > > I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods > > Eg. > [Transaction(Required)][Cache("cache.Store")] > public void SaveVeryComplexObject(object veryComplex) > > What should i do ? > Do you guys have support planned for it ? > > Cheers > Ivan > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 From dinov at exchange.microsoft.com Tue Nov 28 19:56:05 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 10:56:05 -0800 Subject: [IronPython] Unpickler.persistent_load, please... In-Reply-To: <1d39a8340611201257g4da279c9v50b0d35745f871f1@mail.gmail.com> References: <1d39a8340611201257g4da279c9v50b0d35745f871f1@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E32019A0E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> This is the first request for this we've gotten and it hasn't really been on our todo list. I've opened a bug (http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=6011). In the mean time I'd suggest using the standard pickle module which ships w/ CPython - it appears to support persistent_load. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Patrick O'Brien Sent: Monday, November 20, 2006 12:58 PM To: users at lists.ironpython.com Subject: [IronPython] Unpickler.persistent_load, please... Will there be support for Unpickler.persistent_load any time soon? -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 28 20:06:13 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 11:06:13 -0800 Subject: [IronPython] Help.. I need decorators In-Reply-To: <456C85AE.9010900@voidspace.org.uk> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C85AE.9010900@voidspace.org.uk> Message-ID: <7AD436E4270DD54A94238001769C22274E32019A24@DF-GRTDANE-MSG.exchange.corp.microsoft.com> There's both the syntax issue and the implementation issue. The syntax issue is more obvious and we have candidates for classes and methods (e.g. something like __attributes__ = ... for classes, and decorators for methods - harder are attributes on the return type, on the parameters, on fields, etc...). At the implementation level the attributes need to be added to the type created by NewTypeMaker. Currently we share the underlying types based upon common base classes & interfaces (and __slots__). We'd need to update this sharing to also take into account attributes and we'd also need to either re-generate methods or wrap the functions we initially generated with an attributed method. Finally to make it truly work the new methods probably need to be declared on the actual type created by NewTypeMaker (today they are either dynamic methods or static methods declared in some other class). So there are both a lot of details to get right along with the syntax issues. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Tuesday, November 28, 2006 10:54 AM To: Discussion of IronPython Subject: Re: [IronPython] Help.. I need decorators Dino Viehland wrote: > This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. > Can I ask what the difficulty with it is ? It surely isn't just a syntax issue, is it very difficult to implement ? Fuzzyman http://www.voidspace.org.uk/index2.shtml > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero > Sent: Monday, November 20, 2006 12:22 PM > To: Discussion of IronPython > Subject: [IronPython] Help.. I need decorators > > Hi > > I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods > > Eg. > [Transaction(Required)][Cache("cache.Store")] > public void SaveVeryComplexObject(object veryComplex) > > What should i do ? > Do you guys have support planned for it ? > > Cheers > Ivan > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From sum.ergo.code at gmail.com Tue Nov 28 20:07:19 2006 From: sum.ergo.code at gmail.com (Patrick O'Brien) Date: Tue, 28 Nov 2006 13:07:19 -0600 Subject: [IronPython] Unpickler.persistent_load, please... In-Reply-To: <7AD436E4270DD54A94238001769C22274E32019A0E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1d39a8340611201257g4da279c9v50b0d35745f871f1@mail.gmail.com> <7AD436E4270DD54A94238001769C22274E32019A0E@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <1d39a8340611281107v30a0fbe1m788e943b977e9733@mail.gmail.com> On 11/28/06, Dino Viehland wrote: > > This is the first request for this we've gotten and it hasn't really been > on our todo list. I've opened a bug ( > http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=6011). > In the mean time I'd suggest using the standard pickle module which ships w/ > CPython ? it appears to support persistent_load. > I neglected to follow up letting you know I had submitted this as bug #5799. Sorry about that. -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 28 20:22:21 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 11:22:21 -0800 Subject: [IronPython] Class with slots and getattr not compatible In-Reply-To: <1d39a8340611201635p7bb977e1o64823d0f395c65a4@mail.gmail.com> References: <1d39a8340611201635p7bb977e1o64823d0f395c65a4@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E32019A35@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Thanks for the bug report! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Patrick O'Brien Sent: Monday, November 20, 2006 4:36 PM To: users at lists.ironpython.com Subject: [IronPython] Class with slots and getattr not compatible Ticket: http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=5801 IronPython: >>> class Foo(object): ... __slots__ = ['bar'] ... def __getattr__(self, name): ... return name.upper() ... >>> foo = Foo() >>> foo.bar Traceback (most recent call last): File , line 0, in ##2163 File , line 0, in get_bar##2164 AttributeError: '' object has no attribute 'bar' >>> foo.baz 'BAZ' >>> CPython: PyCrust 0.9.5 - The Flakiest Python Shell Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class Foo(object): ... __slots__ = ['bar'] ... def __getattr__(self, name): ... return name.upper() ... >>> foo = Foo() >>> foo.bar 'BAR' >>> foo.baz 'BAZ' >>> -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Tue Nov 28 20:29:10 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 11:29:10 -0800 Subject: [IronPython] Calling python script from c# In-Reply-To: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> References: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> Message-ID: <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Is libxml2 a pyd? If so we currently don't support importing pyd's (it would require matching CPython's extension interface). Instead you might be able to use the .NET XML libraries as a work around. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of miken Sent: Monday, November 27, 2006 5:39 AM To: users at lists.ironpython.com Subject: [IronPython] Calling python script from c# Hi, I'm trying to run a python script from c# using the executeFile method. The debugger seems to stop on an import statement (libxml2) : import libxml2 I did used AddToPath to add the related modules. Is there another way to tell the CLR where the imported modules are? Am I missing something else? Thanx for your help. --mike _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue Nov 28 20:34:13 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 28 Nov 2006 19:34:13 +0000 Subject: [IronPython] Help.. I need decorators In-Reply-To: <7AD436E4270DD54A94238001769C22274E32019A24@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C85AE.9010900@voidspace.org.uk> <7AD436E4270DD54A94238001769C22274E32019A24@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <456C8F35.4000403@voidspace.org.uk> Dino Viehland wrote: > There's both the syntax issue and the implementation issue. The syntax issue is more obvious and we have candidates for classes and methods (e.g. something like __attributes__ = ... for classes, and decorators for methods - harder are attributes on the return type, on the parameters, on fields, etc...). > > At the implementation level the attributes need to be added to the type created by NewTypeMaker. Currently we share the underlying types based upon common base classes & interfaces (and __slots__). We'd need to update this sharing to also take into account attributes and we'd also need to either re-generate methods or wrap the functions we initially generated with an attributed method. Finally to make it truly work the new methods probably need to be declared on the actual type created by NewTypeMaker (today they are either dynamic methods or static methods declared in some other class). > > So there are both a lot of details to get right along with the syntax issues. > Thanks for the reply Dino. Any interim workaround would be great... Fuzzyman http://www.voidspace.org.uk/index2.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Tuesday, November 28, 2006 10:54 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Help.. I need decorators > > Dino Viehland wrote: >> This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. >> > > Can I ask what the difficulty with it is ? It surely isn't just a syntax > issue, is it very difficult to implement ? > > Fuzzyman > http://www.voidspace.org.uk/index2.shtml > >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero >> Sent: Monday, November 20, 2006 12:22 PM >> To: Discussion of IronPython >> Subject: [IronPython] Help.. I need decorators >> >> Hi >> >> I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods >> >> Eg. >> [Transaction(Required)][Cache("cache.Store")] >> public void SaveVeryComplexObject(object veryComplex) >> >> What should i do ? >> Do you guys have support planned for it ? >> >> Cheers >> Ivan >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> ------------------------------------------------------------------------ >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 >> > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > > _______________________________________________ > 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 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 From dinov at exchange.microsoft.com Tue Nov 28 20:34:50 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 11:34:50 -0800 Subject: [IronPython] How to implement in C# ironpython extension? In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C22274E32019A4B@DF-GRTDANE-MSG.exchange.corp.microsoft.com> __getitem__ and __setitem__ can be implemented by implementing an indexer in C#. These will automatically be transformed. To implement __getattribute__ / __setattr__ you can implement ICustomAttributes and intercept all attribute access. You'll need to fall back to the type to get the default behavior, e.g. something like (see SystemState.cs for an approximate answer): Return Ops.GetDynamicType(this).TryGetAttr(context, this, name, out value); There's no way to implement just __getattr__, only __getattribute__. Other special methods you can implement by name or by applying PythonName("__foo__") to the method. There are certain interfaces we'll recognize and transform for you automatically (IEnumerator -> next, ToString -> __str__, ICodeFormattable -> __repr__, IDescriptor -> __get__, and ICallable -> __call__). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Sent: Tuesday, November 21, 2006 10:36 AM To: users at lists.ironpython.com Subject: Re: [IronPython] How to implement in C# ironpython extension? Thank you for answer! I should to be more acurate. How to implement in C# extension special methods: __getitem__, __setitem__, __getattr__, __setattr__ and other special methods? Thanks. From s.kobalczyk at softwaremind.pl Tue Nov 28 20:54:23 2006 From: s.kobalczyk at softwaremind.pl (Szymon Kobalczyk) Date: Tue, 28 Nov 2006 20:54:23 +0100 Subject: [IronPython] IronPython in a web application In-Reply-To: References: Message-ID: <456C93EF.2080804@softwaremind.pl> Hi, In our system IP is used for many things including text templates in similar fashion to what you describe. My implementation is basically turning the whole template into Python function and then compiles it using PythonEngine.CreateMethodUnscoped so it can be reused with different arguments. Actually I will be refactoring and adding new functionality to my templates engine this week so I would try to send you some bits shortly after. In the meantime you might want to take a look at Cheetah (http://cheetahtemplate.org/). It was raported on this list that it works with IP. Regards, Szymon Kobalczyk Ian Warwick napisa?(a): > Hi, > > New guy here. > > I am developing a web application that uses the Front Controller > pattern, the idea was that it would provide rich functionality for > mapping UI Elements to business objects. > > It came to the point where it would be nice to have content parts that > I could write up in a text file, just a few html snippets for > customizing certain areas. > > I then decided to add IronPython support within these snippets, it > works really well and very fast but I wanted to confirm it by talking > to other developers using IronPython. > > In a nutshell I have a class that encapsulates PythonEngine and > executes code written in the snippet file outputing the result back > into the snippet file, I use the <% %> and <%= %> style markup for > code blocks. > > The only concern I have is that I create a PythonEngine for every http > request. > > The PythonEngine instantiates really quickly. > > I would appreciate any advice on this. > > best regards > > Ian (Fluxtah) > > > > ------------------------------------------------------------------------ > Be one of the first to try Windows Live Mail. > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 ivan at flanders.co.nz Tue Nov 28 21:33:41 2006 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 29 Nov 2006 09:33:41 +1300 Subject: [IronPython] Help.. I need decorators In-Reply-To: <456C8F35.4000403@voidspace.org.uk> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C85AE.9010900@voidspace.org.uk><7AD436E4270DD54A94238001769C22274E32019A24@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C8F35.4000403@voidspace.org.uk> Message-ID: <150B16DF855DAB4EA4A110247448DD570D5204@fiji.VanDyck.local> Yes I agree any temporary workaround would be great... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, 29 November 2006 8:34 a.m. To: Discussion of IronPython Subject: Re: [IronPython] Help.. I need decorators Dino Viehland wrote: > There's both the syntax issue and the implementation issue. The syntax issue is more obvious and we have candidates for classes and methods (e.g. something like __attributes__ = ... for classes, and decorators for methods - harder are attributes on the return type, on the parameters, on fields, etc...). > > At the implementation level the attributes need to be added to the type created by NewTypeMaker. Currently we share the underlying types based upon common base classes & interfaces (and __slots__). We'd need to update this sharing to also take into account attributes and we'd also need to either re-generate methods or wrap the functions we initially generated with an attributed method. Finally to make it truly work the new methods probably need to be declared on the actual type created by NewTypeMaker (today they are either dynamic methods or static methods declared in some other class). > > So there are both a lot of details to get right along with the syntax issues. > Thanks for the reply Dino. Any interim workaround would be great... Fuzzyman http://www.voidspace.org.uk/index2.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Tuesday, November 28, 2006 10:54 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Help.. I need decorators > > Dino Viehland wrote: >> This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. >> > > Can I ask what the difficulty with it is ? It surely isn't just a syntax > issue, is it very difficult to implement ? > > Fuzzyman > http://www.voidspace.org.uk/index2.shtml > >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero >> Sent: Monday, November 20, 2006 12:22 PM >> To: Discussion of IronPython >> Subject: [IronPython] Help.. I need decorators >> >> Hi >> >> I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods >> >> Eg. >> [Transaction(Required)][Cache("cache.Store")] >> public void SaveVeryComplexObject(object veryComplex) >> >> What should i do ? >> Do you guys have support planned for it ? >> >> Cheers >> Ivan >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> ------------------------------------------------------------------------ >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 >> > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > > _______________________________________________ > 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 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Tue Nov 28 21:43:18 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 12:43:18 -0800 Subject: [IronPython] Help.. I need decorators In-Reply-To: <150B16DF855DAB4EA4A110247448DD570D5204@fiji.VanDyck.local> References: <150B16DF855DAB4EA4A110247448DD570D516F@fiji.VanDyck.local> <7AD436E4270DD54A94238001769C22274E320199FF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C85AE.9010900@voidspace.org.uk><7AD436E4270DD54A94238001769C22274E32019A24@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456C8F35.4000403@voidspace.org.uk> <150B16DF855DAB4EA4A110247448DD570D5204@fiji.VanDyck.local> Message-ID: <7AD436E4270DD54A94238001769C22274E32019A92@DF-GRTDANE-MSG.exchange.corp.microsoft.com> The one workaround I am aware of is to write a base class in C# that has the necessary attributes and then implement the rest in Python by deriving from that class. If you need to have the base class call the derived class you can add some protected abstract methods that the Python class would override. Certainly not ideal, but it's probably the simplest way to do it for the time being. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero Sent: Tuesday, November 28, 2006 12:34 PM To: Discussion of IronPython Subject: Re: [IronPython] Help.. I need decorators Yes I agree any temporary workaround would be great... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, 29 November 2006 8:34 a.m. To: Discussion of IronPython Subject: Re: [IronPython] Help.. I need decorators Dino Viehland wrote: > There's both the syntax issue and the implementation issue. The syntax issue is more obvious and we have candidates for classes and methods (e.g. something like __attributes__ = ... for classes, and decorators for methods - harder are attributes on the return type, on the parameters, on fields, etc...). > > At the implementation level the attributes need to be added to the type created by NewTypeMaker. Currently we share the underlying types based upon common base classes & interfaces (and __slots__). We'd need to update this sharing to also take into account attributes and we'd also need to either re-generate methods or wrap the functions we initially generated with an attributed method. Finally to make it truly work the new methods probably need to be declared on the actual type created by NewTypeMaker (today they are either dynamic methods or static methods declared in some other class). > > So there are both a lot of details to get right along with the syntax issues. > Thanks for the reply Dino. Any interim workaround would be great... Fuzzyman http://www.voidspace.org.uk/index2.shtml > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Tuesday, November 28, 2006 10:54 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Help.. I need decorators > > Dino Viehland wrote: >> This comes up on a semi-regular basis. We currently don't have any support for attributes. We've considered many ways to do this but likely won't have support until 2.0 at the earliest. >> > > Can I ask what the difficulty with it is ? It surely isn't just a syntax > issue, is it very difficult to implement ? > > Fuzzyman > http://www.voidspace.org.uk/index2.shtml > >> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero >> Sent: Monday, November 20, 2006 12:22 PM >> To: Discussion of IronPython >> Subject: [IronPython] Help.. I need decorators >> >> Hi >> >> I really want to get into ironpython big time. But the environment I use requires extensive use of decorators, attributes on methods >> >> Eg. >> [Transaction(Required)][Cache("cache.Store")] >> public void SaveVeryComplexObject(object veryComplex) >> >> What should i do ? >> Do you guys have support planned for it ? >> >> Cheers >> Ivan >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> users mailing list >> users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> >> ------------------------------------------------------------------------ >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 >> > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 > > _______________________________________________ > 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 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 _______________________________________________ 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 exchange.microsoft.com Tue Nov 28 22:14:48 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 28 Nov 2006 13:14:48 -0800 Subject: [IronPython] Subclassing a Control In-Reply-To: <20253b0c0611271411s18fc15d0yfebfd006f659e69a@mail.gmail.com> References: <20253b0c0611271411s18fc15d0yfebfd006f659e69a@mail.gmail.com> Message-ID: <7AD436E4270DD54A94238001769C22274E32019AAF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> CreateParams is a property, so you'll need to construct a property to do this: class TransLabel(Label): def get_CreateParams(self): cp = super(TransLabel, self).CreateParams cp.ExStyle = cp.ExStyle | 20 return cp CreateParams = property(fget=get_CreateParams) Unfortunately it looks like we don't get the correct dispatch to the base-class property in the super case here. Instead we stack overflow. A work around could be to either create CreateParams yourself, or get it from another label. class TransLabel(Label): def get_CreateParams(self): cp = Label().CreateParams cp.ExStyle = cp.ExStyle | 20 return cp CreateParams = property(fget=get_CreateParams) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell Sent: Monday, November 27, 2006 2:11 PM To: users at lists.ironpython.com Subject: [IronPython] Subclassing a Control Hi Folks, I was doing some IronPython for the first time in ages so forgive me if I am being dumb :-) Anyway I am trying to make a transparent label WinForm control: class TransLabel(Label): def CreateParams(self): cp = super(TransLabel,self).CreateParams cp.ExStyle = cp.ExStyle | 0x20 return cp def OnPaintBackground(self,e): pass The problem is the super call fails with: Traceback (most recent call last): File K:\MyDev\PyLP\helloWorld1.py, line 69, in Initialize File K:\MyDev\PyLP\helloWorld1.py, line 22, in __init__ File , line 0, in DefaultNew##12 File , line 0, in .ctor##26 File System.Windows.Forms, line unknown, in .ctor File System.Windows.Forms, line unknown, in .ctor TypeError: issubclass: arg 1 must be a class line22 is only self.label = TransLabel() Thanks and take care, Davy Mitchell -- Davy Mitchell Blog - http://www.latedecember.com/sites/personal/davy/ Mood News - BBC News Headlines Auto-Classified as Good, Bad or Neutral. http://www.latedecember.com/sites/moodnews/ _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Tue Nov 28 22:24:46 2006 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 28 Nov 2006 21:24:46 +0000 Subject: [IronPython] Subclassing a Control In-Reply-To: <7AD436E4270DD54A94238001769C22274E32019AAF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <20253b0c0611271411s18fc15d0yfebfd006f659e69a@mail.gmail.com> <7AD436E4270DD54A94238001769C22274E32019AAF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <456CA91E.80200@voidspace.org.uk> Dino Viehland wrote: > CreateParams is a property, so you'll need to construct a property to do this: > > class TransLabel(Label): > def get_CreateParams(self): > cp = super(TransLabel, self).CreateParams > cp.ExStyle = cp.ExStyle | 20 > return cp > CreateParams = property(fget=get_CreateParams) > > Unfortunately it looks like we don't get the correct dispatch to the base-class property in the super case here. Instead we stack overflow. A work around could be to either create CreateParams yourself, or get it from another label. > > class TransLabel(Label): > def get_CreateParams(self): > cp = Label().CreateParams > cp.ExStyle = cp.ExStyle | 20 > return cp > CreateParams = property(fget=get_CreateParams) > The following syntax is equivalent and looks nicer :-p class TransLabel(Label): @property def CreateParams(self): cp = Label().CreateParams cp.ExStyle = cp.ExStyle | 20 return cp (or at least it should be.) Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Davy Mitchell > Sent: Monday, November 27, 2006 2:11 PM > To: users at lists.ironpython.com > Subject: [IronPython] Subclassing a Control > > Hi Folks, > > I was doing some IronPython for the first time in ages so forgive me > if I am being dumb :-) > > Anyway I am trying to make a transparent label WinForm control: > > class TransLabel(Label): > > def CreateParams(self): > cp = super(TransLabel,self).CreateParams > cp.ExStyle = cp.ExStyle | 0x20 > return cp > > def OnPaintBackground(self,e): > pass > > The problem is the super call fails with: > Traceback (most recent call last): > File K:\MyDev\PyLP\helloWorld1.py, line 69, in Initialize > File K:\MyDev\PyLP\helloWorld1.py, line 22, in __init__ > File , line 0, in DefaultNew##12 > File , line 0, in .ctor##26 > File System.Windows.Forms, line unknown, in .ctor > File System.Windows.Forms, line unknown, in .ctor > TypeError: issubclass: arg 1 must be a class > > line22 is only self.label = TransLabel() > > Thanks and take care, > Davy Mitchell > > -- > Davy Mitchell > Blog - http://www.latedecember.com/sites/personal/davy/ > Mood News > - BBC News Headlines Auto-Classified as Good, Bad or Neutral. > http://www.latedecember.com/sites/moodnews/ > _______________________________________________ > 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 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006 From sanxiyn at gmail.com Wed Nov 29 01:51:48 2006 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Wed, 29 Nov 2006 09:51:48 +0900 Subject: [IronPython] Calling python script from c# In-Reply-To: <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> References: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Message-ID: <5b0248170611281651y5e53dbf9rdd2d5aa920833e6a@mail.gmail.com> 2006/11/29, Dino Viehland : > Is libxml2 a pyd? If so we currently don't support importing pyd's (it would require matching CPython's extension interface). Instead you might be able to use the .NET XML libraries as a work around. Yes, Python binding of libxml2 is a C extension module. PS. I greatly prefer "C extension module" over "pyd", since C extension modules do not have pyd extension on platforms other than Windows. -- Seo Sanghyeon From michael.niemaz at xrce.xerox.com Wed Nov 29 09:45:15 2006 From: michael.niemaz at xrce.xerox.com (Michael Niemaz) Date: Wed, 29 Nov 2006 09:45:15 +0100 Subject: [IronPython] Calling python script from c# In-Reply-To: <5b0248170611281651y5e53dbf9rdd2d5aa920833e6a@mail.gmail.com> References: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170611281651y5e53dbf9rdd2d5aa920833e6a@mail.gmail.com> Message-ID: <1164789915.14232.58.camel@frugy> Thanx guys. Just to recap: I can not load/run my python scripts because it uses a 'C extension module'. Am I correct? So there is no way that I will be able to run this script as is without changing the xml bit. How would you proceed to 'change the xml part'? Thanx, --mike On Wed, 2006-11-29 at 09:51 +0900, Sanghyeon Seo wrote: > 2006/11/29, Dino Viehland : > > Is libxml2 a pyd? If so we currently don't support importing pyd's (it would require matching CPython's extension interface). Instead you might be able to use the .NET XML libraries as a work around. > > Yes, Python binding of libxml2 is a C extension module. > > PS. I greatly prefer "C extension module" over "pyd", since C > extension modules do not have pyd extension on platforms other than > Windows. > From vagmi.mudumbai at gmail.com Wed Nov 29 09:55:48 2006 From: vagmi.mudumbai at gmail.com (Vagmi Mudumbai) Date: Wed, 29 Nov 2006 14:25:48 +0530 Subject: [IronPython] Calling python script from c# In-Reply-To: <1164789915.14232.58.camel@frugy> References: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170611281651y5e53dbf9rdd2d5aa920833e6a@mail.gmail.com> <1164789915.14232.58.camel@frugy> Message-ID: This might be a long shot but you can try python.net ( http://pythonnet.sf.net). It can work with both .NET assemblies and C extensions. I am not sure how stable it is and I do not see much activity in this front. Unline IronPython, Python.NET is not a complete implementation of Python in the managed world. Instead, it exists as a bridge between the CPython and the Managed world. You can infact embed Python code into the managed code. (http://pythonnet.sourceforge.net/readme.html#embedding) Regards, Vagmi http://installneo.blogspot.com "Peace is its own reward." - Mahatma Gandhi On 11/29/06, Michael Niemaz wrote: > > Thanx guys. > > Just to recap: I can not load/run my python scripts because it uses a 'C > extension module'. Am I correct? > > So there is no way that I will be able to run this script as is without > changing the xml bit. > > How would you proceed to 'change the xml part'? > > Thanx, > > --mike > > On Wed, 2006-11-29 at 09:51 +0900, Sanghyeon Seo wrote: > > 2006/11/29, Dino Viehland : > > > Is libxml2 a pyd? If so we currently don't support importing pyd's > (it would require matching CPython's extension interface). Instead you > might be able to use the .NET XML libraries as a work around. > > > > Yes, Python binding of libxml2 is a C extension module. > > > > PS. I greatly prefer "C extension module" over "pyd", since C > > extension modules do not have pyd extension on platforms other than > > Windows. > > > > > _______________________________________________ > 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 michael.niemaz at xrce.xerox.com Wed Nov 29 10:00:23 2006 From: michael.niemaz at xrce.xerox.com (Michael Niemaz) Date: Wed, 29 Nov 2006 10:00:23 +0100 Subject: [IronPython] Calling python script from c# In-Reply-To: References: <1164634758.604710.33790@l12g2000cwl.googlegroups.com> <7AD436E4270DD54A94238001769C22274E32019A40@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <5b0248170611281651y5e53dbf9rdd2d5aa920833e6a@mail.gmail.com> <1164789915.14232.58.camel@frugy> Message-ID: <1164790823.14232.69.camel@frugy> Thank you Vagmi. I'll have a look at python.net. --mike On Wed, 2006-11-29 at 14:25 +0530, Vagmi Mudumbai wrote: > This might be a long shot but you can try python.net > (http://pythonnet.sf.net). It can work with both .NET assemblies and C > extensions. I am not sure how stable it is and I do not see much > activity in this front. Unline IronPython, Python.NET is not a > complete implementation of Python in the managed world. Instead, it > exists as a bridge between the CPython and the Managed world. You can > infact embed Python code into the managed code. > (http://pythonnet.sourceforge.net/readme.html#embedding) > > Regards, > Vagmi > > > > http://installneo.blogspot.com > > "Peace is its own reward." - Mahatma Gandhi > On 11/29/06, Michael Niemaz wrote: > Thanx guys. > > Just to recap: I can not load/run my python scripts because it > uses a 'C > extension module'. Am I correct? > > So there is no way that I will be able to run this script as > is without > changing the xml bit. > > How would you proceed to 'change the xml part'? > > Thanx, > > --mike > > On Wed, 2006-11-29 at 09:51 +0900, Sanghyeon Seo wrote: > > 2006/11/29, Dino Viehland : > > > Is libxml2 a pyd? If so we currently don't support > importing pyd's (it would require matching CPython's extension > interface). Instead you might be able to use the .NET XML > libraries as a work around. > > > > Yes, Python binding of libxml2 is a C extension module. > > > > PS. I greatly prefer "C extension module" over "pyd", since > C > > extension modules do not have pyd extension on platforms > other than > > Windows. > > > > > _______________________________________________ > 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 Detlef.Stute at al-lighting.com Wed Nov 29 12:13:29 2006 From: Detlef.Stute at al-lighting.com (Stute, Detlef ALRT/EEG4 (Fa. epos)) Date: Wed, 29 Nov 2006 12:13:29 +0100 Subject: [IronPython] Memory leak at import? Message-ID: I use the IronPython.dll at my own program. The python engine is running in a worker thread (MTAThread). I create a new engine each time and at the end I call engine.Dispose(). If I call test.py with the following content: import sys from time import * import os print 'Hello world' If I disable the line "import os" everything is ok. But if it is enabled, each call causes in a memory leak of 4 MB. Does anybody else have the same problem or is there a solution? Best regards Detlef Stute www.seatec-gmbh.com ########################################## CODE ##### start the thread EngineOptions eo = new EngineOptions(); eo.ExceptionDetail = true; eo.ShowClrExceptions = true; engine = new PythonEngine(eo); // create stream to get the messages from the python engine stream = new NotifyingStream(); engine.SetStandardOutput(stream); engine.SetStandardError(stream); workerThread = new Thread(ExecuteScriptWorker); // worker thread gets same culture as its caller workerThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentUICulture; workerThread.Start(parameters); #### the thread function [MTAThread] private static void ExecuteScriptWorker(object parameters) { WorkerParameters wp = parameters as WorkerParameters; try { engine.ExecuteFile(wp.scriptFile); } catch (ThreadAbortException ex) { // do something } finally { engine.Dispose(); Thread.Sleep(100); engine = null; workerThread = null; GC.Collect(); } Detlef Stute Automotive Lighting Reutlingen GmbH ALRT/EEG4 T?binger Str. 123 72762 Reutlingen Telefon: +49 (0) 7121 35-39952 Fax: +49 (0) 7121 35-3639952 mailto:detlef.stute at al-lighting.com From Detlef.Stute at al-lighting.com Wed Nov 29 12:18:18 2006 From: Detlef.Stute at al-lighting.com (Stute, Detlef ALRT/EEG4 (Fa. epos)) Date: Wed, 29 Nov 2006 12:18:18 +0100 Subject: [IronPython] engine.Dispose closes the stdout stream Message-ID: Hi all, I redirect the stdout/err ... when I start the python engine engine = new PythonEngine(eo); // create stream to get the messages from the python engine stream = new NotifyingStream(); engine.SetStandardOutput(stream); engine.SetStandardError(stream); When I call engine.Dispose() there the streams are closed. Is that the way the engine should do? It did not open the streams why does it close them? Best regards Detlef Stute www.seatec-gmbh.com From dinov at exchange.microsoft.com Wed Nov 29 18:14:04 2006 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Wed, 29 Nov 2006 09:14:04 -0800 Subject: [IronPython] Memory leak at import? In-Reply-To: References: Message-ID: <7AD436E4270DD54A94238001769C22274E449F072D@DF-GRTDANE-MSG.exchange.corp.microsoft.com> Standard modules will get compiled into static types which are not collectible by the CLR. This will result in the leak you're seeing. You can enable GenerateAsSnippets mode (-X:GenerateAsSnippets at the command line, or IronPython.Compiler.Options.GenerateModulesAsSnippets = true) and you should see the leak go away. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stute, Detlef ALRT/EEG4 (Fa. epos) Sent: Wednesday, November 29, 2006 3:13 AM To: users at lists.ironpython.com Subject: [IronPython] Memory leak at import? I use the IronPython.dll at my own program. The python engine is running in a worker thread (MTAThread). I create a new engine each time and at the end I call engine.Dispose(). If I call test.py with the following content: import sys from time import * import os print 'Hello world' If I disable the line "import os" everything is ok. But if it is enabled, each call causes in a memory leak of 4 MB. Does anybody else have the same problem or is there a solution? Best regards Detlef Stute www.seatec-gmbh.com ########################################## CODE ##### start the thread EngineOptions eo = new EngineOptions(); eo.ExceptionDetail = true; eo.ShowClrExceptions = true; engine = new PythonEngine(eo); // create stream to get the messages from the python engine stream = new NotifyingStream(); engine.SetStandardOutput(stream); engine.SetStandardError(stream); workerThread = new Thread(ExecuteScriptWorker); // worker thread gets same culture as its caller workerThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentUICulture; workerThread.Start(parameters); #### the thread function [MTAThread] private static void ExecuteScriptWorker(object parameters) { WorkerParameters wp = parameters as WorkerParameters; try { engine.ExecuteFile(wp.scriptFile); } catch (ThreadAbortException ex) { // do something } finally { engine.Dispose(); Thread.Sleep(100); engine = null; workerThread = null; GC.Collect(); } Detlef Stute Automotive Lighting Reutlingen GmbH ALRT/EEG4 T?binger Str. 123 72762 Reutlingen Telefon: +49 (0) 7121 35-39952 Fax: +49 (0) 7121 35-3639952 mailto:detlef.stute at al-lighting.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From daftspaniel at gmail.com Wed Nov 29 21:43:54 2006 From: daftspaniel at gmail.com (Davy Mitchell) Date: Wed, 29 Nov 2006 20:43:54 +0000 Subject: [IronPython] Subclassing a Control In-Reply-To: <456CA91E.80200@voidspace.org.uk> References: <20253b0c0611271411s18fc15d0yfebfd006f659e69a@mail.gmail.com> <7AD436E4270DD54A94238001769C22274E32019AAF@DF-GRTDANE-MSG.exchange.corp.microsoft.com> <456CA91E.80200@voidspace.org.uk> Message-ID: <20253b0c0611291243w335ef0fdh60e5f0930fd8a569@mail.gmail.com> Thanks - got it working. Put the code snippet on my blog. http://www.latedecember.com/sites/personal/davy/ class TransLabel(Control): def __init__(self): pass def CreateParams(self): cp = Label().CreateParams cp.ExStyle = cp.ExStyle | 0x20 return cp CreateParams = property(fget=CreateParams) def OnPaintBackground(self,e): pass def OnPaint(self,e): grfx = e.Graphics grfx.DrawString("Hello World", self.Font, Brushes.Black, 0, 0) Cheers, Davy Mitchell Blog - http://www.latedecember.com/sites/personal/davy/ Mood News - BBC News Headlines Auto-Classified as Good, Bad or Neutral. http://www.latedecember.com/sites/moodnews/ From fabio.pliger at siavr.it Thu Nov 30 00:03:22 2006 From: fabio.pliger at siavr.it (fabio.pliger) Date: Thu, 30 Nov 2006 00:03:22 +0100 Subject: [IronPython] Is any one use IronPython in your project? In-Reply-To: <20061127T123159Z_8C13000C0000@dot.state.tx.us> References: <20061127T123159Z_8C13000C0000@dot.state.tx.us> Message-ID: I use IP as scripting language in several applications. I find it's really great! I do agree that it would be much better having full (or at least half .. :) ) compatibility with cPython or 3rd party libs, but i understand the point that IP team is much more focused on stability than on compatibility...(as a comment i still can't understand if IP can be considere an open source project..( Maybe in a future comunity edt we'll have it ;) .. btw... great work! -----Original Message----- From: "Shawn Fox" To: users at lists.ironpython.com Date: Mon, 27 Nov 2006 12:31:59 -0600 Subject: [***SPAM*** Punteggio: 30.6/9.0] Re: [IronPython] Is any one use IronPython in your project? I use IronPython in several projects. I use it primarily for cutomizations and validations, or actions and events that are likely to change. Overall, I find it easier to implement business rules in the python language than in C# or C++... Python just seems to "jive" with the way I think. While I would certainly like greater compatibility with the many third-party libraries in existence, I recognize that IronPython is a separate product from CPython or JPython. Compared to CPython and JPython it is also fairly young. As it matures, I imagine that the most desired features will be implemented, but I see no reason not to use a great, functional product just because it is not 100% compatible with a different implementation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Thu Nov 30 12:12:51 2006 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 30 Nov 2006 03:12:51 -0800 Subject: [IronPython] embedded debugging In-Reply-To: <456B1026.40505@nival.com> References: <50B69702CA6E6D4E849D30CD4989AB8E4E4173F517@DF-GRTDANE-MSG.exchange.corp.microsoft.com>, <456B1026.40505@nival.com> Message-ID: <50B69702CA6E6D4E849D30CD4989AB8E522D8ADBC3@DF-GRTDANE-MSG.exchange.corp.microsoft.com> We do want to provide a good debugging experience, but we will not be able to get to this in the short term. The VSIP integration is currently a sample. Making it support all functionality is a fair bit of work. http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=2539 tracks this issue. ________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Ivan Chelubeev [Ivan.Chelubeev at nival.com] Sent: Monday, November 27, 2006 8:19 AM To: Discussion of IronPython Subject: Re: [IronPython] embedded debugging Shri Borde wrote: > I believe your breakpoint is in top-level global code of the module. In > that case, this is a known limitation. > > What is needed is a visualizer to display CLR global variables. > VisualStudio does support such a plug-in architecture. However, such a > plug-in has not yet been implemented. We do want to improve such support > in the future, but we have not gotten to this yet. Are there any plans to do this anytime soon? -------------- next part -------------- An HTML attachment was scrubbed... URL: