From steven at wilcoxzone.com Sat Dec 4 04:40:46 2004 From: steven at wilcoxzone.com (Steven Wilcox) Date: Fri, 3 Dec 2004 22:40:46 -0500 Subject: [IronPython] registering other event types like mouseevents Message-ID: <20041204034133.DKWM1980.imf16aec.mail.bellsouth.net@scwp4main> I apologize for being a total newbie but I was wondering if anyone had a fix for handling mousevents and dragevents. I need to be able to handle these for the little project I am working on. Thanks. -ScW -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Dec 8 22:48:19 2004 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 8 Dec 2004 13:48:19 -0800 Subject: [IronPython] IL Rewriting @ Runtime Message-ID: I forgot about this article... http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/ It describes a technique to rewrite IL at runtime. From d.stockwell at qut.edu.au Thu Dec 9 02:14:22 2004 From: d.stockwell at qut.edu.au (Douglas Stockwell) Date: Thu, 9 Dec 2004 11:14:22 +1000 Subject: [IronPython] IL Rewriting @ Runtime Message-ID: <200412090113.CBC36945@mail-router02.qut.edu.au> John Lam also uses the Profiler API to mutate IL in his Runtime Aspect Weaver. See here: http://www.iunknown.com/000267.html Unfortunately while these techniques are interesting experiments, in their current incarnation (unmanaged, and external to the CLR) they are not particularly useful to language implementers. >From the article: "...but note that its not suited for deployment in a production environment. The reason is that it's based on the Profiling API, which after being registered circumvents the CLR security infrastructure..." Remembering that taking advantage of the benefits of managed execution is one of the biggest reasons for porting a language to a VM like the CLR. Not to mention the potential performance implications. - Doug -----Original Message----- From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, 9 December 2004 7:48 AM To: users-ironpython.com at lists.ironpython.com Subject: [IronPython] IL Rewriting @ Runtime I forgot about this article... http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/ It describes a technique to rewrite IL at runtime. _______________________________________________ users-ironpython.com mailing list users-ironpython.com at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From david.ascher at gmail.com Thu Dec 9 06:43:12 2004 From: david.ascher at gmail.com (David Ascher) Date: Wed, 8 Dec 2004 21:43:12 -0800 Subject: [IronPython] IronPHP Message-ID: FYI, From Miguel's blog: http://numbers.wordnerd.org/blog/index.php?p=19 Last Friday I started writing a PHP to Mono CIL (aka .NET) compiler. I'm making pretty good progress so far. Here's what's been implemented: * arithmetic and string expressions * variables * user defined functions * ?and the while flow control statement At the moment, the parser generates an abstract syntax tree and then walks it to perform an evaluation. When I've completed the parser I'll start looking into using System.Reflection.Emit to actually produce the IL code. Here's a screenshot of what I've got so far: ... From jim at ironpython.com Thu Dec 9 22:36:28 2004 From: jim at ironpython.com (Jim Hugunin) Date: Thu, 9 Dec 2004 13:36:28 -0800 Subject: [IronPython] IL Rewriting @ Runtime In-Reply-To: <200412090113.CBC36945@mail-router02.qut.edu.au> Message-ID: <20041209213632.32ABF14968B@pillage.dreamhost.com> There's another technology in .net that supports IL rewriting at runtime - edit-and-continue. This one requires the debugging API and like the hacks using the profiling API isn't really useful for production use. Both VB and C# will be using this in their debugger modes in VS.Net 2005 to give some of the benefits of making changes on the fly that we're all used to in Python. Here's an msdn article on the feature: http://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dnvs05/ht ml/edit_continue.asp I haven't had a chance yet to play with the underlying APIs, partially because they're only useful for development-time use. I believe that the only way to use EnC today is through the unmanaged debug API, but that's always something that could be wrapped in the future if this is useful. -Jim > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users- > ironpython.com-bounces at lists.ironpython.com] On Behalf Of Douglas > Stockwell > Sent: Wednesday, December 08, 2004 5:14 PM > To: users-ironpython.com at lists.ironpython.com > Subject: RE: [IronPython] IL Rewriting @ Runtime > > John Lam also uses the Profiler API to mutate IL in his Runtime Aspect > Weaver. See here: http://www.iunknown.com/000267.html > > Unfortunately while these techniques are interesting experiments, in their > current incarnation (unmanaged, and external to the CLR) they are not > particularly useful to language implementers. > > >From the article: > > "...but note that its not suited for deployment in a production > environment. > The reason is that it's based on the Profiling API, which after being > registered circumvents the CLR security infrastructure..." > > Remembering that taking advantage of the benefits of managed execution is > one of the biggest reasons for porting a language to a VM like the CLR. > > Not to mention the potential performance implications. > > - Doug > > -----Original Message----- > From: users-ironpython.com-bounces at lists.ironpython.com > [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of > Keith J. Farmer > Sent: Thursday, 9 December 2004 7:48 AM > To: users-ironpython.com at lists.ironpython.com > Subject: [IronPython] IL Rewriting @ Runtime > > I forgot about this article... > > http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/ > > It describes a technique to rewrite IL at runtime. > _______________________________________________ > 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 luismg at gmx.net Mon Dec 13 22:58:36 2004 From: luismg at gmx.net (Luis M. Gonzalez) Date: Mon, 13 Dec 2004 18:58:36 -0300 Subject: [IronPython] Weblog Message-ID: <004f01c4e15e$e9c73ae0$1302a8c0@luis> Hello, I'd like to know if Jim's weblog is still active. It seems that there hasn't been any new entry since October. As for this list, it's been also disconcertingly quiet lately... I wouldn't want to annoy anyone with my questions, but is there any news regarding Ironpython's progress? The suspense is killing me! -------------- next part -------------- An HTML attachment was scrubbed... URL: From fwierzbicki at gmail.com Tue Dec 14 13:33:44 2004 From: fwierzbicki at gmail.com (Frank Wierzbicki) Date: Tue, 14 Dec 2004 07:33:44 -0500 Subject: [IronPython] PyObject.cs in make_meta1.py Message-ID: <4dab5f76041214043334078b59@mail.gmail.com> I was playing with the scripts in ../IronPython-0.6/IronPython/scripts. make_meta1.py looked like a good place to start, but was expecting a file PyObject.cs... Is this script stale or should PyObject.cs just missing from the distro? From krzysztof_wilkosz at poczta.fm Wed Dec 15 22:37:22 2004 From: krzysztof_wilkosz at poczta.fm (Krzysztof Wilkosz) Date: Wed, 15 Dec 2004 22:37:22 +0100 Subject: [IronPython] IronPython like Jython Message-ID: <41C0AE92.4000004@poczta.fm> Hi! Maybe it is not so wise question to ask but... How can I use IronPython as a script language parser for my .NET app (something like: "Python .NET for Applications" - as it is possible with Jython)? I reviewed the code of IronPython 0.6 but I still don`t know: 1. How to prepare C# "API methods" of my app for usage from script? 2. How to invoke such a script in IronPython interpreter? thanks in advance Chris ---------------------------------------------------------------------- Startuj z INTERIA.PL!!! >>> http://link.interia.pl/f1837 From jvm_cop at spamcop.net Thu Dec 16 00:05:00 2004 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 15 Dec 2004 18:05:00 -0500 Subject: [IronPython] IronPython like Jython In-Reply-To: <41C0AE92.4000004@poczta.fm> Message-ID: <4.3.2.7.2.20041215173622.04e3d590@mail.comcast.net> What is the timeframe for your product? At this point, IronPython is not "ready for prime time" -- the official status of the project is [quote] Not finished - IronPython is currently at a pre-alpha stage suitable for experimentation but not for serious development work. [end quote]. It's my impression that the next release could be quite a bit more complete, but there have been no updates to the information on the ironpython.com site since July 28. (Maybe I should look at Jim H's blog before saying that.) I have not looked hard at this, but you might be able to use Python for .NET http://www.zope.org/Members/Brian/PythonNet/ (this is a few .NET assemblies that -- in essence -- let Python 2.4 code call into the CLR). Given that there is discussion of how it might be "embedded" in your .NET app, perhaps you could use it instead, if your goal is to let people write Python code to "script" your app. Unfortunately, I don't think your code would be the same in the two cases. Good luck... At 04:37 PM 12/15/2004, Krzysztof Wilkosz wrote >Hi! > >Maybe it is not so wise question to ask but... > >How can I use IronPython as a script language parser for my .NET app (something like: "Python .NET for Applications" - as it is possible with Jython)? > >I reviewed the code of IronPython 0.6 but I still don`t know: > >1. How to prepare C# "API methods" of my app for usage from script? >2. How to invoke such a script in IronPython interpreter? > >thanks in advance > >Chris J. Merrill / Analytical Software Corp From krzysztof_wilkosz at poczta.fm Thu Dec 16 01:25:55 2004 From: krzysztof_wilkosz at poczta.fm (Krzysztof Wilkosz) Date: Thu, 16 Dec 2004 01:25:55 +0100 Subject: [IronPython] IronPython like Jython In-Reply-To: <4.3.2.7.2.20041215173622.04e3d590@mail.comcast.net> References: <4.3.2.7.2.20041215173622.04e3d590@mail.comcast.net> Message-ID: <41C0D613.6020605@poczta.fm> J. Merrill wrote: > What is the timeframe for your product? At this point, IronPython is not "ready for prime time" -- the official status of the project is [quote] Not finished - IronPython is currently at a pre-alpha stage suitable for experimentation but not for serious development work. [end quote]. It's my impression that the next release could be quite a bit more complete, but there have been no updates to the information on the ironpython.com site since July 28. (Maybe I should look at Jim H's blog before saying that.) I was primarily intending to use IronPython because I am writing article shortly about "How to use Python in .NET Enviroment" targeting usage .NET from Python AND Python from .NET apps (at least C#). For me the most important is the second. It needs not to be a production implementation. I need only a few hits because reading all the code of IronPython is not an acceptable solution for me. My timeframe is ~week. Chris >>How can I use IronPython as a script language parser for my .NET app (something like: "Python .NET for Applications" - as it is possible with Jython)? >> >>I reviewed the code of IronPython 0.6 but I still don`t know: >> >>1. How to prepare C# "API methods" of my app for usage from script? >>2. How to invoke such a script in IronPython interpreter? >> >>thanks in advance >> >>Chris ---------------------------------------------------------------------- Startuj z INTERIA.PL!!! >>> http://link.interia.pl/f1837 From lobrien at knowing.net Thu Dec 16 02:42:16 2004 From: lobrien at knowing.net (Larry O'Brien) Date: Wed, 15 Dec 2004 15:42:16 -1000 Subject: [IronPython] IronPython like Jython In-Reply-To: <41C0D613.6020605@poczta.fm> Message-ID: <20041216014257.0CA02985C2@che.dreamhost.com> >>Python from .NET apps (at least C#). For me the >>most important is the second. It needs not to be a production >>implementation. I need only a few hits because reading all the code of Chris, I have an article coming out on DevX talking about driving IronPython with the Tablet PC. Maybe the following will help. Ignore the OutputQueue -- that's a class that I wrote to capture output, and remove the lines referring to UnparseableStatement -- that's a class that I wrote as well. The methods marked [test] are lifted out of an NUnit class. I'd be happy to share more with you or anyone else if it's helpful. Cheers, Larry O'Brien http://www.knowing.net/ -- using System; using IronPython.AST; using IronPython.Modules; using IronPython.Objects; namespace Pynk.Wrapper { public class FrameHolder { public FrameHolder() { q = new OutputQueue(); sys.path.append(Environment.CurrentDirectory); sys.stdout = q.pythonOut; top = new module(); topFrame = new Frame(top); } OutputQueue q; module top; Frame topFrame; Frame Frame { get { return topFrame; } } public Stmt Parse(string s) { Parser p = Parser.fromString(s); try { Stmt statement = p.parseStmt(); return statement; } catch(Exception ex) { return new UnparseableStatement(ex); } } public string Run(Stmt s) { FrameCode code = SnippetMaker.generate(s, "input"); code.Run(topFrame); string results = q.ReadToEnd(); return results; } public string ParseAndRun(string s) { Stmt stmt = Parse(s); if(stmt.GetType() != typeof(UnparseableStatement)) { string results = Run(stmt); return results; } else { return ""; } } } } -- [Test] public void TestCreateVariable() { FrameHolder fh = new FrameHolder(); string s = "b = 2+2"; string results = fh.ParseAndRun(s); string r2 = fh.ParseAndRun("b"); Assert.AreEqual("4\n",r2); } [Test] public void TestBlock() { FrameHolder fh = new FrameHolder(); string block = "b = [\"Dave\", \"Mark\", \"Ann\", \"Phil\"]"; string results = fh.ParseAndRun(block); block = "for name in b:\n"; block += "\tprint name\n"; string results2 = fh.ParseAndRun(block); Assert.AreEqual("Dave\nMark\nAnn\nPhil\n",results2); } [Test] public void AnonVariable() { FrameHolder fh =new FrameHolder(); string block = "2+2"; string results = fh.ParseAndRun(block); block = "_ * 2"; string r2 = fh.ParseAndRun(block); Assert.AreEqual("8\n",r2); } From nbornstein at gmail.com Thu Dec 23 14:11:55 2004 From: nbornstein at gmail.com (Niel Bornstein) Date: Thu, 23 Dec 2004 08:11:55 -0500 Subject: [IronPython] Writing NUnit tests in FePy Message-ID: <170bf6304122305114b5936d1@mail.gmail.com> Sean McGrath writes about doing JUnit tests in Jython: http://seanmcgrath.blogspot.com/archives/2004_12_19_seanmcgrath_archive.html#110380302705707493 See also this DeveloperWorks article: http://www-106.ibm.com/developerworks/library/j-jythtest.html?ca=dnt-519 Has anyone done anything similar with NUnit and IronPython? The idea is that you write your individual NUnit tests in C# as normal, but use IronPython as a harness to create test suites dynamically. Niel From lobrien at knowing.net Sat Dec 25 01:22:56 2004 From: lobrien at knowing.net (Larry O'Brien) Date: Fri, 24 Dec 2004 14:22:56 -1000 Subject: [IronPython] IronPython + Tablet PC article on DevX Message-ID: <20041225002334.2B470985AE@che.dreamhost.com> My first article on programming the Tablet PC with IronPython (and with IronPython) is now available on DevX: http://www.devx.com/TabletPC/Article/26666 You can download a super-preliminary version of my "Pynk" editor and try it out (depends on Tablet PC SDK 1.7 and IronPython 0.6). There's a brief video with the article, too, showing ink evaluated as a python expression ("pow(2,3)"). Cheers, Larry O'Brien http://www.Knowing.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: