From garth at deadlybloodyserious.com Wed Sep 1 00:01:55 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Wed, 1 Sep 2004 08:01:55 +1000 Subject: [IronPython] Why not post patches? In-Reply-To: <4134C60C.3060307@activestate.com> Message-ID: <20040831220154.63D835DC44@mail03.your-site.com> Does anyone have a subversion repository we can reach? It'd be a nightmare with CVS, but with subversion it'd be a doddle to import Jim's code and give all you IronPython doddlers the ability to dynamically add and remove your own alternative branches. I should emphasise the idea is *not* to branch IronPython, but to maintain an easy-to-work-with repository of the fixes developed by Keith, Curt, and Edd (makefiles are fixes, too!) et al, and tools as developed by Johan et al. -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Jeff Griffiths Sent: Wednesday, 1 September 2004 4:40 AM To: Edd Dumbill Cc: users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Why not post patches? Edd Dumbill wrote: > I've seen several posts from very able folk wanting to get involved, > but so far no indication whether this would be welcome or not. > Clearly we all think IronPython is amazing work and want to contribute > to it. ...which sort of begs another question: If there is to be an 'IronPython project' ( yes! ) how will that work? Does Jim have time or inclination to manage this? Should someone else / some group step in / should there be a process for making decisions like that? I mean, someone could just start a sourceforge project ( assuming sourceforge is working again ) but that may not be Jim's preference, or that of other interested people. cheers, JeffG ( just playing the devil's advocate here ) > > -- Edd > > > _______________________________________________ users-ironpython.com > mailing list users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jim at ironpython.com Wed Sep 1 04:50:53 2004 From: jim at ironpython.com (Jim Hugunin) Date: Tue, 31 Aug 2004 19:50:53 -0700 Subject: [IronPython] IronPython future development plan so far In-Reply-To: <20040831220154.63D835DC44@mail03.your-site.com> Message-ID: <20040901025058.8FEE313D883@sack.dreamhost.com> There've been many good questions about the future of IronPython development and about how people can most effectively contribute to further development. I want to thank everyone who's offered to help. I've sometimes been frustrated by people who complain about open source projects not moving fast enough and want the lead developers to just work harder. Those people who don't just complain but offer to work to make things better are one of the best parts of a good open source community. I want to let you all know as much as I can today about my future development work on IronPython. I still expect to lead the development of IronPython to a stable and complete 1.0 release. One part of my decision to go to Microsoft is to have an employer who will fully support me in achieving this. I know that I could never have found the time to do this on my own as a hobby project. It's been roughly one month since I released IronPython-0.6. Since then, I've started a new job at Microsoft and I'm still in the middle of moving my family to the state of Washington. I've also been busy working out the right plan for me to continue to work on IronPython as a Microsoft employee. I'm making good progress on this, but this work within Microsoft is not yet done. I have great confidence the resulting plan will be one that will make the developer community happy. If the plan doesn't work for developers, then it just doesn't make sense. I'd like to ask you all to be patient with me for a little longer while I work on the best plan to drive IronPython forward to a great future. -Jim PS - In case I didn't have enough interesting distractions going on, I'm going to be spending the next two days at the scipy conference at Cal Tech where I get to deliver a keynote address. Don't tell Eric that my talk is still being written. From jim at ironpython.com Wed Sep 1 04:59:43 2004 From: jim at ironpython.com (Jim Hugunin) Date: Tue, 31 Aug 2004 19:59:43 -0700 Subject: [IronPython] How would you use IronPython with WMI? In-Reply-To: Message-ID: <20040901025952.3A5A313D8FB@sack.dreamhost.com> Keith J. Farmer wrote: > I had switched to debug mode, trying to look into a bug. > > Couldn't compile -- SystemUtils was missing. > > I think I committed a sin when I added a reference to vjslib (the J# > library) and replaced the call to SystemUtil.IdentityHashCode(o) in Ops.Id > with a call to java.lang.System.identityHashCode(o). > > It compiled and ran, at least. > > I'm guess that it's equivalent? Java's the only place I saw on google > that had such a method name. I have no idea what that Java function does. You should use the SystemUtils.dll that comes with IronPython. I forgot to include this in the debug directory, but you can simply copy the one that comes from the release dir to debug and everything should just work. If you feel a great need to rebuild from scratch, look at the UtilLibraryBuilder single class project that is used to generate this simple dll. SystemUtils.dll contains a single function that makes a non-virtual call to Object.GetHashCode(). This will always call the default implementation of this method ignoring any overrides. I use this as the closest fast approximation to Python's notion of a unique int id for each object. This approach should be reconsidered from two ends. One, the method called here isn't guaranteed to produce a unique int for each unique object. Two, when you think about other developers coming to this project having this special dll complicates the build process and it would be nice to simplify things. It's on my list to try to figure out a better approach to getting a unique id. -Jim From jim at ironpython.com Wed Sep 1 06:02:50 2004 From: jim at ironpython.com (Jim Hugunin) Date: Tue, 31 Aug 2004 21:02:50 -0700 Subject: [IronPython] IronPython - thread to Python? In-Reply-To: <6A35A566-F791-11D8-8D32-000D932927FE@opnet.com> Message-ID: <20040901040256.A1A4B13D86F@sack.dreamhost.com> Nick Bastin wrote: > > I saw an entry on one of my favorite "news" blogs, Daily Python: > > > > http://www.pythonware.com/daily/ > > > > On 2004-08-23 Ted Leung had this to say: > > > > "I think that the threat from IronPython is much worse than the Bill > > describes. Not only does IronPython have the potential to make > > scripting on the JVM DOA, it also has the power to destroy Python as > > we know it." > > > > This seems a bit melodramatic, doesn't it? > > You should definitely read Ted's whole blog, and not just the blurb. > He makes some good points, and his blog is generally a good read. He > makes his living writing code in python, so I wouldn't just write off > his opinions... I personally think that Ted's overstating any dangers, but I wouldn't write-off his opinion. I'd love to see Chandler running on IronPython and taking full advantage of the CLR, so I suppose I'm guilty of some hubris. IronPython is a new implementation of the Python language. If I wanted to build a new programming language, I would have called it Jim's Groovy New Language or something like that. The point of IronPython is to take the Python language to a new platform. This isn't to promise that IronPython will be 100% compatible with CPython. There will almost certainly be differences. I expect that the differences will be handled in a very similar way to the differences between Jython and CPython. Take a look at this document: http://jython.sourceforge.net/docs/differences.html I drafted that document many years ago to keep track of known differences between Jython and CPython. I then sat down with Guido and went through the list adding the comments in italics. This clarified the reasons for the differences and clarified the definition of what it means to be Python. FYI - this document is a little bit out of date. CPython-2.4 has fixed the first two items that say "CPython should be fixed". I haven't investigated any items beyond those two. I'm pretty strongly convinced that Jython made Python a stronger language both by extending its reach to the Java platform and by forcing the developers to think about the difference between the Python language and a particular implementation. I have every reason to believe that IronPython will have the same positive impact. -Jim From jim at ironpython.com Wed Sep 1 06:02:50 2004 From: jim at ironpython.com (Jim Hugunin) Date: Tue, 31 Aug 2004 21:02:50 -0700 Subject: [IronPython] Questions for Jim.... In-Reply-To: Message-ID: <20040901040258.5FE5613D857@sack.dreamhost.com> Brian Lloyd wrote: > Contribution: I'd really like to contribute to get IP to a > production-ready release. Contributing builtin-module > implementations would be right up my alley given my, er, > copious free time ;) There isn't a public repository at the > moment, so what is the best way to do that? Email things to > Jim? As I said in my recent message to the list, there's no good way to do this today. I appreciate these kinds of offers, and coming from the guy who wrote Python.NET is excellent. I'll get back to you as soon as I know more. > "Batteries included" is a catchphrase for CPython, referring to the > included library of standard modules. While I can divine how to implement > a 'built-in' module in C# based on the 0.6 code, it looks like we still > need a way to replicate one of the befefits of the CPython libraries > (specifically that you can implement a library in Python, at least as a > prototype, then move it to 'native' code later w/o changing the Python > interface). That is also probably a key to 'keeping up with the latest > Python version' for the CLR implementation, since most new library > module are implemented in Python first. I don't see a way to do that > currently (but maybe I'm missing something?) If you take a look at the C# code for the sys module in IronPython, you'll see a commented-out hack that put my local directories for the Python standard library and for a development version of modified library code onto sys.path by default. When preparing the public release I just ripped this out because I didn't have time to do anything else. For experimental purposes, you could just hack your personal copy of sys to include whatever path you'd like to play with Python modules on. > implementation as well. I would argue that getting unittest.py > (or a managed equivalent) working in the near term should be a > reasonably high priority (and would also provide the infrastructure > to better gauge the state of the managed Python runtime as a whole). I agree with this completely. unittest.py did run at one intermediate stage of IronPython's development so that I could start running parts of the Python regression test suite. Unfortunately, parrotbench proved a major distraction and I let that code drift while focusing on other issues. -Jim From jim at ironpython.com Wed Sep 1 06:02:50 2004 From: jim at ironpython.com (Jim Hugunin) Date: Tue, 31 Aug 2004 21:02:50 -0700 Subject: [IronPython] dll In-Reply-To: <20040831113713.71059985A0@che.dreamhost.com> Message-ID: <20040901040259.C13E713D86F@sack.dreamhost.com> Well, if you do this: C:\IronPython\bin> IronPythonConsole >>> import colors You'll get a file called "colors.dll" in the working directory. While this dll is technically referencable from C# or VB, I doubt that you'll be very happy with it. IronPython needs a static compiler, and that doesn't really exist in the current release. -Jim ________________________________________ From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of david Powell Sent: Tuesday, August 31, 2004 4:37 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] dll >From the mailing list I can see that typing at the command prompt ? C:\IronPython\bin> IronPythonConsole colors.py ? Produces the executable __main__.exe. ? But is it possible at this stage to produce a dll that can be referenced by C# or VB.NET? ? regards David ? ? ? From garth at deadlybloodyserious.com Wed Sep 1 12:51:36 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Wed, 1 Sep 2004 20:51:36 +1000 Subject: [IronPython] Why not post patches? Message-ID: <20040901105139.0EC2C5E648@mail04.your-site.com> Given it'll be a) low traffic, and b) completely temporary until Jim finishes moving and figuring things out with Microsoft, we could even use someplace like http://www.cvsdude.org/ to host a repository of IronPython tweaks. -----Original Message----- From: Garth T Kidd [mailto:garth at deadlybloodyserious.com] Sent: Wednesday, 1 September 2004 8:02 AM To: 'Jeff Griffiths'; 'Edd Dumbill' Cc: 'users-ironpython.com at lists.ironpython.com' Subject: RE: [IronPython] Why not post patches? Does anyone have a subversion repository we can reach? It'd be a nightmare with CVS, but with subversion it'd be a doddle to import Jim's code and give all you IronPython doddlers the ability to dynamically add and remove your own alternative branches. I should emphasise the idea is *not* to branch IronPython, but to maintain an easy-to-work-with repository of the fixes developed by Keith, Curt, and Edd (makefiles are fixes, too!) et al, and tools as developed by Johan et al. -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Jeff Griffiths Sent: Wednesday, 1 September 2004 4:40 AM To: Edd Dumbill Cc: users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] Why not post patches? Edd Dumbill wrote: > I've seen several posts from very able folk wanting to get involved, > but so far no indication whether this would be welcome or not. > Clearly we all think IronPython is amazing work and want to contribute > to it. ...which sort of begs another question: If there is to be an 'IronPython project' ( yes! ) how will that work? Does Jim have time or inclination to manage this? Should someone else / some group step in / should there be a process for making decisions like that? I mean, someone could just start a sourceforge project ( assuming sourceforge is working again ) but that may not be Jim's preference, or that of other interested people. cheers, JeffG ( just playing the devil's advocate here ) > > -- Edd > > > _______________________________________________ users-ironpython.com > mailing list users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From edd at usefulinc.com Wed Sep 1 13:04:53 2004 From: edd at usefulinc.com (Edd Dumbill) Date: Wed, 01 Sep 2004 12:04:53 +0100 Subject: [IronPython] Why not post patches? In-Reply-To: <20040901105139.0EC2C5E648@mail04.your-site.com> References: <20040901105139.0EC2C5E648@mail04.your-site.com> Message-ID: <1094036693.4135.39.camel@saag> On Wed, 2004-09-01 at 20:51 +1000, Garth T Kidd wrote: > Given it'll be a) low traffic, and b) completely temporary until Jim > finishes moving and figuring things out with Microsoft, we could even use > someplace like http://www.cvsdude.org/ to host a repository of IronPython > tweaks. Given Jim's message, I think that simply posting tweaks to the mailing list would suffice. He's clearly working on a plan! -- Edd From brian at sweetapp.com Wed Sep 1 13:20:23 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Wed, 01 Sep 2004 13:20:23 +0200 Subject: [IronPython] Problem binding delegate to Form.Paint In-Reply-To: <4134C60C.3060307@activestate.com> References: <2D89F6C4A80FA547BF5D5B8FDDD04523060CB9@exchange.adrembi.com> <1093964394.4135.9.camel@saag> <4134C60C.3060307@activestate.com> Message-ID: <4135B077.2070005@sweetapp.com> def paint(data, event): pass f.Paint += paint Unhandled Exception: System.ArgumentException: Error binding to target method. at System.Delegate.InternalCreate(Object target, String method, Boolean ignor eCase) at System.Delegate.CreateDelegate(Type type, Object target, String method) at IronPython.Objects.ReflectedEvent.__iadd__(Object func) at IronPython.Objects.Ops.InPlaceAdd(Object x, Object y) at __main__.init() in C:\Dev\gui_winforms.py:line 37 at IronPythonConsole.IronPython.DoFile(String[] args) at IronPythonConsole.IronPython.Main(String[] args) Does anyone understand this problem? Cheers, Brian From curt at hagenlocher.org Wed Sep 1 15:10:20 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 1 Sep 2004 06:10:20 -0700 Subject: [IronPython] Problem binding delegate to Form.Paint Message-ID: <200409011310.GAA19594@dopey.hagenlocher.org> Brian Quinlan writes: > def paint(data, event): > pass > > f.Paint += paint > > Unhandled Exception: System.ArgumentException: Error binding to > target method. > [...] > Does anyone understand this problem? The PaintEventHandler delegate has a signature that is not compatible with the EventHandler delegate, which is the only one supported "out-of-the-box" by IronPython. I posted a patch in the last two weeks that would allow your code to work. You can find it in the archives. I'm in the middle of figuring out how to handle virtual methods in overriding a CLR base class, or I'd repost the code. When I'm done, you'll be able to say class MyForm(Form): -- Curt Hagenlocher curt at hagenlocher.org From man5940 at yahoo.es Wed Sep 1 18:40:48 2004 From: man5940 at yahoo.es (Man) Date: Wed, 1 Sep 2004 18:40:48 +0200 Subject: [IronPython] IronPython + wxPython Message-ID: <000001c49042$70a99620$0200a8c0@draco> Hello, can I compile a wxPython application with IronPython? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From garth at deadlybloodyserious.com Wed Sep 1 22:49:57 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Thu, 2 Sep 2004 06:49:57 +1000 Subject: [IronPython] IronPython + wxPython In-Reply-To: <000001c49042$70a99620$0200a8c0@draco> Message-ID: <20040901204957.7AAED5E6DF@mail04.your-site.com> I'd guess wxPython relies on a compiled extension to cPython, and thus almost definitely *won't* work with IronPython right now. You'd have to wait for the wxWindows guys to support a shim to the .Net based Windows Forms. Why the rush? -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Man Sent: Thursday, 2 September 2004 2:41 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] IronPython + wxPython Hello, can I compile a wxPython application with IronPython? Thanks! From nbastin at opnet.com Wed Sep 1 22:53:58 2004 From: nbastin at opnet.com (Nick Bastin) Date: Wed, 1 Sep 2004 16:53:58 -0400 Subject: [IronPython] IronPython + wxPython In-Reply-To: <20040901204957.7AAED5E6DF@mail04.your-site.com> References: <20040901204957.7AAED5E6DF@mail04.your-site.com> Message-ID: <0B889E38-FC59-11D8-8D32-000D932927FE@opnet.com> On Sep 1, 2004, at 4:49 PM, Garth T Kidd wrote: > I'd guess wxPython relies on a compiled extension to cPython, and thus > almost definitely *won't* work with IronPython right now. You'd have > to wait > for the wxWindows guys to support a shim to the .Net based Windows > Forms. You could try to make wx.Net work: -- Nick From d.holton at vanderbilt.edu Wed Sep 1 23:04:20 2004 From: d.holton at vanderbilt.edu (Doug Holton) Date: Wed, 01 Sep 2004 16:04:20 -0500 Subject: [IronPython] Re: IronPython + wxPython In-Reply-To: <20040901191634.9AE67985C1@che.dreamhost.com> References: <20040901191634.9AE67985C1@che.dreamhost.com> Message-ID: <41363954.2030503@vanderbilt.edu> > Hello, can I compile a wxPython application with IronPython? You should be able to use wx.net from any .net compatible language: http://wxnet.sourceforge.net/ but I couldn't get IronPython to import it at all (even installing wx.NET with gacutil). I think it works in the language boo ( http://boo.codehaus.org/ ) if you use: import wx from "wx.NET". wx.NET is still in early development anyway, so it might be best to stick with the more full-featured GTK or Windows.Forms for now. From jeffg at ActiveState.com Wed Sep 1 23:39:44 2004 From: jeffg at ActiveState.com (Jeff Griffiths) Date: Wed, 01 Sep 2004 14:39:44 -0700 Subject: [IronPython] Re: IronPython + wxPython In-Reply-To: <41363954.2030503@vanderbilt.edu> References: <20040901191634.9AE67985C1@che.dreamhost.com> <41363954.2030503@vanderbilt.edu> Message-ID: <413641A0.6040706@activestate.com> Doug Holton wrote: > > wx.NET is still in early development anyway, so it might be best to > stick with the more full-featured GTK or Windows.Forms for now. hrm, I think the original poster's intent may have been something more along the lines of: "will my existing wxPy apps run and build in IronPython?" ...and it seems the answer is currently no. It begs the question as to whether it will be possible to use existing code of various types in IronPython as we go. I don't expect this will be true for anything useing Tkinter unless through some sort of unmanaged proxy? JeffG > _______________________________________________ users-ironpython.com > mailing list users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From curt at hagenlocher.org Thu Sep 2 04:50:04 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 1 Sep 2004 19:50:04 -0700 Subject: [IronPython] dll Message-ID: <200409020250.TAA20645@dopey.hagenlocher.org> "Jim Hugunin" writes: > Well, if you do this: > > C:\IronPython\bin> IronPythonConsole > >>> import colors > > You'll get a file called "colors.dll" in the working directory. > While this dll is technically referencable from C# or VB, I doubt > that you'll be very happy with it. IronPython needs a static > compiler, and that doesn't really exist in the current release. Isn't it more than that? IronPython would actually need to be able to create static type definitions in order to get "native" support in VB or C#, and that's not a Python language feature at all. Without that, there are only two possibilities. 1. Define your type information as an interface in VB or C# and distribute either two assemblies or a single multi-module assembly. 2. Load the assembly dynamically and use reflection to interact with it. -- Curt Hagenlocher curt at hagenlocher.org From randall_burns at yahoo.com Thu Sep 2 21:10:31 2004 From: randall_burns at yahoo.com (Randall Burns) Date: Thu, 2 Sep 2004 12:10:31 -0700 (PDT) Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 3 In-Reply-To: <20040902190527.824C7985FD@che.dreamhost.com> Message-ID: <20040902191031.2626.qmail@web14310.mail.yahoo.com> Why can use of static types be done in libraries specfic to IronPython? That would given IronPython programs a limited interface using static types to call DLL's and such -or am I missing something here? Curt Hagenlocher curt at hagenlocher.org wrote >Isn't it more than that? IronPython would actually >need to be able to create static type definitions in >order to get "native" >support in VB or C#, and that's not a Python language >feature at all. Without that, there are only two >possibilities. > >1. Define your type information as an interface in VB >or C# and distribute either two assemblies or a single >multi-module assembly. >2. Load the assembly dynamically and use reflection to >interact with it. _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush From nbastin at opnet.com Thu Sep 2 21:16:40 2004 From: nbastin at opnet.com (Nick Bastin) Date: Thu, 2 Sep 2004 15:16:40 -0400 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 3 In-Reply-To: <20040902191031.2626.qmail@web14310.mail.yahoo.com> References: <20040902191031.2626.qmail@web14310.mail.yahoo.com> Message-ID: <9E5F0708-FD14-11D8-B4A8-000D932927FE@opnet.com> On Sep 2, 2004, at 3:10 PM, Randall Burns wrote: > Why can use of static types be done in libraries > specfic to IronPython? That would given IronPython > programs a limited interface using static types to > call DLL's and such -or am I missing something here? Couldn't we use decorators to create native interfaces to any function we wanted to expose? This would be similar to the use of decorators in pyobjc. -- Nick From curt at hagenlocher.org Thu Sep 2 23:08:59 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 2 Sep 2004 14:08:59 -0700 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 3 Message-ID: <200409022108.OAA00616@dopey.hagenlocher.org> Nick Bastin writes: > On Sep 2, 2004, at 3:10 PM, Randall Burns wrote: > >> Why can use of static types be done in libraries >> specfic to IronPython? That would given IronPython >> programs a limited interface using static types to >> call DLL's and such -or am I missing something here? Well, you have to define a langauage construct before you can implement anything at all. It's not a core library vs IP-specific library issue. > Couldn't we use decorators to create native interfaces to any > function we wanted to expose? This would be similar to the use > of decorators in pyobjc. Yes, decorators could probably serve that purpose. I haven't been following CPython since 1.6, but I understand that decorators have been added or are being added to an upcoming release. Can you decorate parameters, also, or just functions and classes? Ideally, you'd want to decorate a parameter with its type, otherwise you're back to a syntactical issue. Can you point to an example in pyobjc? I tried to find something on the site, but I got too irritated at their slow-rendering header and gave up. From what I remember about ObjC, though, the language supports sending messages to objects without knowing anything about the object. This is a lot more compatible with the Python object model than the C#/VB model, where everything is strongly typed. -- Curt Hagenlocher curt at hagenlocher.org From nbastin at opnet.com Thu Sep 2 23:23:55 2004 From: nbastin at opnet.com (Nick Bastin) Date: Thu, 2 Sep 2004 17:23:55 -0400 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 3 In-Reply-To: <200409022108.OAA00616@dopey.hagenlocher.org> References: <200409022108.OAA00616@dopey.hagenlocher.org> Message-ID: <650E8EDE-FD26-11D8-B4A8-000D932927FE@opnet.com> On Sep 2, 2004, at 5:08 PM, Curt Hagenlocher wrote: > Nick Bastin writes: > >> On Sep 2, 2004, at 3:10 PM, Randall Burns wrote: >> >>> Why can use of static types be done in libraries >>> specfic to IronPython? That would given IronPython >>> programs a limited interface using static types to >>> call DLL's and such -or am I missing something here? > > Well, you have to define a langauage construct before you > can implement anything at all. It's not a core library vs > IP-specific library issue. > >> Couldn't we use decorators to create native interfaces to any >> function we wanted to expose? This would be similar to the use >> of decorators in pyobjc. > > Yes, decorators could probably serve that purpose. I haven't been > following CPython since 1.6, but I understand that decorators have > been added or are being added to an upcoming release. Can you > decorate parameters, also, or just functions and classes? Ideally, > you'd want to decorate a parameter with its type, otherwise you're > back to a syntactical issue. You decorate a function (in 2.4). You can effectively decorate the parameters by decorating the function with an appropriate decorator: @CLRTypes([CLR.Integer, CLR.String]) def my_func (a, b): pass or something like that. > Can you point to an example in pyobjc? I tried to find something > on the site, but I got too irritated at their slow-rendering header > and gave up. From what I remember about ObjC, though, the > language supports sending messages to objects without knowing > anything about the object. This is a lot more compatible with > the Python object model than the C#/VB model, where everything > is strongly typed. They don't concern themselves with the type, but the signature is significant for the selector, so they are planning on using a decorator. You'll actually have to look at the mailing list, or the py-dev mailing list to see the syntax, since decorators were just added to Python 2.4 alpha, and are not a part of the standard pyobjc yet. -- Nick From marko.siladin at gmail.com Sun Sep 5 18:07:07 2004 From: marko.siladin at gmail.com (Marko Siladin) Date: Sun, 5 Sep 2004 12:07:07 -0400 Subject: [IronPython] Continuation lines Message-ID: Greetings, I just started experimenting with IronPython and was wondering if there is a list of features that are not implemented yet? So I can tell if something is a bug or just not yet implemented. I tried to use Continuation lines for string literals and got the following error: >>> h="t\ System.IndexOutOfRangeException: Index was outside the bounds of the array. at IronPython.AST.Tokenizer.nextChar() at IronPython.AST.Tokenizer.readString(Char quoteChar, Boolean isRaw, Boolean isUnicode) at IronPython.AST.Tokenizer.next() at IronPython.AST.Parser.nextToken() at IronPython.AST.Parser.peekToken() at IronPython.AST.Parser.parseTestList(Boolean& trailingComma) at IronPython.AST.Parser.parseTestListAsExpr() at IronPython.AST.Parser.parseExprStmt() at IronPython.AST.Parser.parseSmallStmt() at IronPython.AST.Parser.parseSimpleStmt() at IronPython.AST.Parser.parseStmt() at IronPythonConsole.IronPython.ParseText(String text) at IronPythonConsole.IronPython.DoInteractive() This was using IronPython 0.6 on .NET 1.1 (Windows 2000) Sorry if this is covered on a web page somewhere - I wasn't able to find it. -- ...Marko From curt at hagenlocher.org Sun Sep 5 18:26:59 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Sun, 5 Sep 2004 09:26:59 -0700 Subject: [IronPython] Continuation lines Message-ID: <200409051626.JAA07428@dopey.hagenlocher.org> Marko Siladin writes: > I tried to use Continuation lines for string literals and got > the following error: I've identified a few problems and fixes in this regard. See http://listserver.dreamhost.com/pipermail/users-ironpython.com/2004- August/000008.html I haven't worked on this problem since that message. -- Curt Hagenlocher curt at hagenlocher.org From garth at deadlybloodyserious.com Mon Sep 6 06:26:18 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Mon, 6 Sep 2004 14:26:18 +1000 Subject: [IronPython] IronPython + wxPython In-Reply-To: <0B889E38-FC59-11D8-8D32-000D932927FE@opnet.com> Message-ID: <20040906042619.01DB75E5E8@mail04.your-site.com> Oh, boy, did I get caught out on that one. :) -----Original Message----- From: Nick Bastin [mailto:nbastin at opnet.com] Sent: Thursday, 2 September 2004 6:54 AM To: Garth T Kidd Cc: 'Man'; users-ironpython.com at lists.ironpython.com Subject: Re: [IronPython] IronPython + wxPython On Sep 1, 2004, at 4:49 PM, Garth T Kidd wrote: > I'd guess wxPython relies on a compiled extension to cPython, and thus > almost definitely *won't* work with IronPython right now. You'd have > to wait for the wxWindows guys to support a shim to the .Net based > Windows Forms. You could try to make wx.Net work: -- Nick From garth at deadlybloodyserious.com Mon Sep 6 06:40:12 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Mon, 6 Sep 2004 14:40:12 +1000 Subject: [IronPython] dll In-Reply-To: <200409020250.TAA20645@dopey.hagenlocher.org> Message-ID: <20040906044011.0F6EA5E5E8@mail04.your-site.com> IronPython-specific attributes (set either manually or via 2.4-style @decorators) could be used to tell IronPython how to tag Python methods and classes for the static typed languages. 2.3-style: import System def foo(a, b): return "%s: %d" % (a, b) my_func.__CLRdetails__ = (System.String, System.Int64, System.String) 2.4-style: import CLR import System @CLR.returns(System.String) @CLR.argspec(System.Int64, System.String) def foo(a, b): return "%s: %d" % (a, b) -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher Sent: Thursday, 2 September 2004 12:50 PM To: Jim Hugunin; users-ironpython.com at lists.ironpython.com Subject: RE: [IronPython] dll "Jim Hugunin" writes: > Well, if you do this: > > C:\IronPython\bin> IronPythonConsole > >>> import colors > > You'll get a file called "colors.dll" in the working directory. > While this dll is technically referencable from C# or VB, I doubt that > you'll be very happy with it. IronPython needs a static compiler, and > that doesn't really exist in the current release. Isn't it more than that? IronPython would actually need to be able to create static type definitions in order to get "native" support in VB or C#, and that's not a Python language feature at all. Without that, there are only two possibilities. 1. Define your type information as an interface in VB or C# and distribute either two assemblies or a single multi-module assembly. 2. Load the assembly dynamically and use reflection to interact with it. -- Curt Hagenlocher curt at hagenlocher.org _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From pythonmailing at web.de Sun Sep 5 11:48:33 2004 From: pythonmailing at web.de (Marek Kubica) Date: Sun, 5 Sep 2004 11:48:33 +0200 Subject: [IronPython] Why not post patches? In-Reply-To: <20040831220154.63D835DC44@mail03.your-site.com> References: <4134C60C.3060307@activestate.com> <20040831220154.63D835DC44@mail03.your-site.com> Message-ID: <20040905114833.00000318@galileo> On Wed, 1 Sep 2004 08:01:55 +1000 "Garth T Kidd" wrote: > Does anyone have a subversion repository we can reach? It'd be a > nightmare with CVS, but with subversion it'd be a doddle to import > Jim's code and give all you IronPython doddlers the ability to > dynamically add and remove your own alternative branches. Well, I know of some *really* good administated SVN repository, reachible through HTTP(S): http://svn.projectdream.org , http://projectdream.org I absolutely agree, with CVS it would be a nightmare. greets, Marek From senthilkumar.chockalingam at kla-tencor.com Wed Sep 8 13:31:28 2004 From: senthilkumar.chockalingam at kla-tencor.com (senthilkumar) Date: Wed, 8 Sep 2004 17:01:28 +0530 Subject: [IronPython] How to get the Type of object Message-ID: I would like to know is there any way to get the type of the object. Actaully my requirement is 1. First i'll create a object for any C#/.Net Datatype (for example obj = StringBuilder()) 2. Second i may create any other objects are do some operations. 3. Now, On typing obj(in a taxtbox) and clicking on a button i have to identify the ObjectType to which it belongs From Mahesh.CR at capco.com Wed Sep 8 14:10:56 2004 From: Mahesh.CR at capco.com (CR Mahesh) Date: Wed, 8 Sep 2004 20:10:56 +0800 Subject: [IronPython] How to get the Type of object Message-ID: <50547E7F6FF3BD4D89444E5EAC10973C216E8E@sgsi2k3s01.capco.com> Senthil Every object in IronPython, like in Python proper, supports a(or is it some?) intrinsic property for every object created. This is the __name__ property. You could access it with the normal '.' operator. Try the following code, it worked for me. >>>from System.Text import * >>>s = StringBuilder >>>s.__name__ >>>"System.Text.StringBuilder" Cheers Mahesh -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of senthilkumar Sent: Wednesday, September 08, 2004 5:01 PM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] How to get the Type of object I would like to know is there any way to get the type of the object. Actaully my requirement is 1. First i'll create a object for any C#/.Net Datatype (for example obj = StringBuilder()) 2. Second i may create any other objects are do some operations. 3. Now, On typing obj(in a taxtbox) and clicking on a button i have to identify the ObjectType to which it belongs _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ************************************************************************ The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com/ ************************************************************************ From tom.berger at gmail.com Wed Sep 8 15:07:24 2004 From: tom.berger at gmail.com (tom berger) Date: Wed, 8 Sep 2004 14:07:24 +0100 Subject: [IronPython] How to get the Type of object In-Reply-To: References: Message-ID: you can call the GetType method on every object to get the Type object representing it's type. tom On Wed, 8 Sep 2004 17:01:28 +0530, senthilkumar wrote: > > I would like to know is there any way to get the type of the object. > Actaully my requirement is > > 1. First i'll create a object for any C#/.Net Datatype (for example > obj = StringBuilder()) > 2. Second i may create any other objects are do some operations. > 3. Now, On typing obj(in a taxtbox) and clicking on a button i have to > identify the ObjectType to which it belongs > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://intellectronica.net/object/ From wolfgang.deix at gmx.at Wed Sep 8 16:57:27 2004 From: wolfgang.deix at gmx.at (Wolfgang Deix) Date: Wed, 8 Sep 2004 16:57:27 +0200 Subject: [IronPython] IronPython on .NET Compact Framework? Message-ID: <20040908145535.DA59D985C2@che.dreamhost.com> Hello! I want to introduce myself to the IronPython Users-Mailinglist with my first question (a thing which interests me very much ;-) ): How difficult would it be to port IronPython so that the IronPythonConsole could be run on the .NET Compact Framework of Win CE.NET pocket or handheld pcs? I tried to run the IronPythonConsole.exe on my CE.NET 4.1 handheld pc but I get the error message "Error IronPythonConsole.exe TypeLoadException" and I think maybe this is related to the differences between the .NET Framework and the .NET Compact Framework? kind regards, Wolli. From thane at magna-capital.com Thu Sep 9 00:09:45 2004 From: thane at magna-capital.com (Thane) Date: Wed, 8 Sep 2004 15:09:45 -0700 Subject: [IronPython] How to get the Type of object In-Reply-To: Message-ID: There are a couple of ways to do this, but my preference is to use Python's "type()" function. (Similar to GetType() -- see output below.) >>> a = 'asdf' >>> GetType(a) System.String >>> type(a) >>> from System.Text import * >>> obj = StringBuilder() >>> type(obj) >>> GetType(obj) System.Text.StringBuilder >>> -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of senthilkumar Sent: Wednesday, September 08, 2004 4:31 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] How to get the Type of object I would like to know is there any way to get the type of the object. Actaully my requirement is 1. First i'll create a object for any C#/.Net Datatype (for example obj = StringBuilder()) 2. Second i may create any other objects are do some operations. 3. Now, On typing obj(in a taxtbox) and clicking on a button i have to identify the ObjectType to which it belongs _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From curt at hagenlocher.org Thu Sep 9 02:12:50 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 8 Sep 2004 17:12:50 -0700 Subject: [IronPython] How to get the Type of object Message-ID: <200409090012.RAA14014@dopey.hagenlocher.org> "senthilkumar" writes: > I would like to know is there any way to get the type of the object. There are two types associated with every object in IronPython. The first is its Python type, which can be gotten using the type() operator, and the second is its CLR type, which can be gotten using GetType(). Consider the following code: import System from System.Text import StringBuilder class MyStringBuilder(object): pass sb = StringBuilder() msb = MyStringBuilder() print type(sb), type(msb) print sb.GetType(), msb.GetType() The first statement will print and the second will print System.Text.StringBuilder IronPython.NewTypes.System.Object More importantly, if I defined another class as class OtherStringBuilder(object): pass then type(MyStringBuilder()) != type(OtherStringBuilder()), but for now, MyStringBuilder().GetType() == OtherStringBuilder.GetType() because each is based on the same underlying CLR type. -- Curt Hagenlocher curt at hagenlocher.org From foxpdll at comch.ru Fri Sep 10 12:37:17 2004 From: foxpdll at comch.ru (=?windows-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?=) Date: Fri, 10 Sep 2004 14:37:17 +0400 Subject: [IronPython] (no subject) Message-ID: Hello users-ironpython.com, had this why exeptions rised? what type of RecvBytes neded for normal work? from System import * from System.Text import * from System.IO import * from System.Net import * from System.Net.Sockets import * RecvBytes="*"1024 print RecvBytes.Length s = Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) hostInfo = Dns.Resolve("mail.ru") for curAdd in hostInfo.AddressList: print curAdd.ToString() hostEndPoint = IPEndPoint(curAdd, 110) s.Connect(hostEndPoint) print s.Receive(RecvBytes, RecvBytes.Length, 0) Best regards, ???????? ??????? (????????? ?????????????) ??? "???????? ??????????" 512-125 8-905-65-66-927 icq 49606850 ???????? ??????? foxpdll at comch.ru 2004-09-10 From jvm_cop at spamcop.net Fri Sep 10 16:33:56 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Fri, 10 Sep 2004 10:33:56 -0400 Subject: [IronPython] (no subject) In-Reply-To: Message-ID: <4.3.2.7.2.20040910102313.04a1b5c8@mail.comcast.net> When mentioning an exception, you should always give the description of the exception, and where it occurs in your code. If the exception was from the Connect call, that's completely different than if the exception was from the Receive call. Did it take a while for the exception to appear? You specified that you wanted to receive 1024 bytes into the buffer. If there aren't that many bytes available, it might be that an exception is raised. Examples in the .NET documentation suggest that you might better ask for s.Available bytes (that's the number of bytes currently available to be received on the socket). It should not be necessary to specify the buffer length; both Python and .NET know that the buffer is 1024 bytes. The ability to read a specified number of bytes is, I believe, provided so that if the protocol being used tells you the length of the following data, you can read exactly the amount you want. Why are there extra indentation levels on the "hostEndPoint =" and "print s.Receive" lines? At 06:37 AM 9/10/2004, =?windows-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?= wrote >Hello users-ironpython.com, > > >had this >why exeptions rised? >what type of RecvBytes neded for normal work? > >from System import * >from System.Text import * >from System.IO import * >from System.Net import * >from System.Net.Sockets import * > >RecvBytes="*"1024 >print RecvBytes.Length > >s = Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) >hostInfo = Dns.Resolve("mail.ru") >for curAdd in hostInfo.AddressList: > print curAdd.ToString() > hostEndPoint = IPEndPoint(curAdd, 110) > s.Connect(hostEndPoint) > print s.Receive(RecvBytes, RecvBytes.Length, 0) > > >Best regards, > >???????? ??????? (????????? ?????????????) >??? "???????? ??????????" >512-125 >8-905-65-66-927 >icq 49606850 >???????? ??????? >foxpdll at comch.ru >2004-09-10_______________________________________________ >users-ironpython.com mailing list >users-ironpython.com at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com J. Merrill / Analytical Software Corp From curt at hagenlocher.org Fri Sep 10 22:18:21 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 10 Sep 2004 13:18:21 -0700 Subject: [IronPython] FIX: Defining classes interactively Message-ID: <200409102018.NAA18690@dopey.hagenlocher.org> When using the interactive interpreter to define a class, an exception is thrown. The simplest code that reproduces this is >>> class foo: ... pass ... This results in System.Reflection.TargetException: Non-static field requires a target. This problem can be fixed by modifying line 124 in Objects/module.cs to read "return fi.GetValue(this);" -- that is, changing the argument from null to this. I don't see any negative ramifications to making the change. -- Curt Hagenlocher curt at hagenlocher.org From curt at hagenlocher.org Sat Sep 11 02:40:55 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 10 Sep 2004 17:40:55 -0700 Subject: [IronPython] dll Message-ID: <200409110040.RAA19125@dopey.hagenlocher.org> "Garth T Kidd" writes: > import System > def foo(a, b): > return "%s: %d" % (a, b) > my_func.__CLRdetails__ = (System.String, System.Int64, > System.String) Does this syntax work in Python 2.3? It doesn't currently work in IronPython (hereafter, "FePy"), because the function object doesn't allow assignment to arbitrary slots. The question is, at what point does FePy actually emit the foo function into the assembly? Is it just the assignment to the magic member? That seems problematic. Maybe you should have to call a function like "CLR.Publish(foo)". Other interop issues: What class will global functions be a member of? How will the namespace of the assembly be controlled? Does it make sense that 1 FePy source file = 1 assembly, or should there be a way to combine them? -- Curt Hagenlocher curt at hagenlocher.org From david.ascher at gmail.com Sat Sep 11 03:00:40 2004 From: david.ascher at gmail.com (David Ascher) Date: Fri, 10 Sep 2004 18:00:40 -0700 Subject: [IronPython] dll In-Reply-To: <200409110040.RAA19125@dopey.hagenlocher.org> References: <200409110040.RAA19125@dopey.hagenlocher.org> Message-ID: On Fri, 10 Sep 2004 17:40:55 -0700, Curt Hagenlocher wrote: > "Garth T Kidd" writes: > > > import System > > def foo(a, b): > > return "%s: %d" % (a, b) > > my_func.__CLRdetails__ = (System.String, System.Int64, > > System.String) > > Does this syntax work in Python 2.3? It doesn't currently work > in IronPython (hereafter, "FePy"), :-) I like it! From curt at hagenlocher.org Sat Sep 11 03:04:51 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 10 Sep 2004 18:04:51 -0700 Subject: [IronPython] dll Message-ID: <200409110104.SAA19191@dopey.hagenlocher.org> David Ascher writes: > On Fri, 10 Sep 2004 17:40:55 -0700, Curt Hagenlocher > wrote: >> Does this syntax work in Python 2.3? It doesn't currently work >> in IronPython (hereafter, "FePy"), > > :-) I like it! Thanks! I figured "IP" was already doubly overloaded and unlikely to catch on... Can I propose "feppy (rhymes with 'peppy')" as a pronunciation? -- Curt Hagenlocher curt at hagenlocher.org From garth at deadlybloodyserious.com Sat Sep 11 09:48:17 2004 From: garth at deadlybloodyserious.com (Garth T Kidd) Date: Sat, 11 Sep 2004 17:48:17 +1000 Subject: [IronPython] dll In-Reply-To: <200409110040.RAA19125@dopey.hagenlocher.org> Message-ID: <20040911074820.A6CCC5E6CD@mail04.your-site.com> Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def foo(a, b): ... return "%s: %d" % (a, b) ... >>> foo.__CLRDetails__ = (str, int) >>> dir(foo) ['__CLRDetails__', '__call__', '__class__', '__delattr__', '__dict__', '__doc__' , '__get__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__ ', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__ ', 'func_closure', 'func_code', 'func_defaults', 'func_dict', 'func_doc', 'func_ globals', 'func_name'] >>> I'd hope that IronPython waits until it has finished executing the model before generating the assembly. That's how Python does it. If you want to define a class and then 'del' it. See also: method = classmethod(method). You have to wait until the dust settles before you know what you're trying to publish. IronPython functions not having arbitrary slots is a bug. Anyone managed to make UnitTest work? Or, some suitable subset until we can get the real deal working? -----Original Message----- From: Curt Hagenlocher [mailto:curt at hagenlocher.org] Sent: Saturday, 11 September 2004 10:41 AM To: Garth T Kidd; users-ironpython.com at lists.ironpython.com Subject: RE: [IronPython] dll "Garth T Kidd" writes: > import System > def foo(a, b): > return "%s: %d" % (a, b) > my_func.__CLRdetails__ = (System.String, System.Int64, > System.String) Does this syntax work in Python 2.3? It doesn't currently work in IronPython (hereafter, "FePy"), because the function object doesn't allow assignment to arbitrary slots. The question is, at what point does FePy actually emit the foo function into the assembly? Is it just the assignment to the magic member? That seems problematic. Maybe you should have to call a function like "CLR.Publish(foo)". Other interop issues: What class will global functions be a member of? How will the namespace of the assembly be controlled? Does it make sense that 1 FePy source file = 1 assembly, or should there be a way to combine them? -- Curt Hagenlocher curt at hagenlocher.org From macrocosm at fastmail.fm Mon Sep 13 22:25:28 2004 From: macrocosm at fastmail.fm (Arich Chanachai) Date: Mon, 13 Sep 2004 16:25:28 -0400 Subject: [IronPython] Speed Message-ID: <41460238.1010402@fastmail.fm> How does IronPython measure up to Jython in terms of speed? With IronPython, will I have full access to all of the standard Python classes in addition to those of .NET/Mono? Thanks folks From hostetlerm at gmail.com Mon Sep 13 23:09:23 2004 From: hostetlerm at gmail.com (Mike Hostetler) Date: Mon, 13 Sep 2004 16:09:23 -0500 Subject: [IronPython] Speed In-Reply-To: <41460238.1010402@fastmail.fm> References: <41460238.1010402@fastmail.fm> Message-ID: On Mon, 13 Sep 2004 16:25:28 -0400, Arich Chanachai wrote: > How does IronPython measure up to Jython in terms of speed? IronPython is faster. But they really are different birds . . .er, snakes. > With IronPython, will I have full access to all of the standard Python > classes in addition to those of .NET/Mono? Not at the moment -- IronPython is only in alpha-stage. There isn't any standard modules that ship with it, except for sys. Of course, someone more knowledgable than me can refute me on any of the above claims. ;) -- Mike Hostetler http://www.binary.net/thehaas From foxpdll at comch.ru Tue Sep 14 08:32:25 2004 From: foxpdll at comch.ru (=?windows-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?=) Date: Tue, 14 Sep 2004 10:32:25 +0400 Subject: [IronPython] why? Message-ID: the simple code returne True but nothing print why? is that right? from System.Console import * WriteLine("Hello world!") p.s. sorry for my english i dont want stady it at school!!!! my mom said me - stadi inglish! but i dont listen her ;-( From foxpdll at comch.ru Tue Sep 14 08:57:31 2004 From: foxpdll at comch.ru (=?windows-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?=) Date: Tue, 14 Sep 2004 10:57:31 +0400 Subject: [IronPython] worked source Message-ID: Hello all! are any ware collection of simple worked soure for ironpython for sample view? except two in zip package with gtk and win gui From brian at sweetapp.com Tue Sep 14 10:58:20 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Tue, 14 Sep 2004 10:58:20 +0200 Subject: [IronPython] worked source In-Reply-To: References: Message-ID: <4146B2AC.5000500@sweetapp.com> ???????? ??????? wrote: > Hello all! > are any ware collection of simple worked soure for ironpython > for sample view? There is a very simple example at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303062 Cheers, Brian From brian at sweetapp.com Tue Sep 14 11:01:12 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Tue, 14 Sep 2004 11:01:12 +0200 Subject: [IronPython] why? In-Reply-To: References: Message-ID: <4146B358.2050208@sweetapp.com> ???????? ??????? wrote: > the simple code > returne True but nothing print > why? is that right? > > > from System.Console import * > WriteLine("Hello world!") I think that this is a bug. > p.s. sorry for my english > i dont want stady it at school!!!! > my mom said me - stadi inglish! > but i dont listen her Your English is good. Spelling in English is very hard though. Cheers, Brian From ld at galador.net Wed Sep 15 01:39:11 2004 From: ld at galador.net (Lloyd Dupont) Date: Wed, 15 Sep 2004 09:39:11 +1000 Subject: [IronPython] IronPython on the CompactFramework Message-ID: <001201c49ab4$184803a0$730010ac@5dservices.com.au> I'm afraid it won't be possible any time soon. Because... compact framework doesn't support the emit namespace! And I haven't looked at the code but it looks like it's using it! -------------- next part -------------- An HTML attachment was scrubbed... URL: From foxpdll at comch.ru Wed Sep 15 08:16:11 2004 From: foxpdll at comch.ru (=?WINDOWS-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?=) Date: Wed, 15 Sep 2004 10:16:11 +0400 Subject: [IronPython] (no subject) Message-ID: salamaleikum all had this from System import * from System.IO import * from System.Net.Sockets import * from System.Text.Encoding.ASCII import * print "initializing server..." listener = TcpListener(8080) listener.Start() print "server initialized, waiting for"+"incoming connections..." s = listener.AcceptSocket() ns = NetworkStream(s) r = StreamReader(ns) while 1: command = r.ReadLine() if not command: break print "incoming: ", command result = "foxpdll" res = GetBytes(result.ToCharArray()) print type(res) s.Send(res,res.Length,0) s.close() at s.Send(res,res.Length,0) program terninate with error Unhandled Exception: System.Exception: bad args to this method at IronPython.Objects.ReflectedMethodBase.Call(Object[] args) at IronPython.Objects.Ops.Call(Object func, Object arg0, Object arg1, Object arg2) at __main__.init() in E:\tmp\IronPython-0.6\bin\fox.py:line 21 at IronPythonConsole.IronPython.DoFile(String[] args) at IronPythonConsole.IronPython.Main(String[] args) the type of res is System.Byte[] why it fails? what wrong i am doing? what kind of parameters must be send to s.Send function? in msdn it is a byte array iznt syste.byte[] not byte array???????? From senthilkumar.chockalingam at kla-tencor.com Wed Sep 15 09:28:24 2004 From: senthilkumar.chockalingam at kla-tencor.com (senthilkumar) Date: Wed, 15 Sep 2004 12:58:24 +0530 Subject: [IronPython] How to get the list of objects created Message-ID: Is there any way to get the list of objects created? for example : if create some objects like X = 4 Y = 6 obj = StringBuilder Now, i want to get the count of objects created and also the objects list. Is there any command or group of commands to execute it. Thanks in advance Regards Senthil Kumar From curt at hagenlocher.org Wed Sep 15 09:27:14 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 15 Sep 2004 00:27:14 -0700 Subject: [IronPython] (no subject) Message-ID: <200409150727.AAA30446@dopey.hagenlocher.org> > result = "foxpdll" > res = GetBytes(result.ToCharArray()) By the way, this is extraneous, because GetBytes has a string overload. You could just say res = GetBytes(result) > s.Send(res,res.Length,0) The reason you're getting "bad args" is that this gets translated into a method call Socket.Send(byte[], int32, int32), which doesn't exist. The closest signature, and the one you probably intended, is Socket.Send(byte[], int32, SocketFlags) -- SocketFlags is an enumeration, which is not an int32. This line would have worked s.Send(res, res.Length, SocketFlags.None) as would the line s.Send(res, SocketFlags.None) and the line s.Send(res) since you're not really changing the meaning of the call by using the additional parameters. You could argue that, having not found a matching signature, FePy should have translated the int32 into a "SocketFlags". I would disagree, and assert that the increased readability caused by forcing use of the specific enumerated type outweighs any advantages of being able to use a raw int32. It occurs to me that you may have been thinking of the Stream.Write function, which has the signature Write(byte[] buffer, int32 length, int32 position). The Socket.Send function does not work with the same parameters. -- Curt Hagenlocher curt at hagenlocher.org From curt at hagenlocher.org Wed Sep 15 10:02:52 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 15 Sep 2004 01:02:52 -0700 Subject: [IronPython] why? Message-ID: <200409150802.BAA30534@dopey.hagenlocher.org> > the simple code > returne True but nothing print > why? is that right? > > from System.Console import * > WriteLine("Hello world!") Actually, the code is printing True but returning nothing. If you assign the result of the WriteLine to a variable, you'll see that its value is None. The bug appears to be this: In ReflectedMethodBase.Call (file Objects/ReflectedMembers.cs), there is code to pick one of the overloads when a particular name has been overloaded. This code simply goes through the list of overloads and sees if the number of parameters match and if each parameter can be converted from the Python type into the desired CLR type. The list of overloads appears to be returned by the reflection API in the order that the functions are stored in the assembly. The first overload for WriteLine with one parameter is System.Console.WriteLine(boolean). A call is made to the function Ops.ConvertTo, which happily converts a string into a boolean, resulting in that particular overload being called. This behavior is probably a result of implementing the Python idiom s = 'abc' if s: DoSomething() It would be nice if ReflectedMethodBase.Call would try to find the best match instead of the first available match, but it would probably be cleaner to eliminate the automatic cast of string to boolean. Is there anyplace other than a conditional expression where this is legal in Python? -- Curt Hagenlocher curt at hagenlocher.org From nicksjacobson at yahoo.com Wed Sep 15 11:46:56 2004 From: nicksjacobson at yahoo.com (Nicholas Jacobson) Date: Wed, 15 Sep 2004 02:46:56 -0700 (PDT) Subject: [IronPython] DirectX Message-ID: <20040915094656.65069.qmail@web53907.mail.yahoo.com> Why doesn't the following line work in IronPythonConsole: "import Microsoft.DirectX"? Is there a way to access this library, or are there future plans to implement it? Thanks! --Nick _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com From curt at hagenlocher.org Wed Sep 15 15:17:30 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 15 Sep 2004 06:17:30 -0700 Subject: [IronPython] DirectX Message-ID: <200409151317.GAA30942@dopey.hagenlocher.org> Nicholas Jacobson writes: > Why doesn't the following line work in > IronPythonConsole: "import Microsoft.DirectX"? Just like the C# compiler, there are some libraries that FePy knows about, and some for which you have to give it an assembly reference. Currently, the way to give it an assembly reference is to use either sys.LoadAssemblyByName or sys.LoadAssemblyFromFile. For DirectX, you want import sys sys.LoadAssemblyByName('Microsoft.DirectX') import Microsoft.DirectX -- Curt Hagenlocher curt at hagenlocher.org From jvm_cop at spamcop.net Wed Sep 15 15:54:30 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 15 Sep 2004 09:54:30 -0400 Subject: [IronPython] why? In-Reply-To: <200409150802.BAA30534@dopey.hagenlocher.org> Message-ID: <4.3.2.7.2.20040915094340.04b8bef0@mail.comcast.net> At 04:02 AM 9/15/2004, Curt Hagenlocher wrote (in part) >It would be nice if ReflectedMethodBase.Call would try to find >the best match instead of the first available match, but it would >probably be cleaner to eliminate the automatic cast of string to >boolean. Is there anyplace other than a conditional expression >where this is legal in Python? Though I'm not a fluent Python programmer, I don't know of any reason not to remove that automatic cast of not just string, but integer and object, to boolean, other than in the context where a true/false value is being sought (in a conditional expression). Otherwise, FePy could find someMethod(boolean) before it finds someMethod(object) or someMethod(integer) as well as the someMethod(string) case mentioned here. Perhaps ReflectedMethodBase.Call needs a new, optional, boolean parameter (default false) indicating whether an automatic cast to boolean should happen. Another important question is whether there is a way to work around this in the current code. I'd guess that WriteLine("%s", "string") would work, but that sure looks like something you would not want to make into an idiom long-term. J. Merrill / Analytical Software Corp From curt at hagenlocher.org Wed Sep 15 17:44:39 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 15 Sep 2004 08:44:39 -0700 Subject: [IronPython] why? Message-ID: <200409151544.IAA31137@dopey.hagenlocher.org> "J. Merrill" writes: > Perhaps ReflectedMethodBase.Call needs a new, optional, boolean > parameter (default false) indicating whether an automatic cast to > boolean should happen. What about code like ClrObject.Enabled = 1 Shouldn't there be a translation of int <=> boolean there? As far as I can tell, the Python boolean type wasn't added until 2.3, and there are probably still a lot of people (like me) that would write the code that way. Maybe it would be more effective to loop through the method list twice -- disallowing crazy bool conversions the first time and then allowing them if there weren't any hits. -- Curt Hagenlocher curt at hagenlocher.org From thane at magna-capital.com Wed Sep 15 18:10:32 2004 From: thane at magna-capital.com (Thane) Date: Wed, 15 Sep 2004 09:10:32 -0700 Subject: [IronPython] How to get the list of objects created In-Reply-To: Message-ID: In CPython you do the following: Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> X = 4 >>> Y = 42.6 >>> globals().values() [, '__main__', 42.600000000000001, None, 4] ** BUG ALERT ** But if you try to get the values() of the global dictionary in IronPython, it will crash. C:\Python\IRONPY~1.6\bin>ironpythonconsole >>> X = 4 >>> Y = 6 >>> globals() {'X':4, 'Y':6} >>> g.values() Fatal stack overflow error. Also note that if you have a statement like: >>> from System.Text import * Your list of globals is going to be pretty big! -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of senthilkumar Sent: Wednesday, September 15, 2004 12:28 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] How to get the list of objects created Is there any way to get the list of objects created? for example : if create some objects like X = 4 Y = 6 obj = StringBuilder Now, i want to get the count of objects created and also the objects list. Is there any command or group of commands to execute it. Thanks in advance Regards Senthil Kumar _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From curt at hagenlocher.org Wed Sep 15 18:24:32 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 15 Sep 2004 09:24:32 -0700 Subject: [IronPython] How to get the list of objects created Message-ID: <200409151624.JAA31212@dopey.hagenlocher.org> thane at magna-capital.com writes > ** BUG ALERT ** > But if you try to get the values() of the global dictionary in > IronPython, it will crash. > > C:\Python\IRONPY~1.6\bin>ironpythonconsole > >>> X = 4 > >>> Y = 6 > >>> globals() > {'X':4, 'Y':6} > >>> g.values() > > Fatal stack overflow error. Interesting. It looks like the problem is that the result of the previous call to global() is itself being saved into the global namespace, as the '_' value. When you next reference globals, you get a recursive structure. This likely wouldn't be an issue if run from inside a .py file that was started at the command line -- it's just a side effect of the interactive mode. -- Curt Hagenlocher curt at hagenlocher.org From bob at redivi.com Wed Sep 15 21:48:20 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed, 15 Sep 2004 15:48:20 -0400 Subject: [IronPython] why? In-Reply-To: <200409151544.IAA31137@dopey.hagenlocher.org> References: <200409151544.IAA31137@dopey.hagenlocher.org> Message-ID: <326EE896-0750-11D9-A02D-000A95686CD8@redivi.com> On Sep 15, 2004, at 11:44 AM, Curt Hagenlocher wrote: > "J. Merrill" writes: > >> Perhaps ReflectedMethodBase.Call needs a new, optional, boolean >> parameter (default false) indicating whether an automatic cast to >> boolean should happen. > > What about code like > ClrObject.Enabled = 1 > > Shouldn't there be a translation of int <=> boolean there? As far > as I can tell, the Python boolean type wasn't added until 2.3, and > there are probably still a lot of people (like me) that would write > the code that way. 2.2.1 added True and False to __builtin__, 2.3 added an actual bool type. -bob From jvm_cop at spamcop.net Wed Sep 15 22:13:53 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 15 Sep 2004 16:13:53 -0400 Subject: [IronPython] why? Message-ID: <4.3.2.7.2.20040915161332.04b159f8@wheresmymailserver.com> I had not intended to go off-list, so in the hopes that people want to hear the accidentally-private discussion (or at least won't mind!), here it is. (Curt was responding to my comments, shown with two > signs.) At 03:55 PM 9/15/2004, Curt Hagenlocher wrote >> Given that set_Enabled is not overridden, FePy should clearly know >> to cast 1 to boolean and pass that value. Did I suggest that there >> be no implicit conversions? I hope not; it's one of the things >> that makes dynamically-typed Python so usable. > >Sorry... I'm just projecting from the code I've read. There does >not appear to be special-case code for non-overloaded functions. >(And I'm not sure why I started calling them "overridden" instead >of "overloaded".) The ReflectedMethodBase class stores an array >of MethodBase -- if there is no overload, then the array has one >element, otherwise it has more. Naturally, it would be possible >to change this behavior. > >> Let's change the name to SomeFunction for the rest of this >> discussion, as it would be a bit odd to name a function to >> which you could pass non-booleans CallBoolFunction. > >Good point. > >> If there are overrides of SomeFunction, what we want is for >> FePy to figure out which one has the signature that "best >> matches" the Python value 1. > >So, it sounds like the simplest and cheapest idea would be to >add a flag to Ops.ConvertTo (or to create a different version) >that would control how liberal we want to be in type conversion. >We can go through the loop once with the value set to "strict", >and then again with the value set to "liberal". > >> However, it should prefer to cast 2 to string than to boolean. > >Yes, but there's a performance cost for doing that. As you >point out, we need multiple loops with steadily decreasing values >of "strict", or we need to calculate the "goodness" of each possible >overload and then take the "best" one. > >> (Of course, it would not have to do the .NET metadata query >> twice, as it could cache the results.) > >It already is caching the results. > >> I really should take a look at the source to see how hard such a >> change would be. > >Objects/ReflectedMembers.cs contains the "pick an overload" code, >and the actual conversion happens in Objects/Ops.cs. In both >files, look for the function Ops.ConvertTo. > >By the way, our last two exchanges have been off-list. I assumed >that you had gone off-list on purpose, but in retrospect, you may >have been tripped up by the "Reply" options (as I have been, on >occaision). > >-- >Curt Hagenlocher >curt at hagenlocher.org J. Merrill / Analytical Software Corp From senthilkumar.chockalingam at kla-tencor.com Thu Sep 16 06:40:02 2004 From: senthilkumar.chockalingam at kla-tencor.com (senthilkumar) Date: Thu, 16 Sep 2004 10:10:02 +0530 Subject: [IronPython] How to import my own .net Components Message-ID: I have created a .net component and placed in GAC. How do i use or import this component and call its methods. I tried to import as from sampleGAC import * , but it gives error like this.. IronPython.Objects.PythonImportError: can't load sampleGAC at IronPython.Objects.module.Import(String fullName, Boolean keepTop) at IronPython.Objects.Ops.ImportStar(module mod, String fullName) at input_1.Run(Frame frame) at klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter. pushCommand(String strCommand) in e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein terpreter.cs:line 39 Please Assist me Thanks in advance Senthil Kumar From ld at galador.net Thu Sep 16 07:09:53 2004 From: ld at galador.net (Lloyd Dupont) Date: Thu, 16 Sep 2004 15:09:53 +1000 Subject: [IronPython] How to import my own .net Components References: Message-ID: <013e01c49bab$729ea910$730010ac@5dservices.com.au> you shoud first put your lib in the list of loadable library with a call like sys.loadLibrary(mylibname) or something like that...... someone answer the same problem in the topic directX ----- Original Message ----- From: "senthilkumar" To: Sent: Thursday, September 16, 2004 2:40 PM Subject: [IronPython] How to import my own .net Components >I have created a .net component and placed in GAC. How do i use or import > this component and call its methods. > > I tried to import as > from sampleGAC import * , but it gives error like this.. > IronPython.Objects.PythonImportError: can't load sampleGAC > at IronPython.Objects.module.Import(String fullName, Boolean keepTop) > at IronPython.Objects.Ops.ImportStar(module mod, String fullName) > at input_1.Run(Frame frame) > at > klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter. > pushCommand(String strCommand) in > e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein > terpreter.cs:line 39 > > Please Assist me > Thanks in advance > Senthil Kumar > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From senthilkumar.chockalingam at kla-tencor.com Thu Sep 16 12:31:10 2004 From: senthilkumar.chockalingam at kla-tencor.com (senthilkumar) Date: Thu, 16 Sep 2004 16:01:10 +0530 Subject: [IronPython] Why Method call is not working? Message-ID: I'm trying to call a method of a .Net component, but it allways throws error. here is the code i executed 1. o = sampleGAC.TestClass //(Namespace.classname)//works fine 2. o.ReturnTest() // not working, allways produce error as follws System.IndexOutOfRangeException: Index was outside the bounds of the array. at IronPython.Objects.ReflectedMethodBase.BindArgs(MethodBase info, Object& instance, Object[] args) at IronPython.Objects.ReflectedMethodBase.Call(Object[] args) at IronPython.Objects.Ops.Call(Object func) at input_21.Run(Frame frame) at klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter. pushCommand(String strCommand) in e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein terpreter.cs:line 39 I also tried with .new System Components, i created a instance of datetime and tries to access the method ToLongTimeString(), as o = System.DateTime //works fine o.ToLongTimeString //Error it also produces the same error ( Index was outside the bounds of the array ). Is there anything wrong in calling the method. please assist me Thanks in advance Senthil Kumar From curt at hagenlocher.org Thu Sep 16 14:37:43 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 16 Sep 2004 05:37:43 -0700 Subject: [IronPython] Why Method call is not working? Message-ID: <200409161237.FAA32767@dopey.hagenlocher.org> "senthilkumar" writes: > I'm trying to call a method of a .Net component, but it allways > throws error. > > here is the code i executed > 1. o = sampleGAC.TestClass //(Namespace.classname)//works fine > 2. o.ReturnTest() // not working, allways produce error as follws You are not creating o as an object of type sampleGAC.TestClass. You are setting o equal to a reference to the class object. The class object does not have a member called ReturnTest() -- though if ReturnTest were static, this would work. > I also tried with .new System Components, i created a instance of > datetime and tries to access the method ToLongTimeString(), as > > o = System.DateTime //works fine > o.ToLongTimeString //Error Same issue. "o = System.DateTime(2004, 9, 16)" will work, because you will then actually invoke the constructor. -- Curt Hagenlocher curt at hagenlocher.org From curt at hagenlocher.org Fri Sep 17 00:16:10 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 16 Sep 2004 15:16:10 -0700 Subject: [IronPython] Lightweight Code Generation? Message-ID: <200409162216.PAA01055@dopey.hagenlocher.org> Lightweight Code Generation in .NET 2.0 looks like it would be an ideal tool to implement parts of FePy. http://weblogs.asp.net/joelpob/archive/2004/03/31/105282.aspx What are the plans are for Mono to support these kinds of 2.0 features? -- Curt Hagenlocher curt at hagenlocher.org From john.luke at gmail.com Fri Sep 17 00:37:19 2004 From: john.luke at gmail.com (John Luke) Date: Thu, 16 Sep 2004 18:37:19 -0400 Subject: [IronPython] Lightweight Code Generation? In-Reply-To: <200409162216.PAA01055@dopey.hagenlocher.org> References: <200409162216.PAA01055@dopey.hagenlocher.org> Message-ID: <350e7e17040916153765c3db54@mail.gmail.com> Hello, If I'm am not mistaken it is already there, and has been for quite a while. On Thu, 16 Sep 2004 15:16:10 -0700, Curt Hagenlocher wrote: > Lightweight Code Generation in .NET 2.0 looks like it would be > an ideal tool to implement parts of FePy. > > http://weblogs.asp.net/joelpob/archive/2004/03/31/105282.aspx > > What are the plans are for Mono to support these kinds of > 2.0 features? > > -- > Curt Hagenlocher > curt at hagenlocher.org > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From ld at galador.net Fri Sep 17 01:09:28 2004 From: ld at galador.net (Lloyd Dupont) Date: Fri, 17 Sep 2004 09:09:28 +1000 Subject: [IronPython] Lightweight Code Generation? References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> Message-ID: <001401c49c42$440ca330$730010ac@5dservices.com.au> if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version downloadable on the web site runs on 1.1. therefore your assesment is fataly incorrect. ----- Original Message ----- From: "John Luke" To: Cc: "IronPython" Sent: Friday, September 17, 2004 8:37 AM Subject: Re: [IronPython] Lightweight Code Generation? > Hello, > If I'm am not mistaken it is already there, and has been for quite a > while. > > > On Thu, 16 Sep 2004 15:16:10 -0700, Curt Hagenlocher > wrote: >> Lightweight Code Generation in .NET 2.0 looks like it would be >> an ideal tool to implement parts of FePy. >> >> http://weblogs.asp.net/joelpob/archive/2004/03/31/105282.aspx >> >> What are the plans are for Mono to support these kinds of >> 2.0 features? >> >> -- >> Curt Hagenlocher >> curt at hagenlocher.org >> _______________________________________________ >> users-ironpython.com mailing list >> users-ironpython.com at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From john.luke at gmail.com Fri Sep 17 01:21:53 2004 From: john.luke at gmail.com (John Luke) Date: Thu, 16 Sep 2004 19:21:53 -0400 Subject: [IronPython] Lightweight Code Generation? In-Reply-To: <001401c49c42$440ca330$730010ac@5dservices.com.au> References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> <001401c49c42$440ca330$730010ac@5dservices.com.au> Message-ID: <350e7e170409161621304cbd7f@mail.gmail.com> Wrong, he asked about if mono supported DynamicMethod, which it does if you have built the "2.0 preview" bits. Perhaps you would have to build IronPython from source yourself to work with 2.0, but I dont see why it wouldn't work. On Fri, 17 Sep 2004 09:09:28 +1000, Lloyd Dupont wrote: > if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version > downloadable on the web site runs on 1.1. therefore your assesment is fataly > incorrect. From ld at galador.net Fri Sep 17 02:25:46 2004 From: ld at galador.net (Lloyd Dupont) Date: Fri, 17 Sep 2004 10:25:46 +1000 Subject: [IronPython] Lightweight Code Generation? References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> <001401c49c42$440ca330$730010ac@5dservices.com.au> <350e7e170409161621304cbd7f@mail.gmail.com> Message-ID: <004301c49c4c$f5046510$730010ac@5dservices.com.au> Sorry Luke but I do disagree. When I disagree I speak about IronPython 0.6 available on here: http://ironpython.com/ with the following link: http://ironpython.com/IronPython-0.6.zip DynamicMethod is a 2.0 feature, therefore it wouldn't work with 1.1, wether mono or Microsft version! Just to be sure (maybe there is some #if V2? section?) I open the project and make a solution wide search for 'DynamicMethod': it's not there! It's what I mean by it's not there! On the other hand I might agree you on the likely fact Jim Hugunin probably have a version on his computer using them. But I was speaking of the publicly available version here ! Best regards, Lloyd ----- Original Message ----- From: "John Luke" To: "Lloyd Dupont" Cc: Sent: Friday, September 17, 2004 9:21 AM Subject: Re: [IronPython] Lightweight Code Generation? > Wrong, > he asked about if mono supported DynamicMethod, which it does if you > have built the "2.0 preview" bits. Perhaps you would have to build > IronPython from source yourself to work with 2.0, but I dont see why > it wouldn't work. > > On Fri, 17 Sep 2004 09:09:28 +1000, Lloyd Dupont wrote: >> if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version >> downloadable on the web site runs on 1.1. therefore your assesment is >> fataly >> incorrect. > From ld at galador.net Fri Sep 17 02:29:19 2004 From: ld at galador.net (Lloyd Dupont) Date: Fri, 17 Sep 2004 10:29:19 +1000 Subject: [IronPython] Lightweight Code Generation? References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> <001401c49c42$440ca330$730010ac@5dservices.com.au> <350e7e170409161621304cbd7f@mail.gmail.com> Message-ID: <004a01c49c4d$714fda50$730010ac@5dservices.com.au> Also, just from the .NET point of view (disregarding Pyhton for a little while) If I launch the MS.NET 1.1 doc, and type DynamicMethod in the index: it's not there! And yep if I do that for .NET 2.0 doc it's there. But it's not in 1.1! even tought 2.0 is already out as a beta! (and that won't likely change! it will never make it in 1.1!) Best regards, Lloyd ----- Original Message ----- From: "John Luke" To: "Lloyd Dupont" Cc: Sent: Friday, September 17, 2004 9:21 AM Subject: Re: [IronPython] Lightweight Code Generation? > Wrong, > he asked about if mono supported DynamicMethod, which it does if you > have built the "2.0 preview" bits. Perhaps you would have to build > IronPython from source yourself to work with 2.0, but I dont see why > it wouldn't work. > > On Fri, 17 Sep 2004 09:09:28 +1000, Lloyd Dupont wrote: >> if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version >> downloadable on the web site runs on 1.1. therefore your assesment is >> fataly >> incorrect. > From john.luke at gmail.com Fri Sep 17 02:42:42 2004 From: john.luke at gmail.com (John Luke) Date: Thu, 16 Sep 2004 20:42:42 -0400 Subject: [IronPython] Lightweight Code Generation? In-Reply-To: <004a01c49c4d$714fda50$730010ac@5dservices.com.au> References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> <001401c49c42$440ca330$730010ac@5dservices.com.au> <350e7e170409161621304cbd7f@mail.gmail.com> <004a01c49c4d$714fda50$730010ac@5dservices.com.au> Message-ID: <350e7e170409161742b2ad2fe@mail.gmail.com> Hey, I know it is not in 1.1, and that IronPython 0.6 is built for that, but that is irrelevant. It is silly to argue over this. Mono has implemented it in cvs, but it does not produce the correct output and I filed a bug for it. On Fri, 17 Sep 2004 10:29:19 +1000, Lloyd Dupont wrote: > Also, just from the .NET point of view (disregarding Pyhton for a little > while) > > If I launch the MS.NET 1.1 doc, and type DynamicMethod in the index: it's > not there! > And yep if I do that for .NET 2.0 doc it's there. > But it's not in 1.1! even tought 2.0 is already out as a beta! > (and that won't likely change! it will never make it in 1.1!) > > Best regards, > Lloyd > > > > ----- Original Message ----- > From: "John Luke" > To: "Lloyd Dupont" > Cc: > Sent: Friday, September 17, 2004 9:21 AM > Subject: Re: [IronPython] Lightweight Code Generation? > > > Wrong, > > he asked about if mono supported DynamicMethod, which it does if you > > have built the "2.0 preview" bits. Perhaps you would have to build > > IronPython from source yourself to work with 2.0, but I dont see why > > it wouldn't work. > > > > On Fri, 17 Sep 2004 09:09:28 +1000, Lloyd Dupont wrote: > >> if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version > >> downloadable on the web site runs on 1.1. therefore your assesment is > >> fataly > >> incorrect. > > > > From curt at hagenlocher.org Fri Sep 17 02:56:21 2004 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 16 Sep 2004 17:56:21 -0700 Subject: [IronPython] Lightweight Code Generation? Message-ID: <200409170056.RAA01321@dopey.hagenlocher.org> "Lloyd Dupont" writes: > Also, just from the .NET point of view (disregarding Pyhton for a > little while) If I launch the MS.NET 1.1 doc, and type > DynamicMethod in the index: it's not there! > And yep if I do that for .NET 2.0 doc it's there. > But it's not in 1.1! even tought 2.0 is already out as a beta! > (and that won't likely change! it will never make it in 1.1!) Well, yes. The question is, given that FePy is in early beta, and .NET 2.0 is in early beta, and lightweight code generation could considerably simplify some of FePy's implementation, does it make sense to consider use of this feature? Of course, it would mean that you'd need .NET 2.0 or a newer version of Mono to use FePy. Right now, FePy has to generate an assembly to contain all of its dynamic code. It generates this assembly to the file snippets.dll. I'm not sure if it has to generate the assembly to a file (versus in-memory), but one side effect of this is that you can only run a single instance of FePy from the same directory at the same time. Being able to generate dynamic code that lives in memory and doesn't have to be part of an on-disk assembly could be very useful. -- Curt Hagenlocher curt at hagenlocher.org From senthilkumar.chockalingam at kla-tencor.com Fri Sep 17 07:37:27 2004 From: senthilkumar.chockalingam at kla-tencor.com (senthilkumar) Date: Fri, 17 Sep 2004 11:07:27 +0530 Subject: [IronPython] import statement inside .py file not working Message-ID: I have one .py file which has only one statements such as import System I have one windows or console application which invokes IronPython Component. This application has a method to execute python file which has the below set of statements sys.path.append(Path.GetDirectoryName(strFilePath)); Parser objParser = Parser.fromFile(strFilePath); Stmt objStmt = objParser.parseFileInput(); NameEnv objEnvironment = new NameEnv(new module(), null); objStmt.Execute(objEnvironment); When executing it gives the following error System.NotImplementedException: execute: IronPython.AST.ImportStmt at IronPython.AST.Stmt.Execute(NameEnv env) in f:\software\ironpython-0.6\ironpython\ast\stmt.cs:line 33 at IronPython.AST.SuiteStmt.Execute(NameEnv env) in f:\software\ironpython-0.6\ironpython\ast\stmt.cs:line 56 at klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter. pushFile(String strFilePath) in e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein terpreter.cs:line 75 Please assist me Thanks and Regards Senthil Kumar From schabios at logi-track.com Fri Sep 17 14:53:07 2004 From: schabios at logi-track.com (Markus Schaber) Date: Fri, 17 Sep 2004 14:53:07 +0200 Subject: [IronPython] dll In-Reply-To: <200409020250.TAA20645@dopey.hagenlocher.org> References: <200409020250.TAA20645@dopey.hagenlocher.org> Message-ID: <20040917145307.73682a6b@kingfisher.intern.logi-track.com> Hi, Curt, On Wed, 1 Sep 2004 19:50:04 -0700 "Curt Hagenlocher" wrote: > Isn't it more than that? IronPython would actually need to be > able to create static type definitions in order to get "native" > support in VB or C#, and that's not a Python language feature > at all. Without that, there are only two possibilities. > > 1. Define your type information as an interface in VB or C# and > distribute either two assemblies or a single multi-module assembly. > 2. Load the assembly dynamically and use reflection to interact > with it. As far as I remember, Jython used special Tags in the docstrings to accomplish this. HTH, markus -- markus schaber | dipl. informatiker logi-track ag | rennweg 14-16 | ch 8001 z?rich phone +41-43-888 62 52 | fax +41-43-888 62 53 mailto:schabios at logi-track.com | www.logi-track.com From jvm_cop at spamcop.net Fri Sep 17 19:50:02 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Fri, 17 Sep 2004 13:50:02 -0400 Subject: [IronPython] Lightweight Code Generation? In-Reply-To: <200409170056.RAA01321@dopey.hagenlocher.org> Message-ID: <4.3.2.7.2.20040917133941.04af0910@mail.comcast.net> It would certainly be easy enough to get rid of that "single instance per directory" side effect. .NET supports in-memory-only assemblies, but having the assembly on disk certainly must make it easier to do certain kinds of debugging (e.g. you could run Reflector on it to see what's going on, if it doesn't work the way you think it should). For at least that reason, I'd want to have the option to have any dynamic assemblies be on-disk. If using the new functionality would mean that there'd have to be two different implementations, one to satisfy the "on-disk assembly" requirement and one that uses the new functionality, that would leave open the possibility that things would work differently in those two scenarios -- which I'd think could make people mistrust FePy completely. But if the new mechanisms lets you save the resulting dynamic code as an assembly (if needed), it might be worth the "no .NET 1.1 framework support" problems to use those new features. At 08:56 PM 9/16/2004, Curt Hagenlocher wrote (in part) >Right now, FePy has to generate an assembly to contain all of >its dynamic code. It generates this assembly to the file >snippets.dll. I'm not sure if it has to generate the assembly >to a file (versus in-memory), but one side effect of this is >that you can only run a single instance of FePy from the same >directory at the same time. > >Being able to generate dynamic code that lives in memory and >doesn't have to be part of an on-disk assembly could be very >useful. > >-- >Curt Hagenlocher >curt at hagenlocher.org J. Merrill / Analytical Software Corp From jvm_cop at spamcop.net Fri Sep 17 21:12:32 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Fri, 17 Sep 2004 15:12:32 -0400 Subject: [IronPython] Lightweight Code Generation? In-Reply-To: <001401c49c42$440ca330$730010ac@5dservices.com.au> References: <200409162216.PAA01055@dopey.hagenlocher.org> <350e7e17040916153765c3db54@mail.gmail.com> Message-ID: <4.3.2.7.2.20040917151049.04b739d0@mail.comcast.net> What does the state of FePy have to do with John Luke's statement that Mono has support for the .NET 2.0 features that Curt asked about? At 07:09 PM 9/16/2004, Lloyd Dupont wrote >if I'm not mistaken this feature need .NET 2.0 whereas the 0.6 version downloadable on the web site runs on 1.1. therefore your assesment is fataly incorrect. > >----- Original Message ----- From: "John Luke" >To: >Cc: "IronPython" >Sent: Friday, September 17, 2004 8:37 AM >Subject: Re: [IronPython] Lightweight Code Generation? > > >>Hello, >>If I'm am not mistaken it is already there, and has been for quite a while. >> >> >>On Thu, 16 Sep 2004 15:16:10 -0700, Curt Hagenlocher >> wrote: >>>Lightweight Code Generation in .NET 2.0 looks like it would be >>>an ideal tool to implement parts of FePy. >>> >>>http://weblogs.asp.net/joelpob/archive/2004/03/31/105282.aspx >>> >>>What are the plans are for Mono to support these kinds of >>>2.0 features? >>> >>>-- >>>Curt Hagenlocher >>>curt at hagenlocher.org >>>[snip] J. Merrill / Analytical Software Corp From bob at sofsis.cl Mon Sep 20 19:44:39 2004 From: bob at sofsis.cl (Phillip Neumann) Date: Mon, 20 Sep 2004 17:44:39 +0000 Subject: [IronPython] Glade Message-ID: <1095702279.918.2.camel@localhost> Hello!.. IronPython seems greate... but i cannot use Glade with it.. 8( (yes, with C# i can use it...) why does this happend? killfill at book /> uname -a FreeBSD book.sofsis.cl 5.3-BETA5 FreeBSD 5.3-BETA5 #0: Sun Sep 19 20:01:12 UTC 2004 root at book.sofsis.cl:/usr/obj/usr/src/sys/GENERIC i386 killfill at book /> ironpython >>> import Gtk >>> import Glade IronPython.Objects.PythonImportError: can't load Glade in <0x00074> IronPython.Objects.module:Import (string,bool) in <0x00024> IronPython.Objects.Ops:Import (IronPython.Objects.module,string) in <0x0002f> input_1:Run (IronPython.Objects.Frame) in <0x001c5> IronPythonConsole.IronPython:DoInteractive () >>> import Gtk.Glade IronPython.Objects.PythonAttributeError: 'package#' object has no attribute 'Glade' in <0x001e6> IronPython.Objects.Ops:GetAttr (object,string) in <0x00066> IronPython.Objects.Importer:ImportFrom (object,string) in <0x000fd> IronPython.Objects.Importer:ImportOne (string,bool) in <0x00025> IronPython.Objects.module:Import (string,bool) in <0x00024> IronPython.Objects.Ops:Import (IronPython.Objects.module,string) in <0x0002f> input_2:Run (IronPython.Objects.Frame) in <0x001c5> IronPythonConsole.IronPython:DoInteractive () killfill at book /usr/local/lib/mono/gtk-sharp> ls art-sharp.dll gdk-sharp.dll gtk-sharp.dll atk-sharp.dll glade-sharp.dll gtkhtml-sharp.dll gconf-sharp-peditors.dll glib-sharp.dll pango-sharp.dll gconf-sharp.dll gnome-sharp.dll rsvg-sharp.dll gda-sharp.dll gnomedb-sharp.dll vte-sharp.dll -- Phillip Neumann From ld at galador.net Thu Sep 23 03:26:22 2004 From: ld at galador.net (Lloyd Dupont) Date: Thu, 23 Sep 2004 11:26:22 +1000 Subject: [IronPython] Glade References: <1095702279.918.2.camel@localhost> Message-ID: <00a901c4a10c$61d2f030$730010ac@5dservices.com.au> you shoul first losad library before importing namespaces there is a command style : sys.LoadFomFile(aDllName) I'm not of it exact name, but that's the idea! ----- Original Message ----- From: "Phillip Neumann" To: Sent: Tuesday, September 21, 2004 3:44 AM Subject: [IronPython] Glade > Hello!.. > > > IronPython seems greate... but i cannot use Glade with it.. 8( > > (yes, with C# i can use it...) > > > why does this happend? > > > killfill at book /> uname -a > FreeBSD book.sofsis.cl 5.3-BETA5 FreeBSD 5.3-BETA5 #0: Sun Sep 19 > 20:01:12 UTC 2004 root at book.sofsis.cl:/usr/obj/usr/src/sys/GENERIC > i386 > killfill at book /> ironpython >>>> import Gtk >>>> import Glade > IronPython.Objects.PythonImportError: can't load Glade > in <0x00074> IronPython.Objects.module:Import (string,bool) > in <0x00024> IronPython.Objects.Ops:Import > (IronPython.Objects.module,string) > in <0x0002f> input_1:Run (IronPython.Objects.Frame) > in <0x001c5> IronPythonConsole.IronPython:DoInteractive () > >>>> import Gtk.Glade > IronPython.Objects.PythonAttributeError: 'package#' object has no > attribute 'Glade' > in <0x001e6> IronPython.Objects.Ops:GetAttr (object,string) > in <0x00066> IronPython.Objects.Importer:ImportFrom (object,string) > in <0x000fd> IronPython.Objects.Importer:ImportOne (string,bool) > in <0x00025> IronPython.Objects.module:Import (string,bool) > in <0x00024> IronPython.Objects.Ops:Import > (IronPython.Objects.module,string) > in <0x0002f> input_2:Run (IronPython.Objects.Frame) > in <0x001c5> IronPythonConsole.IronPython:DoInteractive () > > > killfill at book /usr/local/lib/mono/gtk-sharp> ls > art-sharp.dll gdk-sharp.dll gtk-sharp.dll > atk-sharp.dll glade-sharp.dll gtkhtml-sharp.dll > gconf-sharp-peditors.dll glib-sharp.dll pango-sharp.dll > gconf-sharp.dll gnome-sharp.dll rsvg-sharp.dll > gda-sharp.dll gnomedb-sharp.dll vte-sharp.dll > > > -- > Phillip Neumann > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From zanesdad at bellsouth.net Fri Sep 24 14:23:22 2004 From: zanesdad at bellsouth.net (Jeremy Jones) Date: Fri, 24 Sep 2004 08:23:22 -0400 Subject: [IronPython] running compiled code In-Reply-To: <00a901c4a10c$61d2f030$730010ac@5dservices.com.au> References: <1095702279.918.2.camel@localhost> <00a901c4a10c$61d2f030$730010ac@5dservices.com.au> Message-ID: <415411BA.1000705@bellsouth.net> Is there a way to run compiled code (e.g. the __main__.exe that was generated by the IronPythonConsole) without having to be in the IronPython\bin directory? I'm running IronPython 0.6 and Mono 1.0 on Windows XP. I've successfully run IronPython by itself and under Mono. I've successfully run IronPythonConsole on a simple Python script and generated the __main__.exe and a .dll file. I've even successfully run the generated __main__.exe - but only while I'm in the IronPython\bin directory. I guess it's referencing some libraries that are in that directory. Is there a way that I can copy the IronPython libraries into the Mono directory and have Mono aware of IronPython? Or is there some environment variable that I can set to make Mono aware of IronPython? Jeremy Jones From zanesdad at bellsouth.net Fri Sep 24 14:54:56 2004 From: zanesdad at bellsouth.net (Jeremy Jones) Date: Fri, 24 Sep 2004 08:54:56 -0400 Subject: [IronPython] running compiled code In-Reply-To: <415411BA.1000705@bellsouth.net> References: <1095702279.918.2.camel@localhost> <00a901c4a10c$61d2f030$730010ac@5dservices.com.au> <415411BA.1000705@bellsouth.net> Message-ID: <41541920.3000807@bellsouth.net> Jeremy Jones wrote: > Is there a way to run compiled code (e.g. the __main__.exe that was > generated by the IronPythonConsole) without having to be in the > IronPython\bin directory? I'm running IronPython 0.6 and Mono 1.0 on > Windows XP. I've successfully run IronPython by itself and under > Mono. I've successfully run IronPythonConsole on a simple Python > script and generated the __main__.exe and a .dll file. I've even > successfully run the generated __main__.exe - but only while I'm in > the IronPython\bin directory. I guess it's referencing some libraries > that are in that directory. Is there a way that I can copy the > IronPython libraries into the Mono directory and have Mono aware of > IronPython? Or is there some environment variable that I can set to > make Mono aware of IronPython? > > > Jeremy Jones > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com Actually, I got it to work. I just copied: IronPython.dll IronPythonConsole.exe IronPythonConsole.pdb SystemUtil.dll IronMath.dll to my Mono\lib directory. I don't know if I need all of those files or not.... I'm trying the same thing on Linux, though and I can't seem to get it to work. I've tried copying the same files as above to my /usr/lib/mono/1.0 directory to no success and decided to try copying them to my /usr/bin directory (since that is where the mono executable lives) to no succes as well. (I have gotten Mono on Linux to run the __main__.exe, though. But while I'm in the IronPython/bin directory.) Anyone have any ideas on where I can copy these IronPython exe and dll files on Linux to get it working? Jeremy Jones From randall_burns at yahoo.com Fri Sep 24 21:34:01 2004 From: randall_burns at yahoo.com (Randall Burns) Date: Fri, 24 Sep 2004 12:34:01 -0700 (PDT) Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 18 In-Reply-To: <20040924190655.2E18D985E8@che.dreamhost.com> Message-ID: <20040924193401.89823.qmail@web14302.mail.yahoo.com> How do folks see the new Microsoft command shell relates to IronPython? Will Iron Python be able to leverage any of this work? http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From ld at galador.net Sat Sep 25 00:44:31 2004 From: ld at galador.net (Lloyd Dupont) Date: Sat, 25 Sep 2004 08:44:31 +1000 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 18 References: <20040924193401.89823.qmail@web14302.mail.yahoo.com> Message-ID: <000a01c4a288$1e5b5310$0100a8c0@vulcain> I'm just reading a paper pn it. so far IronPython seems simpler :S ----- Original Message ----- From: "Randall Burns" To: Sent: Saturday, September 25, 2004 5:34 AM Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 18 > How do folks see the new Microsoft command shell > relates to IronPython? Will Iron Python be able to > leverage any of this work? > > http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > http://promotions.yahoo.com/new_mail > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From ld at galador.net Tue Sep 28 13:50:17 2004 From: ld at galador.net (Lloyd Dupont) Date: Tue, 28 Sep 2004 21:50:17 +1000 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 18 References: <20040924193401.89823.qmail@web14302.mail.yahoo.com> Message-ID: <008901c4a551$64aba100$0100a8c0@vulcain> I've been confirmed beta tester of MSH, should be able to start testing tomorrow (well, this wek-end) however I have the feeling, somehow, that python has a definitive edge which is: Python could be embeded into your application, to provide configurable UI. Well, any kind of configuration in fact, that's really great! Infact even run-time modification (maybe there is security setting to investigate before though :S) ----- Original Message ----- From: "Randall Burns" To: Sent: Saturday, September 25, 2004 5:34 AM Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 18 > How do folks see the new Microsoft command shell > relates to IronPython? Will Iron Python be able to > leverage any of this work? > > http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > http://promotions.yahoo.com/new_mail > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From randall_burns at yahoo.com Tue Sep 28 21:28:50 2004 From: randall_burns at yahoo.com (Randall Burns) Date: Tue, 28 Sep 2004 12:28:50 -0700 (PDT) Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 In-Reply-To: <20040928190944.EA9C2985E3@che.dreamhost.com> Message-ID: <20040928192850.72946.qmail@web14322.mail.yahoo.com> --- users-ironpython.com-request at lists.ironpython.com > Message: 1 > Date: Tue, 28 Sep 2004 21:50:17 +1000 > From: "Lloyd Dupont" > What I've found: I tend to write stuff in Python over bash or similar shells from the standpoint of maintainability-and avoiding a tower of babel(one language can do more). This works because the classes for doing stuff largely equivalent to bash are reasonbly mature in Python. What Microsoft _appears_ to be doing with this stuff is creating a next generation shell that takes advantage of some of the .NET features. That would I expect mean that to provide equivalent functionality, Python would need some new libraries/classes. I'd really like to know your thoughts as you get more familiar with MSH. > I've been confirmed beta tester of MSH, should be > able to start testing > tomorrow (well, this wek-end) > however I have the feeling, somehow, that python has > a definitive edge which > is: > > Python could be embeded into your application, to > provide configurable UI. > Well, any kind of configuration in fact, that's > really great! > Infact even run-time modification (maybe there is > security setting to > investigate before though :S) > > > ----- Original Message ----- > From: "Randall Burns" > To: > Sent: Saturday, September 25, 2004 5:34 AM > Subject: [IronPython] Re: users-ironpython.com > Digest, Vol 2, Issue 18 > > > > How do folks see the new Microsoft command shell > > relates to IronPython? Will Iron Python be able to > > leverage any of this work? > > > > > http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 > > > > __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From bob at sofsis.cl Tue Sep 28 18:51:03 2004 From: bob at sofsis.cl (Phillip Neumann) Date: Tue, 28 Sep 2004 16:51:03 +0000 Subject: [IronPython] Glade Message-ID: <1096390263.6135.46.camel@localhost> Hello... Im still trying to use Glade!:.. look: import System import sys from Gtk import * sys.LoadAssemblyFromFile('/usr/local/lib/mono/gtk-sharp/glade-sharp.dll') import Glade xml = Glade.XML("gui.glade", "window1",None) System.DllNotFoundException: libglade-2.0-0.dll in <0x00053> (wrapper managed-to-native) Glade.XML:glade_xml_new (string,string,string) in <0x00062> Glade.XML:.ctor (string,string,string) in (unmanaged) (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[]) in <0x00004> (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[]) in <0x00097> System.Reflection.MonoCMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) Why is this happening?.. what is that libglade-2.0.0.dll file?... thanks you very much. -- Phillip Neumann From bob at sofsis.cl Tue Sep 28 19:13:54 2004 From: bob at sofsis.cl (Phillip Neumann) Date: Tue, 28 Sep 2004 17:13:54 +0000 Subject: [IronPython] Glade In-Reply-To: <1096390263.6135.46.camel@localhost> References: <1096390263.6135.46.camel@localhost> Message-ID: <1096391633.10063.2.camel@localhost> Hm... this will fix the problem: ;)... it seems that it thinks im on windows somehow.. anyway... i wrote a class in C#: #FirstFile.cs namespace BaseDatos{ public class basedatos{ balblablablabla } } How would i load that class in ironpython so i can use that logic? thank you very much! El mar, 28-09-2004 a las 16:51, Phillip Neumann escribi?: > Hello... > > Im still trying to use Glade!:.. > > > look: > > > import System > import sys > from Gtk import * > sys.LoadAssemblyFromFile('/usr/local/lib/mono/gtk-sharp/glade-sharp.dll') > import Glade > > xml = Glade.XML("gui.glade", "window1",None) > System.DllNotFoundException: libglade-2.0-0.dll > in <0x00053> (wrapper managed-to-native) Glade.XML:glade_xml_new > (string,string,string) > in <0x00062> Glade.XML:.ctor (string,string,string) > in (unmanaged) (wrapper managed-to-native) > System.Reflection.MonoCMethod:InternalInvoke (object,object[]) > in <0x00004> (wrapper managed-to-native) > System.Reflection.MonoCMethod:InternalInvoke (object,object[]) > in <0x00097> System.Reflection.MonoCMethod:Invoke > (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) > > > Why is this happening?.. what is that libglade-2.0.0.dll file?... > > > > thanks you very much. -- Phillip Neumann From bob at sofsis.cl Tue Sep 28 21:24:13 2004 From: bob at sofsis.cl (Phillip Neumann) Date: Tue, 28 Sep 2004 19:24:13 +0000 Subject: [IronPython] Glade In-Reply-To: <1096391633.10063.2.camel@localhost> References: <1096390263.6135.46.camel@localhost> <1096391633.10063.2.camel@localhost> Message-ID: <1096399453.14256.0.camel@localhost> never mind i got it El mar, 28-09-2004 a las 17:13, Phillip Neumann escribi?: > Hm... this will fix the problem: > > > > > ;)... it seems that it thinks im on windows somehow.. > > anyway... > > i wrote a class in C#: > > #FirstFile.cs > namespace BaseDatos{ > public class basedatos{ > balblablablabla > } > } > > > How would i load that class in ironpython so i can use that logic? > > thank you very much! > > > > > El mar, 28-09-2004 a las 16:51, Phillip Neumann escribi?: > > Hello... > > > > Im still trying to use Glade!:.. > > > > > > look: > > > > > > import System > > import sys > > from Gtk import * > > sys.LoadAssemblyFromFile('/usr/local/lib/mono/gtk-sharp/glade-sharp.dll') > > import Glade > > > > xml = Glade.XML("gui.glade", "window1",None) > > System.DllNotFoundException: libglade-2.0-0.dll > > in <0x00053> (wrapper managed-to-native) Glade.XML:glade_xml_new > > (string,string,string) > > in <0x00062> Glade.XML:.ctor (string,string,string) > > in (unmanaged) (wrapper managed-to-native) > > System.Reflection.MonoCMethod:InternalInvoke (object,object[]) > > in <0x00004> (wrapper managed-to-native) > > System.Reflection.MonoCMethod:InternalInvoke (object,object[]) > > in <0x00097> System.Reflection.MonoCMethod:Invoke > > (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) > > > > > > Why is this happening?.. what is that libglade-2.0.0.dll file?... > > > > > > > > thanks you very much. -- Phillip Neumann From luxorxul at yahoo.ca Wed Sep 29 04:16:18 2004 From: luxorxul at yahoo.ca (Gerald Bauer) Date: Tue, 28 Sep 2004 22:16:18 -0400 (EDT) Subject: [IronPython] Using MyXaml and IronPython Message-ID: <20040929021618.55198.qmail@web40828.mail.yahoo.com> Hello, I've started to try out MyXaml using IronPython. My first experiment was just to load a MyXaml-encoded Windows form using Python. Using the snippet below everything works out fine: --------------------------- import sys sys.LoadAssemblyByName( "MyXaml" ) import MyXaml dir( MyXaml ) p = MyXaml.Parser() form = p.LoadForm( "c:\src\myxaml\python\counter.myxaml", "AppMainForm", None, None ) form.ShowDialog() ------------------------------ If anyone else is interested using MyXaml and Python together, let me know. - Gerald --------------------------- Gerald Bauer Rich Client Conference (RichCon) 2005 - http://richcon.com XUL News Wire - http://xulnews.com ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca From bob at sofsis.cl Tue Sep 28 22:37:11 2004 From: bob at sofsis.cl (Phillip Neumann) Date: Tue, 28 Sep 2004 20:37:11 +0000 Subject: [IronPython] Gtk.TreeStore(what)? Message-ID: <1096403831.16568.0.camel@localhost> Hello.. What should i put as arguments in Gtk.TreeStore? >>> import Gtk >>> Gtk.TreeStore(str) System.ArgumentException: parameters in <0x00085> System.Reflection.MonoCMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) in <0x0001d> System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) in <0x00044> System.Reflection.ConstructorInfo:Invoke (object[]) in <0x000f9> IronPython.Objects.ReflectedMethodBase:Call (object[]) in <0x00029> IronPython.Objects.ReflectedType:Call (object[]) in <0x001f5> IronPython.Objects.Ops:Call (object,object) in <0x0007f> input_1:Run (IronPython.Objects.Frame) in <0x001c5> IronPythonConsole.IronPython:DoInteractive () thanks in advance and sorry for the previouse messages.. -- Phillip Neumann From ld at galador.net Wed Sep 29 11:59:43 2004 From: ld at galador.net (Lloyd Dupont) Date: Wed, 29 Sep 2004 19:59:43 +1000 Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 References: <20040928192850.72946.qmail@web14322.mail.yahoo.com> Message-ID: <003801c4a60b$1af6f5e0$0100a8c0@vulcain> I could already gives you my 1st impression. (but not yet the 2nd one...) it looks awfull and scriptic like while ( $var -lt 10 ) { write-host $var; $var += 1 } and then it seems more file system oriented (I could get-childitem C: or (better) dir HKCU:\Printers) but I haven't been able to create a normal object (let say a form). in the doc they speak about a new-object type syntax, but that doesn't work..... ----- Original Message ----- From: "Randall Burns" To: Sent: Wednesday, September 29, 2004 5:28 AM Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 > > --- users-ironpython.com-request at lists.ironpython.com >> Message: 1 >> Date: Tue, 28 Sep 2004 21:50:17 +1000 >> From: "Lloyd Dupont" >> > What I've found: > I tend to write stuff in Python over bash or similar > shells from the standpoint of maintainability-and > avoiding a tower of babel(one language can do more). > > This works because the classes for doing stuff largely > equivalent to bash are reasonbly mature in Python. > What Microsoft _appears_ to be doing with this stuff > is creating a next generation shell that takes > advantage of some of the .NET features. That would I > expect mean that to provide equivalent functionality, > Python would > need some new libraries/classes. > > I'd really like to know your thoughts as you get more > familiar with MSH. > > >> I've been confirmed beta tester of MSH, should be >> able to start testing >> tomorrow (well, this wek-end) >> however I have the feeling, somehow, that python has >> a definitive edge which >> is: >> >> Python could be embeded into your application, to >> provide configurable UI. >> Well, any kind of configuration in fact, that's >> really great! >> Infact even run-time modification (maybe there is >> security setting to >> investigate before though :S) >> >> >> ----- Original Message ----- >> From: "Randall Burns" >> To: >> Sent: Saturday, September 25, 2004 5:34 AM >> Subject: [IronPython] Re: users-ironpython.com >> Digest, Vol 2, Issue 18 >> >> >> > How do folks see the new Microsoft command shell >> > relates to IronPython? Will Iron Python be able to >> > leverage any of this work? >> > >> > >> > http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 >> > >> > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From ironpython at alexh.sent.com Wed Sep 29 15:33:14 2004 From: ironpython at alexh.sent.com (ironpython at alexh.sent.com) Date: Wed, 29 Sep 2004 23:33:14 +1000 Subject: [IronPython] Re: MSH vs IronPython In-Reply-To: <003801c4a60b$1af6f5e0$0100a8c0@vulcain> References: <20040928192850.72946.qmail@web14322.mail.yahoo.com> <003801c4a60b$1af6f5e0$0100a8c0@vulcain> Message-ID: <1096464794.26961.205400234@webmail.messagingengine.com> >>> in the doc they speak about a new-object type syntax, but that doesn't work..... I find your "review" somewhat misleading (the it doesn't work bit?) :) MSH isn't really intended to be a script based application development environment for developing object oriented applications - it really is an administrative scripting tool that provides the glue that connects discoverable, user-defined (binary) commands - that communicate with each other through a structured object based pipeline. See http://weblogs.asp.net/ahoffman/archive/2003/12/28/46162.aspx IronPython addresses a different market - one more geared to take advantage of its shell, concise yet elegant object oriented language, and ability to easily reuse non-binary code - in order to create somewhat more traditional executables and libraries. I'm blown away by MSH's object pipeline, composable architecture and simple mechanism for command discovery - but dismayed by its $#*! syntax. I'm blown away by (Iron)Python's sheer productivity, concise predictable syntax, interactive mode, dynamic (yet strongly-typed) types and ability to produce (soon?) and consume CLR types - for more traditional development. Alex Hoffman ----- Original message ----- From: "Lloyd Dupont" To: users-ironpython.com at lists.ironpython.com Date: Wed, 29 Sep 2004 19:59:43 +1000 Subject: Re: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 I could already gives you my 1st impression. (but not yet the 2nd one...) it looks awfull and scriptic like while ( $var -lt 10 ) { write-host $var; $var += 1 } and then it seems more file system oriented (I could get-childitem C: or (better) dir HKCU:\Printers) but I haven't been able to create a normal object (let say a form). in the doc they speak about a new-object type syntax, but that doesn't work..... ----- Original Message ----- From: "Randall Burns" To: Sent: Wednesday, September 29, 2004 5:28 AM Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 > > --- users-ironpython.com-request at lists.ironpython.com >> Message: 1 >> Date: Tue, 28 Sep 2004 21:50:17 +1000 >> From: "Lloyd Dupont" >> > What I've found: > I tend to write stuff in Python over bash or similar > shells from the standpoint of maintainability-and > avoiding a tower of babel(one language can do more). > > This works because the classes for doing stuff largely > equivalent to bash are reasonbly mature in Python. > What Microsoft _appears_ to be doing with this stuff > is creating a next generation shell that takes > advantage of some of the .NET features. That would I > expect mean that to provide equivalent functionality, > Python would > need some new libraries/classes. > > I'd really like to know your thoughts as you get more > familiar with MSH. > > >> I've been confirmed beta tester of MSH, should be >> able to start testing >> tomorrow (well, this wek-end) >> however I have the feeling, somehow, that python has >> a definitive edge which >> is: >> >> Python could be embeded into your application, to >> provide configurable UI. >> Well, any kind of configuration in fact, that's >> really great! >> Infact even run-time modification (maybe there is >> security setting to >> investigate before though :S) >> >> >> ----- Original Message ----- >> From: "Randall Burns" >> To: >> Sent: Saturday, September 25, 2004 5:34 AM >> Subject: [IronPython] Re: users-ironpython.com >> Digest, Vol 2, Issue 18 >> >> >> > How do folks see the new Microsoft command shell >> > relates to IronPython? Will Iron Python be able to >> > leverage any of this work? >> > >> > >> > http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 >> > >> > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From foxpdll at comch.ru Wed Sep 29 16:14:33 2004 From: foxpdll at comch.ru (=?windows-1251?B?z/Du9vv46O0gxOzo8vDo6Q==?=) Date: Wed, 29 Sep 2004 18:14:33 +0400 Subject: [IronPython] sys.stdin Message-ID: has that import sys print "foxpdll was here1" sys.stdout.write("FoxPDLL was here2\n") print sys.stdin.readline() in Python23 worked but under ironpythonconsole error rised Unhandled Exception: IronPython.Objects.PythonAttributeError: type object 'IronPython.Modules.sys' has no attribute 'stdin' at IronPython.Objects.Ops.GetAttr(Object o, String name) at __main__.init() in E:\prog\IronPython-0.6\test.py:line 4 at IronPythonConsole.IronPython.DoFile(String[] args) at IronPythonConsole.IronPython.Main(String[] args) why? in ironpython.dll hasnt find stdin at all From randall_burns at yahoo.com Wed Sep 29 16:27:53 2004 From: randall_burns at yahoo.com (Randall Burns) Date: Wed, 29 Sep 2004 07:27:53 -0700 (PDT) Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 21 In-Reply-To: <20040929133418.19E63985FF@che.dreamhost.com> Message-ID: <20040929142753.43200.qmail@web14308.mail.yahoo.com> --- users-ironpython.com-request at lists.ironpython.com wrote: >MSH isn't really intended to be a script based >application development environment for developing >object oriented applications - it really is >an administrative scripting tool that provides the >glue that connects discoverable, user-defined (binary) >commands - that communicate with >each other through a structured object based pipeline. >See http://weblogs.asp.net/ahoffman/archive/2003/12/28/46162.aspx Well at the very least, allowing Iron Python Applications to be compatible with that pipeline would seem like a good idea. >IronPython addresses a different market >..... in order to create >somewhat more traditional executables and libraries. Well, Perl has had libraries that give Perl the equivalent functionality of the Unix Shell. I've never regretted it when I chose perl or python over the shell when writing a script over a few lines. The main thing that is a key though: once you learn a shell, sometimes you know how to do something in it _very_ tersely-so having equivalent commands in libraries in a "real" language can be quite handy-if only as a memory device. >I'm blown away by MSH's object pipeline, composable >architecture and >simple mechanism for command discovery - but dismayed >by its $#*! syntax. It seems like the first is something Iron python can borrow-possibly parts of the second and the third something iron python can fix. This may be a way to do an end run around msh. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From jake at jakebartlett.com Wed Sep 29 16:44:15 2004 From: jake at jakebartlett.com (Jake Bartlett) Date: Wed, 29 Sep 2004 10:44:15 -0400 Subject: [IronPython] sys.stdin In-Reply-To: References: Message-ID: <415ACA3F.1010503@jakebartlett.com> I appears that sys hasn't been completely implemented. For now you'll have to use the .net classes over the builtin Python classes: For example import sys from System import * print "foxpdll was here1" sys.stdout.write("FoxPDLL was here2\n") print Console.ReadLine() ???????? ??????? wrote: >has that > >import sys >print "foxpdll was here1" >sys.stdout.write("FoxPDLL was here2\n") >print sys.stdin.readline() > >in Python23 worked >but under ironpythonconsole error rised > >Unhandled Exception: IronPython.Objects.PythonAttributeError: type object 'IronPython.Modules.sys' has no attribute 'stdin' > at IronPython.Objects.Ops.GetAttr(Object o, String name) > at __main__.init() in E:\prog\IronPython-0.6\test.py:line 4 > at IronPythonConsole.IronPython.DoFile(String[] args) > at IronPythonConsole.IronPython.Main(String[] args) > > >why? >in ironpython.dll hasnt find stdin at all > > > > >_______________________________________________ >users-ironpython.com mailing list >users-ironpython.com at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From ld at galador.net Wed Sep 29 23:33:59 2004 From: ld at galador.net (Lloyd Dupont) Date: Thu, 30 Sep 2004 07:33:59 +1000 Subject: [IronPython] Re: MSH vs IronPython References: <20040928192850.72946.qmail@web14322.mail.yahoo.com><003801c4a60b$1af6f5e0$0100a8c0@vulcain> <1096464794.26961.205400234@webmail.messagingengine.com> Message-ID: <002201c4a66c$17a22e80$0100a8c0@vulcain> >>>> in the doc they speak about a new-object type syntax, but that doesn't >>>> work..... > > I find your "review" somewhat misleading (the it doesn't work bit?) :) my "review" is really just a half an hour first imprssion before going to bed. furthermore, many things are really cool. I even stated (just as briefly) that you could easily browse registry, file system, environment, and that's cool. however it is stated in the GettingStarted.rtf " You can also call the constructor for a .NET type or bind to a ActiveXObject: MSH> $d= new-object System.DateTime 2004 12 1 " and I was frustrated that new-object get me: 'new-object' is not recognized as a cmdlet, function, operable program or script file. and a 'get-command' (cool tool to get..... the list of available command) gives me only 'new-item' as potential candidate, but it was not the one! aynyway it's very much a beta product, as they said in the GettingStarted: " The MSH language is partially implemented at this time; the following constructs may be used from the command line: " however what work seems to work well, don't get me wrong! > MSH isn't really intended to be a script based application development > environment for developing object oriented applications - it really is > an administrative scripting tool that provides the glue that connects that was my impression too. you could "dir" (get-childitem) the environment, the file system, the regisry in a consistent manner, you almost believe they are same kind of object > IronPython addresses a different market - one more geared to take I think too... more and more.. > advantage of its shell, concise yet elegant object oriented language, > and ability to easily reuse non-binary code - in order to create > somewhat more traditional executables and libraries. > > I'm blown away by MSH's object pipeline, composable architecture and > simple mechanism for command discovery - but dismayed by its $#*! > syntax. me too... and -lt 1 2 too.... but you could use 1<2 too :) and after half an hour yesterday, in the end, it becomes to be less alien. OK, time to go to work now, bye... > > I'm blown away by (Iron)Python's sheer productivity, concise predictable > syntax, interactive mode, dynamic (yet strongly-typed) types and ability > to produce (soon?) and consume CLR types - for more traditional > development. > > Alex Hoffman > > > ----- Original message ----- > From: "Lloyd Dupont" > To: users-ironpython.com at lists.ironpython.com > Date: Wed, 29 Sep 2004 19:59:43 +1000 > Subject: Re: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue > 20 > > I could already gives you my 1st impression. > (but not yet the 2nd one...) > > it looks awfull and scriptic like > while ( $var -lt 10 ) { write-host $var; $var += 1 } > > and then it seems more file system oriented (I could get-childitem C: or > (better) dir HKCU:\Printers) > but I haven't been able to create a normal object (let say a form). > in the doc they speak about a > new-object type syntax, but that doesn't work..... > > ----- Original Message ----- > From: "Randall Burns" > To: > Sent: Wednesday, September 29, 2004 5:28 AM > Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 > > >> >> --- users-ironpython.com-request at lists.ironpython.com >>> Message: 1 >>> Date: Tue, 28 Sep 2004 21:50:17 +1000 >>> From: "Lloyd Dupont" >>> >> What I've found: >> I tend to write stuff in Python over bash or similar >> shells from the standpoint of maintainability-and >> avoiding a tower of babel(one language can do more). >> >> This works because the classes for doing stuff largely >> equivalent to bash are reasonbly mature in Python. >> What Microsoft _appears_ to be doing with this stuff >> is creating a next generation shell that takes >> advantage of some of the .NET features. That would I >> expect mean that to provide equivalent functionality, >> Python would >> need some new libraries/classes. >> >> I'd really like to know your thoughts as you get more >> familiar with MSH. >> >> >>> I've been confirmed beta tester of MSH, should be >>> able to start testing >>> tomorrow (well, this wek-end) >>> however I have the feeling, somehow, that python has >>> a definitive edge which >>> is: >>> >>> Python could be embeded into your application, to >>> provide configurable UI. >>> Well, any kind of configuration in fact, that's >>> really great! >>> Infact even run-time modification (maybe there is >>> security setting to >>> investigate before though :S) >>> >>> >>> ----- Original Message ----- >>> From: "Randall Burns" >>> To: >>> Sent: Saturday, September 25, 2004 5:34 AM >>> Subject: [IronPython] Re: users-ironpython.com >>> Digest, Vol 2, Issue 18 >>> >>> >>> > How do folks see the new Microsoft command shell >>> > relates to IronPython? Will Iron Python be able to >>> > leverage any of this work? >>> > >>> > >>> >> http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 >>> > >>> > >> >> >> >> __________________________________ >> Do you Yahoo!? >> Yahoo! Mail Address AutoComplete - You start. We finish. >> http://promotions.yahoo.com/new_mail >> _______________________________________________ >> users-ironpython.com mailing list >> users-ironpython.com at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users-ironpython.com mailing list > users-ironpython.com at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jvm_cop at spamcop.net Thu Sep 30 17:02:07 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Thu, 30 Sep 2004 11:02:07 -0400 Subject: [IronPython] Re: MSH vs IronPython In-Reply-To: <002201c4a66c$17a22e80$0100a8c0@vulcain> References: <20040928192850.72946.qmail@web14322.mail.yahoo.com> <003801c4a60b$1af6f5e0$0100a8c0@vulcain> <1096464794.26961.205400234@webmail.messagingengine.com> Message-ID: <4.3.2.7.2.20040930104423.05093130@mail.comcast.net> It's very annoying / disappointing / frustrating / stupid / typical that when MS decides that they need a "better" command-prompt language that, instead of using an existing scripting language that could do everything they want (like Python just to name one possibility), they invent something completely new and different with new syntax, new semantics, new everything. Aren't there enough scripting languages already? What capabilities does MSH have that couldn't be added to Python (or some other extensible scriptable language) by building an appropriate library? Couldn't JScript.Net be the language, if they don't want to support Python? Is the problem that Python is cross-platform, and thus not proprietary to MS? Is the problem that .Net no longer locks you into Windows (thanks to Mono) so they don't want to use it for simple tasks? (Are we supposed to build "production applications" in MSH that lock our users into Windows? Are we going to be begging for MSH compilers and so on? ARGHHH!) Are MS intentionally trying to make everyone keep learning how to dance MS's new dances (to the same old songs) in order to prevent anyone from having the time to build anything that might actually provide some benefit to users, something that "accidentally" might not lock the users and developers into using Windows exclusively? It's time for us to say ENOUGH in as loud a voice as the development community can muster. I believe wholeheartedly in the .NET initiative; MS had gone a ridiculously long time without providing developers with _any_ programming environment with the productivity advantages that "managed languages" (like Python, Java, Ruby, APL, even J{ava}Script) provide. But now that we've gone through the process of learning "the .NET way" they need to stop forcing us to learn yet another way of doing things when there are already many ways to do everything that a command-prompt language needs to do. At 05:33 PM 9/29/2004, Lloyd Dupont wrote >>>>>in the doc they speak about a new-object type syntax, but that doesn't work..... >> >>I find your "review" somewhat misleading (the it doesn't work bit?) :) >my "review" is really just a half an hour first imprssion before going to bed. >furthermore, many things are really cool. >I even stated (just as briefly) that you could easily browse registry, file system, environment, and that's cool. > >however it is stated in the GettingStarted.rtf >" >You can also call the constructor for a .NET type or bind to a ActiveXObject: > >MSH> $d= new-object System.DateTime 2004 12 1 > >" >and I was frustrated that new-object get me: >'new-object' is not recognized as a cmdlet, function, operable program or script file. > >and a 'get-command' (cool tool to get..... the list of available command) gives me only 'new-item' as potential candidate, but it was not the one! > >aynyway it's very much a beta product, as they said in the GettingStarted: >" >The MSH language is partially implemented at this time; the following constructs may be used from the command line: > >" > >however what work seems to work well, don't get me wrong! > >>MSH isn't really intended to be a script based application development >>environment for developing object oriented applications - it really is >>an administrative scripting tool that provides the glue that connects >that was my impression too. >you could "dir" (get-childitem) the environment, the file system, the regisry in a consistent manner, you almost believe they are same kind of object > >>IronPython addresses a different market - one more geared to take >I think too... more and more.. > >>advantage of its shell, concise yet elegant object oriented language, >>and ability to easily reuse non-binary code - in order to create >>somewhat more traditional executables and libraries. >> >>I'm blown away by MSH's object pipeline, composable architecture and >>simple mechanism for command discovery - but dismayed by its $#*! >>syntax. >me too... and -lt 1 2 too.... but you could use 1<2 too :) >and after half an hour yesterday, in the end, it becomes to be less alien. > > >OK, time to go to work now, bye... > >> >>I'm blown away by (Iron)Python's sheer productivity, concise predictable >>syntax, interactive mode, dynamic (yet strongly-typed) types and ability >>to produce (soon?) and consume CLR types - for more traditional >>development. >> >>Alex Hoffman >> >> >>----- Original message ----- >>From: "Lloyd Dupont" >>To: users-ironpython.com at lists.ironpython.com >>Date: Wed, 29 Sep 2004 19:59:43 +1000 >>Subject: Re: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue >>20 >> >>I could already gives you my 1st impression. >>(but not yet the 2nd one...) >> >>it looks awfull and scriptic like >>while ( $var -lt 10 ) { write-host $var; $var += 1 } >> >>and then it seems more file system oriented (I could get-childitem C: or >>(better) dir HKCU:\Printers) >>but I haven't been able to create a normal object (let say a form). >>in the doc they speak about a >>new-object type syntax, but that doesn't work..... >> >>----- Original Message ----- From: "Randall Burns" >>To: >>Sent: Wednesday, September 29, 2004 5:28 AM >>Subject: [IronPython] Re: users-ironpython.com Digest, Vol 2, Issue 20 >> >> >>> >>>--- users-ironpython.com-request at lists.ironpython.com >>>>Message: 1 >>>>Date: Tue, 28 Sep 2004 21:50:17 +1000 >>>>From: "Lloyd Dupont" >>>What I've found: >>>I tend to write stuff in Python over bash or similar >>>shells from the standpoint of maintainability-and >>>avoiding a tower of babel(one language can do more). >>> >>>This works because the classes for doing stuff largely >>>equivalent to bash are reasonbly mature in Python. >>>What Microsoft _appears_ to be doing with this stuff >>>is creating a next generation shell that takes >>>advantage of some of the .NET features. That would I >>>expect mean that to provide equivalent functionality, >>>Python would >>>need some new libraries/classes. >>> >>>I'd really like to know your thoughts as you get more >>>familiar with MSH. >>> >>> >>>>I've been confirmed beta tester of MSH, should be >>>>able to start testing >>>>tomorrow (well, this wek-end) >>>>however I have the feeling, somehow, that python has >>>>a definitive edge which >>>>is: >>>> >>>>Python could be embeded into your application, to >>>>provide configurable UI. >>>>Well, any kind of configuration in fact, that's >>>>really great! >>>>Infact even run-time modification (maybe there is >>>>security setting to >>>>investigate before though :S) >>>> >>>> >>>>----- Original Message ----- From: "Randall Burns" >>>>To: >>>>Sent: Saturday, September 25, 2004 5:34 AM >>>>Subject: [IronPython] Re: users-ironpython.com >>>>Digest, Vol 2, Issue 18 >>>> >>>> >>>>> How do folks see the new Microsoft command shell >>>>> relates to IronPython? Will Iron Python be able to >>>>> leverage any of this work? >>>>> >>>>> >>>http://developers.slashdot.org/article.pl?sid=04/09/21/0153251&tid=201&tid=156&tid=8 >>>>> >>>>> >>> >>> >>> >>>__________________________________ >>>Do you Yahoo!? >>>Yahoo! Mail Address AutoComplete - You start. We finish. >>>http://promotions.yahoo.com/new_mail >>>_______________________________________________ >>>users-ironpython.com mailing list >>>users-ironpython.com at lists.ironpython.com >>>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >>_______________________________________________ >>users-ironpython.com mailing list >>users-ironpython.com at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>_______________________________________________ >>users-ironpython.com mailing list >>users-ironpython.com at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >_______________________________________________ >users-ironpython.com mailing list >users-ironpython.com at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com J. Merrill / Analytical Software Corp From arild.fines at broadpark.no Thu Sep 30 17:07:34 2004 From: arild.fines at broadpark.no (Arild Fines) Date: Thu, 30 Sep 2004 17:07:34 +0200 Subject: [IronPython] Re: MSH vs IronPython In-Reply-To: <4.3.2.7.2.20040930104423.05093130@mail.comcast.net> Message-ID: users-ironpython.com-bounces at lists.ironpython.com wrote: > Aren't there enough scripting languages already? No. -- Arild AnkhSVN: http://ankhsvn.tigris.org Blog: http://ankhsvn.com/blog IRC: irc://irc.freenode.net/ankhsvn "The problem in the world today is communication. Too much communication." -- Homer Simpson From lobrien at knowing.net Thu Sep 30 19:21:35 2004 From: lobrien at knowing.net (Larry O'Brien) Date: Thu, 30 Sep 2004 07:21:35 -1000 Subject: [IronPython] Re: MSH vs IronPython In-Reply-To: <4.3.2.7.2.20040930104423.05093130@mail.comcast.net> Message-ID: >>What capabilities does MSH have that couldn't be added to Python (or some >>other extensible scriptable language) by building an appropriate library? I suspect that the lion's share of work in MSH has not been the scripting syntax but has had to do with the infrastructure for creating a "pipes and filters" shell architecture that passes around .NET objects. I agree that there are aspects of the MSH syntax that seem gratuitously contrarian -- after 15 years of training the developer community to think "noun.verb()" they adopt "verb-noun". But it's not really the developers to whom they're trying to give a tool, it's the administrators (there's overlap, but not nearly complete) and perhaps in some usability study "verb-noun" has been shown... I dunno', seems gratuitous to me. But I think it would be a mistake to assume that a Python interactive prompt would _necessarily_ be more productive and easier to understand by the majority of users. In the best of all possible worlds, I would love to have a .profile that essentially provided a Python console as _my_ interactive prompt but which would still support push-location pop-location. And Joe Administrator can have a "pure" MSH shell and Jane Unix could have a bash-like shell. I don't know if MS has made any statements about whether that kind of customization will be possible within MSH. Cheers, Larry From ld at galador.net Thu Sep 30 23:06:51 2004 From: ld at galador.net (Lloyd Dupont) Date: Fri, 1 Oct 2004 07:06:51 +1000 Subject: [IronPython] Re: MSH vs IronPython References: Message-ID: <002201c4a731$79c75840$0100a8c0@vulcain> Also you could navigate file system, registry, WMI, env variable and other stuff all in unified way. anyway it's not a programming tool but more an admin tool. I lack imagination fr such stuff but I will try to investigate more this week-end and I'll tell you