From stan at ertmssolutions.com Thu Dec 1 12:07:23 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Thu, 01 Dec 2005 12:07:23 +0100 Subject: [IronPython] IronPython HTML documentation Message-ID: <438ED96B.2010101@ertmssolutions.com> hello, It would be very nice to have an HTML documentation of IronPython's engine classes. Has anyone done that? Thanks a lot, Stan. -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- From Martin.Maly at microsoft.com Thu Dec 1 22:36:56 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 1 Dec 2005 13:36:56 -0800 Subject: [IronPython] IronPython HTML documentation In-Reply-To: <438ED96B.2010101@ertmssolutions.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57D98B6@df-foxhound-msg.exchange.corp.microsoft.com> Currently, there is no such documentation (that I know of) available. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stanislas Pinte Sent: Thursday, December 01, 2005 3:07 AM To: Discussion of IronPython Subject: [IronPython] IronPython HTML documentation hello, It would be very nice to have an HTML documentation of IronPython's engine classes. Has anyone done that? Thanks a lot, Stan. -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From stan at phidani.be Fri Dec 2 14:53:01 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 2 Dec 2005 14:53:01 +0100 Subject: [IronPython] PythonEngine bug Message-ID: <1133531581.439051bd38df4@webmail.raincode.com> hello, I am having problems importing modules in the PythonEngine: PythonEngine engine = new PythonEngine(); engine.AddToPath(Environment.CurrentDirectory); engine.Import("hop"); Function inc = engine.Evaluate("hop.increment") as Function; whith hop.py being in the current directory, I get: 1) TraceAnalyzer.test.ScriptingTests.TestPythonGlobalVariableUsageAcrossFunctionCalls : IronPython.Objects.PythonAttributeError : 'NoneType' object has no attribute 'increment' Any idea? Thanks a lot, Stan. From stan at phidani.be Fri Dec 2 15:18:26 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 2 Dec 2005 15:18:26 +0100 Subject: [IronPython] PythonEngine bug In-Reply-To: <1133531581.439051bd38df4@webmail.raincode.com> References: <1133531581.439051bd38df4@webmail.raincode.com> Message-ID: <1133533106.439057b27aa99@webmail.raincode.com> Hello, my apologies for the false warning: actually, engine.AddToPath(Environment.CurrentDirectory); will add the directory of the assembly we are running, not the current directory. I don't know if it is the expected behavior or not. Thanks, Stan. Quoting Stanislas Pinte : > hello, > > I am having problems importing modules in the PythonEngine: > > PythonEngine engine = new PythonEngine(); > engine.AddToPath(Environment.CurrentDirectory); > engine.Import("hop"); > Function inc = engine.Evaluate("hop.increment") as Function; > > whith hop.py being in the current directory, I get: > > 1) TraceAnalyzer.test.ScriptingTests.TestPythonGlobalVariableUsageAcrossFunctionCalls : > IronPython.Objects.PythonAttributeError : 'NoneType' object has no attribute 'increment' > > Any idea? > > Thanks a lot, > > Stan. > > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From info at geatec.com Fri Dec 2 21:15:06 2005 From: info at geatec.com (J. de Hooge) Date: Fri, 2 Dec 2005 21:15:06 +0100 Subject: [IronPython] Debugging Message-ID: <000001c5f77d$1632d550$6402a8c0@GEADELL> LS I have a question about debugging IP code. One of the nice and handy things about Python in general is that I can use a very simple and straigth way of debugging in many cases. When I run a script that is not bugfree, Cpython often tells me quite effectively what is wrong and where. Some well placed print statements will often do to find the cause of problems. What really helps here is the fact that there's no compilation and linking delay. IP's error reports were somewhat less clear and complete upto version 0.93, but I could live with them. But ever since I've been using version 0.95, I often find myself completely in the dark when an error occurs. Often the interpreter tells me vaguely what's wrong, but doesn't even bother to add a hint as to where in the code the problem arises. Why this change? Probably I've missed something, maybe an option to IPConsole or something like that. Currently I find it quite timeconsuming to debug code this way. Of course I can use a debugger (which will often take me right into the C# implementation code of IP, but I understand from other postings that I can avoid that by compiling IPConsole etc. without debugging info.) But as said: the very simple and straigth way of debugging using the interpreters exception messages, with just an indication of the problematic line of code, a stack trace and some well placed print statements has been very productive for me. Just starting up the debugger often takes much more time that find an error by means of exception messages used to. Are there any plans to enhance interpreter error reports? Why have they become less complete than in previous versions, e.g. often lacking even line numbers. Or have I indeed missed some configuration possibilities? If so, what are they? Thanks Jacques de Hooge info at geatec.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbera.web at gmail.com Fri Dec 2 22:02:57 2005 From: dbera.web at gmail.com (Debajyoti Bera) Date: Fri, 2 Dec 2005 16:02:57 -0500 Subject: [IronPython] How to use namespace Message-ID: <200512021602.57182.dbera@cs.bu.edu> Hi I couldnt find this in the mailing-list archive. How to create a namespace in ironpython ? I dont think python supports namespaces but is there round about way to create e.g. the following class in ironpython ? (class abcd in namespace mynamespace with method myfunc) namespace mynamespace { class abcd { public void myfunc (int i) { return; } } } -- Debajyoti Bera, Graduate Student, BU-CS @ http://cs-people.bu.edu/dbera/ http://dbera.blogspot.com @ 617-782-1324 (R) 617-358-2354 (O) From Martin.Maly at microsoft.com Sat Dec 3 03:07:43 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 2 Dec 2005 18:07:43 -0800 Subject: [IronPython] How to use namespace In-Reply-To: <200512021602.57182.dbera@cs.bu.edu> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA027@df-foxhound-msg.exchange.corp.microsoft.com> Currently this is not possible. However I feel that as our static compilation story evolves, this is something that will come up as one of the issues to address. Thanks for your input Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Debajyoti Bera Sent: Friday, December 02, 2005 1:03 PM To: users at lists.ironpython.com Subject: [IronPython] How to use namespace Hi I couldnt find this in the mailing-list archive. How to create a namespace in ironpython ? I dont think python supports namespaces but is there round about way to create e.g. the following class in ironpython ? (class abcd in namespace mynamespace with method myfunc) namespace mynamespace { class abcd { public void myfunc (int i) { return; } } } -- Debajyoti Bera, Graduate Student, BU-CS @ http://cs-people.bu.edu/dbera/ http://dbera.blogspot.com @ 617-782-1324 (R) 617-358-2354 (O) _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From edreamleo at charter.net Sat Dec 3 22:03:51 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Sat, 3 Dec 2005 15:03:51 -0600 Subject: [IronPython] Newbie questions & comments Message-ID: <000601c5f84d$107090f0$6400a8c0@EDWARDOFFICE> Hello all, Great looking project. I am eager to start porting Leo to IronPython + Windows Forms. Here are some first thoughts from somebody new to .Net, IronPython, Windows Forms and Gotdotnet :-) 1. It took me two days to find the link to this list. I would have expected the link to be in the left sidebar of the IronPython home page, rather than at the bottom of a news announcement. 2. I just filed a bug report that IronPythonConsole -i whatever.py crashes. I wouldn't have done so had I found this list first. Sorry about that. However, there does not seem to be any discussion in the IronPython tutorial about how to run IronPython from a file. Typing interactively is ok for a start, but how do you execute IronPython on a file? Any help getting started would be appreciated. Thanks! Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From Martin.Maly at microsoft.com Sun Dec 4 03:25:31 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sat, 3 Dec 2005 18:25:31 -0800 Subject: [IronPython] Debugging In-Reply-To: <000001c5f77d$1632d550$6402a8c0@GEADELL> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA0BB@df-foxhound-msg.exchange.corp.microsoft.com> Hello Jacques, I am sorry you find the IronPython errors insufficient. We did make some changes in the error handling code, but didn't observe that the messages would get less clear. My quick test with the IronPython console revealed following issue. Please let me know if that is also what you are experiencing or if there are problems beyond that. Currently when we throw exception, the stack trace doesn't give enough information about the stack frames and functions on the stack: >>> def f(a,b): ... return a/b ... >>> def g(a,b): ... return f(a,b) ... >>> def h(a,b): ... return g(a,b) ... >>> h(1,0) Traceback (most recent call last): at at at at ZeroDivisionError: Attempted to divide by zero. >>> This is an unfortunate bug and we'll fix it. If there are scenarios beyond this one (I tried runnig/importing modules with parse errors, importing modules that generate exception, running modules that throw from the command line) and so far I feel the one problem I see is the one described above. We'll fix this one, thanks for reporting the problem we overlooked! Martin ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Friday, December 02, 2005 12:15 PM To: users at lists.ironpython.com Subject: [IronPython] Debugging LS I have a question about debugging IP code. One of the nice and handy things about Python in general is that I can use a very simple and straigth way of debugging in many cases. When I run a script that is not bugfree, Cpython often tells me quite effectively what is wrong and where. Some well placed print statements will often do to find the cause of problems. What really helps here is the fact that there's no compilation and linking delay. IP's error reports were somewhat less clear and complete upto version 0.93, but I could live with them. But ever since I've been using version 0.95, I often find myself completely in the dark when an error occurs. Often the interpreter tells me vaguely what's wrong, but doesn't even bother to add a hint as to where in the code the problem arises. Why this change? Probably I've missed something, maybe an option to IPConsole or something like that. Currently I find it quite timeconsuming to debug code this way. Of course I can use a debugger (which will often take me right into the C# implementation code of IP, but I understand from other postings that I can avoid that by compiling IPConsole etc. without debugging info.) But as said: the very simple and straigth way of debugging using the interpreters exception messages, with just an indication of the problematic line of code, a stack trace and some well placed print statements has been very productive for me. Just starting up the debugger often takes much more time that find an error by means of exception messages used to. Are there any plans to enhance interpreter error reports? Why have they become less complete than in previous versions, e.g. often lacking even line numbers. Or have I indeed missed some configuration possibilities? If so, what are they? Thanks Jacques de Hooge info at geatec.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Sun Dec 4 03:49:20 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sat, 3 Dec 2005 18:49:20 -0800 Subject: [IronPython] Newbie questions & comments In-Reply-To: <000601c5f84d$107090f0$6400a8c0@EDWARDOFFICE> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA0BD@df-foxhound-msg.exchange.corp.microsoft.com> Hello Edward, I am glad you found the mailing list, I also saw your bug on GotDotNet - Thanks! To run Python script from the file, simply run: IronPythonConsole whatever.py You saw IronPython crash because we assumed (and we should probably check for that) that the command line parameter "-i" was a file name so we tried to run it :) Hope this helps Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Edward K. Ream Sent: Saturday, December 03, 2005 1:04 PM To: IronPython Subject: [IronPython] Newbie questions & comments Hello all, Great looking project. I am eager to start porting Leo to IronPython + Windows Forms. Here are some first thoughts from somebody new to .Net, IronPython, Windows Forms and Gotdotnet :-) 1. It took me two days to find the link to this list. I would have expected the link to be in the left sidebar of the IronPython home page, rather than at the bottom of a news announcement. 2. I just filed a bug report that IronPythonConsole -i whatever.py crashes. I wouldn't have done so had I found this list first. Sorry about that. However, there does not seem to be any discussion in the IronPython tutorial about how to run IronPython from a file. Typing interactively is ok for a start, but how do you execute IronPython on a file? Any help getting started would be appreciated. Thanks! Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From edreamleo at charter.net Sun Dec 4 12:20:56 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Sun, 4 Dec 2005 05:20:56 -0600 Subject: [IronPython] Newbie questions & comments Message-ID: <000e01c5f8c4$cc58b050$6400a8c0@EDWARDOFFICE> > To run Python script from the file, simply run: > IronPythonConsole whatever.py Something strange is happening when I do this. If I invoke IronPythonConsole interactively, I can import winforms. But something different happens when I execute a file. For example, suppose ironPythonTest.py contains: print 'Hello Iron Python!!' import winforms Possible bug 1: If I invoke IronPythonConsole like this: C:\prog\IronPython-0.9.5\bin>IronPythonConsole ironPythonTest.py I get: Hello Iron Python!! Unhandled Exception: No module named winforms Possible bug 2: This generates the XP dialog: 'IronPythonConsole.exe has encountered a problem and needs to close. We are sorry for the inconvenience.' Possible bug 3: The same XP dialog appears if the file does not exist. Possible bug 4: Without a workable -i option it is difficult to run IronPython from a batch file: the console goes away before it is possible to see whatever exception caused IronPython to exist. Anyway, any ideas about what is causing IronPython not to be able to import winforms? Edward P.S. Here is a contents of the console illustrating this strange behavior: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\WINDOWS\system32>cd c:\prog\IronPython-0.9.5 C:\prog\IronPython-0.9.5>bin\IronPythonConsole.exe test.py Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\prog\IronPython-0.9.5\test.py'. File name: 'C:\prog\IronPython-0.9.5\test.py' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, I nt32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at IronPython.AST.Parser.fromFile(String filename) at IronPython.Hosting.PythonEngine.RunFileInNewModule(String fileName, String moduleName) at IronPython.Hosting.PythonEngine.RunFileInNewModule(String fileName) at IronPythonConsole.PythonCommandLine.RunFile(PythonEngine engine, String filename) at IronPythonConsole.PythonCommandLine.Main(String[] rawArgs) C:\prog\IronPython-0.9.5>bin\IronPythonConsole.exe ironPythonTest.py Hello Iron Python!! Unhandled Exception: No module named winforms C:\prog\IronPython-0.9.5> EKR -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From kfarmer at thuban.org Sun Dec 4 13:17:28 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sun, 4 Dec 2005 04:17:28 -0800 Subject: [IronPython] Newbie questions & comments Message-ID: Option: modify the source code to do a Console.ReadKey() before exiting. You could also try dumping the output to a file. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Edward K. Ream Possible bug 4: Without a workable -i option it is difficult to run IronPython from a batch file: the console goes away before it is possible to see whatever exception caused IronPython to exist. From edreamleo at charter.net Sun Dec 4 16:27:31 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Sun, 4 Dec 2005 09:27:31 -0600 Subject: [IronPython] Workaround for -i Message-ID: <000501c5f8e7$3ed6b740$6400a8c0@EDWARDOFFICE> There is an easy workaround for the missing -i option: simply invoke the batch file from an already open console window. That way the console stays open when the batch file dies. Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From rcs1000 at amoral.org Sun Dec 4 23:02:29 2005 From: rcs1000 at amoral.org (Robert Smithson) Date: Sun, 04 Dec 2005 22:02:29 +0000 Subject: [IronPython] Avalon/WinFX Message-ID: <43936775.8040209@amoral.org> Hi, I watched the terrific demo on IronPython with Avalon/WinFX. But I just can't get it to work. It's probably something very simple which I've missed. IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from avalon import * Unhandled exception: >>> Traceback (most recent call last): at System.Threading.ThreadHelper.ThreadStart() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callb ack, Object state) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ThreadStart.Invoke() at System.Threading.ThreadStart(Object ) at avalon.start$f3() in D:\Downloads\IronPython-0.9.5\Tutorial\avalon.py:line 50 AttributeError: 'System.Windows.Application' object has no attribute 'StartingUp' Unhandled Exception: 'System.Windows.Application' object has no attribute 'StartingUp' What am I doing wrong? Many thanks, Robert From rcs1000 at amoral.org Sun Dec 4 23:39:00 2005 From: rcs1000 at amoral.org (Robert Smithson) Date: Sun, 04 Dec 2005 22:39:00 +0000 Subject: [IronPython] Avalon/WinFX Message-ID: <43937004.7040503@amoral.org> OK, I think I found the answer out on my own, and it is rather obvious. I didn't have the WinFX SDK installed, just the run-time. Thanks, Robert From Martin.Maly at microsoft.com Mon Dec 5 07:36:51 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sun, 4 Dec 2005 22:36:51 -0800 Subject: [IronPython] Newbie questions & comments In-Reply-To: <000e01c5f8c4$cc58b050$6400a8c0@EDWARDOFFICE> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA11F@df-foxhound-msg.exchange.corp.microsoft.com> Hi Edward, > Edward K. Ream Wrote: > > Something strange is happening when I do this. If I invoke > IronPythonConsole interactively, I can import winforms. But > something different happens when I execute a file. For > example, suppose ironPythonTest.py contains: > > print 'Hello Iron Python!!' > import winforms Are you trying to import the "winforms.py" that is part of the tutorial? Make sure that when you run the IronPython console, you have the tutorial directory >>> import sys >>> sys.path By default, the sys.path includes current directory and the "bin\Lib" directory. You can add the tutorial directory into the sys.path: sys.path.append(r"C:\prog\IronPython-0.9.5\Tutorial") Or run the console from the tutorial directory. > Possible bug 2: This generates the XP dialog: > 'IronPythonConsole.exe has encountered a problem and needs to > close. We are sorry for the inconvenience.' Currently IronPython passes the exceptions encountered to the OS which results in the dialog box. To fix this is on our todo list. I hope this helps Martin From korpse-ironpython at kaydash.za.net Mon Dec 5 08:03:30 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Mon, 05 Dec 2005 09:03:30 +0200 Subject: [IronPython] Workaround for -i In-Reply-To: <000501c5f8e7$3ed6b740$6400a8c0@EDWARDOFFICE> References: <000501c5f8e7$3ed6b740$6400a8c0@EDWARDOFFICE> Message-ID: <4393E642.105@kaydash.za.net> Edward K. Ream wrote: > There is an easy workaround for the missing -i option: simply invoke the > batch file from an already open console window. That way the console stays > open when the batch file dies. Shouldn't the -i option actually be stopping IronPython from exiting when it's done running the script, so as to allow interactive inspection? Snippet from python.exe -h: -i : inspect interactively after running script, (also PYTHONINSPECT=x) and force prompts, even if stdin does not appear to be a terminal -- Jonathan From dawm at teko.com.pl Mon Dec 5 09:50:09 2005 From: dawm at teko.com.pl (=?iso-8859-2?Q?Miko=B3aj_Dawidowski?=) Date: Mon, 5 Dec 2005 09:50:09 +0100 Subject: [IronPython] IronPython and serializing object and a few questions Message-ID: <20051205085008.196FE1BBFD@che.dreamhost.com> Hello all, .NET and IronPython +WPF is a great combination. Looking forward to use its final version I started educating myself on those 3 and have some questions: 1. How to serialize IronPython objects? I have some apps written in "normal" Python and use gnosis.xml.pickle to save and load data. I tried to load pickle, gnosis.xml.pickle from IronPythonConsole but this is what I got. IronPython 0.9.3 on .NET 2.0.50215.322 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append("c:/python24/lib") >>> sys.path.append("c:/python24/libs") >>> import gnosis.xml.pickle Traceback (most recent call last): at ImportError: No module named gnosis.xml.pickle >>> import pickle Traceback (most recent call last): at at pickle.Initialize() in c:\python24\lib\pickle.py:line 32 ImportError: No module named marshal >>> import cPickle Traceback (most recent call last): at ImportError: No module named cPickle >>> I saw the tutorial in 0.9.5 distro - but sys.LoadAssemblyByName("System.Xml") doesn't do exactly what pickle does, does it? 2. I have .NET with WinFX from September 2005 CTP and IronPython 0.9.3 works but 0.9.5 requries newer .NET. .NET version and WinFX September 2005 CTP IronPython 0.9.3 on .NET 2.0.50215.322 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> This is what 0.9.5 whine: "0.9.5 To run this application, you first must install one of the following versions of the .NET Framework: v2.0.50727" So i guess this is telling me to update my .NET wright? :) Ok, my question is not so pythonic but I think you guys have experience. Do I have to uninstall whole WinFX SDK and after installing new .NET install it again? And the most important: Will WinFX still working with that new .NET ? 3. IronPython generates exec's from scripts. But when executed they crash. Should they work? Maybe the should be ran differently... Best regards and GREAT WORK!! Nick From info at geatec.com Mon Dec 5 12:41:03 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 5 Dec 2005 12:41:03 +0100 Subject: [IronPython] Debugging In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F57DA0BB@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000001c5f990$c6135610$6402a8c0@GEADELL> Martin, Thanks for your reaction. My problems with error reports seem to go beyond what you mention. A brief example of what I mean is below: lotsOfCodeAndImports_dummy = 'allKindsOfInterestingCodeThatMayStillContainBugsIncludingImportsOfModulesTh atMayAlsoStillContainBugs' needleInAHaystack = 3 print needleInAHaystack [] evenMoreCode_dummy = 'evenMoreInterestingCodeThatMayStillContainBugs' CPython tells me: File "C:\activ_dell\prog\fun\src\funTry.py", line 4 print needleInAHayStack [] ^ SyntaxError: invalid syntax IronPython tells me: Unhandled Exception: 'int' object has no attribute '__getitem__' (To be complete it first asks me wether I want to send MS an error report, I choose "Don't send") I am especially bothered by the fact that neither a line number nor a file name are mentioned. The last two weeks I have repeatedly just sprinkeled numerous "print " statements in my sourcecode, using binary search to pin down the error... And I can't use CPython for many of my modules since most of them heavily relies on .NET. By the way, I am aware that error reporting on a product < 1.0 may understandably not yet be perfect. Still I choose to use it because of its obvious potential. Kind regards Jacques de Hooge info at geatec.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Mon Dec 5 18:44:31 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 5 Dec 2005 09:44:31 -0800 Subject: [IronPython] IronPython and serializing object and a few questions In-Reply-To: <20051205085008.196FE1BBFD@che.dreamhost.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA1C3@df-foxhound-msg.exchange.corp.microsoft.com> Hello Miko?aj, > Mikolaj Dawidowski Wrote: > Hello all, > > 1. How to serialize IronPython objects? IronPython doesn't yet come with all built-in modules. We keep adding few of these with each release, but marshal and support for pickle has not yet been implemented. Some of our customers were playing with the XML serialization which, sadly, won't do for the pure Python case. > 2. I have .NET with WinFX from September 2005 CTP and > IronPython 0.9.3 works but 0.9.5 requries newer .NET. Unfortunately, as I am just reading on the MSDN web, the WinFX is not yet available for the .NET 2.0 final release. As soon as .NET 2.0 was released, we switched IronPython over to the final build. > So i guess this is telling me to update my .NET wright? :) Not necessarily. Of course it is one possibility (but then you run the risk of not being able to run WinFX on the 2.0 latest build). What I'd propose you try first is build IronPython from the sources on your installation of .NET. The Beta 2 runtime and SDK are still available on Microsoft downloads: http://www.microsoft.com/downloads/details.aspx?FamilyID=7abd8c8f-287e-4c7e-9a4a-a4ecff40fc8e&DisplayLang=en http://www.microsoft.com/downloads/details.aspx?FamilyID=41070791-8912-4f94-ac46-7ce0e386d5c9&DisplayLang=en > Do I have to uninstall whole WinFX SDK and after installing > new .NET install it again? And the most important: I am honestly not quite sure here. I would try to build IronPython on your setup where WinFX works. In my experience it is easier to get IronPytohn run on other builds of .NET than getting WinFX do the same. > Will WinFX still working with that new .NET ? In my experience, it didn't, but I only gave it a quick try. From what I read with the proper order of installations it actually should, but I wasn't able to get it working so I chose to wait for the CTP that will run on .NET 2.0 final release. > 3. IronPython generates exec's from scripts. But when > executed they crash. > Should they work? Maybe the should be ran differently... They often do. The crash you may be seeing is .NET trying to find the IronPython assemblies. Try copying IronPython.dll and IronMath.dll into the same directory as your generated exe. I know it is far from perfect solution, but as we develop IronPython, we do not want to include the assemblies in the global assembly cache yet. Hope this helps, Martin From Martin.Maly at microsoft.com Mon Dec 5 19:02:12 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 5 Dec 2005 10:02:12 -0800 Subject: [IronPython] Debugging In-Reply-To: <000001c5f990$c6135610$6402a8c0@GEADELL> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA1F1@df-foxhound-msg.exchange.corp.microsoft.com> Jacques, thank you for more details about the issues you are having with IronPython, The reason you see the 'report an error to MS' dialog is our change in exception handling that I described earlier. We are going to fix it for the next release and display the exceptions coming from running scripts in a way that standard Python does. Once we fix that, we should get file and line information for the exceptions, and if not, we'll make sure to fix that too. As for the error below, it is a parser bug that will be easy to fix. Thanks again and I hope that next release of IronPython will work better for you. Martin ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, December 05, 2005 3:41 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] Debugging Martin, Thanks for your reaction. My problems with error reports seem to go beyond what you mention. A brief example of what I mean is below: lotsOfCodeAndImports_dummy = 'allKindsOfInterestingCodeThatMayStillContainBugsIncludingImportsOfModulesThatMayAlsoStillContainBugs' needleInAHaystack = 3 print needleInAHaystack [] evenMoreCode_dummy = 'evenMoreInterestingCodeThatMayStillContainBugs' CPython tells me: File "C:\activ_dell\prog\fun\src\funTry.py", line 4 print needleInAHayStack [] ^ SyntaxError: invalid syntax IronPython tells me: Unhandled Exception: 'int' object has no attribute '__getitem__' (To be complete it first asks me wether I want to send MS an error report, I choose "Don't send") I am especially bothered by the fact that neither a line number nor a file name are mentioned. The last two weeks I have repeatedly just sprinkeled numerous "print " statements in my sourcecode, using binary search to pin down the error... And I can't use CPython for many of my modules since most of them heavily relies on .NET. By the way, I am aware that error reporting on a product < 1.0 may understandably not yet be perfect. Still I choose to use it because of its obvious potential. Kind regards Jacques de Hooge info at geatec.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From edreamleo at charter.net Mon Dec 5 21:00:42 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Mon, 5 Dec 2005 14:00:42 -0600 Subject: [IronPython] Workaround for -i References: <000501c5f8e7$3ed6b740$6400a8c0@EDWARDOFFICE> <4393E642.105@kaydash.za.net> Message-ID: <001101c5f9d6$9ad2a1e0$6400a8c0@EDWARDOFFICE> > Shouldn't the -i option actually be stopping IronPython from exiting Right. That's why opening IronPython from a console is a workaround, not a fix. Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From dawm at teko.com.pl Tue Dec 6 09:07:02 2005 From: dawm at teko.com.pl (=?iso-8859-2?Q?Miko=B3aj_Dawidowski?=) Date: Tue, 6 Dec 2005 09:07:02 +0100 Subject: [IronPython] IronPython and serializing object and a few questions Message-ID: <20051206080703.3C8AC1BB6D@che.dreamhost.com> Thank you very much for your answers. I rebuild IronPython from source. It went very well and fast (it realy amazes me). And IronPythonConsole works now, great! I launched an WinForms sample, it worked too. However a crash ocurrs when trying running avalon sample. I run tests from the IronPython095 package and it stopped at "conversions". Since I don't know if this is ok or not I just place it below: ------------------------------------------ IronPython 0.9.5 on .NET 2.0.50215.322 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append('c:/ironpython/scripts') >>> import TestAll >>> TestAll.main() ======================================================= Testing ParrotBench suite long ======================================================= ParrotBench !!! SKIP !!! ======================================================= ======================================================= Testing Pystone suite long ======================================================= Pystone !!! SKIP !!! ======================================================= ======================================================= Testing IronPython suite long Running Arithmetics ... PASS Running Assert ... PASS Running Attrs ... PASS Running BadAssign ... PASS Running BigInt ... PASS Running BindingTest ... PASS Running Builtin ... PASS Running calls ... PASS Running Classes ... PASS Running Closures ... PASS Running conversions ...Traceback (most recent call last): at at TestAll.main$f17() in c:\ironpython\scripts\TestAll.py:line 177 at TestAll.runtesttrack$f16(Object results, Object test, Object msg) in c:\ir onpython\scripts\TestAll.py:line 170 at TestAll.runtest$f14(Object test, Object msg) in c:\ironpython\scripts\Test All.py:line 151 at TestAll.exectest$f13(Object test, Object testtype) in c:\ironpython\script s\TestAll.py:line 140 at TestAll.ironpython$f9(Object test) in c:\ironpython\scripts\TestAll.py:lin e 106 at irontestsuite.run$f20(Object type) in c:\ironpython\Scripts\Tests\irontest suite.py:line 85 at conversions.Initialize() in c:\ironpython\Scripts\Tests\conversions.py:lin e 72 at conversions.x$f149(Object self) in c:\ironpython\Scripts\Tests\conversions .py:line 50 at System.Single.Parse(String s) at IronPython.Objects.ReflectedMethodBase. Invoke(MethodBinding binding) at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info) at System.Number.ParseSingle(String value, NumberStyles options, NumberFormat Info numfmt) at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffe r& number, NumberFormatInfo info, Boolean parseDecimal) System.FormatException: Input string was not in a correct format. >>> ------------------------------------------ Adding IronPython dlls to execs helped, thanks. Its working great. Thanks and best regards Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From korpse-ironpython at kaydash.za.net Tue Dec 6 09:41:12 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Tue, 06 Dec 2005 10:41:12 +0200 Subject: [IronPython] Workaround for -i In-Reply-To: <001101c5f9d6$9ad2a1e0$6400a8c0@EDWARDOFFICE> References: <000501c5f8e7$3ed6b740$6400a8c0@EDWARDOFFICE> <4393E642.105@kaydash.za.net> <001101c5f9d6$9ad2a1e0$6400a8c0@EDWARDOFFICE> Message-ID: <43954EA8.1030007@kaydash.za.net> Edward K. Ream wrote: >> Shouldn't the -i option actually be stopping IronPython from exiting > > Right. That's why opening IronPython from a console is a workaround, not a > fix. Technically, a workaround should provide a temporary fix. Simply stopping the console window from disappearing altogether does not allow you to inspect interactively, which is the main point of -i. -- Jonathan From kfarmer at thuban.org Tue Dec 6 11:06:05 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Tue, 6 Dec 2005 02:06:05 -0800 Subject: [IronPython] IronPython and serializing object and a few questions Message-ID: WinFx for .NET 2.0 RTM was released a couple weeks ago: http://www.microsoft.com/downloads/details.aspx?familyid=E5376297-DA10-4 FC3-967D-38C96F767FC4&displaylang=en ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Monday, 05 December 2005 09:45 Unfortunately, as I am just reading on the MSDN web, the WinFX is not yet available for the .NET 2.0 final release. As soon as .NET 2.0 was released, we switched IronPython over to the final build. From Martin.Maly at microsoft.com Tue Dec 6 15:51:57 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 6 Dec 2005 06:51:57 -0800 Subject: [IronPython] IronPython and serializing object and a few questions In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA767@df-foxhound-msg.exchange.corp.microsoft.com> I stand corrected. Thank you Keith! This should make life much easier. Martin > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of > Keith J. Farmer > Sent: Tuesday, December 06, 2005 2:06 AM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython and serializing object > and a few questions > > WinFx for .NET 2.0 RTM was released a couple weeks ago: > http://www.microsoft.com/downloads/details.aspx?familyid=E5376 > 297-DA10-4 > FC3-967D-38C96F767FC4&displaylang=en > ----- > Keith J. Farmer // kfarmer at thuban.org > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly > Sent: Monday, 05 December 2005 09:45 > > Unfortunately, as I am just reading on the MSDN web, the > WinFX is not yet available for the .NET 2.0 final release. As > soon as .NET 2.0 was released, we switched IronPython over to > the final build. > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Martin.Maly at microsoft.com Tue Dec 6 16:05:41 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 6 Dec 2005 07:05:41 -0800 Subject: [IronPython] IronPython and serializing object and a few questions In-Reply-To: <20051206080703.3C8AC1BB6D@che.dreamhost.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA76A@df-foxhound-msg.exchange.corp.microsoft.com> The only thing I can think of is the locale difference because the code that fails is trying to parse float point number. It is actually a bug in the test code itself. We need to parse in a culture invariant way (pass extra parameter to the Parse method). Now that Keith corrected me and found the November CTP of WinFX, you may get better luck running WinFX code with the new build. Nowever, I would be interested to see the avalon sample crash stack trace. Thanks Martin ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mikolaj Dawidowski Sent: Tuesday, December 06, 2005 12:07 AM To: users at lists.ironpython.com Subject: Re: [IronPython] IronPython and serializing object and a few questions Thank you very much for your answers. I rebuild IronPython from source. It went very well and fast (it realy amazes me). And IronPythonConsole works now, great! I launched an WinForms sample, it worked too. However a crash ocurrs when trying running avalon sample. I run tests from the IronPython095 package and it stopped at "conversions". Since I don't know if this is ok or not I just place it below: ------------------------------------------ IronPython 0.9.5 on .NET 2.0.50215.322 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append('c:/ironpython/scripts') >>> import TestAll >>> TestAll.main() ======================================================= Testing ParrotBench suite long ======================================================= ParrotBench !!! SKIP !!! ======================================================= ======================================================= Testing Pystone suite long ======================================================= Pystone !!! SKIP !!! ======================================================= ======================================================= Testing IronPython suite long Running Arithmetics ... PASS Running Assert ... PASS Running Attrs ... PASS Running BadAssign ... PASS Running BigInt ... PASS Running BindingTest ... PASS Running Builtin ... PASS Running calls ... PASS Running Classes ... PASS Running Closures ... PASS Running conversions ...Traceback (most recent call last): at at TestAll.main$f17() in c:\ironpython\scripts\TestAll.py:line 177 at TestAll.runtesttrack$f16(Object results, Object test, Object msg) in c:\ir onpython\scripts\TestAll.py:line 170 at TestAll.runtest$f14(Object test, Object msg) in c:\ironpython\scripts\Test All.py:line 151 at TestAll.exectest$f13(Object test, Object testtype) in c:\ironpython\script s\TestAll.py:line 140 at TestAll.ironpython$f9(Object test) in c:\ironpython\scripts\TestAll.py:lin e 106 at irontestsuite.run$f20(Object type) in c:\ironpython\Scripts\Tests\irontest suite.py:line 85 at conversions.Initialize() in c:\ironpython\Scripts\Tests\conversions.py:lin e 72 at conversions.x$f149(Object self) in c:\ironpython\Scripts\Tests\conversions .py:line 50 at System.Single.Parse(String s) at IronPython.Objects.ReflectedMethodBase. Invoke(MethodBinding binding) at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info) at System.Number.ParseSingle(String value, NumberStyles options, NumberFormat Info numfmt) at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffe r& number, NumberFormatInfo info, Boolean parseDecimal) System.FormatException: Input string was not in a correct format. >>> ------------------------------------------ Adding IronPython dlls to execs helped, thanks. Its working great. Thanks and best regards Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan at ertmssolutions.com Fri Dec 2 15:02:58 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Fri, 2 Dec 2005 15:02:58 +0100 Subject: [IronPython] sys.path.append("c:/Python24/Lib") throw SyntaxError Message-ID: <1133532178.439054126b920@webmail.raincode.com> > /cygdrive/c/Program\ Files/IronPython-0.9.5/bin/IronPythonConsole.exe IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys >>> sys.path.append("c:/Python24/Lib") Traceback (most recent call last): SyntaxError: unexpected token bad character '?' at :1 >>> -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- From stan at ertmssolutions.com Fri Dec 2 15:17:48 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Fri, 2 Dec 2005 15:17:48 +0100 Subject: [IronPython] Solved: Re: PythonEngine bug In-Reply-To: <1133531581.439051bd38df4@webmail.raincode.com> References: <1133531581.439051bd38df4@webmail.raincode.com> Message-ID: <1133533068.4390578c875c4@webmail.raincode.com> Hello, my apologies for the false warning: actually, engine.AddToPath(Environment.CurrentDirectory); will add the directory of the assembly we are running, not the current directory. I don't know if it is the expected behavior or not. Thanks, Stan. Quoting Stanislas Pinte : > hello, > > I am having problems importing modules in the PythonEngine: > > PythonEngine engine = new PythonEngine(); > engine.AddToPath(Environment.CurrentDirectory); > engine.Import("hop"); > Function inc = engine.Evaluate("hop.increment") as Function; > > whith hop.py being in the current directory, I get: > > 1) TraceAnalyzer.test.ScriptingTests.TestPythonGlobalVariableUsageAcrossFunctionCalls : > IronPython.Objects.PythonAttributeError : 'NoneType' object has no attribute 'increment' > > Any idea? > > Thanks a lot, > > Stan. > > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- From Martin.Maly at microsoft.com Tue Dec 6 16:22:52 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 6 Dec 2005 07:22:52 -0800 Subject: [IronPython] Solved: Re: PythonEngine bug In-Reply-To: <1133533068.4390578c875c4@webmail.raincode.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA76B@df-foxhound-msg.exchange.corp.microsoft.com> Actually, Environment.CurrentDirectory does return current directory, not the directory of the running assembly: C:\Ip>ip IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import System >>> System.Environment.CurrentDirectory 'C:\\Ip' >>> System.Environment.CommandLine 'C:\\Ip\\IronPython\\Src\\Bin\\IronPythonConsole.exe' Martin > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of > Stanislas Pinte > Sent: Friday, December 02, 2005 6:18 AM > To: Discussion of IronPython > Subject: [IronPython] Solved: Re: PythonEngine bug > > Hello, > > my apologies for the false warning: > > actually, > > engine.AddToPath(Environment.CurrentDirectory); > > will add the directory of the assembly we are running, not > the current directory. > > I don't know if it is the expected behavior or not. > > Thanks, > > Stan. From edreamleo at charter.net Tue Dec 6 16:28:46 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Tue, 6 Dec 2005 09:28:46 -0600 Subject: [IronPython] Newbie questions & comments References: <5C0A6F919D675745BB1DBA7412DB68F57DA11F@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <001b01c5fa79$c15272c0$6400a8c0@EDWARDOFFICE> > > Are you trying to import the "winforms.py" that is part of the tutorial? > > [snip] Running my batch file from the Tutorial directory does indeed make winforms available. Thanks! Alas, winforms itself does not work properly when started inside my batch file. The window freezes. Here is the contents of my batch file: cd c:\prog\IronPython-0.9.5\Tutorial ..\bin\IronPythonConsole c:\prog\leoCVS\leo\test\ironPythonTest.py Here is the contents of the test file that freezes: [starts] print 'Let the wild rumpus start!' import winforms from System.Windows.Forms import * from System.Drawing import * def click(*args): print args f = System.Windows.Forms.Form() f.Click += click f.Show() print 'done' [ends] The window appears and 'done' is printed immediately. However, clicking in the window brings up the XP "This program is not responding" window. It seems that the following code in winforms.py is not working as expected: t = Thread(thread_proc) t.Start() Here is another attempt: [starts] print 'Let the wild rumpus start!' import sys import System sys.LoadAssemblyByName("System.Windows.Forms") sys.LoadAssemblyByName("System.Drawing") def click(*args): print args f = System.Windows.Forms.Form() f.Click += click f.Show() print 'done' [ends] In this case the window appears (very fleetingly, I think), and the 'done' message appears and that's all. Presumably this is 'correct': the code wasn't run in a separate thread. Consider the Windows Forms tutorial at: http://samples.gotdotnet.com/quickstart/winforms/ The c# code is: namespace Microsoft.Samples.WinForms.Cs.SimpleHelloWorld { using System; using System.Windows.Forms; public class SimpleHelloWorld : Form { [STAThread] public static int Main(string[] args) { Application.Run(new SimpleHelloWorld()); return 0; } public SimpleHelloWorld() { this.Text = "Hello World"; } } } Obviously, something involving threads is happening, but a newbie isn't going to know how to do this in IronPython. BTW, I assume eventually there will be a Python tab for all these examples :-) So from my mostly ignorant viewpoint it appears that: - there is a problem with the thread code in winforms.py - the IronPython tutorial doesn't tell how to run a Hello World IronPython program from a batch file. Any help would be appreciated. Thanks. Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From Martin.Maly at microsoft.com Tue Dec 6 17:12:45 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 6 Dec 2005 08:12:45 -0800 Subject: [IronPython] Newbie questions & comments In-Reply-To: <001b01c5fa79$c15272c0$6400a8c0@EDWARDOFFICE> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F57DA782@df-foxhound-msg.exchange.corp.microsoft.com> Hello Edward > Edward K. Ream Wrote: > > Alas, winforms itself does not work properly when started > inside my batch file. The window freezes. Here is the > contents of my batch file: > > cd c:\prog\IronPython-0.9.5\Tutorial > ..\bin\IronPythonConsole c:\prog\leoCVS\leo\test\ironPythonTest.py > > Here is the contents of the test file that freezes: > > [starts] > print 'Let the wild rumpus start!' > > import winforms > from System.Windows.Forms import * > from System.Drawing import * > > def click(*args): print args > > f = System.Windows.Forms.Form() > f.Click += click > f.Show() > > print 'done' > [ends] > > The window appears and 'done' is printed immediately. > However, clicking in the window brings up the XP "This > program is not responding" window. It seems that the > following code in winforms.py is not working as expected: > > t = Thread(thread_proc) > t.Start() The purpose of the winforms.py in the tutorial is to start a new thread that will pump windows messages in the interactive mode so that you can construct WinForms application interactively from the console. The console thread is tied down by the character operations so it cannot pump messages. When you run an WinForms script, there is no need to set up this second thread. So the code above would work well if entered interactively from the console. > Here is another attempt: > > [starts] > print 'Let the wild rumpus start!' > > import sys > import System > sys.LoadAssemblyByName("System.Windows.Forms") > sys.LoadAssemblyByName("System.Drawing") > > def click(*args): print args > > f = System.Windows.Forms.Form() > f.Click += click > f.Show() > > print 'done' > [ends] > In this case the window appears (very fleetingly, I think), > and the 'done' > message appears and that's all. Presumably this is > 'correct': the code wasn't run in a separate thread. This is actually almost exactly what you need. There is one line missing at the end, after you show the form: System.Windows.Forms.Application.Run() That will start the message pump and your window will stay up, receiving messages. Alternatively, you can follow the C# sample below and run the following script: import sys import System sys.LoadAssemblyByName("System.Windows.Forms") def click(*args): print args f = System.Windows.Forms.Form() f.Click += click System.Windows.Forms.Application.Run(f) print 'done' The advantage being that if you close the form, the message loop will terminate. In the first case, you have to terminate the application explicitly by calling Application.Exit() from one of your event handlers, for example: import sys import System sys.LoadAssemblyByName("System.Windows.Forms") def click(*args): System.Windows.Forms.Application.Exit() f = System.Windows.Forms.Form() f.Click += click f.Show() System.Windows.Forms.Application.Run() > Consider the Windows Forms tutorial at: > > http://samples.gotdotnet.com/quickstart/winforms/ > > The c# code is: > > namespace Microsoft.Samples.WinForms.Cs.SimpleHelloWorld { > using System; > using System.Windows.Forms; > > public class SimpleHelloWorld : Form { > > [STAThread] > public static int Main(string[] args) { > Application.Run(new SimpleHelloWorld()); > return 0; > } > > public SimpleHelloWorld() { > this.Text = "Hello World"; > } > } > } > > Obviously, something involving threads is happening, but a > newbie isn't going to know how to do this in IronPython. > BTW, I assume eventually there will be a Python tab for all > these examples :-) > > So from my mostly ignorant viewpoint it appears that: > > - there is a problem with the thread code in winforms.py > > - the IronPython tutorial doesn't tell how to run a Hello > World IronPython program from a batch file. > Thanks for this feedback, we'll think about how to make the examples clearer. Martin From edreamleo at charter.net Tue Dec 6 18:03:04 2005 From: edreamleo at charter.net (Edward K. Ream) Date: Tue, 6 Dec 2005 11:03:04 -0600 Subject: [IronPython] Newbie questions & comments References: <5C0A6F919D675745BB1DBA7412DB68F57DA782@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000c01c5fa86$ef11ccd0$6400a8c0@EDWARDOFFICE> The wild rumpus has started! Many thanks for your help. The code samples you suggested do indeed work. > Thanks for this feedback, we'll think about how to make the examples > clearer. You are welcome. I am reminded of the scene in the book 'The right stuff' where the test pilot can fly any plane just by asking two questions: 'How do you start this thing?' and 'is there anything else I should know?' :-) >From my point of view, the analog is learning how to fire up a program from a file instead of interactively. BTW, the following is not necessary in these examples: sys.LoadAssemblyByName("System.Drawing") Edward -------------------------------------------------------------------- Edward K. Ream email: edreamleo at charter.net Leo: http://webpages.charter.net/edreamleo/front.html -------------------------------------------------------------------- From jimhug at exchange.microsoft.com Tue Dec 6 22:09:22 2005 From: jimhug at exchange.microsoft.com (Jim Hugunin) Date: Tue, 6 Dec 2005 13:09:22 -0800 Subject: [IronPython] Workaround for -i In-Reply-To: <43954EA8.1030007@kaydash.za.net> Message-ID: The workaround that I use is execfile, i.e. > IronPythonConsole >>> execfile('foo.py') This is exactly what python -i foo.py does for you. -Jim -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs Sent: Tuesday, December 06, 2005 12:41 AM To: Discussion of IronPython Subject: Re: [IronPython] Workaround for -i Edward K. Ream wrote: >> Shouldn't the -i option actually be stopping IronPython from exiting > > Right. That's why opening IronPython from a console is a workaround, not a > fix. Technically, a workaround should provide a temporary fix. Simply stopping the console window from disappearing altogether does not allow you to inspect interactively, which is the main point of -i. -- Jonathan _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From stan at ertmssolutions.com Wed Dec 7 17:37:57 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Wed, 07 Dec 2005 17:37:57 +0100 Subject: [IronPython] Next release question. [WAS: Re: Debugging] In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F57DA1F1@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F57DA1F1@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43970FE5.8040007@ertmssolutions.com> Martin Maly wrote: > Jacques, thank you for more details about the issues you are having with > IronPython, > > The reason you see the 'report an error to MS' dialog is our change in > exception handling that I described earlier. We are going to fix it for > the next release and display the exceptions coming from running scripts > in a way that standard Python does. hello, any agenda for the next release? Is there a development list we can follow to learn more about progress?? The correct reporting of exceptions is critical to us, as we use IronPython as an embedded scripting engine. thanks a lot, Stan. > Once we fix that, we should get file and line information for the > exceptions, and if not, we'll make sure to fix that too. > > As for the error below, it is a parser bug that will be easy to fix. > > Thanks again and I hope that next release of IronPython will work better > for you. > > Martin > --------------------------- From Martin.Maly at microsoft.com Thu Dec 8 01:35:19 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 7 Dec 2005 16:35:19 -0800 Subject: [IronPython] Next release question. [WAS: Re: Debugging] In-Reply-To: <43970FE5.8040007@ertmssolutions.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889C25@df-foxhound-msg.exchange.corp.microsoft.com> The only public list that we have is the progress we are making on the Python regression tests (on channel9 wiki http://channel9.msdn.com/wiki/default.aspx/IronPython.RegressionTests) As for the agenda, we still focus on getting more of the CPython regression tests running and fixing problems that impact our users most. For example the exception reporting is already fixed and will be out in the upcoming release. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stanislas Pinte Sent: Wednesday, December 07, 2005 8:38 AM To: Discussion of IronPython Subject: [IronPython] Next release question. [WAS: Re: Debugging] Martin Maly wrote: > Jacques, thank you for more details about the issues you are having with > IronPython, > > The reason you see the 'report an error to MS' dialog is our change in > exception handling that I described earlier. We are going to fix it for > the next release and display the exceptions coming from running scripts > in a way that standard Python does. hello, any agenda for the next release? Is there a development list we can follow to learn more about progress?? The correct reporting of exceptions is critical to us, as we use IronPython as an embedded scripting engine. thanks a lot, Stan. > Once we fix that, we should get file and line information for the > exceptions, and if not, we'll make sure to fix that too. > > As for the error below, it is a parser bug that will be easy to fix. > > Thanks again and I hope that next release of IronPython will work better > for you. > > Martin > --------------------------- _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From stan at ertmssolutions.com Thu Dec 8 11:19:31 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Thu, 08 Dec 2005 11:19:31 +0100 Subject: [IronPython] Next release question. [WAS: Re: Debugging] In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5889C25@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5889C25@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <439808B3.7030703@ertmssolutions.com> Thanks Martin! I'll make sure I check the wiki. Thanks for the wonderful work anyway. Stan. Martin Maly wrote: > The only public list that we have is the progress we are making on the Python regression tests (on channel9 wiki http://channel9.msdn.com/wiki/default.aspx/IronPython.RegressionTests) > > As for the agenda, we still focus on getting more of the CPython regression tests running and fixing problems that impact our users most. For example the exception reporting is already fixed and will be out in the upcoming release. > > Martin > > -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- From giles.thomas at resolversystems.com Thu Dec 8 12:32:28 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Thu, 08 Dec 2005 11:32:28 +0000 Subject: [IronPython] NUnit with IronPython Message-ID: <439819CC.9050901@resolversystems.com> Hi, Has anyone got IronPython to work with NUnit? The thing that's blocking me is how to associate the "TestFixture" attribute with the class and the "Test" attribute with the methods. I suspect I may be missing something fundamental... Regards, Giles From Martin.Maly at microsoft.com Thu Dec 8 16:52:59 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 8 Dec 2005 07:52:59 -0800 Subject: [IronPython] NUnit with IronPython In-Reply-To: <439819CC.9050901@resolversystems.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889DDC@df-foxhound-msg.exchange.corp.microsoft.com> .NET Attributes on classes/methods are something we yet have to find the right answer to. At this point, there is not a way to put attributes on the classes/methods/... that IronPython generates. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Thursday, December 08, 2005 3:32 AM To: Discussion of IronPython Subject: [IronPython] NUnit with IronPython Hi, Has anyone got IronPython to work with NUnit? The thing that's blocking me is how to associate the "TestFixture" attribute with the class and the "Test" attribute with the methods. I suspect I may be missing something fundamental... Regards, Giles _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From giles.thomas at resolversystems.com Thu Dec 8 17:04:00 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Thu, 08 Dec 2005 16:04:00 +0000 Subject: [IronPython] NUnit with IronPython In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5889DDC@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5889DDC@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43985970.4000408@resolversystems.com> Thanks, Martin. I guess this means we can't use NUnit for now. Regards, Giles Martin Maly wrote: > .NET Attributes on classes/methods are something we yet have to find the right answer to. At this point, there is not a way to put attributes on the classes/methods/... that IronPython generates. > > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Thursday, December 08, 2005 3:32 AM > To: Discussion of IronPython > Subject: [IronPython] NUnit with IronPython > > Hi, > > Has anyone got IronPython to work with NUnit? The thing that's blocking > me is how to associate the "TestFixture" attribute with the class and > the "Test" attribute with the methods. > > I suspect I may be missing something fundamental... > > > Regards, > > Giles > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From giles.thomas at resolversystems.com Thu Dec 8 18:33:32 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Thu, 08 Dec 2005 17:33:32 +0000 Subject: [IronPython] IronPython IDE In-Reply-To: <439819CC.9050901@resolversystems.com> References: <439819CC.9050901@resolversystems.com> Message-ID: <43986E6C.50208@resolversystems.com> Hi all, Another question - what are people using to edit/debug IronPython code? My most recent projects have all been with Java using IntelliJ, and I've only just moved over to .NET. I'm told that Visual Studio 2005 is a good IDE - but it appears that it only supports C# and Visual Basic. Right now I'm using TextPad with a Python syntax highlighing configuration file, but if there's anything better out there - or if my understanding wrt VS2005 is wrong - then I'd love to hear about it! Cheers, Giles From kfarmer at thuban.org Thu Dec 8 18:45:31 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 8 Dec 2005 09:45:31 -0800 Subject: [IronPython] NUnit with IronPython Message-ID: For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Thursday, 08 December 2005 08:04 To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Thanks, Martin. I guess this means we can't use NUnit for now. From kfarmer at thuban.org Thu Dec 8 18:47:59 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 8 Dec 2005 09:47:59 -0800 Subject: [IronPython] Next release question. [WAS: Re: Debugging] Message-ID: Is it possible to list the tests that are scheduled for the next build, or are they done as you think of them? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Wednesday, 07 December 2005 16:35 To: Discussion of IronPython Subject: Re: [IronPython] Next release question. [WAS: Re: Debugging] The only public list that we have is the progress we are making on the Python regression tests (on channel9 wiki http://channel9.msdn.com/wiki/default.aspx/IronPython.RegressionTests) From Martin.Maly at microsoft.com Thu Dec 8 18:55:07 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 8 Dec 2005 09:55:07 -0800 Subject: [IronPython] NUnit with IronPython In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889E75@df-foxhound-msg.exchange.corp.microsoft.com> This is, sadly, true. IronPython will not preserve the name of the method as we know it... Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 9:46 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Thursday, 08 December 2005 08:04 To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Thanks, Martin. I guess this means we can't use NUnit for now. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From william at resolversystems.com Thu Dec 8 19:02:27 2005 From: william at resolversystems.com (William Reade) Date: Thu, 08 Dec 2005 18:02:27 +0000 Subject: [IronPython] NUnit with IronPython In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5889E75@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5889E75@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43987533.6080308@resolversystems.com> Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? William Martin Maly wrote: >This is, sadly, true. IronPython will not preserve the name of the method as we know it... > >Martin > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer >Sent: Thursday, December 08, 2005 9:46 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? > >----- >Keith J. Farmer // kfarmer at thuban.org > > From Martin.Maly at microsoft.com Thu Dec 8 19:01:58 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 8 Dec 2005 10:01:58 -0800 Subject: [IronPython] Next release question. [WAS: Re: Debugging] In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889E7E@df-foxhound-msg.exchange.corp.microsoft.com> We pretty much do them as we think of them with the focus on tests that require changes in the IronPython engine to get passing. Right now we are working mostly on the 6 core tests listed in the regrtest.py (test_grammar, test_opcodes, test_operations, test_builtin, test_exceptions and test_types). Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 9:48 AM To: Discussion of IronPython Subject: Re: [IronPython] Next release question. [WAS: Re: Debugging] Is it possible to list the tests that are scheduled for the next build, or are they done as you think of them? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Wednesday, 07 December 2005 16:35 To: Discussion of IronPython Subject: Re: [IronPython] Next release question. [WAS: Re: Debugging] The only public list that we have is the progress we are making on the Python regression tests (on channel9 wiki http://channel9.msdn.com/wiki/default.aspx/IronPython.RegressionTests) _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Thu Dec 8 19:08:27 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 8 Dec 2005 10:08:27 -0800 Subject: [IronPython] NUnit with IronPython In-Reply-To: <43987533.6080308@resolversystems.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889E95@df-foxhound-msg.exchange.corp.microsoft.com> IronPython mangles names. For example: def method(): return 1 Produces: public static object method$f0() The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, December 08, 2005 10:02 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? William Martin Maly wrote: >This is, sadly, true. IronPython will not preserve the name of the method as we know it... > >Martin > >-----Original Message----- >From: users-bounces at lists.ironpython.com >[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. >Farmer >Sent: Thursday, December 08, 2005 9:46 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? > >----- >Keith J. Farmer // kfarmer at thuban.org > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From william at resolversystems.com Thu Dec 8 19:38:19 2005 From: william at resolversystems.com (William Reade) Date: Thu, 08 Dec 2005 18:38:19 +0000 Subject: [IronPython] NUnit with IronPython In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5889E95@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5889E95@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43987D9B.6090201@resolversystems.com> Sadly, NUnit won't run static methods, so that won't work, but thank you anyway. Are class names similarly mangled? If there's any documentation on this, I'd really appreciate a pointer to it, as I haven't been able to find much help elsewhere... or is it just a matter of hunting through the source? William Martin Maly wrote: >IronPython mangles names. For example: > >def method(): > return 1 > >Produces: > >public static object method$f0() > >The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. > >Martin > > >-----Original Message----- >From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade >Sent: Thursday, December 08, 2005 10:02 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? > >William > >Martin Maly wrote: > > > >>This is, sadly, true. IronPython will not preserve the name of the method as we know it... >> >>Martin >> >>-----Original Message----- >>From: users-bounces at lists.ironpython.com >>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. >>Farmer >>Sent: Thursday, December 08, 2005 9:46 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] NUnit with IronPython >> >>For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? >> >>----- >>Keith J. Farmer // kfarmer at thuban.org >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From Martin.Maly at microsoft.com Thu Dec 8 19:56:18 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 8 Dec 2005 10:56:18 -0800 Subject: [IronPython] NUnit with IronPython In-Reply-To: <43987D9B.6090201@resolversystems.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5889F19@df-foxhound-msg.exchange.corp.microsoft.com> Name mangling for classes is not complicated. What makes it harder is not the naming, it is the way the classes are compiled. Class gets generated as a static function named: $maker that creates the class (the type) at runtime. Other than source code and exploration of generated binaries using ildasm or reflector, we don't currently have documentation on this, unfortunately. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, December 08, 2005 10:38 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Sadly, NUnit won't run static methods, so that won't work, but thank you anyway. Are class names similarly mangled? If there's any documentation on this, I'd really appreciate a pointer to it, as I haven't been able to find much help elsewhere... or is it just a matter of hunting through the source? William Martin Maly wrote: >IronPython mangles names. For example: > >def method(): > return 1 > >Produces: > >public static object method$f0() > >The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. > >Martin > > >-----Original Message----- >From: users-bounces at lists.ironpython.com >[mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade >Sent: Thursday, December 08, 2005 10:02 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? > >William > >Martin Maly wrote: > > > >>This is, sadly, true. IronPython will not preserve the name of the method as we know it... >> >>Martin >> >>-----Original Message----- >>From: users-bounces at lists.ironpython.com >>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. >>Farmer >>Sent: Thursday, December 08, 2005 9:46 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] NUnit with IronPython >> >>For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? >> >>----- >>Keith J. Farmer // kfarmer at thuban.org >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Thu Dec 8 20:06:09 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 8 Dec 2005 11:06:09 -0800 Subject: [IronPython] NUnit with IronPython Message-ID: Assuming IP is going for the .NET producer route, what's the tact for exposing CLR classes with CLR methods? EG, would there be a 'fixed' (as in 'non-dynamic') form of method and field which won't mangle the name, allowing it to be exposed? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Thursday, 08 December 2005 10:56 To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Name mangling for classes is not complicated. What makes it harder is not the naming, it is the way the classes are compiled. Class gets generated as a static function named: $maker that creates the class (the type) at runtime. Other than source code and exploration of generated binaries using ildasm or reflector, we don't currently have documentation on this, unfortunately. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, December 08, 2005 10:38 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Sadly, NUnit won't run static methods, so that won't work, but thank you anyway. Are class names similarly mangled? If there's any documentation on this, I'd really appreciate a pointer to it, as I haven't been able to find much help elsewhere... or is it just a matter of hunting through the source? William Martin Maly wrote: >IronPython mangles names. For example: > >def method(): > return 1 > >Produces: > >public static object method$f0() > >The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. > >Martin > > >-----Original Message----- >From: users-bounces at lists.ironpython.com >[mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade >Sent: Thursday, December 08, 2005 10:02 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? > >William > >Martin Maly wrote: > > > >>This is, sadly, true. IronPython will not preserve the name of the method as we know it... >> >>Martin >> >>-----Original Message----- >>From: users-bounces at lists.ironpython.com >>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. >>Farmer >>Sent: Thursday, December 08, 2005 9:46 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] NUnit with IronPython >> >>For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? >> >>----- >>Keith J. Farmer // kfarmer at thuban.org >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From aidand at microsoft.com Thu Dec 8 20:56:42 2005 From: aidand at microsoft.com (Aidan Downes) Date: Thu, 8 Dec 2005 11:56:42 -0800 Subject: [IronPython] NUnit with IronPython Message-ID: Doesn't python have its own nunit variant? Pyunit I think. Probably easier to port that over to ironpython. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 11:06 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Assuming IP is going for the .NET producer route, what's the tact for exposing CLR classes with CLR methods? EG, would there be a 'fixed' (as in 'non-dynamic') form of method and field which won't mangle the name, allowing it to be exposed? ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Thursday, 08 December 2005 10:56 To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Name mangling for classes is not complicated. What makes it harder is not the naming, it is the way the classes are compiled. Class gets generated as a static function named: $maker that creates the class (the type) at runtime. Other than source code and exploration of generated binaries using ildasm or reflector, we don't currently have documentation on this, unfortunately. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, December 08, 2005 10:38 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Sadly, NUnit won't run static methods, so that won't work, but thank you anyway. Are class names similarly mangled? If there's any documentation on this, I'd really appreciate a pointer to it, as I haven't been able to find much help elsewhere... or is it just a matter of hunting through the source? William Martin Maly wrote: >IronPython mangles names. For example: > >def method(): > return 1 > >Produces: > >public static object method$f0() > >The test_prefix would get therefore preserved so on a second thought, this may work, provided that nunit executes public static methods and doesn't require specific return value. Ours is always "object" in this case. > >Martin > > >-----Original Message----- >From: users-bounces at lists.ironpython.com >[mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade >Sent: Thursday, December 08, 2005 10:02 AM >To: Discussion of IronPython >Subject: Re: [IronPython] NUnit with IronPython > >Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? > >William > >Martin Maly wrote: > > > >>This is, sadly, true. IronPython will not preserve the name of the method as we know it... >> >>Martin >> >>-----Original Message----- >>From: users-bounces at lists.ironpython.com >>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. >>Farmer >>Sent: Thursday, December 08, 2005 9:46 AM >>To: Discussion of IronPython >>Subject: Re: [IronPython] NUnit with IronPython >> >>For backwards compatibility, NUnit would also accept method names beginning with "test" ("test_" ?). However, I don't think IP emits methods as we know them yet? >> >>----- >>Keith J. Farmer // kfarmer at thuban.org >> >> >> >> > >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >_______________________________________________ >users mailing list >users at lists.ironpython.com >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -ironpython.com From kfarmer at thuban.org Thu Dec 8 21:10:01 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 8 Dec 2005 12:10:01 -0800 Subject: [IronPython] NUnit with IronPython References: Message-ID: Having stable names would be useful outside of unit testing, though, and more attractive in the long run. ________________________________ From: users-bounces at lists.ironpython.com on behalf of Aidan Downes Sent: Thu 12/8/2005 11:56 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Doesn't python have its own nunit variant? Pyunit I think. Probably easier to port that over to ironpython. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 11:06 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Assuming IP is going for the .NET producer route, what's the tact for exposing CLR classes with CLR methods? EG, would there be a 'fixed' (as in 'non-dynamic') form of method and field which won't mangle the name, allowing it to be exposed? -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3955 bytes Desc: not available URL: From s at rusek.org Thu Dec 8 22:56:58 2005 From: s at rusek.org (Stefan Rusek) Date: Thu, 8 Dec 2005 15:56:58 -0600 Subject: [IronPython] NUnit with IronPython In-Reply-To: Message-ID: <000901c5fc42$502796a0$0100a8c0@obeikelp.com> Yeah, I wrote a codedom library for ironpython, and had it working with asp.net and everything only to realized that the dll that IP compiles is almost useless for asp.net in the current form. --Stefan _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 2:10 PM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Having stable names would be useful outside of unit testing, though, and more attractive in the long run. _____ From: users-bounces at lists.ironpython.com on behalf of Aidan Downes Sent: Thu 12/8/2005 11:56 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Doesn't python have its own nunit variant? Pyunit I think. Probably easier to port that over to ironpython. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 08, 2005 11:06 AM To: Discussion of IronPython Subject: Re: [IronPython] NUnit with IronPython Assuming IP is going for the .NET producer route, what's the tact for exposing CLR classes with CLR methods? EG, would there be a 'fixed' (as in 'non-dynamic') form of method and field which won't mangle the name, allowing it to be exposed? -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 5282 bytes Desc: not available URL: From jvm_cop at spamcop.net Fri Dec 9 00:29:24 2005 From: jvm_cop at spamcop.net (J. Merrill) Date: Thu, 08 Dec 2005 18:29:24 -0500 Subject: [IronPython] NUnit with IronPython Message-ID: <4.3.2.7.2.20051208182919.0527e8a8@mail.comcast.net> Isn't the source for NUnit available? If it is, perhaps it would make sense to modify it to support use of a naming convention, rather than .Net attributes, to determine which classes should be treated as being TestFixtures and which methods are Test methods. (For example, any classes with NUnitTestFixture in the name, and methods with NUnitTest in the name, could be so treated.) This would be in line with the "convention vs configuration" idea popularized, AFAIK, by Rails. Just a thought... At 11:04 AM 12/8/2005, Giles Thomas wrote >Thanks, Martin. I guess this means we can't use NUnit for now. > >Regards, > >Giles J. Merrill / Analytical Software Corp From thane at magna-capital.com Fri Dec 9 02:27:21 2005 From: thane at magna-capital.com (Thane) Date: Thu, 8 Dec 2005 20:27:21 -0500 Subject: [IronPython] IronPython IDE In-Reply-To: <43986E6C.50208@resolversystems.com> Message-ID: <20051209012723.723211BB38@che.dreamhost.com> You can try this: http://www.magna-capital.com/Articles/PythonIDE.html I wrote it for my personal use, so I can't guarantee anything and there's no help manual (yet). Feel free to try it out and use it if you like. --Thane > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Thursday, December 08, 2005 12:34 PM > To: Discussion of IronPython > Subject: [IronPython] IronPython IDE > > Hi all, > > Another question - what are people using to edit/debug IronPython code? > > My most recent projects have all been with Java using IntelliJ, and I've > only just moved over to .NET. I'm told that Visual Studio 2005 is a > good IDE - but it appears that it only supports C# and Visual Basic. > > Right now I'm using TextPad with a Python syntax highlighing > configuration file, but if there's anything better out there - or if my > understanding wrt VS2005 is wrong - then I'd love to hear about it! > > > Cheers, > > Giles > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From stan at ertmssolutions.com Fri Dec 9 10:44:28 2005 From: stan at ertmssolutions.com (Stanislas Pinte) Date: Fri, 09 Dec 2005 10:44:28 +0100 Subject: [IronPython] IronPython IDE In-Reply-To: <43986E6C.50208@resolversystems.com> References: <439819CC.9050901@resolversystems.com> <43986E6C.50208@resolversystems.com> Message-ID: <439951FC.2020108@ertmssolutions.com> Giles Thomas wrote: > Hi all, > > Another question - what are people using to edit/debug IronPython code? > > My most recent projects have all been with Java using IntelliJ, and I've > only just moved over to .NET. I'm told that Visual Studio 2005 is a > good IDE - but it appears that it only supports C# and Visual Basic. Vim is great. WingIDE is very nice, and comes with fully integrated python highlighting and completion. > > Right now I'm using TextPad with a Python syntax highlighing > configuration file, but if there's anything better out there - or if my > understanding wrt VS2005 is wrong - then I'd love to hear about it! > > > Cheers, > > Giles > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- ----------------------------------------------------------------- Stanislas Pinte e-mail: stan at ertmssolutions.com ERTMS Solutions http://www.ertmssolutions.com Rue de l'Autonomie, 1 Tel: + 322 - 522.06.63 1070 Bruxelles Fax: + 322 - 522.09.30 ----------------------------------------------------------------- From dawm at teko.com.pl Fri Dec 9 11:15:07 2005 From: dawm at teko.com.pl (=?iso-8859-2?Q?Miko=B3aj_Dawidowski?=) Date: Fri, 9 Dec 2005 11:15:07 +0100 Subject: [IronPython] Follow Up: Avalon/WinFX and StartUp error again... Message-ID: <20051209101508.05A561BB9E@che.dreamhost.com> I installed the latest .NET 2.0 (final) and WinFX libraries and got the following error. I look similiar to Robert Smithson problems (http://www.mail-archive.com/users at lists.ironpython.com/msg00201.html). Robert says that he installed WinFX SDK and it worked. However I have SDK installed...I think. I mean WinFX SDK is called officially : MS Windows SDK for November 2005 WinFX RC CTP , right? I know avalon is working because XAMLPad from SDK runs fine. ............................................... Microsoft Windows XP [Wersja 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\IronPython\Tutorial>IronPythonConsole.bat IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from avalon import * Unhandled exception: >>> Traceback (most recent call last): at System.Threading.ThreadHelper.ThreadStart() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ThreadStart.Invoke() at System.Threading.ThreadStart(Object ) at avalon.start$f3() in C:\IronPython\Tutorial\avalon.py:line 50 AttributeError: 'System.Windows.Application' object has no attribute 'StartingUp' Unhandled Exception: 'System.Windows.Application' object has no attribute 'StartingUp' C:\IronPython\Tutorial> ............................................... Here is what I have installed: MicrosoftR WindowsR Software Development Kit (SDK) for the November 2005 WinFXR Runtime Components Community Technology Preview (CTP) http://www.microsoft.com/downloads/details.aspx?FamilyID=0a118d5f-21e7-4a3e- 82d9-f30c6ce3f63d&displaylang=en 6.0.5262.0.2.WindowsSDK_Vista_idw.DVD.Rel.img WinFX Runtime (Microsoft Pre-Release Software WinFX Runtime Components - November Community Technology Preview (CTP)) http://www.microsoft.com/downloads/details.aspx?FamilyId=E5376297-DA10-4FC3- 967D-38C96F767FC4&displaylang=en Of course .NET 2.0 Visual C++ Express , C# express and Visual Studio WinFX extensions. Almost everything from Tom Archer's recipe: http://blogs.msdn.com/tomarcher/archive/2005/11/18/494506.aspx From giles.thomas at resolversystems.com Fri Dec 9 13:00:48 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Fri, 09 Dec 2005 12:00:48 +0000 Subject: [IronPython] Unit testing, IDEs and release dates In-Reply-To: References: Message-ID: <439971F0.8080005@resolversystems.com> Thanks to everyone for their thoughts on unit testing. There is indeed a PyUnit, it's part of the standard Python distribution (under the package name unittest). However, it uses three packages that haven't been implemented in IronPython yet - traceback, os and types - and modifying it to remove these dependencies looks like more work than writing a new (simpler) test framework. Thanks also to everyone for the thoughts on IDEs. A question for the development team - I appreciate that it's much too early for anything precise, but when do you expect to be able to get a 1.0 release - in the sense of, will it be years or months from now? Regards, Giles From kfarmer at thuban.org Fri Dec 9 17:07:34 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 9 Dec 2005 08:07:34 -0800 Subject: [IronPython] IronPython IDE References: <439819CC.9050901@resolversystems.com><43986E6C.50208@resolversystems.com> <439951FC.2020108@ertmssolutions.com> Message-ID: The Visual IL project is now available for download as source from GotDotNet -- someone could take a look at how that is put together and (with the VSIP package from Microsoft) put together their own VS2k5 package for Python. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3048 bytes Desc: not available URL: From sdrucker at microsoft.com Fri Dec 9 20:31:24 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Fri, 9 Dec 2005 11:31:24 -0800 Subject: [IronPython] Follow Up: Avalon/WinFX and StartUp error again... Message-ID: This is because the 'StartingUp' event changed to 'Startup' in the more recent WPF release. You can simply edit the avalon.py file and change app.StartingUp to app.Startup. --Steven -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Mikolaj Dawidowski Sent: Friday, December 09, 2005 2:15 AM To: users at lists.ironpython.com Subject: [IronPython] Follow Up: Avalon/WinFX and StartUp error again... I installed the latest .NET 2.0 (final) and WinFX libraries and got the following error. I look similiar to Robert Smithson problems (http://www.mail-archive.com/users at lists.ironpython.com/msg00201.html). Robert says that he installed WinFX SDK and it worked. However I have SDK installed...I think. I mean WinFX SDK is called officially : MS Windows SDK for November 2005 WinFX RC CTP , right? I know avalon is working because XAMLPad from SDK runs fine. ............................................... Microsoft Windows XP [Wersja 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\IronPython\Tutorial>IronPythonConsole.bat IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from avalon import * Unhandled exception: >>> Traceback (most recent call last): at System.Threading.ThreadHelper.ThreadStart() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ThreadStart.Invoke() at System.Threading.ThreadStart(Object ) at avalon.start$f3() in C:\IronPython\Tutorial\avalon.py:line 50 AttributeError: 'System.Windows.Application' object has no attribute 'StartingUp' Unhandled Exception: 'System.Windows.Application' object has no attribute 'StartingUp' C:\IronPython\Tutorial> ............................................... Here is what I have installed: MicrosoftR WindowsR Software Development Kit (SDK) for the November 2005 WinFXR Runtime Components Community Technology Preview (CTP) http://www.microsoft.com/downloads/details.aspx?FamilyID=0a118d5f-21e7-4 a3e- 82d9-f30c6ce3f63d&displaylang=en 6.0.5262.0.2.WindowsSDK_Vista_idw.DVD.Rel.img WinFX Runtime (Microsoft Pre-Release Software WinFX Runtime Components - November Community Technology Preview (CTP)) http://www.microsoft.com/downloads/details.aspx?FamilyId=E5376297-DA10-4 FC3- 967D-38C96F767FC4&displaylang=en Of course .NET 2.0 Visual C++ Express , C# express and Visual Studio WinFX extensions. Almost everything from Tom Archer's recipe: http://blogs.msdn.com/tomarcher/archive/2005/11/18/494506.aspx _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Aaron.Marten at microsoft.com Fri Dec 9 23:11:16 2005 From: Aaron.Marten at microsoft.com (Aaron Marten) Date: Fri, 9 Dec 2005 14:11:16 -0800 Subject: [IronPython] IronPython IDE Message-ID: <5FCAA6E21F110544B8CD0EEBB51B0AE8DD9065@RED-MSG-20.redmond.corp.microsoft.com> Hi Giles, I'm on the Visual Studio SDK team here at Microsoft. In co-operation with the IronPython team, we're currently working on integrating IronPython into Visual Studio as a sample to ship in our SDK. We've just released a CTP with the first version of this here: http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx I also blogged a bit about the Dec CTP release of the Visual Studio SDK here: http://blogs.msdn.com/aaronmar/archive/2005/12/09/502202.aspx Note that right now, the integration code is in an incomplete state, but we do have the beginnings of a project system and language service working. Note that right now, the integration is only available as a preview sample in the Visual Studio SDK, so you'll have to agree to our license to get the code. Thanks! Aaron Marten (Microsoft) -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Thursday, December 08, 2005 9:34 AM To: Discussion of IronPython Subject: [IronPython] IronPython IDE Hi all, Another question - what are people using to edit/debug IronPython code? My most recent projects have all been with Java using IntelliJ, and I've only just moved over to .NET. I'm told that Visual Studio 2005 is a good IDE - but it appears that it only supports C# and Visual Basic. Right now I'm using TextPad with a Python syntax highlighing configuration file, but if there's anything better out there - or if my understanding wrt VS2005 is wrong - then I'd love to hear about it! Cheers, Giles _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Sat Dec 10 10:32:14 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sat, 10 Dec 2005 01:32:14 -0800 Subject: [IronPython] IronPython 0.9.6 released Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Hello IronPython community, We?ve just released the newest version of IronPython ? 0.9.6. This is most likely the last Alpha version of IronPython before the end of the year when we play to release IronPython 1.0 Beta 1. This build includes many bug fixes for issues reported to us by the community as well as support for many new modules. We are continuing to drive completeness of the Python and support for interoperability between .NET and IronPython. Here are the highlithts of the 0.9.6 release, the full list of changes is included at the end of the mail: All missing dictionary methods are now implemented Parser changes for tools integration Weak reference support Itertools module is now implemented Improved debugger sequence point generation, parser & tokenizer improvements Python equality/hashing and CLR equality/hashing separated Unhandled exceptions are no longer passed to the OS Exceptions have better stack traces in the interactive environment locals() support for most common usage scenarios (but not execfile or eval yet) Regular expression improvements: Implement missing methods, support Python named groups, fix match implementation when matching in the middle of a string, We?d also like to thank everyone in the community for your bug reports and suggestions that helped make this a better release: Mike Hostetler, Nicholas Jacobson, Davy Mitchell, Alexei Bocharov, Rosenkrantz, Jacques de Hooge, Anthony Tarlano, diaphanein, pchasco, Koly, Sumit Basu, Shon Shah, Angelo Xu, Boris Capitanu, carlostekken, Flexibal, glchapman, Luis M. Gonzalez, reportlabrobin, spencermah You can download the IronPython 0.9.6 release from: http://www.microsoft.com/downloads/details.aspx?FamilyID=e73fad51-6566-4f4a-a42c-33bb5b89b4e8&displaylang=en Thanks and keep in touch, The IronPython team Full list of changes and bug fixes: =================================== Duplicate parameters & fancy kw args fixed Kw-arg property assignment fixed Module on old class moved into dictionary Improved syntax errors for null expressions Exec supports multi-line expressions Dict now has copy, and update supports user defined dictionaries == will call user defined __cmp__ function Improved error reporting for parser Duplicate named parameters detected by parser & reported Integer performance improvements & possible correctness improvements Bitwise operators implemented for bool IronPython compiles warning free Kw args & default params work better together __hash__ is called for user defined types when hashing All old style classes are of type instance Code gen no longer produced duplicate parameter names Tab at end of file no longer produces parser error Throwing strings is supported Backwards slices (m on module level generates invalid program exception rather than SyntaxError Equals between boxed bool and Python bool now returns True String manipulation produces incorrect results - bug fixed From kfarmer at thuban.org Sat Dec 10 10:35:06 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 10 Dec 2005 01:35:06 -0800 Subject: [IronPython] IronPython 0.9.6 released References: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: Hi from across the street ;) That's a big list -- can you elaborate on the tools integration? ________________________________ From: users-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Sat 12/10/2005 1:32 AM Parser changes for tools integration -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3411 bytes Desc: not available URL: From kfarmer at thuban.org Sat Dec 10 10:41:44 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 10 Dec 2005 01:41:44 -0800 Subject: [IronPython] IronPython 0.9.6 released References: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: Just read Aaron's email and blog posting -- most cool! ________________________________ From: users-bounces at lists.ironpython.com on behalf of Keith J. Farmer Sent: Sat 12/10/2005 1:35 AM To: Discussion of IronPython Subject: RE: [IronPython] IronPython 0.9.6 released Hi from across the street ;) That's a big list -- can you elaborate on the tools integration? ________________________________ From: users-bounces at lists.ironpython.com on behalf of Martin Maly Sent: Sat 12/10/2005 1:32 AM Parser changes for tools integration -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3831 bytes Desc: not available URL: From lattam at mac.com Sat Dec 10 23:06:06 2005 From: lattam at mac.com (Michael Latta) Date: Sat, 10 Dec 2005 14:06:06 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <200512102207.jBAM7Q5v023666@mac.com> Is it possible to use IronPython to subclass a CLR class? In particular can I use IronPython to create a subclass of WWF Activity and override the methods needed to implement custom activities? Using IronPython as a workflow scripting language would be pretty cool. The discussion about mangled methods and class names raises questions about interoperating with frameworks like WWF where subclassing is involved. Michael From Martin.Maly at microsoft.com Sat Dec 10 23:35:04 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Sat, 10 Dec 2005 14:35:04 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <200512102207.jBAM7Q5v023666@mac.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922B73@df-foxhound-msg.exchange.corp.microsoft.com> IronPython does support subclassing and method overriding so your scenario should work. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Latta Sent: Saturday, December 10, 2005 2:06 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython 0.9.6 released Is it possible to use IronPython to subclass a CLR class? In particular can I use IronPython to create a subclass of WWF Activity and override the methods needed to implement custom activities? Using IronPython as a workflow scripting language would be pretty cool. The discussion about mangled methods and class names raises questions about interoperating with frameworks like WWF where subclassing is involved. Michael _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ender at objectrealms.net Sun Dec 11 00:29:37 2005 From: ender at objectrealms.net (Kapil Thangavelu) Date: Sat, 10 Dec 2005 15:29:37 -0800 Subject: [IronPython] IronPython IDE In-Reply-To: <43986E6C.50208@resolversystems.com> References: <439819CC.9050901@resolversystems.com> <43986E6C.50208@resolversystems.com> Message-ID: <439B64E1.7070000@objectrealms.net> Giles Thomas wrote: > Hi all, > > Another question - what are people using to edit/debug IronPython code? emacs ;-) there is also an ironpython plugin for monodevelop, in that project's svn repository. i believe it needs updating though to work the latest version of monodevlop svn repository anon access svn://svn.myrealbox.com/source/trunk/monodevelop another option might be extending the pydev extension for eclipse which already has support for both cpython and jython. http://pydev.sourceforge.net/ > > My most recent projects have all been with Java using IntelliJ, and I've > only just moved over to .NET. I'm told that Visual Studio 2005 is a > good IDE - but it appears that it only supports C# and Visual Basic. i'm not sure how viable it is, but activestate's python plugin for visual studio might be useful, although the code completion/introspection might be broken with ironpython, it should still give proper syntax highlighting. http://www.activestate.com/Products/Visual_Python/?mp=1 cheers, kapil From trimbo at gmail.com Sun Dec 11 03:13:47 2005 From: trimbo at gmail.com (Chris Trimble) Date: Sat, 10 Dec 2005 18:13:47 -0800 Subject: [IronPython] IronPython IDE In-Reply-To: <5FCAA6E21F110544B8CD0EEBB51B0AE8DD9065@RED-MSG-20.redmond.corp.microsoft.com> References: <5FCAA6E21F110544B8CD0EEBB51B0AE8DD9065@RED-MSG-20.redmond.corp.microsoft.com> Message-ID: On 12/9/05, Aaron Marten wrote: > Hi Giles, > I'm on the Visual Studio SDK team here at Microsoft. In > co-operation with the IronPython team, we're currently working on > integrating IronPython into Visual Studio as a sample to ship in our > SDK. We've just released a CTP with the first version of this here: > > http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx I'd like to check this out, but this URL doesn't seem to be working for me. It just sits for a while and times out. Anyone else having problems? - Chris From kfarmer at thuban.org Sun Dec 11 03:37:24 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 10 Dec 2005 18:37:24 -0800 Subject: [IronPython] IronPython IDE Message-ID: I noticed as much last night. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Chris Trimble Sent: Saturday, 10 December 2005 18:14 I'd like to check this out, but this URL doesn't seem to be working for me. It just sits for a while and times out. Anyone else having problems? From hank at prosysplus.com Sun Dec 11 03:39:41 2005 From: hank at prosysplus.com (Hank Fay) Date: Sat, 10 Dec 2005 21:39:41 -0500 Subject: [IronPython] IronPython IDE In-Reply-To: Message-ID: <003401c5fdfc$23a92240$0701a8c0@bigdeuce> Works for me in Firefox. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Chris Trimble Sent: Saturday, December 10, 2005 9:14 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython IDE On 12/9/05, Aaron Marten wrote: > Hi Giles, > I'm on the Visual Studio SDK team here at Microsoft. In > co-operation with the IronPython team, we're currently working on > integrating IronPython into Visual Studio as a sample to ship in our > SDK. We've just released a CTP with the first version of this here: > > http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx I'd like to check this out, but this URL doesn't seem to be working for me. It just sits for a while and times out. Anyone else having problems? - Chris _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Sun Dec 11 11:13:02 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sun, 11 Dec 2005 02:13:02 -0800 Subject: [IronPython] IronPython IDE Message-ID: It's working now -- it wasn't a browser issue. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Hank Fay Sent: Saturday, 10 December 2005 18:40 To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython IDE Works for me in Firefox. From dinov at exchange.microsoft.com Sun Dec 11 23:23:08 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Sun, 11 Dec 2005 14:23:08 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B73@df-foxhound-msg.exchange.corp.microsoft.com> References: <200512102207.jBAM7Q5v023666@mac.com>, <5C0A6F919D675745BB1DBA7412DB68F5922B73@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214E235C15@df-foxhound-msg.exchange.corp.microsoft.com> But there is one limitation to this - you cannot currently override protected methods or access protected fields when subclassing. We should have that fixed for the next release. ________________________________________ From: users-bounces at lists.ironpython.com On Behalf Of Martin Maly Sent: Saturday, December 10, 2005 2:35 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 0.9.6 released IronPython does support subclassing and method overriding so your scenario should work. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Latta Sent: Saturday, December 10, 2005 2:06 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython 0.9.6 released Is it possible to use IronPython to subclass a CLR class? In particular can I use IronPython to create a subclass of WWF Activity and override the methods needed to implement custom activities? Using IronPython as a workflow scripting language would be pretty cool. The discussion about mangled methods and class names raises questions about interoperating with frameworks like WWF where subclassing is involved. Michael _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dawm at teko.com.pl Mon Dec 12 09:08:06 2005 From: dawm at teko.com.pl (=?iso-8859-2?Q?Miko=B3aj_Dawidowski?=) Date: Mon, 12 Dec 2005 09:08:06 +0100 Subject: [IronPython] Follow Up: Avalon/WinFX and StartUp error again... In-Reply-To: Message-ID: <20051212080757.7883A1BC4C@che.dreamhost.com> Thank you very much. Works great. --Nick -----Original Message----- From: Steven Drucker [mailto:sdrucker at microsoft.com] Sent: Friday, December 09, 2005 8:31 PM To: Discussion of IronPython Subject: Re: [IronPython] Follow Up: Avalon/WinFX and StartUp error again... This is because the 'StartingUp' event changed to 'Startup' in the more recent WPF release. You can simply edit the avalon.py file and change app.StartingUp to app.Startup. --Steven From kfarmer at thuban.org Mon Dec 12 10:12:25 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 12 Dec 2005 01:12:25 -0800 Subject: [IronPython] IronPython 0.9.6 released Message-ID: Out of curiosity, was there a specific reason for having different cases for Parser.fromString/Parser.FromString? ----- Keith J. Farmer // kfarmer at thuban.org From s.kobalczyk at softwaremind.pl Mon Dec 12 10:25:04 2005 From: s.kobalczyk at softwaremind.pl (Szymon Kobalczyk) Date: Mon, 12 Dec 2005 10:25:04 +0100 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <439D41F0.10602@softwaremind.pl> Martin Maly wrote: >Hello IronPython community, > >We've just released the newest version of IronPython ? 0.9.6. [...] > I haven't found any mention of fixes regarding the memory issues I reported last month. Have you done anything to stop these memory leaks? I think this is rather important for everyone who embeds PythonEngine in own application and should be fixed before the 1.0 version is released. Regards, Szymon Kobalczyk. From info at geatec.com Mon Dec 12 10:28:46 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 10:28:46 +0100 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000001c5fefe$73ffcf20$6402a8c0@GEADELL> Hi, Thanks for the new version of IP. I'd like to start using it as soon as possible, since error reporting is said to be improved on this version and that will probably speed up my work. I've installed IP 0.9.6 and attempted to run my apps with it, but I ran into the following problems: Problem 1: (reported earlier) ========== As reported by me for IP 0.9.5, setting the AllowDrop property of e.g. a Forms.ListView to True while using IP 0.9.6 STILL results in an exception message: DragDrop registration failed. The fix I've used on 0.9.5 (see earlier posting) was changing the declaration of Main in PythonCommandLine.cs from: static int Main(string[] rawArgs) { to: [STAThread] static int Main(string[] rawArgs) { If adding the [STAThread] attribute is not generally feasible for some other reason, please could at least a command line switch be added to the next version to achieve this. Otherways apps using Drag and Drop (a.o. all my apps) will not run (see earlier discussions). Surely D&D is considered an important part of the Windows User Experience... ;=) Problem 2: (new problem) ========== With IP 0.9.5 I could compile the above fix using the following recipe from the readme.html in the root of the IP distribution: [QUOTE] After installing the SDK, open the .NET Framework SDK command prompt, go to the IronPython directory and execute: msbuild IronPython.sln This will build IronPython.dll, IronMath.dll and IronPythonConsole.exe in the "bin" directory. [UNQUOTE] But with IP 0.9.6 this does not work any more. The following error messages are displayed: [QUOTE] [Microsoft .NET Framework, Version 2.0.50727.42] Copyright (C) Microsoft Corporation 2005. All rights reserved. Build started 12/12/2005 10:16:16 AM. __________________________________________________ Project "C:\IronPython-0.9.6-STA\IronPython.sln" (default targets): Target ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". Target Build: Target IronMath: __________________________________________________ Project "C:\IronPython-0.9.6-STA\IronPython.sln" is building "C:\IronPython-0.9.6-STA\IronMath\IronMath.csproj" (default targets): Target CoreCompile: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /unsafe+ /checked- /nowarn:1701,1702 /nostdlib- /warn:4 /baseaddress:285212672 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /debug+ /filealign:4096 /optimize- /out:obj\Debug\IronMath.dll /target:library /warnaserror+ AssemblyInfo.cs Complex64.cs integer.cs integerTest.cs CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' Done building target "CoreCompile" in project "IronMath.csproj" -- FAILED. Done building project "IronMath.csproj" -- FAILED. Build FAILED. CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' 0 Warning(s) 2 Error(s) [UNQUOTE] For IP 0.9.5 compiling still works as expected, so nothing seems to have fallen over in my compilation environment. My question is: 1. Could the [STATThread] please be added to the next release one way or the other 2. Could someone provide me with a fix or workaround for compiling IP 0.9.6 using the .NET SDK so that I can start using the improved error reporting Thanks Jacques de Hooge info at geatec.com From kfarmer at thuban.org Mon Dec 12 10:50:51 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 12 Dec 2005 01:50:51 -0800 Subject: [IronPython] Problems with tutorials Message-ID: Encountering a variety of problems with the agents tutorial: a = AgentServerClass() -> should not have () ? a.Load("Merlin.acs") -> throws bad args exception for the Load() method. Doesn't change if I use C:\WINDOWS\msagent\chars\merlin.acs, which exists on my machine. Also doesn't work if I call AgentServerClass.Load("merlin.acs"). NB: I'm using x64. With the Avalon tutorial, I get "can't set arbitrary attributes on built-in type System.Windows.Window" when I try w.Text = "My Avalon Application". Trying to retrieve w.Text gives no-such-attribute error. w.Title does exist, however. w.Content.TextContent should be w.Content.Text, I think. w.Content.PersistentAnimations doesn't exist, and I don't see any likely rename. ----- Keith J. Farmer // kfarmer at thuban.org From info at geatec.com Mon Dec 12 10:52:54 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 10:52:54 +0100 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000501c5ff01$d63a1cb0$6402a8c0@GEADELL> LS, I can not submit bugs for IP anymore. This used to work fine, but now I get stranded on the following page: [QUOTE] GotDotNet If you see this page, it is because you have completed an action that threw an error in the GotDotNet system. We apologize for the inconvenience, and ask you to help our team understand why the system threw the error. Please email gdnfeed at microsoft.com and provide as much of the following as you can: URL\Web page you were requesting Workspace name and URL (if applicable) Your UserName What action you were trying to accomplish (Workspace home page, download a file, post, etc) OS and Web browser you are using Were you using Passport and logged in? Can we contact you for more information? The Gotdotnet team [UNQUOTE] Kind regards Jacques de Hooge info at geatec.com From kfarmer at thuban.org Mon Dec 12 10:53:55 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 12 Dec 2005 01:53:55 -0800 Subject: [IronPython] IronPython 0.9.6 released Message-ID: For what it's worth, it compiled just fine on my system without modifications using VS2k5. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, 12 December 2005 01:29 [QUOTE] After installing the SDK, open the .NET Framework SDK command prompt, go to the IronPython directory and execute: msbuild IronPython.sln This will build IronPython.dll, IronMath.dll and IronPythonConsole.exe in the "bin" directory. [UNQUOTE] But with IP 0.9.6 this does not work any more. The following error messages are displayed: From info at geatec.com Mon Dec 12 11:04:37 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 11:04:37 +0100 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: Message-ID: <000601c5ff03$78e9f330$6402a8c0@GEADELL> Thanks for the feedback Keith I think it's just a matter of some paths being wrong. I still have VS 2003 installed and using it for different project. But .NET SDK 2 should do, according to the readme. And everything still works alright for IP 0.9.5 Jacques -----Oorspronkelijk bericht----- Van: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] Namens Keith J. Farmer Verzonden: Monday, December 12, 2005 10:54 AM Aan: Discussion of IronPython Onderwerp: Re: [IronPython] IronPython 0.9.6 released For what it's worth, it compiled just fine on my system without modifications using VS2k5. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, 12 December 2005 01:29 [QUOTE] After installing the SDK, open the .NET Framework SDK command prompt, go to the IronPython directory and execute: msbuild IronPython.sln This will build IronPython.dll, IronMath.dll and IronPythonConsole.exe in the "bin" directory. [UNQUOTE] But with IP 0.9.6 this does not work any more. The following error messages are displayed: _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Mon Dec 12 11:35:12 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Mon, 12 Dec 2005 02:35:12 -0800 Subject: [IronPython] VSIP integration package Message-ID: So I've installed the VS SDK, and have built the MSBuild tasks for IronPython as well as the PythonProject solution, but I don't think it's actually working. I'm not finding any instructions for installation of the Python solution, though I followed the ones for the Figures sample. I have Python in the new project window, and it creates a new solution, but it doesn't show any files, nor does it provide any means to add any. It's like the installation of the .pyproj handler didn't happen. Clues, mighty ones? ----- Keith J. Farmer // kfarmer at thuban.org From info at geatec.com Mon Dec 12 11:51:48 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 11:51:48 +0100 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: Message-ID: <000001c5ff0a$0d85b730$6402a8c0@GEADELL> Clearing the LIB environment variable solves my compilaton problem for IP 0.9.6 Still don't understand why that is not needed for IP 0.9.5 But allas, I can now built 0.9.6 with [STAThread] and start using it. Joepie! (Dutch exclamation of joy) Jacques de Hooge info at geatec.com -----Oorspronkelijk bericht----- Van: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] Namens Keith J. Farmer Verzonden: Monday, December 12, 2005 10:54 AM Aan: Discussion of IronPython Onderwerp: Re: [IronPython] IronPython 0.9.6 released For what it's worth, it compiled just fine on my system without modifications using VS2k5. ----- Keith J. Farmer // kfarmer at thuban.org From info at geatec.com Mon Dec 12 12:28:05 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 12:28:05 +0100 Subject: [IronPython] in - operator got broken in transition from 0.9.5 to 0.9.6 In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000501c5ff0f$21f824f0$6402a8c0@GEADELL> LS Following code: =============== aList = [['a']] anItem = ['a'] print '1', anItem in aList for item in aList: if item == anItem: print '2', True break else: print '2', False In IP 0.9.6 prints: =================== 2 False 2 True In IP 0.9.5 prints: =================== 1 True 2 True In Cpython 2.4 prints: ====================== 1 True 2 True Following Cpython 2.4 manual 1 and 2 should print the same thing: ================================================================= [QUOTE] For the list and tuple types, x in y is true if and only if there exists an index i such that x == y[i] is true. [UNQUOTE] Kind regards Jacques de Hooge info at geatec.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From giles.thomas at resolversystems.com Mon Dec 12 13:02:46 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Mon, 12 Dec 2005 12:02:46 +0000 Subject: [IronPython] IronPython IDE In-Reply-To: <5FCAA6E21F110544B8CD0EEBB51B0AE8DD9065@RED-MSG-20.redmond.corp.microsoft.com> References: <5FCAA6E21F110544B8CD0EEBB51B0AE8DD9065@RED-MSG-20.redmond.corp.microsoft.com> Message-ID: <439D66E6.7030505@resolversystems.com> Hi Aaron, Thanks for the pointer. Is there any simple documentation on setting this up once you've downloaded it? Cheers, Giles Aaron Marten wrote: > Hi Giles, > I'm on the Visual Studio SDK team here at Microsoft. In > co-operation with the IronPython team, we're currently working on > integrating IronPython into Visual Studio as a sample to ship in our > SDK. We've just released a CTP with the first version of this here: > > http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx > > I also blogged a bit about the Dec CTP release of the Visual Studio SDK > here: > http://blogs.msdn.com/aaronmar/archive/2005/12/09/502202.aspx > > Note that right now, the integration code is in an incomplete state, but > we do have the beginnings of a project system and language service > working. Note that right now, the integration is only available as a > preview sample in the Visual Studio SDK, so you'll have to agree to our > license to get the code. > > Thanks! > Aaron Marten (Microsoft) > > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Thursday, December 08, 2005 9:34 AM > To: Discussion of IronPython > Subject: [IronPython] IronPython IDE > > Hi all, > > Another question - what are people using to edit/debug IronPython code? > > My most recent projects have all been with Java using IntelliJ, and I've > > only just moved over to .NET. I'm told that Visual Studio 2005 is a > good IDE - but it appears that it only supports C# and Visual Basic. > > Right now I'm using TextPad with a Python syntax highlighing > configuration file, but if there's anything better out there - or if my > understanding wrt VS2005 is wrong - then I'd love to hear about it! > > > Cheers, > > Giles > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From info at geatec.com Mon Dec 12 13:07:41 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 13:07:41 +0100 Subject: [IronPython] bug: list.remove broken in transition from 0.9.5 to 0.9.6 In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000001c5ff14$aa2334f0$6402a8c0@GEADELL> LS Following fragment: =================== aList = [['a']] anItem = ['a'] print aList aList.remove (anItem) print aList Prints in IP 0.9.6 ================== [['a']] Traceback (most recent call last): at __main__.Initialize() in C:\activ_dell\prog\fun\src\funTry.py:line 5 ValueError: list.index(x): x not in list Prints in IP 0.9.5 ================== [['a']] [] Prints in Cpython 2.4 ===================== [['a']] [] Of course this probably has to do with the in-bug reported earlier. But this one for me is more severe since I use list.remove quite a lot in my code. Kind regards Jacques de Hooge info at geatec.com From info at geatec.com Mon Dec 12 13:31:33 2005 From: info at geatec.com (J. de Hooge) Date: Mon, 12 Dec 2005 13:31:33 +0100 Subject: [IronPython] bug: list.index broken in transition from ip 0.9.5 to ip 0.9.6 In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5922B4B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <000001c5ff17$ff8e6560$6402a8c0@GEADELL> LS Yet another disguise of probably the same underlying bug: aList = [['a']] anItem = ['a'] print aList.index (anItem) Traceback (most recent call last): at __main__.Initialize() in C:\activ_dell\prog\fun\src\funTry.py:line 4 ValueError: list.index(x): x not in list The number of workarounds in my code is getting a bit too big now, since I am using this everywhere. Unfortunately I'll have to revert to 0.9.5 awaiting these things to be fixed. Guys, you've been making a great product upto now. My sincere respect for that. As far as I can see the IP team has been impressively productive. Don't know what the project pressures are, but please keep taking the time you need! I'd personally rather wait some more months for 1.0 than having things done in a rush. I propose basic stuff like this is added to the regression test suite. Kind regards Jacques de Hooge info at geatec.com From Martin.Maly at microsoft.com Mon Dec 12 17:45:09 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 08:45:09 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922C55@df-foxhound-msg.exchange.corp.microsoft.com> Slow transition towards code that passes FxCop. It is one of the necessities to release final 1.0 down the road so wherever we touch code, we try to follow the FxCop naming requirements so that there are not as many changes needed once we actually run the FxCop tool on our sources. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Monday, December 12, 2005 1:12 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 0.9.6 released Out of curiosity, was there a specific reason for having different cases for Parser.fromString/Parser.FromString? ----- Keith J. Farmer // kfarmer at thuban.org _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Mon Dec 12 17:47:41 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 08:47:41 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <439D41F0.10602@softwaremind.pl> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922C56@df-foxhound-msg.exchange.corp.microsoft.com> We didn't get to that one yet, sorry about that. Certainly before 1.0 this needs to be fixed. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Szymon Kobalczyk Sent: Monday, December 12, 2005 1:25 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 0.9.6 released Martin Maly wrote: >Hello IronPython community, > >We've just released the newest version of IronPython ? 0.9.6. [...] > I haven't found any mention of fixes regarding the memory issues I reported last month. Have you done anything to stop these memory leaks? I think this is rather important for everyone who embeds PythonEngine in own application and should be fixed before the 1.0 version is released. Regards, Szymon Kobalczyk. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Mon Dec 12 18:03:35 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 09:03:35 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <000001c5fefe$73ffcf20$6402a8c0@GEADELL> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922C5C@df-foxhound-msg.exchange.corp.microsoft.com> Jacques, As for the first problem, the unfortunate thing is that fixing it for some of us breaks it for others. Let me look into whether command line parameter could be the solution. I will let you know as soon as I know more. The answer to your question 1 is, therefore, yes. As for the second problem, my guess is that the problem may stem from the SDK command line setup. The LIB environment variable gets set up by the SDK initialization and may have been set up incorrectly. Are you using VS2005 or the .NET Framework SDK? I suspect that the batch files on your computer may not be doing what they are supposed to ... I am using Visual Studio 2005 for my development and when I open the VS build window, there is no path in the LIB variable that contains the directory VC98 ('C:\Program Files\Microsoft Visual Studio\VC98\lib). I wonder if that may be a lead to possible solution. I hope this helps Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, December 12, 2005 1:29 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython 0.9.6 released Hi, Thanks for the new version of IP. I'd like to start using it as soon as possible, since error reporting is said to be improved on this version and that will probably speed up my work. I've installed IP 0.9.6 and attempted to run my apps with it, but I ran into the following problems: Problem 1: (reported earlier) ========== As reported by me for IP 0.9.5, setting the AllowDrop property of e.g. a Forms.ListView to True while using IP 0.9.6 STILL results in an exception message: DragDrop registration failed. The fix I've used on 0.9.5 (see earlier posting) was changing the declaration of Main in PythonCommandLine.cs from: static int Main(string[] rawArgs) { to: [STAThread] static int Main(string[] rawArgs) { If adding the [STAThread] attribute is not generally feasible for some other reason, please could at least a command line switch be added to the next version to achieve this. Otherways apps using Drag and Drop (a.o. all my apps) will not run (see earlier discussions). Surely D&D is considered an important part of the Windows User Experience... ;=) Problem 2: (new problem) ========== With IP 0.9.5 I could compile the above fix using the following recipe from the readme.html in the root of the IP distribution: [QUOTE] After installing the SDK, open the .NET Framework SDK command prompt, go to the IronPython directory and execute: msbuild IronPython.sln This will build IronPython.dll, IronMath.dll and IronPythonConsole.exe in the "bin" directory. [UNQUOTE] But with IP 0.9.6 this does not work any more. The following error messages are displayed: [QUOTE] [Microsoft .NET Framework, Version 2.0.50727.42] Copyright (C) Microsoft Corporation 2005. All rights reserved. Build started 12/12/2005 10:16:16 AM. __________________________________________________ Project "C:\IronPython-0.9.6-STA\IronPython.sln" (default targets): Target ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". Target Build: Target IronMath: __________________________________________________ Project "C:\IronPython-0.9.6-STA\IronPython.sln" is building "C:\IronPython-0.9.6-STA\IronMath\IronMath.csproj" (default targets): Target CoreCompile: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /unsafe+ /checked- /nowarn:1701,1702 /nostdlib- /warn:4 /baseaddress:285212672 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /debug+ /filealign:4096 /optimize- /out:obj\Debug\IronMath.dll /target:library /warnaserror+ AssemblyInfo.cs Complex64.cs integer.cs integerTest.cs CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' Done building target "CoreCompile" in project "IronMath.csproj" -- FAILED. Done building project "IronMath.csproj" -- FAILED. Build FAILED. CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' CSC : error CS1668: Warning as Error: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' 0 Warning(s) 2 Error(s) [UNQUOTE] For IP 0.9.5 compiling still works as expected, so nothing seems to have fallen over in my compilation environment. My question is: 1. Could the [STATThread] please be added to the next release one way or the other 2. Could someone provide me with a fix or workaround for compiling IP 0.9.6 using the .NET SDK so that I can start using the improved error reporting Thanks Jacques de Hooge info at geatec.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Mon Dec 12 18:11:00 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 12 Dec 2005 09:11:00 -0800 Subject: [IronPython] bug: list.index broken in transition from ip 0.9.5 to ip 0.9.6 In-Reply-To: <000001c5ff17$ff8e6560$6402a8c0@GEADELL> Message-ID: <4039D552ADAB094BB1EA670F3E96214EA41AA4@df-foxhound-msg.exchange.corp.microsoft.com> Thanks for the bug reports - these are related to one of our changes to separate Python equality from CLR equality. The "in" bug is the same issue as this bug just in a different spot. Both of these changes are related to a fix to address how to treat python equality & hashing versus CLR equality & hashing. Because Python frequently uses value equality (rather than reference equality) and allows types to throw from __hash__ and CLR types can't throw from GetHashCode() we had to separate the two. Obviously I missed a few spots in the implementation where we are still calling the CLR's equals instead of python's (in this case we're actually calling Array.IndexOf). The destabilization you're seeing now is our push to get all of these risky changes out of the way now before we switch to the beta releases. Sorry for the inconvenience but hopefully this will result in a better 1.0 all around. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, December 12, 2005 4:32 AM To: 'Discussion of IronPython' Subject: [IronPython] bug: list.index broken in transition from ip 0.9.5 to ip 0.9.6 LS Yet another disguise of probably the same underlying bug: aList = [['a']] anItem = ['a'] print aList.index (anItem) Traceback (most recent call last): at __main__.Initialize() in C:\activ_dell\prog\fun\src\funTry.py:line 4 ValueError: list.index(x): x not in list The number of workarounds in my code is getting a bit too big now, since I am using this everywhere. Unfortunately I'll have to revert to 0.9.5 awaiting these things to be fixed. Guys, you've been making a great product upto now. My sincere respect for that. As far as I can see the IP team has been impressively productive. Don't know what the project pressures are, but please keep taking the time you need! I'd personally rather wait some more months for 1.0 than having things done in a rush. I propose basic stuff like this is added to the regression test suite. Kind regards Jacques de Hooge info at geatec.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Mon Dec 12 18:28:43 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 09:28:43 -0800 Subject: [IronPython] IronPython 0.9.6 released In-Reply-To: <000501c5ff01$d63a1cb0$6402a8c0@GEADELL> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922C8A@df-foxhound-msg.exchange.corp.microsoft.com> The GotDotNet website occassionally has problems as the development team works on it. I am going to pass your feedback to the GotDotNet developers to let them know our community is negatively affected by it. Thanks for the feedback, it is important to let us know of these problems too so that we can talk to the right people to get things fixed! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, December 12, 2005 1:53 AM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython 0.9.6 released LS, I can not submit bugs for IP anymore. This used to work fine, but now I get stranded on the following page: [QUOTE] GotDotNet If you see this page, it is because you have completed an action that threw an error in the GotDotNet system. We apologize for the inconvenience, and ask you to help our team understand why the system threw the error. Please email gdnfeed at microsoft.com and provide as much of the following as you can: URL\Web page you were requesting Workspace name and URL (if applicable) Your UserName What action you were trying to accomplish (Workspace home page, download a file, post, etc) OS and Web browser you are using Were you using Passport and logged in? Can we contact you for more information? The Gotdotnet team [UNQUOTE] Kind regards Jacques de Hooge info at geatec.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Mon Dec 12 18:34:56 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 12 Dec 2005 09:34:56 -0800 Subject: [IronPython] bug: list.index broken in transition from ip 0.9.5 to ip 0.9.6 In-Reply-To: <000001c5ff17$ff8e6560$6402a8c0@GEADELL> Message-ID: <4039D552ADAB094BB1EA670F3E96214EA41AEA@df-foxhound-msg.exchange.corp.microsoft.com> If you want to update your copy the fix is to update these methods in list.cs: public bool __contains__(object item) { for (int i = 0; i < size; i++) { if (Ops.IsTrue(Ops.Equal(data[i], item))) return true; } return false; } And then later in the file: public int index(object item) { return index(item, 0, size); } public int index(object item, int start) { return index(item, start, size); } public int index(object item, int start, int stop) { //??? fix indices for (int i = start; i < Math.Min(stop, size); i++) { if (Ops.IsTrue(Ops.Equal(data[i], item))) return i; } throw Ops.ValueError("list.index(item): item not in list"); } -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of J. de Hooge Sent: Monday, December 12, 2005 4:32 AM To: 'Discussion of IronPython' Subject: [IronPython] bug: list.index broken in transition from ip 0.9.5 to ip 0.9.6 LS Yet another disguise of probably the same underlying bug: aList = [['a']] anItem = ['a'] print aList.index (anItem) Traceback (most recent call last): at __main__.Initialize() in C:\activ_dell\prog\fun\src\funTry.py:line 4 ValueError: list.index(x): x not in list The number of workarounds in my code is getting a bit too big now, since I am using this everywhere. Unfortunately I'll have to revert to 0.9.5 awaiting these things to be fixed. Guys, you've been making a great product upto now. My sincere respect for that. As far as I can see the IP team has been impressively productive. Don't know what the project pressures are, but please keep taking the time you need! I'd personally rather wait some more months for 1.0 than having things done in a rush. I propose basic stuff like this is added to the regression test suite. Kind regards Jacques de Hooge info at geatec.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Mon Dec 12 18:51:49 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 09:51:49 -0800 Subject: [IronPython] Problems with tutorials In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922CD8@df-foxhound-msg.exchange.corp.microsoft.com> Believe it or not, this problem is actually caused by the missing [STAThread] attribute on the IronPythonConsole Main. Good to know this :) Seems that when I remove it, I caused problems for more people than I helped. As I said in my previous email to Jacques, I am going to fix this for the next release. If there is no beter way to do that, I am going to put the [STAThread] attribute back. It is also the workaround for the time being. Thanks for the bug report, Keith! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Monday, December 12, 2005 1:51 AM To: Discussion of IronPython Subject: [IronPython] Problems with tutorials Encountering a variety of problems with the agents tutorial: a = AgentServerClass() -> should not have () ? a.Load("Merlin.acs") -> throws bad args exception for the Load() method. Doesn't change if I use C:\WINDOWS\msagent\chars\merlin.acs, which exists on my machine. Also doesn't work if I call AgentServerClass.Load("merlin.acs"). NB: I'm using x64. With the Avalon tutorial, I get "can't set arbitrary attributes on built-in type System.Windows.Window" when I try w.Text = "My Avalon Application". Trying to retrieve w.Text gives no-such-attribute error. w.Title does exist, however. w.Content.TextContent should be w.Content.Text, I think. w.Content.PersistentAnimations doesn't exist, and I don't see any likely rename. ----- Keith J. Farmer // kfarmer at thuban.org _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jlam at iunknown.com Mon Dec 12 19:05:30 2005 From: jlam at iunknown.com (John Lam) Date: Mon, 12 Dec 2005 13:05:30 -0500 Subject: [IronPython] Problems with tutorials Message-ID: <1E66B509DC78F74BA1CC22C625B096D103C8B7@dc.iunknown.com> IMHO, this is a feature that should be enabled via a command-line switch; you can't back out of your choice that you make at startup time without potentially serious consequences. I'm doing this via a command line switch + a trampoline function in my Ruby CLR bridge. It seems to be the best approach (even though there are still corner cases in the way I do it since there's no way for me to prevent someone else from turning on COM before the CLR (and my stuff) is delay-loaded. Cheers, -John http://www.iunknown.cm -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Monday, December 12, 2005 12:52 PM To: Discussion of IronPython Subject: Re: [IronPython] Problems with tutorials Believe it or not, this problem is actually caused by the missing [STAThread] attribute on the IronPythonConsole Main. Good to know this :) Seems that when I remove it, I caused problems for more people than I helped. As I said in my previous email to Jacques, I am going to fix this for the next release. If there is no beter way to do that, I am going to put the [STAThread] attribute back. It is also the workaround for the time being. Thanks for the bug report, Keith! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Monday, December 12, 2005 1:51 AM To: Discussion of IronPython Subject: [IronPython] Problems with tutorials Encountering a variety of problems with the agents tutorial: a = AgentServerClass() -> should not have () ? a.Load("Merlin.acs") -> throws bad args exception for the Load() method. Doesn't change if I use C:\WINDOWS\msagent\chars\merlin.acs, which exists on my machine. Also doesn't work if I call AgentServerClass.Load("merlin.acs"). NB: I'm using x64. With the Avalon tutorial, I get "can't set arbitrary attributes on built-in type System.Windows.Window" when I try w.Text = "My Avalon Application". Trying to retrieve w.Text gives no-such-attribute error. w.Title does exist, however. w.Content.TextContent should be w.Content.Text, I think. w.Content.PersistentAnimations doesn't exist, and I don't see any likely rename. ----- Keith J. Farmer // kfarmer at thuban.org _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Mon Dec 12 19:20:42 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 12 Dec 2005 10:20:42 -0800 Subject: [IronPython] Problems with tutorials In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5922D30@df-foxhound-msg.exchange.corp.microsoft.com> As for the avalon example, looks like the object model has changed substantially. The w.Title is the way to go, same for w.Content.TextContent; I also failed to find suitable replacement for the the PersistentAnimations :( Martin -----Original Message----- From: users-bounces at lists.ironpython.com On Behalf Of Keith J. Farmer Sent: Monday, December 12, 2005 1:51 AM To: Discussion of IronPython Subject: [IronPython] Problems with tutorials Encountering a variety of problems with the agents tutorial: a = AgentServerClass() -> should not have () ? a.Load("Merlin.acs") -> throws bad args exception for the Load() method. Doesn't change if I use C:\WINDOWS\msagent\chars\merlin.acs, which exists on my machine. Also doesn't work if I call AgentServerClass.Load("merlin.acs"). NB: I'm using x64. With the Avalon tutorial, I get "can't set arbitrary attributes on built-in type System.Windows.Window" when I try w.Text = "My Avalon Application". Trying to retrieve w.Text gives no-such-attribute error. w.Title does exist, however. w.Content.TextContent should be w.Content.Text, I think. w.Content.PersistentAnimations doesn't exist, and I don't see any likely rename. From dinov at exchange.microsoft.com Mon Dec 12 19:20:32 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Mon, 12 Dec 2005 10:20:32 -0800 Subject: [IronPython] Problems with tutorials In-Reply-To: <1E66B509DC78F74BA1CC22C625B096D103C8B7@dc.iunknown.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214EA41B69@df-foxhound-msg.exchange.corp.microsoft.com> If you're doing this on v1.0/v1.1 what you suggest will work most of the time as you've observed but Whidbey had a breaking change to make this more predictable: http://www.gotdotnet.com/team/changeinfo/Backwards1.1to2.0%5Cdefault.aspx - search for Initialization of MTA and STA threads Probably the best way to deal w/ this (other than having 2 EXEs) now is to create a new thread and mark the thread state before starting the thread. Then you can have the main thread die off or do a Join on the new thread and report back the exit code. But maybe your trampoline is already spinning up a new thread... -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of John Lam Sent: Monday, December 12, 2005 10:06 AM To: Discussion of IronPython Subject: Re: [IronPython] Problems with tutorials IMHO, this is a feature that should be enabled via a command-line switch; you can't back out of your choice that you make at startup time without potentially serious consequences. I'm doing this via a command line switch + a trampoline function in my Ruby CLR bridge. It seems to be the best approach (even though there are still corner cases in the way I do it since there's no way for me to prevent someone else from turning on COM before the CLR (and my stuff) is delay-loaded. Cheers, -John http://www.iunknown.cm -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly Sent: Monday, December 12, 2005 12:52 PM To: Discussion of IronPython Subject: Re: [IronPython] Problems with tutorials Believe it or not, this problem is actually caused by the missing [STAThread] attribute on the IronPythonConsole Main. Good to know this :) Seems that when I remove it, I caused problems for more people than I helped. As I said in my previous email to Jacques, I am going to fix this for the next release. If there is no beter way to do that, I am going to put the [STAThread] attribute back. It is also the workaround for the time being. Thanks for the bug report, Keith! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Monday, December 12, 2005 1:51 AM To: Discussion of IronPython Subject: [IronPython] Problems with tutorials Encountering a variety of problems with the agents tutorial: a = AgentServerClass() -> should not have () ? a.Load("Merlin.acs") -> throws bad args exception for the Load() method. Doesn't change if I use C:\WINDOWS\msagent\chars\merlin.acs, which exists on my machine. Also doesn't work if I call AgentServerClass.Load("merlin.acs"). NB: I'm using x64. With the Avalon tutorial, I get "can't set arbitrary attributes on built-in type System.Windows.Window" when I try w.Text = "My Avalon Application". Trying to retrieve w.Text gives no-such-attribute error. w.Title does exist, however. w.Content.TextContent should be w.Content.Text, I think. w.Content.PersistentAnimations doesn't exist, and I don't see any likely rename. ----- Keith J. Farmer // kfarmer at thuban.org _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Sat Dec 10 02:00:13 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 9 Dec 2005 17:00:13 -0800 Subject: [IronPython] IronPython 0.9.6 released Message-ID: <4039D552ADAB094BB1EA670F3E96214EA41849@df-foxhound-msg.exchange.corp.microsoft.com> Hello IronPython community, We?ve just released the newest version of IronPython ? 0.9.6. This is most likely the last Alpha version of IronPython before the end of the year when we play to release IronPython 1.0 Beta 1. This build includes many bug fixes for issues reported to us by the community as well as support for many new modules. We are continuing to drive completeness of the Python and support for interoperability between .NET and IronPython. Here are the highlights of the 0.9.6 release, the full list of changes is included at the end of the mail: All missing dictionary methods are now implemented Parser changes for tools integration Weak reference support Itertools module is now implemented Improved debugger sequence point generation, parser & tokenizer improvements Python equality/hashing and CLR equality/hashing separated Unhandled exceptions are no longer passed to the OS Exceptions have better stack traces in the interactive environment locals() support for most common usage scenarios (but not execfile or eval yet) Regular expression improvements: Implement missing methods, support Python named groups, fix match implementation when matching in the middle of a string, We?d also like to thank everyone in the community for your bug reports and suggestions that helped make this a better release: Mike Hostetler, Nicholas Jacobson, Davy Mitchell, Alexei Bocharov, Rosenkrantz, Jacques de Hooge, Anthony Tarlano, diaphanein, pchasco, Koly, Sumit Basu, Shon Shah, Angelo Xu, Boris Capitanu, carlostekken, Flexibal, glchapman, Luis M. Gonzalez, reportlabrobin, spencermah You can download the IronPython 0.9.6 release from: http://www.microsoft.com/downloads/details.aspx?FamilyID=e73fad51-6566-4f4a-a42c-33bb5b89b4e8&displaylang=en Thanks and keep in touch, The IronPython team Full list of changes and bug fixes: =================================== Duplicate parameters & fancy kw args fixed Kw-arg property assignment fixed Module on old class moved into dictionary Improved syntax errors for null expressions Exec supports multi-line expressions Dict now has copy, and update supports user defined dictionaries == will call user defined __cmp__ function Improved error reporting for parser Duplicate named parameters detected by parser & reported Integer performance improvements & possible correctness improvements Bitwise operators implemented for bool IronPython compiles warning free Kw args & default params work better together __hash__ is called for user defined types when hashing All old style classes are of type instance Code gen no longer produced duplicate parameter names Tab at end of file no longer produces parser error Throwing strings is supported Backwards slices (m on module level generates invalid program exception rather than SyntaxError Equals between boxed bool and Python bool now returns True String manipulation produces incorrect results - bug fixed From Aaron.Marten at microsoft.com Mon Dec 12 21:51:37 2005 From: Aaron.Marten at microsoft.com (Aaron Marten) Date: Mon, 12 Dec 2005 12:51:37 -0800 Subject: [IronPython] IronPython IDE Message-ID: <5FCAA6E21F110544B8CD0EEBB51B0AE8E3F655@RED-MSG-20.redmond.corp.microsoft.com> Hi Giles You'll need to build the various projects that get installed to "Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Samples\IronPythonIntegration". Merely building them will also register them in the Visual Studio "experimental hive". The idea is that while you're writing a package for Visual Studio, you don't want to potentially mess up your installed version, so we create a copy of all the settings and have you work inside the "experimental" copy. In order to run VS under this experimental mode, you can use the shortcut that is installed with the Visual Studio SDK on the Start Menu, or run "devenv /rootsuffix Exp" from a VS Command Prompt. Again, I would stress that this is a very early preview of what we're working on. It will be in a more usable state in our next preview release (probably late Jan 2006). If you have more questions about the sample or Visual Studio Extensibility, I would encourage you to check out our homepage and discussion forum: Homepage: http://msdn.microsoft.com/vstudio/extend/ Forum: http://forums.microsoft.com/msdn/showforum.aspx?forumid=57&siteid=1 Thanks, Aaron -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas Sent: Monday, December 12, 2005 4:03 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython IDE Hi Aaron, Thanks for the pointer. Is there any simple documentation on setting this up once you've downloaded it? Cheers, Giles Aaron Marten wrote: > Hi Giles, > I'm on the Visual Studio SDK team here at Microsoft. In > co-operation with the IronPython team, we're currently working on > integrating IronPython into Visual Studio as a sample to ship in our > SDK. We've just released a CTP with the first version of this here: > > http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx > > I also blogged a bit about the Dec CTP release of the Visual Studio SDK > here: > http://blogs.msdn.com/aaronmar/archive/2005/12/09/502202.aspx > > Note that right now, the integration code is in an incomplete state, but > we do have the beginnings of a project system and language service > working. Note that right now, the integration is only available as a > preview sample in the Visual Studio SDK, so you'll have to agree to our > license to get the code. > > Thanks! > Aaron Marten (Microsoft) > > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Thursday, December 08, 2005 9:34 AM > To: Discussion of IronPython > Subject: [IronPython] IronPython IDE > > Hi all, > > Another question - what are people using to edit/debug IronPython code? > > My most recent projects have all been with Java using IntelliJ, and I've > > only just moved over to .NET. I'm told that Visual Studio 2005 is a > good IDE - but it appears that it only supports C# and Visual Basic. > > Right now I'm using TextPad with a Python syntax highlighing > configuration file, but if there's anything better out there - or if my > understanding wrt VS2005 is wrong - then I'd love to hear about it! > > > Cheers, > > Giles > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From giles.thomas at resolversystems.com Tue Dec 13 11:39:00 2005 From: giles.thomas at resolversystems.com (Giles Thomas) Date: Tue, 13 Dec 2005 10:39:00 +0000 Subject: [IronPython] IronPython IDE In-Reply-To: <5FCAA6E21F110544B8CD0EEBB51B0AE8E3F655@RED-MSG-20.redmond.corp.microsoft.com> References: <5FCAA6E21F110544B8CD0EEBB51B0AE8E3F655@RED-MSG-20.redmond.corp.microsoft.com> Message-ID: <439EA4C4.1060705@resolversystems.com> Many thanks, Aaron - I have it working now. Giles Aaron Marten wrote: > Hi Giles > You'll need to build the various projects that get installed to > "Program Files\Visual Studio 2005 > SDK\2005.12\VisualStudioIntegration\Samples\IronPythonIntegration". > > Merely building them will also register them in the Visual > Studio "experimental hive". The idea is that while you're writing a > package for Visual Studio, you don't want to potentially mess up your > installed version, so we create a copy of all the settings and have you > work inside the "experimental" copy. > > In order to run VS under this experimental mode, you can use the > shortcut that is installed with the Visual Studio SDK on the Start Menu, > or run "devenv /rootsuffix Exp" from a VS Command Prompt. > > Again, I would stress that this is a very early preview of what > we're working on. It will be in a more usable state in our next preview > release (probably late Jan 2006). > > If you have more questions about the sample or Visual Studio > Extensibility, I would encourage you to check out our homepage and > discussion forum: > > Homepage: http://msdn.microsoft.com/vstudio/extend/ > Forum: > http://forums.microsoft.com/msdn/showforum.aspx?forumid=57&siteid=1 > > Thanks, > Aaron > > -----Original Message----- > From: users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas > Sent: Monday, December 12, 2005 4:03 AM > To: Discussion of IronPython > Subject: Re: [IronPython] IronPython IDE > > Hi Aaron, > > Thanks for the pointer. Is there any simple documentation on setting > this up once you've downloaded it? > > > Cheers, > > Giles > > > Aaron Marten wrote: > >>Hi Giles, >> I'm on the Visual Studio SDK team here at Microsoft. In >>co-operation with the IronPython team, we're currently working on >>integrating IronPython into Visual Studio as a sample to ship in our >>SDK. We've just released a CTP with the first version of this here: >> >> http://affiliate.vsipmembers.com/downloads/41/UserFileDownload.ashx >> >>I also blogged a bit about the Dec CTP release of the Visual Studio > > SDK > >>here: >>http://blogs.msdn.com/aaronmar/archive/2005/12/09/502202.aspx >> >>Note that right now, the integration code is in an incomplete state, > > but > >>we do have the beginnings of a project system and language service >>working. Note that right now, the integration is only available as a >>preview sample in the Visual Studio SDK, so you'll have to agree to > > our > >>license to get the code. >> >>Thanks! >> Aaron Marten (Microsoft) >> >> >>-----Original Message----- >>From: users-bounces at lists.ironpython.com >>[mailto:users-bounces at lists.ironpython.com] On Behalf Of Giles Thomas >>Sent: Thursday, December 08, 2005 9:34 AM >>To: Discussion of IronPython >>Subject: [IronPython] IronPython IDE >> >>Hi all, >> >>Another question - what are people using to edit/debug IronPython > > code? > >>My most recent projects have all been with Java using IntelliJ, and > > I've > >>only just moved over to .NET. I'm told that Visual Studio 2005 is a >>good IDE - but it appears that it only supports C# and Visual Basic. >> >>Right now I'm using TextPad with a Python syntax highlighing >>configuration file, but if there's anything better out there - or if > > my > >>understanding wrt VS2005 is wrong - then I'd love to hear about it! >> >> >>Cheers, >> >>Giles >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>_______________________________________________ >>users mailing list >>users at lists.ironpython.com >>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- Giles Thomas Managing Director Resolver Systems Ltd giles.thomas at resolversystems.com From lattam at mac.com Wed Dec 14 04:51:43 2005 From: lattam at mac.com (Michael Latta) Date: Tue, 13 Dec 2005 19:51:43 -0800 Subject: [IronPython] Execution state? In-Reply-To: <439EA4C4.1060705@resolversystems.com> Message-ID: <200512140353.jBE3r7Em011522@mac.com> I have a question about the execution state for IronPython. Does the engine instance hold the intermediate results? Can I have 2 engine instances for example and they have independent definitions, local variables, etc? Or are all changes affected through an engine global to the current VM? To restate, if I wanted to have 2 windows that both execute IronPython what do I need to do to keep their results isolated from each other? What do I need to do to let them share results? Can I execute IronPython code on 2 threads using the same or different engine objects? Michael From ml.cyresse at gmail.com Wed Dec 14 06:14:03 2005 From: ml.cyresse at gmail.com (Liam Clarke) Date: Wed, 14 Dec 2005 18:14:03 +1300 Subject: [IronPython] DW.exe... Message-ID: Hi all, Playing with the November Avalon CTP, and when my script causes an exception through an incorrect parameter or similar (in the Avalon bits) a new process of DW.exe gets spawned. I see that DW is just dumping data for a bug report, but filing a bug report for a bad argument is a bit ludicrous, I thought. Is this IronPython or solely Avalon doing this? Can anyone offer suggestions on preventing it? Regards, Liam Clarke From Martin.Maly at microsoft.com Wed Dec 14 07:24:48 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 13 Dec 2005 22:24:48 -0800 Subject: [IronPython] DW.exe... In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D7465@df-foxhound-msg.exchange.corp.microsoft.com> Are you using IronPython 0.9.6? The 0.9.6 version of IronPython should catch unhandled exceptions and print stack trace rather than passing the exception to the OS (for Dr. Watson - hence DW.exe) As for the 0.9.5 version of IronPytohn, there was a known problem, a change in our exception handling logic that would pass unhandled exceptions to the OS which then triggers Watson. Please let me know if you have problems on IronPython 0.9.6 and, if so, do you use IronPython from console (IronPythonConsole.exe) or is it embedded in another application? Thanks Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke Sent: Tuesday, December 13, 2005 9:14 PM To: Discussion of IronPython Subject: [IronPython] DW.exe... Hi all, Playing with the November Avalon CTP, and when my script causes an exception through an incorrect parameter or similar (in the Avalon bits) a new process of DW.exe gets spawned. I see that DW is just dumping data for a bug report, but filing a bug report for a bad argument is a bit ludicrous, I thought. Is this IronPython or solely Avalon doing this? Can anyone offer suggestions on preventing it? Regards, Liam Clarke _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Wed Dec 14 07:41:17 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 13 Dec 2005 22:41:17 -0800 Subject: [IronPython] Execution state? In-Reply-To: <200512140353.jBE3r7Em011522@mac.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D7469@df-foxhound-msg.exchange.corp.microsoft.com> Hi Michael, Much of the state of IronPython engine execution is isolated, however not everything is so in some cases the multiple instances of IronPython engine can influence each other, however those cases should go away over time. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Latta Sent: Tuesday, December 13, 2005 7:52 PM To: 'Discussion of IronPython' Subject: [IronPython] Execution state? I have a question about the execution state for IronPython. Does the engine instance hold the intermediate results? Can I have 2 engine instances for example and they have independent definitions, local variables, etc? Or are all changes affected through an engine global to the current VM? To restate, if I wanted to have 2 windows that both execute IronPython what do I need to do to keep their results isolated from each other? What do I need to do to let them share results? Can I execute IronPython code on 2 threads using the same or different engine objects? Michael _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ml.cyresse at gmail.com Wed Dec 14 07:45:20 2005 From: ml.cyresse at gmail.com (Liam Clarke) Date: Wed, 14 Dec 2005 19:45:20 +1300 Subject: [IronPython] DW.exe... In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F59D7465@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F59D7465@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: Hi Martin, It's IronPython 0.9.6 on .NET 2.0.50727.42; and I'm running the console, I guess, if that includes ironpythonconsole.exe . The script I'm trying to work with is here - http://rafb.net/paste/results/mk0Jrn95.html (for the next 24 hours at least) Regards, Liam Clarke On 12/14/05, Martin Maly wrote: > Are you using IronPython 0.9.6? The 0.9.6 version of IronPython should catch unhandled exceptions and print stack trace rather than passing the exception to the OS (for Dr. Watson - hence DW.exe) > > As for the 0.9.5 version of IronPytohn, there was a known problem, a change in our exception handling logic that would pass unhandled exceptions to the OS which then triggers Watson. > > Please let me know if you have problems on IronPython 0.9.6 and, if so, do you use IronPython from console (IronPythonConsole.exe) or is it embedded in another application? > > Thanks > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke > Sent: Tuesday, December 13, 2005 9:14 PM > To: Discussion of IronPython > Subject: [IronPython] DW.exe... > > Hi all, > > Playing with the November Avalon CTP, and when my script causes an > exception through an incorrect parameter or similar (in the Avalon > bits) a new process of DW.exe gets spawned. > > I see that DW is just dumping data for a bug report, but filing a bug > report for a bad argument is a bit ludicrous, I thought. > > Is this IronPython or solely Avalon doing this? > > Can anyone offer suggestions on preventing it? > > Regards, > > Liam Clarke > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Martin.Maly at microsoft.com Wed Dec 14 07:56:59 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 13 Dec 2005 22:56:59 -0800 Subject: [IronPython] DW.exe... In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D7473@df-foxhound-msg.exchange.corp.microsoft.com> Hi Liam, The root of the problem is that you create separate thread. Once you do that, the second thread doesn't have global try: except: statement in it so all exceptions fly right through to the OS, which kills the process and displays Dr. Watson. You can do something like: def start(): try: app = MyApp() app.Run() except Exception, e: print e t = Thread(start) t.ApartmentState = ApartmentState.STA t.Start() t.Join() to catch the 2nd thread's exceptions and get diagnostics. I hope this helps Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke Sent: Tuesday, December 13, 2005 10:45 PM To: Discussion of IronPython Subject: Re: [IronPython] DW.exe... Hi Martin, It's IronPython 0.9.6 on .NET 2.0.50727.42; and I'm running the console, I guess, if that includes ironpythonconsole.exe . The script I'm trying to work with is here - http://rafb.net/paste/results/mk0Jrn95.html (for the next 24 hours at least) Regards, Liam Clarke On 12/14/05, Martin Maly wrote: > Are you using IronPython 0.9.6? The 0.9.6 version of IronPython should catch unhandled exceptions and print stack trace rather than passing the exception to the OS (for Dr. Watson - hence DW.exe) > > As for the 0.9.5 version of IronPytohn, there was a known problem, a change in our exception handling logic that would pass unhandled exceptions to the OS which then triggers Watson. > > Please let me know if you have problems on IronPython 0.9.6 and, if so, do you use IronPython from console (IronPythonConsole.exe) or is it embedded in another application? > > Thanks > Martin > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke > Sent: Tuesday, December 13, 2005 9:14 PM > To: Discussion of IronPython > Subject: [IronPython] DW.exe... > > Hi all, > > Playing with the November Avalon CTP, and when my script causes an > exception through an incorrect parameter or similar (in the Avalon > bits) a new process of DW.exe gets spawned. > > I see that DW is just dumping data for a bug report, but filing a bug > report for a bad argument is a bit ludicrous, I thought. > > Is this IronPython or solely Avalon doing this? > > Can anyone offer suggestions on preventing it? > > Regards, > > Liam Clarke > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ml.cyresse at gmail.com Wed Dec 14 08:32:01 2005 From: ml.cyresse at gmail.com (Liam Clarke) Date: Wed, 14 Dec 2005 20:32:01 +1300 Subject: [IronPython] DW.exe... In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F59D7473@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F59D7473@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: Hi Martin, Ah thanks, that sorts it. I thought it might be the case... I was tearing my hair out initially when I received a message regarding a thread needing to be STA... I learnt more than I wanted to with that regard. I will file that in the good to know box. And, thanks for your explanation, makes sense; but I'm still left with that hollow feeling... on account of the Avalon big black window bug http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=2e26e6c9-b7b1-4a5d-b661-d834330deb73 :-) Good to know it's that it's consistent across XAML, IronPython and C#. Thanks, Liam On 12/14/05, Martin Maly wrote: > Hi Liam, > > The root of the problem is that you create separate thread. Once you do that, the second thread doesn't have global try: except: statement in it so all exceptions fly right through to the OS, which kills the process and displays Dr. Watson. > > You can do something like: > > def start(): > try: > app = MyApp() > app.Run() > except Exception, e: > print e > > t = Thread(start) > t.ApartmentState = ApartmentState.STA > t.Start() > t.Join() > > to catch the 2nd thread's exceptions and get diagnostics. > > > I hope this helps > Martin > > > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke > Sent: Tuesday, December 13, 2005 10:45 PM > To: Discussion of IronPython > Subject: Re: [IronPython] DW.exe... > > Hi Martin, > > It's IronPython 0.9.6 on .NET 2.0.50727.42; and I'm running the > console, I guess, if that includes ironpythonconsole.exe > . The script I'm trying to work with is here - > http://rafb.net/paste/results/mk0Jrn95.html (for the next 24 hours at least) > > Regards, > > Liam Clarke > > On 12/14/05, Martin Maly wrote: > > Are you using IronPython 0.9.6? The 0.9.6 version of IronPython should catch unhandled exceptions and print stack trace rather than passing the exception to the OS (for Dr. Watson - hence DW.exe) > > > > As for the 0.9.5 version of IronPytohn, there was a known problem, a change in our exception handling logic that would pass unhandled exceptions to the OS which then triggers Watson. > > > > Please let me know if you have problems on IronPython 0.9.6 and, if so, do you use IronPython from console (IronPythonConsole.exe) or is it embedded in another application? > > > > Thanks > > Martin > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Liam Clarke > > Sent: Tuesday, December 13, 2005 9:14 PM > > To: Discussion of IronPython > > Subject: [IronPython] DW.exe... > > > > Hi all, > > > > Playing with the November Avalon CTP, and when my script causes an > > exception through an incorrect parameter or similar (in the Avalon > > bits) a new process of DW.exe gets spawned. > > > > I see that DW is just dumping data for a bug report, but filing a bug > > report for a bad argument is a bit ludicrous, I thought. > > > > Is this IronPython or solely Avalon doing this? > > > > Can anyone offer suggestions on preventing it? > > > > Regards, > > > > Liam Clarke > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From Detlef.Stute at al-lighting.com Wed Dec 14 09:15:50 2005 From: Detlef.Stute at al-lighting.com (Stute, Detlef ALRT/EEG4) Date: Wed, 14 Dec 2005 09:15:50 +0100 Subject: [IronPython] Console and comment line 0.9.6 Message-ID: Hi all, I'm using IronPython 0.9.6 as scripting engine. I redirect the Iconsole to my own ReadLine and so on. In my ReadLine I read a file and transfer it line by line to the scripting engine. It was working with version 0.9.3 To make a long story short: When the file includes a comment line ( like "# this is a comment"), the console only answers for the future with "...". The same occurred, on IronPythonConsole.exe when you enter a line starting with '#' . I resolved the problem in the file PythonEngine.cs function DoOneInteractive public bool DoOneInteractive( Frame topFrame ) { MyConsole.Write( sys.ps1.ToString(), Style.Prompt ); StringBuilder b = new StringBuilder(); Stmt s; bool isMultiLine = false; while( true ) { string line = MyConsole.ReadLine(); if( line == null ) { if( ExecWrapper != null ) { Ops.Call( ExecWrapper, new object[] { null } ); } return false; } b.Append( line ); b.Append( "\n" ); s = ParseText( b.ToString(), line.Length == 0 ); // !!! this was the old line !!! // if( line.Length == 0) if( line.Length == 0 || null == s) { break; } if( !isMultiLine ) { isMultiLine = true; if( s != null ) break; } MyConsole.Write( sys.ps2.ToString(), Style.Prompt ); } ... More code I added a break from the loop when ParseText returns null. Is that the right way? I found that the difference between 0.9.3 and 0.9.6 is that the comment is now a token ( TokenKind.cs). Mit freundlichen Gr??en/ kind regards/ Cordiali Saluti Detlef Stute SEATEC GmbH Robert-Bosch-Breite 10 37081 Goettingen Germany Mailto: detlef.stute at seatec-gmbh.com www.seatec-gmbh.com From stan at phidani.be Wed Dec 14 10:16:48 2005 From: stan at phidani.be (Stanislas Pinte) Date: Wed, 14 Dec 2005 10:16:48 +0100 Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace Message-ID: <439FE300.1020503@phidani.be> hello, Has anyone an idea of the following: I have a script: > #ScriptingLoopTest python code > > def init_session(settings, fileNamePrefix): > pass > > def handle_message(message): > passmmm and I use IronPython 0.96 as embedded scripting engine. private PythonEngine engine = new PythonEngine(); engine.Import(moduleName); f = engine.Evaluate(moduleName + ".init_session") as Function; g = engine.Evaluate(moduleName + ".handle_message") as Function; when I do g.Call(...), IP detects that the passmm symbol is not defined, and throws a PythonException. This exception only contains that: "name 'passmmm' not defined". It doesn't contain the line number in the imported script, nor the trace, whereas Python 2.4 gives the following: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def handle_message(message): .. passmmm .. >>> handle_message(3) Traceback (most recent call last): File "", line 1, in ? File "", line 2, in handle_message NameError: global name 'passmmm' is not defined >>> It is very important for me to be able to give the user that kind of feedback...is there a way to do it? Thanks a lot, Stan. From Martin.Maly at microsoft.com Wed Dec 14 18:02:30 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 14 Dec 2005 09:02:30 -0800 Subject: [IronPython] Console and comment line 0.9.6 In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D74C7@df-foxhound-msg.exchange.corp.microsoft.com> Hello, As for the code changes, the console interactive loop is not perfect yet and we will improve it to handle more common cases. The change to make comment a token is only for the tokenizer in the 'verbatim' mode, which is only when used by the Visual Studio colorizer. Otherwise the tokenizer simply ignores the comments. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stute, Detlef ALRT/EEG4 Sent: Wednesday, December 14, 2005 12:16 AM To: users at lists.ironpython.com Subject: [IronPython] Console and comment line 0.9.6 Hi all, I'm using IronPython 0.9.6 as scripting engine. I redirect the Iconsole to my own ReadLine and so on. In my ReadLine I read a file and transfer it line by line to the scripting engine. It was working with version 0.9.3 To make a long story short: When the file includes a comment line ( like "# this is a comment"), the console only answers for the future with "...". The same occurred, on IronPythonConsole.exe when you enter a line starting with '#' . ... More code I added a break from the loop when ParseText returns null. Is that the right way? I found that the difference between 0.9.3 and 0.9.6 is that the comment is now a token ( TokenKind.cs). From almondb at gmail.com Wed Dec 14 18:14:40 2005 From: almondb at gmail.com (Brian) Date: Wed, 14 Dec 2005 09:14:40 -0800 Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace In-Reply-To: <439FE300.1020503@phidani.be> References: <439FE300.1020503@phidani.be> Message-ID: <21f1e2700512140914o144fac4fj79236b7667bc46f6@mail.gmail.com> On 12/14/05, Stanislas Pinte wrote: > It is very important for me to be able to give the user that kind of > feedback...is there a way to do it? Martin Maly recently posted: "The reason you see the 'report an error to MS' dialog is our change in exception handling that I described earlier. We are going to fix it for the next release and display the exceptions coming from running scripts in a way that standard Python does. Once we fix that, we should get file and line information for the exceptions, and if not, we'll make sure to fix that too." From Martin.Maly at microsoft.com Wed Dec 14 18:17:22 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 14 Dec 2005 09:17:22 -0800 Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace In-Reply-To: <439FE300.1020503@phidani.be> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D74E4@df-foxhound-msg.exchange.corp.microsoft.com> When you catch the exception after g.Call(...), do you also examine the exception's CallStack? I tried simpler variation on your code: try { engine.Import("x"); Function f = engine.Evaluate("x.f") as Function; f.Call(); } catch (Exception x) { output.write(x.ToString()); output.write(x.StackTrace); } Where x.py is: def f(): return 1/0 And I got following output: x.ToString(): Attempted to divide by zero. x.StackTrace: at IronPython.Objects.IntOps.Divide(Int32 x, Int32 y) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 169 at IronPython.Objects.IntOps.FloorDivide(Int32 x, Object other) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 382 at IronPython.Objects.IntOps.Divide(Int32 x, Object other) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 164 at IronPython.Objects.Ops.Divide(Object x, Object y) in d:\Ip\IronPython\Src\IronPython\Objects\Ops.cs:line 866 at x.f$f0() in D:\Ip\IronPython\Presentations\Editor\bin\Debug\x.py:line 2 at IronPython.Objects.Function0.Call() in d:\Ip\IronPython\Src\IronPython\Objects\Function.cs:line 50 at Editor.Editor.RunScript(Object sender, EventArgs e) in D:\Ip\IronPython\Presentations\Editor\Editor.cs:line 45 -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stanislas Pinte Sent: Wednesday, December 14, 2005 1:17 AM To: users at lists.ironpython.com Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace hello, Has anyone an idea of the following: I have a script: > #ScriptingLoopTest python code > > def init_session(settings, fileNamePrefix): > pass > > def handle_message(message): > passmmm and I use IronPython 0.96 as embedded scripting engine. private PythonEngine engine = new PythonEngine(); engine.Import(moduleName); f = engine.Evaluate(moduleName + ".init_session") as Function; g = engine.Evaluate(moduleName + ".handle_message") as Function; when I do g.Call(...), IP detects that the passmm symbol is not defined, and throws a PythonException. This exception only contains that: "name 'passmmm' not defined". It doesn't contain the line number in the imported script, nor the trace, whereas Python 2.4 gives the following: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def handle_message(message): .. passmmm .. >>> handle_message(3) Traceback (most recent call last): File "", line 1, in ? File "", line 2, in handle_message NameError: global name 'passmmm' is not defined >>> It is very important for me to be able to give the user that kind of feedback...is there a way to do it? Thanks a lot, Stan. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From ryan at acceleration.net Wed Dec 14 19:14:31 2005 From: ryan at acceleration.net (Ryan Davis) Date: Wed, 14 Dec 2005 13:14:31 -0500 Subject: [IronPython] Live usage? Message-ID: <43A06107.6060002@acceleration.net> Hello, I'm considering adding some scripting to one of my applications using the IronPython engine, and I before I do, I know the first question I'm going to be asked: is anyone else using IronPython as a scripting language in a live application? Thanks, Ryan From martin001 at axure.com Sun Dec 11 08:34:30 2005 From: martin001 at axure.com (Martin Smith) Date: Sat, 10 Dec 2005 23:34:30 -0800 Subject: [IronPython] IronPython IDE In-Reply-To: Message-ID: <20051211073243.KOFK20050.fed1rmmtao06.cox.net@martin> The problem appears to be with the passport integration. If you go to the main VSIP site, http://affiliate.vsipmembers.com, it'll make you sign up with a valid passport account and enter a bit more information. Then you'll be able to download the December CTP of the Visual Studio SDK. Once installed, however, it's anybody's guess as to how to actually get the IP integration. I can see the IP samples for MSBuild and the source editor, but I don't have any idea how to get VS to recognize those and let you build Python projects. If anyone has had success with the latter, please let me know. That said... pretty excited about IronPython 1.0 and VS.NET integration! Way to go Jim, Martin and Aaron. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Saturday, December 10, 2005 6:37 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython IDE I noticed as much last night. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Chris Trimble Sent: Saturday, 10 December 2005 18:14 I'd like to check this out, but this URL doesn't seem to be working for me. It just sits for a while and times out. Anyone else having problems? _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From stan at phidani.be Tue Dec 13 16:19:44 2005 From: stan at phidani.be (Stanislas Pinte) Date: Tue, 13 Dec 2005 16:19:44 +0100 Subject: [IronPython] Get the line number for a PythonException Message-ID: <1134487184.439ee6908a9d6@webmail.raincode.com> Hello, I am using IronPython as embedded scripting engine. I am invoking python functions defined in a script like that: engine.AddToPath(Path.GetDirectoryName(scriptPath)); engine.Import(moduleName); f = engine.Evaluate(moduleName + "." + functionName) as Function; .. later: .. f.Call(...) --> when I get a PythonException there, I only get the raw message like: "'bool' object has no attribute 'test'" Is there a way to know the line number of the error? Thanks a lot, Stan. From t.berkovits at worldnet.att.net Wed Dec 14 19:38:48 2005 From: t.berkovits at worldnet.att.net (Tibor Berkovits) Date: Wed, 14 Dec 2005 13:38:48 -0500 Subject: [IronPython] Exec Question Message-ID: <000501c600dd$a08a04d0$d368c144@turing> The following python code snippet glob = {} loc = {} exec "a=12" in glob, loc behaves differently under IP 0.9.5 vs. IP 0.9.6 with respect to which dictionary the definition of 'a' is inserted into. In IP095 it goes to loc, while in IP096 it goes to glob. Can someone please explain which one is the "correct" behavior ? Regards, TB From Martin.Maly at microsoft.com Wed Dec 14 20:31:33 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 14 Dec 2005 11:31:33 -0800 Subject: [IronPython] Exec Question In-Reply-To: <000501c600dd$a08a04d0$d368c144@turing> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F59D75D1@df-foxhound-msg.exchange.corp.microsoft.com> The correct behavior is that of Cpython in this case: Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> glob = {} >>> loc = {} >>> exec "a=12" in glob, loc >>> loc {'a': 12} Seems that we have introduced bug in 0.9.6 Thanks! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tibor Berkovits Sent: Wednesday, December 14, 2005 10:39 AM To: users at lists.ironpython.com Cc: Tibor Berkovits Subject: [IronPython] Exec Question The following python code snippet glob = {} loc = {} exec "a=12" in glob, loc behaves differently under IP 0.9.5 vs. IP 0.9.6 with respect to which dictionary the definition of 'a' is inserted into. In IP095 it goes to loc, while in IP096 it goes to glob. Can someone please explain which one is the "correct" behavior ? Regards, TB _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From iain.cartwright at atari.com Thu Dec 15 00:48:00 2005 From: iain.cartwright at atari.com (Cartwright, Iain) Date: Thu, 15 Dec 2005 10:48:00 +1100 Subject: [IronPython] IronPython IDE Message-ID: If you build the IronPython project (something like C:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Samples\IronPythonIntegration\Project\Py thonProject.sln) in VS 2005 (started from the experimental hive link in the vsip menu) it automatically registers the IronPython Extension. Just re-start VS 2005 (again using the experimental hive) and you will be able to create a new IronPython project. That's as far as I have got. iain -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Smith Sent: Sunday, 11 December 2005 6:35 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython IDE The problem appears to be with the passport integration. If you go to the main VSIP site, http://affiliate.vsipmembers.com, it'll make you sign up with a valid passport account and enter a bit more information. Then you'll be able to download the December CTP of the Visual Studio SDK. Once installed, however, it's anybody's guess as to how to actually get the IP integration. I can see the IP samples for MSBuild and the source editor, but I don't have any idea how to get VS to recognize those and let you build Python projects. If anyone has had success with the latter, please let me know. That said... pretty excited about IronPython 1.0 and VS.NET integration! Way to go Jim, Martin and Aaron. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Saturday, December 10, 2005 6:37 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython IDE I noticed as much last night. ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Chris Trimble Sent: Saturday, 10 December 2005 18:14 I'd like to check this out, but this URL doesn't seem to be working for me. It just sits for a while and times out. Anyone else having problems? _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Thu Dec 15 00:55:20 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 14 Dec 2005 15:55:20 -0800 Subject: [IronPython] IronPython IDE References: Message-ID: Actually, you should build all four projects under integration. If you reset the experimental hive, you need to be patient, since it'll take a while. Also, I was bit by a RTM bug -- sometimes you'll see just "project" or just "web site" in the start page's create/open part. You need to use tools | import and export settings dialog to reset the settings -- I reset to general development. Doing that clearned things up. ________________________________ From: users-bounces at lists.ironpython.com on behalf of Cartwright, Iain Sent: Wed 12/14/2005 3:48 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython IDE If you build the IronPython project (something like C:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Samples\IronPythonIntegration\Project\Py thonProject.sln) in VS 2005 (started from the experimental hive link in the vsip menu) it automatically registers the IronPython Extension. Just re-start VS 2005 (again using the experimental hive) and you will be able to create a new IronPython project. That's as far as I have got. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3928 bytes Desc: not available URL: From ironpython at bobs.org Thu Dec 15 02:19:39 2005 From: ironpython at bobs.org (Bob Arnson) Date: Wed, 14 Dec 2005 17:19:39 -0800 Subject: [IronPython] IronPython IDE In-Reply-To: Message-ID: <004001c60115$a2d16250$6400a8c0@ION> > If you build the IronPython project (something like > C:\Program Files\Visual > Studio 2005 > SDK\2005.12\VisualStudioIntegration\Samples\IronPythonIntegrat > ion\Project\Py > thonProject.sln) in VS 2005 (started from the experimental > hive link in the > vsip menu) it automatically registers the IronPython Extension. You can build the projects under the "normal" Visual Studio hive (aka "retail"). The projects register their packages under the experimental hive for development/debugging purposes -- so you can wipe the experimental hive and get back to a known-good state. Eventually, you'll be able to run an installer for just the IronPython integration and not have to build from source. sig://boB http://bobs.org From Detlef.Stute at al-lighting.com Thu Dec 15 08:11:26 2005 From: Detlef.Stute at al-lighting.com (Stute, Detlef ALRT/EEG4) Date: Thu, 15 Dec 2005 08:11:26 +0100 Subject: [IronPython] Live usage? Message-ID: Hi Ryan, I try to integrate IronPython into our test application. This should run on several test units. We want to split our test skripts into several python files, do output to xml files, ... At this time I start integrating the scripting engine into my program. This works fine at the moment. Mit freundlichen Gr??en/ kind regards/ Cordiali Saluti Detlef Stute SEATEC GmbH Robert-Bosch-Breite 10 37081 Goettingen Germany Mailto: detlef.stute at seatec-gmbh.com www.seatec-gmbh.com From stan at phidani.be Thu Dec 15 09:35:09 2005 From: stan at phidani.be (Stanislas Pinte) Date: Thu, 15 Dec 2005 09:35:09 +0100 Subject: [IronPython] Live usage? In-Reply-To: <43A06107.6060002@acceleration.net> References: <43A06107.6060002@acceleration.net> Message-ID: <43A12ABD.30008@phidani.be> Ryan Davis wrote: > Hello, > > I'm considering adding some scripting to one of my applications using > the IronPython engine, we are integrating it today in our product. (http://www.ertmssolutions.com/sniffer.html). By the way, thanks a lot to the IP team! Stan. and I before I do, I know the first question I'm > going to be asked: is anyone else using IronPython as a scripting > language in a live application? > > Thanks, > Ryan > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From stan at phidani.be Thu Dec 15 09:43:50 2005 From: stan at phidani.be (Stanislas Pinte) Date: Thu, 15 Dec 2005 09:43:50 +0100 Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F59D74E4@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F59D74E4@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43A12CC6.2030302@phidani.be> Martin Maly wrote: > When you catch the exception after g.Call(...), do you also examine the exception's CallStack? No, I did not! And thanks a lot, it indeed contains all the info I need: at script.hop$f1() in ...\script.py:line 10 at IronPython.Objects.Function0.Call() at IronPython.Objects.Ops.Call(Object func) at script.init_session$f0(Object busSettings, Object fileNamePrefix)...\script.py:l ine 7 so that with a little processing, I can make my it easy to read!! Thanks a lot for the help. Stan. > > I tried simpler variation on your code: > > try { > engine.Import("x"); > Function f = engine.Evaluate("x.f") as Function; > f.Call(); > } catch (Exception x) { > output.write(x.ToString()); > output.write(x.StackTrace); > } > > Where x.py is: > > def f(): > return 1/0 > > And I got following output: > > x.ToString(): > Attempted to divide by zero. > > x.StackTrace: > at IronPython.Objects.IntOps.Divide(Int32 x, Int32 y) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 169 > at IronPython.Objects.IntOps.FloorDivide(Int32 x, Object other) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 382 > at IronPython.Objects.IntOps.Divide(Int32 x, Object other) in d:\Ip\IronPython\Src\IronPython\Objects\IntOps.cs:line 164 > at IronPython.Objects.Ops.Divide(Object x, Object y) in d:\Ip\IronPython\Src\IronPython\Objects\Ops.cs:line 866 > at x.f$f0() in D:\Ip\IronPython\Presentations\Editor\bin\Debug\x.py:line 2 > at IronPython.Objects.Function0.Call() in d:\Ip\IronPython\Src\IronPython\Objects\Function.cs:line 50 > at Editor.Editor.RunScript(Object sender, EventArgs e) in D:\Ip\IronPython\Presentations\Editor\Editor.cs:line 45 > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stanislas Pinte > Sent: Wednesday, December 14, 2005 1:17 AM > To: users at lists.ironpython.com > Subject: [IronPython] Stack Traces in IronPython 0.96 do not contain python stack trace > > hello, > > Has anyone an idea of the following: > > I have a script: > > >>#ScriptingLoopTest python code >> >>def init_session(settings, fileNamePrefix): >> pass >> >>def handle_message(message): >> passmmm > > > and I use IronPython 0.96 as embedded scripting engine. > > private PythonEngine engine = new PythonEngine(); > engine.Import(moduleName); > f = engine.Evaluate(moduleName + ".init_session") as Function; > g = engine.Evaluate(moduleName + ".handle_message") as Function; > > when I do g.Call(...), IP detects that the passmm symbol is not > defined, and throws a PythonException. > > This exception only contains that: > > "name 'passmmm' not defined". > > It doesn't contain the line number in the imported script, nor the > trace, whereas Python 2.4 gives the following: > > Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > >>>>def handle_message(message): > > . passmmm > . > >>>>handle_message(3) > > Traceback (most recent call last): > File "", line 1, in ? > File "", line 2, in handle_message > NameError: global name 'passmmm' is not defined > > > It is very important for me to be able to give the user that kind of > feedback...is there a way to do it? > > Thanks a lot, > > Stan. > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From srinivasarao_k at apollolife.com Thu Dec 15 10:03:24 2005 From: srinivasarao_k at apollolife.com (Srinivasa Rao_k) Date: Thu, 15 Dec 2005 14:33:24 +0530 Subject: [IronPython] how can i check the syntax of python code from c#.net In-Reply-To: <43A12CC6.2030302@phidani.be> Message-ID: hi, iam using ironpython 0.9.5, if anybody knows, how to check the syntax of python code from c#.net, please tell me as soon as possible.... Thanks Srinivasarao 91-9885334248 ? This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify the ISMS team of AHSL through ISMS at apollolife.com? From sdrucker at microsoft.com Thu Dec 15 20:32:46 2005 From: sdrucker at microsoft.com (Steven Drucker) Date: Thu, 15 Dec 2005 11:32:46 -0800 Subject: [IronPython] Iron Python on .NET Compact Framework Message-ID: I know this has been asked before, but upon searching the archives, I didn't see a response. What's the potential for running IP on .NET Compact Framework? What's missing? How much work would it take to make this possible? From jimhug at exchange.microsoft.com Thu Dec 15 20:45:21 2005 From: jimhug at exchange.microsoft.com (Jim Hugunin) Date: Thu, 15 Dec 2005 11:45:21 -0800 Subject: [IronPython] Iron Python on .NET Compact Framework In-Reply-To: Message-ID: Because IronPython wasn't written targeting CF from the start, I suspect that there are lots of little cases where we used APIs that aren't supported. However, because IronPython tries to only use core APIs I suspect that this would be a modest amount of work. The one exception to that is that CF doesn't support Reflection.Emit for dynamic code generation. This feature is used quite heavily in IronPython's implementation and would take some serious effort to work around. I've talked with the CF team about this and we're looking at options, but it's not a top priority right now. Thanks - Jim -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Steven Drucker Sent: Thursday, December 15, 2005 11:33 AM To: Discussion of IronPython Subject: [IronPython] Iron Python on .NET Compact Framework I know this has been asked before, but upon searching the archives, I didn't see a response. What's the potential for running IP on .NET Compact Framework? What's missing? How much work would it take to make this possible? _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Thu Dec 15 23:54:11 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 15 Dec 2005 14:54:11 -0800 Subject: [IronPython] New proposed exception model for IronPython Message-ID: <4039D552ADAB094BB1EA670F3E96214EBD17CF@df-foxhound-msg.exchange.corp.microsoft.com> One of the changes we're interesting in making for the next release of IronPython is a new exception model that will provide us with a better story for Python, CLI, and developers working in both worlds. The document below describes the changes (and we've also posted this to our Wiki: http://channel9.msdn.com/wiki/default.aspx/IronPython.ExceptionModel) The New IronPython Exception Model With our next release we're planning on offering a new exception model that attempts to fix the problems with our current model.? This document discusses the problems with the current model and the current thinking for the new model. One World or where we are. In IronPython's current exception implementation we have a unified exception type hierarchy.? The Exception class that is visible Python programmers is an instance of PythonException.? PythonException in turn derives from System.Exception and below PythonException there is the standard Python exception hierarchy.? This results in a couple of perceptible differences between IronPython and CPython.? There's a small difference in that our current exception hierarchy does not start at "Exception".? That's not likely to break anyone anytime soon.? There's a more significant difference in that our exceptions currently are built-in types that can't have arbitrary attributes added.? And there's also a difference in that we are currently limited in what Python programmers can throw; in CPython you can throw any object but we currently only allow you to throw Exceptions. All of those aren't very big problems and seem like they could mostly be tolerated or at the very least we could add some small workarounds to accommodate adding arbitrary attributes, hiding Exceptions base, or simply throwing arbitrary objects (as the CLI does allow this).? But there are larger issues of what our interop story looks like with the rest of the CLI world.? Before we look at where we're going let's look at what the interop story looks like today. First let's look at what it means to raise an exception from IronPython.? When we encounter the raise statement we'll end up calling one of two IronPython's Ops.Raise method.? Ultimately this method will either throw the exception.? If the user passes in a pre-created instance (raise Exception()) we'll just do throw of that object.? If the user passed in a type we'll go ahead and allocate the instance of that type and throw that.? And as a special case today we allow throwing strings which we wrap up specially. This exception is thrown using the CLI's normal exception handling process.? If user code has a try/except statement that handles the exception it will be caught and handled within the Python world.? If running at the interpreter it will be caught by the interpreter and displayed to the user.? And if called from some arbitrary CLI code we'll leak the exception from Python into the CLI code as a "PythonException", "PythonValueError", "PythonTypeError", etc.? Now let's look at the interop story from the Python side.? If you called some CLI code directly or if we failed to catch an error condition coming from some CLI code we call you'd see an unwrapped CLI exception.? For example you might see an ArgumentNullException.? But you'd only see it if you had imported System and explicitly done "except System.Exception:"!? Otherwise there was no way for you to catch these exceptions.? Obviously this isn't a very good story.? If you're a CLI developer you're seeing Python exceptions that you don't know how to handle leak into your code.? If you're a Python developer you're seeing CLI exceptions leak into your code.? Only if you're living in a pure Python world does the story even begin to work - and only with the caveats previously mentioned. Two Worlds or where we're going. What we want to achieve is a model where Python and CLI see a unified exception model.? At the same time we want each environment to see its own exception model to its full fidelity.? The proposed exception model is one where we break apart the existing type hierarchy into two separate hierarchies.? Under this model the Python Exception hierarchy will start at a base class "Exception" which will be an old-style class.?? There will be additional old-style classes that inherit from this (e.g. StandardError and further down ValueError) that fill out the rest of the exception type hierarchy.? Because the Python exception hierarchy is represented by old-style classes these will never actually be thrown by IronPython. Because we keep the current Python exception hierarchy unchanged we'll have all the standard old-style Python classes. If you write pure Python code with no reference to CLS libraries you'll see exactly the current Python exception system. On the other side of the world we have the CLI exception hierarchy.? These are the exceptions that are understood by all languages that target the CLS. In order to maximize interoperability with other languages, IronPython will only throw these standard CLS exception objects. This means that other CLS languages will only see the exceptions they understand. Where the CLS exception hierarchy is not rich enough to capture the Python exception hierarchy we will derive new classes from the appropriate location in the CLS hierarchy. When Worlds Collide. So now if you're a Python developer you see the Python exception hierarchy and that's all you see and life is wonderful.? Likewise if you're a CLI developer calling Python code see exceptions that are just like you'd expect from any other CLI code.? But what happens when the two worlds collide?? This starts to happen when you have Python code that is directly calling other CLI code. The core of this is: we respect except [expression, .].? If expression is a Python exception that is the exception we will catch and give you.? If expression is a CLI exception that is also the exception we will catch and give you.? That's great if you're working with some framework and want to catch a specific exception it throws. A good example of this would be calling a file I/O API. Previously we've had bug reports where users would get a FileIOException instead of the more Python friendly IOError. Under the new model even if a CLI library throws a FileIOException or one of its subclasses the Python programmer will automatically see the IOError. Another similar example was when we failed to trap a bad argument to the intern function. Here we would throw ArgumentNullException but now this automatically gets translated into a TypeError. Likewise we have a similar problem with Python code raises an exception. For example if Python code wanted to raise an EOFError CLS code would previously had no idea how to process this. Under this proposal CLS code will instead receive the EndOfStreamException is is expecting. In general, Python exceptions and CLI exceptions should remain nicely separate because there are no overlapping names so it is always clear which exception you want to work with.? The one potential troublemaker is Exception.? If you do "from System import *" then exception suddenly has a new value.? Therefore all of your exception Exception . statements will now behave differently - you'll end up catching CLS exceptions instead of Python exceptions. The one other tricky case is what should IronPython print when dumping a stack trace for an unhandled exception.? In this case we have no clues to what world the user would like to see.? Our current thinking is that we should display both sets of information and allow this to be user configurable. Another thought has been allowing a user-defined function that can be overridden to customize this functionality at runtime. We'd love to hear what you think about the proposed change. Implementation Details The start of this is changing the exceptions that IronPython throws.? Currently we throw our PythonException subclasses and now we'll throw CLI classes.? For example instead of throwing a ValueError exception we'll throw an ArgumentException now.? If a user calls raise we will likewise translate this into the closest CLI type and store the Python exception in the Data field of the exception. The next change is in how IronPython catches exceptions.? When an exception is caught the translation must be done.? If the exception was raised from Python code the translation is easy - we merely need to extract the Python exception from the Data property.? If the exception originated in CLI code (including the IronPython runtime) the exception will go through translation table.? Ultimately we'll create a new instance of the Python type that will be visible to the Python code.? If this exception is re-thrown then the original exception is pulled from the Python object.? The original exception is also available for Python code to access if it wants to get additional information about the exception.? This original exception value is also used in the event that the exception gets re-raised; it will be the exception value that gets thrown via the CLI. Here's the full proposed exception hierarchy mapping with a couple of notes on ones we're still thinking about. Some of these exceptions map nicely to their CLS equivalents and in those cases we'll use the CLS exceptions. In other cases CLS has no equivalent exceptions and in those cases we'll define custom exceptions inside of IronpPython. Exception System.Exception SystemExit IP.O.SystemExit StopIteration System.InvalidOperationException subtype StandardError System.SystemException KeyboardInterrupt IP.O.KeyboardInterruptException ImportError IP.O.PythonImportError EnvironmentError IP.O.PythonEnvironmentError IOError System.IO.IOException OSError S.R.InteropServices.ExternalException (investigate where OSError comes from) WindowsError System.ComponentModel.Win32Exception EOFError System.IO.EndOfStreamException RuntimeError IP.O.RuntimeException NotImplementedError System.NotImplementedException NameError IP.O.NameException UnboundLocalError IP.O.UnboundLocalException AttributeError System.MissingMemberException SyntaxError IP.O.SyntaxErrorException (System.Data has something close) IndentationError IP.O.IndentationErrorException TabError IP.O.TabErrorException TypeError ArgumentTypeException AssertionError IP.O.AssertionException LookupError IP.O.LookupException IndexError System.IndexOutOfRangeException KeyError S.C.G.KeyNotFoundException ArithmeticError System.ArithmeticException OverflowError System.OverflowException ZeroDivisionError System.DivideByZeroException FloatingPointError IP.O.PythonFloatingPointError ValueError ArgumentException UnicodeError IP.O.UnicodeException UnicodeEncodeError System.Text.EncoderFallbackException UnicodeDecodeError System.Text.DecoderFallbackException UnicodeTranslateError IP.O.UnicodeTranslateException ReferenceError IP.O.ReferenceException SystemError IP.O.PythonSystemError MemoryError System.OutOfMemoryException Warning System.ComponentModel.WarningException UserWarning IP.O.PythonUserWarning DeprecationWarning IP.O.PythonDeprecationWarning PendingDeprecationWarning IP.O.PythonPendingDeprecationWarning SyntaxWarning IP.O.PythonSyntaxWarning OverflowWarning IP.O.PythonOverflowWarning RuntimeWarning IP.O.PythonRuntimeWarning FutureWarning IP.O.PythonFutureWarning From kfarmer at thuban.org Fri Dec 16 00:25:17 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 15 Dec 2005 15:25:17 -0800 Subject: [IronPython] New proposed exception model for IronPython References: <4039D552ADAB094BB1EA670F3E96214EBD17CF@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3357 bytes Desc: not available URL: From dinov at exchange.microsoft.com Fri Dec 16 00:40:48 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 15 Dec 2005 15:40:48 -0800 Subject: [IronPython] New proposed exception model for IronPython In-Reply-To: Message-ID: <4039D552ADAB094BB1EA670F3E96214EBD184B@df-foxhound-msg.exchange.corp.microsoft.com> It's an extremely interesting idea and one that I personally like. Being the new guy I'll want to hear Jim and Martin's input too J. Ultimately there's no reason why we couldn't either expose supplementary dictionaries that provide for user-defined exception translation or even to expose the dictionaries that we use internally (to allow modifying the systems defaults). It also seems like it'd be a great way to keep the exception system highly dynamic and give the advanced Python developer more control of it. I'll make sure to make a note of this to see if we can get it included. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 3:25 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Fri Dec 16 02:26:30 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 15 Dec 2005 17:26:30 -0800 Subject: [IronPython] New proposed exception model for IronPython References: <4039D552ADAB094BB1EA670F3E96214EBD184B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: It's something that should be scoped at the source file level or lower. Otherwise, someone could map Foo exception to PythonFoo exception, someone else could map Foo to PythonBar, and some poor slob would be left wondering why the first bit of code is suddenly misbehaving. #BeginMapException ... #BeginMapException ... #EndMapException ... #EndMapException #BeginMapException ... #EndMapException ________________________________ From: users-bounces at lists.ironpython.com on behalf of Dino Viehland Sent: Thu 12/15/2005 3:40 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython It's an extremely interesting idea and one that I personally like. Being the new guy I'll want to hear Jim and Martin's input too :-). Ultimately there's no reason why we couldn't either expose supplementary dictionaries that provide for user-defined exception translation or even to expose the dictionaries that we use internally (to allow modifying the systems defaults). It also seems like it'd be a great way to keep the exception system highly dynamic and give the advanced Python developer more control of it. I'll make sure to make a note of this to see if we can get it included. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 3:25 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 7273 bytes Desc: not available URL: From Nathan.Ernst at citadelgroup.com Fri Dec 16 03:21:35 2005 From: Nathan.Ernst at citadelgroup.com (Ernst, Nathan) Date: Thu, 15 Dec 2005 20:21:35 -0600 Subject: [IronPython] New proposed exception model for IronPython Message-ID: Personally, what I would propose would be: * Python libraries throw python exceptions. * .Net libs ought to throw .Net exceptions * Where python libs are implemented using .Net libs, .Net exceptions ought to be wrapped with python libs to the fullest extent reasonably possible. I believe these three points would lead to a consistent behavior and compatibility with CPython based scripts. While I like Keith's suggestion of a file-scoped mapping, I'm worried it might even further complicate matters by having to compensate for both schemes (throwing python exceptions, versus throwing .Net exceptions). I make my suggestion of having it effectively left up to the library implementer because I think it is reasonable to expect standard python libraries to throw python exceptions. I also think its reasonable that if you are using ironpython specific libraries (or .Net libs directly) to expect to have to handle .Net exceptions. I'm happy to see the progress that is being made with the new releases (especially with regards to regex support). I think we're fast approaching the point where ironpython can be used as a replacement for CPython. Thanks, Nathan Ernst ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 7:27 PM To: Discussion of IronPython Subject: RE: [IronPython] New proposed exception model for IronPython It's something that should be scoped at the source file level or lower. Otherwise, someone could map Foo exception to PythonFoo exception, someone else could map Foo to PythonBar, and some poor slob would be left wondering why the first bit of code is suddenly misbehaving. #BeginMapException ... #BeginMapException ... #EndMapException ... #EndMapException #BeginMapException ... #EndMapException ________________________________ From: users-bounces at lists.ironpython.com on behalf of Dino Viehland Sent: Thu 12/15/2005 3:40 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython It's an extremely interesting idea and one that I personally like. Being the new guy I'll want to hear Jim and Martin's input too :-). Ultimately there's no reason why we couldn't either expose supplementary dictionaries that provide for user-defined exception translation or even to expose the dictionaries that we use internally (to allow modifying the systems defaults). It also seems like it'd be a great way to keep the exception system highly dynamic and give the advanced Python developer more control of it. I'll make sure to make a note of this to see if we can get it included. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 3:25 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Fri Dec 16 03:34:34 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 15 Dec 2005 18:34:34 -0800 Subject: [IronPython] New proposed exception model for IronPython References: Message-ID: Ah! The joys of language/framework entanglement! ;) -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3185 bytes Desc: not available URL: From thane at magna-capital.com Fri Dec 16 12:20:11 2005 From: thane at magna-capital.com (Thane) Date: Fri, 16 Dec 2005 06:20:11 -0500 Subject: [IronPython] New proposed exception model for IronPython In-Reply-To: Message-ID: <20051216130654.156601BDB6@che.dreamhost.com> I like this suggestion for its simplicity and consistency. Here are two more cases: (1) Exceptions generated from code where no libraries are explicitly used. Here CPython (running the script) creates a Python exception, and IronPython (running a DLL or EXE) creates a .NET (or IP) exception, so this shouldn't be a problem, and (2) Exceptions generated from user-defined libraries that mix Python and .Net libraries. This is sometimes done to support a need in the CPython world (as in the case of Matplotlib, where I wrote a .Net backend - although I seem to be the only one who uses it :-)), and other times the library may be intended only to target .Net (such as a .Net app, which is what Keith's suggestion addresses). It is this case that contains the wrinkles, as a library writer cannot predict who the end user will be. (as Tim Peters might say) glad-to-point-out-problems-that-i-don't-have-to-solve-ly y'rs, --Thane _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ernst, Nathan Sent: Thursday, December 15, 2005 9:22 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Personally, what I would propose would be: * Python libraries throw python exceptions. * .Net libs ought to throw .Net exceptions * Where python libs are implemented using .Net libs, .Net exceptions ought to be wrapped with python libs to the fullest extent reasonably possible. I believe these three points would lead to a consistent behavior and compatibility with CPython based scripts. While I like Keith's suggestion of a file-scoped mapping, I'm worried it might even further complicate matters by having to compensate for both schemes (throwing python exceptions, versus throwing .Net exceptions). I make my suggestion of having it effectively left up to the library implementer because I think it is reasonable to expect standard python libraries to throw python exceptions. I also think its reasonable that if you are using ironpython specific libraries (or .Net libs directly) to expect to have to handle .Net exceptions. I'm happy to see the progress that is being made with the new releases (especially with regards to regex support). I think we're fast approaching the point where ironpython can be used as a replacement for CPython. Thanks, Nathan Ernst _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 7:27 PM To: Discussion of IronPython Subject: RE: [IronPython] New proposed exception model for IronPython It's something that should be scoped at the source file level or lower. Otherwise, someone could map Foo exception to PythonFoo exception, someone else could map Foo to PythonBar, and some poor slob would be left wondering why the first bit of code is suddenly misbehaving. #BeginMapException ... #BeginMapException ... #EndMapException ... #EndMapException #BeginMapException ... #EndMapException _____ From: users-bounces at lists.ironpython.com on behalf of Dino Viehland Sent: Thu 12/15/2005 3:40 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython It's an extremely interesting idea and one that I personally like. Being the new guy I'll want to hear Jim and Martin's input too :-). Ultimately there's no reason why we couldn't either expose supplementary dictionaries that provide for user-defined exception translation or even to expose the dictionaries that we use internally (to allow modifying the systems defaults). It also seems like it'd be a great way to keep the exception system highly dynamic and give the advanced Python developer more control of it. I'll make sure to make a note of this to see if we can get it included. _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 3:25 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.berkovits at worldnet.att.net Fri Dec 16 16:40:35 2005 From: t.berkovits at worldnet.att.net (Tibor Berkovits) Date: Fri, 16 Dec 2005 10:40:35 -0500 Subject: [IronPython] Exec Question Message-ID: <000501c60257$10210e90$d368c144@turing> Tanks for the clarification, Martin. As my planned application depends essentially on dynamic code execution at run-time, any information you may have as to priority and expected release for this bug fix would be appreciated. If you have a patch that I could apply to the sources, while waiting for the official fix, that would be very welcome. Thanks again, and hats-off to the great work you guys are doing on IronPython. Regards, TB From stan at phidani.be Fri Dec 16 17:29:14 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 16 Dec 2005 17:29:14 +0100 Subject: [IronPython] Simpy under IronPython 0.96 Message-ID: <1134750554.43a2eb5a37f82@webmail.raincode.com> Hello, I am trying to start unit testing Simpy under IronPython, and make a state of current affairs... 1: I had to comment out all the from __future__ import statements. 2: I had to copy the following standard CPython modules in IronPythonConsole.exe directory: [bin]> ls *.py bisect.py* ntpath.py* stat.py* unittest.py* copy_reg.py* os.py* traceback.py* warnings.py* linecache.py* random.py* types.py* [bin]> 3: then running ./IronPythonConsole.exe SimPy/testSimPy_ip.py gave me: Ran 41 tests in 0.280s FAILED (failures=1, errors=28) I propose we look at the tests one-by-one, and try to solve the problems. First failed test: def testActivate(self): """Test activate() """ P1 = P(name="P1",T=100.0) initialize() activate(P1,P1.execute(),0) simulate(until=5) assert(now()==5),"Simulate stopped at %s not %s"%(now(),5) ERROR: Test activate() ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ------------------------------------------------------------------------------------------------ Full test output: ERROR: Test activate() ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test yield hold and simulate(until) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request2 with capacity = 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request3 with capacity = 1 several requests ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request4 with capacity = 2 several requests ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with no preemption, 0 capacity ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with no preemption, capacity == 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with preemption, capacity == 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test preemption of preemptor ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: test monitoring of number in the two queues, waitQ and activeQ ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test Monitor - observe with time being picked up from now() ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test Monitor - accumulate over simulation time ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test plot histogram ---------------------------------------------------------------------- : name 'SimPlot' not defined ====================================================================== ERROR: testInterrupt1 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt2 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt3 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt4 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt5 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState1 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState2 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState3 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState4 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testSimEvents2 (__main__.makeEtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testSimEvents3 (__main__.makeEtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Tests that eventsFired reports all events which fired ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Tests that eventsFired reports all events which fired ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testwaituntil1 (__main__.makeWtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== FAIL: Test some Monitor list operations ---------------------------------------------------------------------- : item in list wrong ---------------------------------------------------------------------- Ran 41 tests in 0.280s ERROR: Test activate() ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test yield hold and simulate(until) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request2 with capacity = 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request3 with capacity = 1 several requests ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test request4 with capacity = 2 several requests ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with no preemption, 0 capacity ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with no preemption, capacity == 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test PriorityQ, with preemption, capacity == 1 ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test preemption of preemptor ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: test monitoring of number in the two queues, waitQ and activeQ ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test Monitor - observe with time being picked up from now() ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test Monitor - accumulate over simulation time ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Test plot histogram ---------------------------------------------------------------------- : name 'SimPlot' not defined ====================================================================== ERROR: testInterrupt1 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt2 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt3 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt4 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testInterrupt5 (__main__.makeInterrupttestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState1 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState2 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState3 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testState4 (__main__.makePStatetestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testSimEvents2 (__main__.makeEtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testSimEvents3 (__main__.makeEtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Tests that eventsFired reports all events which fired ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: Tests that eventsFired reports all events which fired ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== ERROR: testwaituntil1 (__main__.makeWtestcase) ---------------------------------------------------------------------- : "Fatal SimPy error: activating function whi ch is not a generator (contains no 'yield')" ====================================================================== FAIL: Test some Monitor list operations ---------------------------------------------------------------------- : item in list wrong ---------------------------------------------------------------------- Ran 41 tests in 0.280s From stan at phidani.be Fri Dec 16 17:40:34 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 16 Dec 2005 17:40:34 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <1134750554.43a2eb5a37f82@webmail.raincode.com> References: <1134750554.43a2eb5a37f82@webmail.raincode.com> Message-ID: <1134751234.43a2ee028bbad@webmail.raincode.com> I think I have the first idea why the tests are failing: [bin]> ./IronPythonConsole.exe IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> def testgenerator(): .. for i in range(0,10): .. yield i .. >>> testgenerator >>> type(testgenerator) >>> import types >>> type(testgenerator) == types.GeneratorType False >>> --> The problem is that the following code doesn't work with either IronPythonConsole, or standard CPython 2.4. Any idea what I may be missing? Thanks, Stan. > I propose we look at the tests one-by-one, and try to solve the problems. > > First failed test: > > def testActivate(self): > """Test activate() > """ > P1 = P(name="P1",T=100.0) > initialize() > activate(P1,P1.execute(),0) > simulate(until=5) > assert(now()==5),"Simulate stopped at %s not %s"%(now(),5) > > ERROR: Test activate() > ---------------------------------------------------------------------- > : "Fatal SimPy error: activating function whi > ch is not a generator (contains no 'yield')" > ------------------------------------ From stan at phidani.be Fri Dec 16 17:47:52 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 16 Dec 2005 17:47:52 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <200512161642.jBGGg58d026661@smtp-vbr5.xs4all.nl> References: <200512161642.jBGGg58d026661@smtp-vbr5.xs4all.nl> Message-ID: <1134751672.43a2efb889cb0@webmail.raincode.com> > > if not (type(process) == types.GeneratorType): > raise Simerror("Fatal SimPy error: activating function which"+ > " is not a generator (contains no 'yield')") > > I suspect that the type system on IronPython is somehow different from that > in CPython. given test.py: #from __future__ import generators import types def gentest(): for i in range(0,10): yield i #assert type(gentest) == types.GeneratorType print type(gentest) assert isinstance(gentest,types.GeneratorType) [bin]> ./IronPythonConsole.exe test.py > > Could you check what e.g. the type of a generator is? > > Klaus M?ller > > > -----Original Message----- > > From: simpy-users-admin at lists.sourceforge.net > > [mailto:simpy-users-admin at lists.sourceforge.net] On Behalf Of > > Stanislas Pinte > > Sent: Friday, December 16, 2005 5:29 PM > > To: simpy-users at lists.sourceforge.net > > Cc: users at lists.ironpython.com > > Subject: [Simpy-users] Simpy under IronPython 0.96 > > > > Hello, > > > > I am trying to start unit testing Simpy under IronPython, and > > make a state of current affairs... > > > > 1: I had to comment out all the from __future__ import statements. > > 2: I had to copy the following standard CPython modules in > > IronPythonConsole.exe directory: > > > > [bin]> ls *.py > > bisect.py* ntpath.py* stat.py* unittest.py* > > copy_reg.py* os.py* traceback.py* warnings.py* > > linecache.py* random.py* types.py* > > [bin]> > > > > 3: then running ./IronPythonConsole.exe SimPy/testSimPy_ip.py > > gave me: > > > > Ran 41 tests in 0.280s > > > > FAILED (failures=1, errors=28) > > > > I propose we look at the tests one-by-one, and try to solve > > the problems. > > > > First failed test: > > > > def testActivate(self): > > """Test activate() > > """ > > P1 = P(name="P1",T=100.0) > > initialize() > > activate(P1,P1.execute(),0) > > simulate(until=5) > > assert(now()==5),"Simulate stopped at %s not %s"%(now(),5) > > > > ERROR: Test activate() > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > -------------------------------------------------------------- > > ---------------------------------- > > Full test output: > > > > ERROR: Test activate() > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test yield hold and simulate(until) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request2 with capacity = 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request3 with capacity = 1 several requests > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request4 with capacity = 2 several requests > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with no preemption, 0 capacity > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with no preemption, capacity == 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with preemption, capacity == 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test preemption of preemptor > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: test monitoring of number in the two queues, waitQ and activeQ > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test Monitor - observe with time being picked up from now() > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test Monitor - accumulate over simulation time > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test plot histogram > > ---------------------------------------------------------------------- > > : name 'SimPlot' not defined > > > > ====================================================================== > > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState1 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState2 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState3 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState4 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testSimEvents2 (__main__.makeEtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testSimEvents3 (__main__.makeEtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Tests that eventsFired reports all events which fired > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Tests that eventsFired reports all events which fired > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testwaituntil1 (__main__.makeWtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > FAIL: Test some Monitor list operations > > ---------------------------------------------------------------------- > > : item in list wrong > > > > ---------------------------------------------------------------------- > > Ran 41 tests in 0.280s > > > > > > ERROR: Test activate() > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test yield hold and simulate(until) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request2 with capacity = 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request3 with capacity = 1 several requests > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test request4 with capacity = 2 several requests > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with no preemption, 0 capacity > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with no preemption, capacity == 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test PriorityQ, with preemption, capacity == 1 > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test preemption of preemptor > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: test monitoring of number in the two queues, waitQ and activeQ > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test Monitor - observe with time being picked up from now() > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test Monitor - accumulate over simulation time > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Test plot histogram > > ---------------------------------------------------------------------- > > : name 'SimPlot' not defined > > > > ====================================================================== > > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState1 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState2 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState3 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testState4 (__main__.makePStatetestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testSimEvents2 (__main__.makeEtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testSimEvents3 (__main__.makeEtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Tests that eventsFired reports all events which fired > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: Tests that eventsFired reports all events which fired > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > ERROR: testwaituntil1 (__main__.makeWtestcase) > > ---------------------------------------------------------------------- > > : "Fatal SimPy error: > > activating function whi ch is not a generator (contains no 'yield')" > > > > ====================================================================== > > FAIL: Test some Monitor list operations > > ---------------------------------------------------------------------- > > : item in list wrong > > > > ---------------------------------------------------------------------- > > Ran 41 tests in 0.280s > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep > > through log files for problems? Stop! Download the new AJAX > > search engine that makes searching your log files as easy as > > surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > Simpy-users mailing list > > Simpy-users at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/simpy-users > > > From stan at phidani.be Fri Dec 16 18:04:24 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 16 Dec 2005 18:04:24 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <200512161659.jBGGxbwR080610@smtp-vbr8.xs4all.nl> References: <200512161659.jBGGxbwR080610@smtp-vbr8.xs4all.nl> Message-ID: <1134752664.43a2f39858a31@webmail.raincode.com> Selon Klaus Muller : > Stan, > Your assertion must be: > assert type(gentest()) == types.GeneratorType, > > _not_: > assert type(gentest) == types.GeneratorType. > > The call of a generator function generates a generator object. You are right, sorry!! there we are: [bin]> python test.py 'import site' failed; use -v for traceback [bin]> ./IronPythonConsole.exe test.py Traceback (most recent call last): at __main__.Initialize() in c:\Program Files\IronPython-0.9.6\bin\test.py:lin e 9 AssertionError [bin]> So let's file a bug to IronPython... From stan at phidani.be Fri Dec 16 18:44:00 2005 From: stan at phidani.be (Stanislas Pinte) Date: Fri, 16 Dec 2005 18:44:00 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <200512161741.jBGHfRQh071449@smtp-vbr1.xs4all.nl> References: <200512161741.jBGHfRQh071449@smtp-vbr1.xs4all.nl> Message-ID: <1134755040.43a2fce016a79@webmail.raincode.com> Selon Klaus Muller : > Good work! What type does IronPython actually return for a generator? a generated type... not looking like a generator... Stan. > > Klaus M?ller > > > -----Original Message----- > > From: Stanislas Pinte [mailto:stan at phidani.be] > > Sent: Friday, December 16, 2005 6:04 PM > > To: Klaus Muller > > Cc: simpy-users at lists.sourceforge.net; users at lists.ironpython.com > > Subject: RE: [Simpy-users] Simpy under IronPython 0.96 > > > > Selon Klaus Muller : > > > > > Stan, > > > Your assertion must be: > > > assert type(gentest()) == types.GeneratorType, > > > > > > _not_: > > > assert type(gentest) == types.GeneratorType. > > > > > > The call of a generator function generates a generator object. > > > > You are right, sorry!! > > > > there we are: > > > > [bin]> python test.py > > 'import site' failed; use -v for traceback > > [bin]> ./IronPythonConsole.exe test.py > '__main__+gentest0'> Traceback (most recent call last): > > at __main__.Initialize() in c:\Program > > Files\IronPython-0.9.6\bin\test.py:lin > > e 9 > > AssertionError > > [bin]> > > > > So let's file a bug to IronPython... > > > > > > > > > From dinov at exchange.microsoft.com Fri Dec 16 18:57:28 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 16 Dec 2005 09:57:28 -0800 Subject: [IronPython] New proposed exception model for IronPython In-Reply-To: Message-ID: <4039D552ADAB094BB1EA670F3E96214EBD1B47@df-foxhound-msg.exchange.corp.microsoft.com> Your proposal is essentially what we have today (we have a separate exception hierarchy that represents Python exceptions that is not correlated with the CLR exception hierarchy in any way). This actually leads to *less* compatibility with CPython because our exception classes end up showing up as new-style classes instead of old-style classes. We also are forced to have a slightly different starting point for our exception hierarchy than CPython. If you see someway we'll be less true to CPython under the proposed model let us know and we can see if we can tweak it to better fit in here. The current story also makes it more difficult for other CLS code to consume Python code. For example under today's story no pre-written .NET code will ever catch Python exceptions. Under the current model .NET developers need to have a dependency on IronPython.dll and then write: try{ } catch(PythonIOError){ } Where all the existing code in the .NET world has: try{ }catch(IOException){ } While it might be reasonable to expect that new .NET code written with Python in mind might handle Python exceptions we certainly can't expect that all the existing code be updated to handle this - and certainly not in a timely manner. Finally I want to point out we don't want to take away your ability to handle .NET exceptions from Python code or raise specific .NET exceptions either. What you catch will be based upon the type specified in your except clause. So you can always do: try: o = System.IO.StreamReader('doesnotexist.txt') except System.IO.IOException, e: raise MySpecialIOError So if you want to provide a more customized exception experience when wrapping calls into .NET code you have the power. Likewise if you want to throw a CLS exception that doesn't get wrapped under the proposed model you can do that as well: raise System.Exception('Hello world!') We don't want to make it hard for the library writer to provide a more customized experience (going either way through the interop story). If you think the new proposal would do this I'd love to hear some specific examples of what you'd like to be able to accomplish and why you think this would interfere with that. Thanks for your feedback! ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ernst, Nathan Sent: Thursday, December 15, 2005 6:22 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Personally, what I would propose would be: Python libraries throw python exceptions. .Net libs ought to throw .Net exceptions Where python libs are implemented using .Net libs, .Net exceptions ought to be wrapped with python libs to the fullest extent reasonably possible. I believe these three points would lead to a consistent behavior and compatibility with CPython based scripts. While I like Keith's suggestion of a file-scoped mapping, I'm worried it might even further complicate matters by having to compensate for both schemes (throwing python exceptions, versus throwing .Net exceptions). I make my suggestion of having it effectively left up to the library implementer because I think it is reasonable to expect standard python libraries to throw python exceptions. I also think its reasonable that if you are using ironpython specific libraries (or .Net libs directly) to expect to have to handle .Net exceptions. I'm happy to see the progress that is being made with the new releases (especially with regards to regex support). I think we're fast approaching the point where ironpython can be used as a replacement for CPython. Thanks, Nathan Ernst ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 7:27 PM To: Discussion of IronPython Subject: RE: [IronPython] New proposed exception model for IronPython It's something that should be scoped at the source file level or lower. Otherwise, someone could map Foo exception to PythonFoo exception, someone else could map Foo to PythonBar, and some poor slob would be left wondering why the first bit of code is suddenly misbehaving. #BeginMapException ... #BeginMapException ... #EndMapException ... #EndMapException #BeginMapException ... #EndMapException ________________________________ From: users-bounces at lists.ironpython.com on behalf of Dino Viehland Sent: Thu 12/15/2005 3:40 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython It's an extremely interesting idea and one that I personally like. Being the new guy I'll want to hear Jim and Martin's input too J. Ultimately there's no reason why we couldn't either expose supplementary dictionaries that provide for user-defined exception translation or even to expose the dictionaries that we use internally (to allow modifying the systems defaults). It also seems like it'd be a great way to keep the exception system highly dynamic and give the advanced Python developer more control of it. I'll make sure to make a note of this to see if we can get it included. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Thursday, December 15, 2005 3:25 PM To: Discussion of IronPython Subject: Re: [IronPython] New proposed exception model for IronPython Would there be a way to map new exceptions between IP and the CLI? For example, if I create a new Python exception, and want to bind it to System.ArgumentException, or convsersely if I create a new CLI exception that I want to map to a Python equivalent. This would be an IronPython-ism, but a worthwhile one I think. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Mon Dec 19 17:56:07 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 19 Dec 2005 08:56:07 -0800 Subject: [IronPython] Exec Question In-Reply-To: <000501c60257$10210e90$d368c144@turing> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD02C5@df-foxhound-msg.exchange.corp.microsoft.com> Hi Tibor, We have fixed this already and will include the fix in our next release before the end of the year. As for the patch ... I would prefer if you could wait for the beta 1 release. If this won't work for you, please let me know and I'll try to extract the patch for you. However given the volume of the changes we are making these days, it may not be a quick endeavor to extract the patch. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tibor Berkovits Sent: Friday, December 16, 2005 7:41 AM To: users at lists.ironpython.com Subject: [IronPython] Exec Question Tanks for the clarification, Martin. As my planned application depends essentially on dynamic code execution at run-time, any information you may have as to priority and expected release for this bug fix would be appreciated. If you have a patch that I could apply to the sources, while waiting for the official fix, that would be very welcome. Thanks again, and hats-off to the great work you guys are doing on IronPython. Regards, TB _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From william at resolversystems.com Mon Dec 19 18:42:54 2005 From: william at resolversystems.com (William Reade) Date: Mon, 19 Dec 2005 17:42:54 +0000 Subject: [IronPython] get_Item in subclass Message-ID: <43A6F11E.30500@resolversystems.com> We've been having some problems subclassing the SyncFusion Grid control with IronPython; namely, that: class TestGridControl(GridControl): pass grid = TestGridControl() value = "foobar" grid[1, 1].CellValue = "foobar" fails with the following stack trace: Unhandled exception: Bad args for the method at IronPython.Objects.ReflectedMethodBase.TryCall(Object[] args, Object& ret) at IronPython.Objects.ReflectedMethodBase.Call(Object[] args) at IronPython.Objects.Ops.Call(Object func, Object[] args) at IronPython.Objects.DynamicType.__getitem__(Object self, Object index) at IronPython.Objects.Ops.GetIndex(Object o, Object index) at FunctionalTests.UnitTests.CellUtilsTest.testSetCellValue$f222(Object self) in H:\dev\current\resolver-working\trunk\FunctionalTests\UnitTests\CellUtilsTest.py:line 41 While: grid = GridControl() grid[1, 1].CellValue = "foobar" works as expected. Has anyone come across this before, and does the list have any bright ideas for working around it? It seems to us that there's some magic for dealing with the CLR Item property which isn't working quite right in subclasses, but that's as far as we've got... Cheers William From kgmuller at xs4all.nl Fri Dec 16 17:41:57 2005 From: kgmuller at xs4all.nl (Klaus Muller) Date: Fri, 16 Dec 2005 17:41:57 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <1134750554.43a2eb5a37f82@webmail.raincode.com> Message-ID: <200512161642.jBGGg58d026661@smtp-vbr5.xs4all.nl> Stan, I am so glad that you are getting on with testing SimPy on IronPython! Many of your errors are: > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" This is caught by the following code in function 'activate' in Simulation.py: if not (type(process) == types.GeneratorType): raise Simerror("Fatal SimPy error: activating function which"+ " is not a generator (contains no 'yield')") I suspect that the type system on IronPython is somehow different from that in CPython. Could you check what e.g. the type of a generator is? Klaus M?ller > -----Original Message----- > From: simpy-users-admin at lists.sourceforge.net > [mailto:simpy-users-admin at lists.sourceforge.net] On Behalf Of > Stanislas Pinte > Sent: Friday, December 16, 2005 5:29 PM > To: simpy-users at lists.sourceforge.net > Cc: users at lists.ironpython.com > Subject: [Simpy-users] Simpy under IronPython 0.96 > > Hello, > > I am trying to start unit testing Simpy under IronPython, and > make a state of current affairs... > > 1: I had to comment out all the from __future__ import statements. > 2: I had to copy the following standard CPython modules in > IronPythonConsole.exe directory: > > [bin]> ls *.py > bisect.py* ntpath.py* stat.py* unittest.py* > copy_reg.py* os.py* traceback.py* warnings.py* > linecache.py* random.py* types.py* > [bin]> > > 3: then running ./IronPythonConsole.exe SimPy/testSimPy_ip.py > gave me: > > Ran 41 tests in 0.280s > > FAILED (failures=1, errors=28) > > I propose we look at the tests one-by-one, and try to solve > the problems. > > First failed test: > > def testActivate(self): > """Test activate() > """ > P1 = P(name="P1",T=100.0) > initialize() > activate(P1,P1.execute(),0) > simulate(until=5) > assert(now()==5),"Simulate stopped at %s not %s"%(now(),5) > > ERROR: Test activate() > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > -------------------------------------------------------------- > ---------------------------------- > Full test output: > > ERROR: Test activate() > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test yield hold and simulate(until) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request2 with capacity = 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request3 with capacity = 1 several requests > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request4 with capacity = 2 several requests > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with no preemption, 0 capacity > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with no preemption, capacity == 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with preemption, capacity == 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test preemption of preemptor > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: test monitoring of number in the two queues, waitQ and activeQ > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test Monitor - observe with time being picked up from now() > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test Monitor - accumulate over simulation time > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test plot histogram > ---------------------------------------------------------------------- > : name 'SimPlot' not defined > > ====================================================================== > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState1 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState2 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState3 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState4 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testSimEvents2 (__main__.makeEtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testSimEvents3 (__main__.makeEtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Tests that eventsFired reports all events which fired > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Tests that eventsFired reports all events which fired > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testwaituntil1 (__main__.makeWtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > FAIL: Test some Monitor list operations > ---------------------------------------------------------------------- > : item in list wrong > > ---------------------------------------------------------------------- > Ran 41 tests in 0.280s > > > ERROR: Test activate() > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test yield hold and simulate(until) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request2 with capacity = 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request3 with capacity = 1 several requests > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test request4 with capacity = 2 several requests > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with no preemption, 0 capacity > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with no preemption, capacity == 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test PriorityQ, with preemption, capacity == 1 > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test preemption of preemptor > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: test monitoring of number in the two queues, waitQ and activeQ > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test Monitor - observe with time being picked up from now() > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test Monitor - accumulate over simulation time > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Test plot histogram > ---------------------------------------------------------------------- > : name 'SimPlot' not defined > > ====================================================================== > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState1 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState2 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState3 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testState4 (__main__.makePStatetestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testSimEvents2 (__main__.makeEtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testSimEvents3 (__main__.makeEtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Tests that eventsFired reports all events which fired > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: Tests that eventsFired reports all events which fired > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > ERROR: testwaituntil1 (__main__.makeWtestcase) > ---------------------------------------------------------------------- > : "Fatal SimPy error: > activating function whi ch is not a generator (contains no 'yield')" > > ====================================================================== > FAIL: Test some Monitor list operations > ---------------------------------------------------------------------- > : item in list wrong > > ---------------------------------------------------------------------- > Ran 41 tests in 0.280s > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep > through log files for problems? Stop! Download the new AJAX > search engine that makes searching your log files as easy as > surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Simpy-users mailing list > Simpy-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/simpy-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3936 bytes Desc: not available URL: From kgmuller at xs4all.nl Fri Dec 16 17:59:29 2005 From: kgmuller at xs4all.nl (Klaus Muller) Date: Fri, 16 Dec 2005 17:59:29 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <1134751672.43a2efb889cb0@webmail.raincode.com> Message-ID: <200512161659.jBGGxbwR080610@smtp-vbr8.xs4all.nl> Stan, Your assertion must be: assert type(gentest()) == types.GeneratorType, _not_: assert type(gentest) == types.GeneratorType. The call of a generator function generates a generator object. Klaus M?ller > -----Original Message----- > From: Stanislas Pinte [mailto:stan at phidani.be] > Sent: Friday, December 16, 2005 5:48 PM > To: Klaus Muller > Cc: simpy-users at lists.sourceforge.net; users at lists.ironpython.com > Subject: RE: [Simpy-users] Simpy under IronPython 0.96 > > > > > if not (type(process) == types.GeneratorType): > > raise Simerror("Fatal SimPy error: activating > function which"+ > > " is not a generator (contains no 'yield')") > > > > I suspect that the type system on IronPython is somehow > different from > > that in CPython. > > given test.py: > > #from __future__ import generators > import types > def gentest(): > for i in range(0,10): > yield i > > #assert type(gentest) == types.GeneratorType print > type(gentest) assert isinstance(gentest,types.GeneratorType) > > [bin]> ./IronPythonConsole.exe test.py > > > > > > Could you check what e.g. the type of a generator is? > > > > Klaus M?ller > > > > > -----Original Message----- > > > From: simpy-users-admin at lists.sourceforge.net > > > [mailto:simpy-users-admin at lists.sourceforge.net] On Behalf Of > > > Stanislas Pinte > > > Sent: Friday, December 16, 2005 5:29 PM > > > To: simpy-users at lists.sourceforge.net > > > Cc: users at lists.ironpython.com > > > Subject: [Simpy-users] Simpy under IronPython 0.96 > > > > > > Hello, > > > > > > I am trying to start unit testing Simpy under IronPython, > and make a > > > state of current affairs... > > > > > > 1: I had to comment out all the from __future__ import statements. > > > 2: I had to copy the following standard CPython modules in > > > IronPythonConsole.exe directory: > > > > > > [bin]> ls *.py > > > bisect.py* ntpath.py* stat.py* unittest.py* > > > copy_reg.py* os.py* traceback.py* warnings.py* > > > linecache.py* random.py* types.py* [bin]> > > > > > > 3: then running ./IronPythonConsole.exe > SimPy/testSimPy_ip.py gave > > > me: > > > > > > Ran 41 tests in 0.280s > > > > > > FAILED (failures=1, errors=28) > > > > > > I propose we look at the tests one-by-one, and try to solve the > > > problems. > > > > > > First failed test: > > > > > > def testActivate(self): > > > """Test activate() > > > """ > > > P1 = P(name="P1",T=100.0) > > > initialize() > > > activate(P1,P1.execute(),0) > > > simulate(until=5) > > > assert(now()==5),"Simulate stopped at %s not %s"%(now(),5) > > > > > > ERROR: Test activate() > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > -------------------------------------------------------------- > > > ---------------------------------- > > > Full test output: > > > > > > ERROR: Test activate() > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test yield hold and simulate(until) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request2 with capacity = 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request3 with capacity = 1 several requests > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request4 with capacity = 2 several requests > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with no preemption, 0 capacity > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with no preemption, capacity == 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with preemption, capacity == 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test preemption of preemptor > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: test monitoring of number in the two queues, waitQ and > > > activeQ > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test Monitor - observe with time being picked up from now() > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test Monitor - accumulate over simulation time > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test plot histogram > > > > -------------------------------------------------------------------- > > > -- : name 'SimPlot' not defined > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState1 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState2 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState3 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState4 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testSimEvents2 (__main__.makeEtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testSimEvents3 (__main__.makeEtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Tests that eventsFired reports all events which fired > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Tests that eventsFired reports all events which fired > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testwaituntil1 (__main__.makeWtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > FAIL: Test some Monitor list operations > > > > -------------------------------------------------------------------- > > > -- : item in list wrong > > > > > > > -------------------------------------------------------------------- > > > -- > > > Ran 41 tests in 0.280s > > > > > > > > > ERROR: Test activate() > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test yield hold and simulate(until) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request2 with capacity = 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request3 with capacity = 1 several requests > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test request4 with capacity = 2 several requests > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with no preemption, 0 capacity > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with no preemption, capacity == 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test PriorityQ, with preemption, capacity == 1 > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test preemption of preemptor > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: test monitoring of number in the two queues, waitQ and > > > activeQ > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test Monitor - observe with time being picked up from now() > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test Monitor - accumulate over simulation time > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Test plot histogram > > > > -------------------------------------------------------------------- > > > -- : name 'SimPlot' not defined > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt1 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt2 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt3 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt4 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testInterrupt5 (__main__.makeInterrupttestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState1 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState2 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState3 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testState4 (__main__.makePStatetestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testSimEvents2 (__main__.makeEtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testSimEvents3 (__main__.makeEtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Tests that eventsFired reports all events which fired > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: Tests that eventsFired reports all events which fired > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > ERROR: testwaituntil1 (__main__.makeWtestcase) > > > > -------------------------------------------------------------------- > > > -- : "Fatal SimPy error: > > > activating function whi ch is not a generator (contains > no 'yield')" > > > > > > > ==================================================================== > > > == > > > FAIL: Test some Monitor list operations > > > > -------------------------------------------------------------------- > > > -- : item in list wrong > > > > > > > -------------------------------------------------------------------- > > > -- > > > Ran 41 tests in 0.280s > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you > grep through > > > log files for problems? Stop! Download the new AJAX > search engine > > > that makes searching your log files as easy as surfing the web. > > > DOWNLOAD SPLUNK! > > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > > _______________________________________________ > > > Simpy-users mailing list > > > Simpy-users at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/simpy-users > > > > > > > > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3936 bytes Desc: not available URL: From kgmuller at xs4all.nl Fri Dec 16 18:41:19 2005 From: kgmuller at xs4all.nl (Klaus Muller) Date: Fri, 16 Dec 2005 18:41:19 +0100 Subject: [IronPython] [Simpy-users] Simpy under IronPython 0.96 In-Reply-To: <1134752664.43a2f39858a31@webmail.raincode.com> Message-ID: <200512161741.jBGHfRQh071449@smtp-vbr1.xs4all.nl> Good work! What type does IronPython actually return for a generator? Klaus M?ller > -----Original Message----- > From: Stanislas Pinte [mailto:stan at phidani.be] > Sent: Friday, December 16, 2005 6:04 PM > To: Klaus Muller > Cc: simpy-users at lists.sourceforge.net; users at lists.ironpython.com > Subject: RE: [Simpy-users] Simpy under IronPython 0.96 > > Selon Klaus Muller : > > > Stan, > > Your assertion must be: > > assert type(gentest()) == types.GeneratorType, > > > > _not_: > > assert type(gentest) == types.GeneratorType. > > > > The call of a generator function generates a generator object. > > You are right, sorry!! > > there we are: > > [bin]> python test.py > 'import site' failed; use -v for traceback > [bin]> ./IronPythonConsole.exe test.py '__main__+gentest0'> Traceback (most recent call last): > at __main__.Initialize() in c:\Program > Files\IronPython-0.9.6\bin\test.py:lin > e 9 > AssertionError > [bin]> > > So let's file a bug to IronPython... > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3936 bytes Desc: not available URL: From vishy at mail.rsise.anu.edu.au Sat Dec 17 02:20:43 2005 From: vishy at mail.rsise.anu.edu.au (S V N Vishwanathan) Date: Fri, 16 Dec 2005 17:20:43 -0800 Subject: [IronPython] IronPython on mac os X (newbie problems) Message-ID: Hi! I am a newbie to IronPython. Maybe I am missing something here ... I installed the latest version of Mono on my Mac OS X (10.4) box and downloaded IronPython and tried % mono IronPythonConsole.exe ** (IronPythonConsole.exe:653): WARNING **: implement me 0x00 ** ERROR **: file class.c: line 3030 (mono_class_from_mono_type): should not be reached aborting... zsh: abort mono IronPythonConsole.exe The relevant version of Mono is: % mono --version Mono JIT compiler version 1.1.10, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal and the OS is % uname -a Darwin Ambica.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc What am I doing wrong? Please do not hesitate to ask me if you need any further information. vishy ps: I am not subscribed to the list. So Pls cc me on the responses. From rcs1000 at amoral.org Mon Dec 19 19:46:58 2005 From: rcs1000 at amoral.org (Robert Smithson) Date: Mon, 19 Dec 2005 18:46:58 +0000 Subject: [IronPython] Types Message-ID: <43A70022.7070100@amoral.org> Hi, When (if) do you guys plan to get the types library ported to IronPython? And, can you advise any workaround I could use right now? Many thanks, Robert From rcs1000 at amoral.org Mon Dec 19 19:57:53 2005 From: rcs1000 at amoral.org (Robert Smithson) Date: Mon, 19 Dec 2005 18:57:53 +0000 Subject: [IronPython] Types Message-ID: <43A702B1.7060509@amoral.org> OK, ignore my last question. The types module from http://svn.python.org/projects/python/trunk/Lib/types.py imports perfectly and seems to do the job. It won't handle .NET objects properly (I suspect), but works fine for what I'm doing. Cheers, Robert From abpillai at gmail.com Mon Dec 19 19:58:34 2005 From: abpillai at gmail.com (Anand Pillai) Date: Tue, 20 Dec 2005 00:28:34 +0530 Subject: [IronPython] IronPython on mac os X (newbie problems) In-Reply-To: References: Message-ID: <8548c5f30512191058h521a6b69x142ad0e55e58f507@mail.gmail.com> Incidentally, I got the same error with IronPython 0.9.6 and the latest version of mono on a FC3 (Fedora Core 3) box. I had installed IronPython to /opt/IronPython. Initially IronPython was running fine. Then I wanted to try out the tutorials and so I did the following: alias 'iron'='mono /opt/IronPython/bin/IronPythonConsole.exe' Then I tried to run the examples using 'iron '. At that point it started giving this error. I dont have the traceback since this happened in the office and I am posting from home. I can send it later if reqd. Thanks -Anand On 12/17/05, S V N Vishwanathan wrote: > Hi! > > I am a newbie to IronPython. Maybe I am missing something here ... > > I installed the latest version of Mono on my Mac OS X (10.4) box and > downloaded IronPython and tried > > % mono IronPythonConsole.exe > > ** (IronPythonConsole.exe:653): WARNING **: implement me 0x00 > > > ** ERROR **: file class.c: line 3030 (mono_class_from_mono_type): should not be reached > aborting... > zsh: abort mono IronPythonConsole.exe > > > The relevant version of Mono is: > > % mono --version > Mono JIT compiler version 1.1.10, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com > TLS: normal > GC: Included Boehm (with typed GC) > SIGSEGV : normal > > and the OS is > > % uname -a > Darwin Ambica.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc > > > > What am I doing wrong? Please do not hesitate to ask me if you need any > further information. > > vishy > > ps: I am not subscribed to the list. So Pls cc me on the responses. > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- Anand B Pillai, Staff Engineer (Development), SpikeSource India Pvt Ltd, Koramangala 3rd Block, Bangalore, India. http://www.spikesource.com Blog: http://randombytes.blogspot.com From Martin.Maly at microsoft.com Mon Dec 19 19:59:38 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Mon, 19 Dec 2005 10:59:38 -0800 Subject: [IronPython] Types In-Reply-To: <43A70022.7070100@amoral.org> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0386@df-foxhound-msg.exchange.corp.microsoft.com> Are you referring to the types.py module that is part of CPython? When it comes to modules that come with CPython and are implemented in Python, we hope to get to the state with IronPython that we can simply use those modules directly. In fact, right now IronPython can import types.py and except for possible bugs, we should be able to also use it correctly. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Robert Smithson Sent: Monday, December 19, 2005 10:47 AM To: users at lists.ironpython.com Subject: [IronPython] Types Hi, When (if) do you guys plan to get the types library ported to IronPython? And, can you advise any workaround I could use right now? Many thanks, Robert _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From korpse-ironpython at kaydash.za.net Tue Dec 20 16:06:26 2005 From: korpse-ironpython at kaydash.za.net (Jonathan Jacobs) Date: Tue, 20 Dec 2005 17:06:26 +0200 Subject: [IronPython] Binary files and byte strings Message-ID: <43A81DF2.2020603@kaydash.za.net> Hi, I have a CPython script to parse specific data files and allow me to manipulate them, mostly relying on the struct module. IronPython doesn't seem to have an implementation of this (yet?) so I used PyPy's implementation and discovered that IronPython's sys module doesn't define a "byteorder" attribute, which was easily worked around. I then ran into the problem that IronPython's file objects don't implement a "tell" function, so I added one that simply returned stream.Position. After this effort I fired up my script and was bombarded by all manner of assertions in my script, telling me that the file I was parsing was *not* in a valid format, I double checked the file executing the script via CPython without a hitch. After some debugging it looked like stream was being repositioned by the reader (perhaps due to buffering?), which left stream.Position unusable. Grokking the PythonFile class showed that binary mode files were implemented using a StreamReader (as opposed to a NewLineReader for text-mode files) which meant that the data would be being decoded as text, which is not particularly useful in the case of binary files and really only serves to mangle data into some unusable mess. In the end I opted for just using stream.Read to get the original information out in the form of a byte[] and using StringOps.FromByteArray (after turning it into a public function as I couldn't find any other way to turn my byte[] into a byte-string) to get this data back to the user in something they could use. Now, I'm not sure if I missed something here but reading (not sure about writing, I'm too scared) binary files seem to be rather broken. Another thing that struck me was how IronPython's "str" type was married to .NET's string type. I don't know if there is some magic deeper down to deal with this but Python's "str" type is a byte-string whereas "unicode" is actual text while .NET's "string" type is designed to represent text as a series of Unicode characters. Hopefully I've said something right. -- Jonathan When you meet a master swordsman, show him your sword. When you meet a man who is not a poet, do not show him your poem. -- Rinzai, ninth century Zen master From riltim at gmail.com Tue Dec 20 16:14:42 2005 From: riltim at gmail.com (Tim Riley) Date: Tue, 20 Dec 2005 10:14:42 -0500 Subject: [IronPython] IronPython on mac os X (newbie problems) In-Reply-To: <8548c5f30512191058h521a6b69x142ad0e55e58f507@mail.gmail.com> References: <8548c5f30512191058h521a6b69x142ad0e55e58f507@mail.gmail.com> Message-ID: I may be wrong but I was under the impression that the more recent versions of IronPython utilized portions of the .NET 2 framework that have yet to be implemented in mono. Regards, Tim Riley On 12/19/05, Anand Pillai wrote: > > Incidentally, I got the same error with IronPython 0.9.6 and the > latest version of mono > on a FC3 (Fedora Core 3) box. > > I had installed IronPython to /opt/IronPython. Initially IronPython > was running fine. Then I wanted to try out the tutorials and so I did > the following: > > alias 'iron'='mono /opt/IronPython/bin/IronPythonConsole.exe' > > Then I tried to run the examples using 'iron '. At that > point it started giving this error. > > I dont have the traceback since this happened in the office and I am > posting from home. I can send it later if reqd. > > Thanks > > -Anand > > > On 12/17/05, S V N Vishwanathan wrote: > > Hi! > > > > I am a newbie to IronPython. Maybe I am missing something here ... > > > > I installed the latest version of Mono on my Mac OS X (10.4) box and > > downloaded IronPython and tried > > > > % mono IronPythonConsole.exe > > > > ** (IronPythonConsole.exe:653): WARNING **: implement me 0x00 > > > > > > ** ERROR **: file class.c: line 3030 (mono_class_from_mono_type): should > not be reached > > aborting... > > zsh: abort mono IronPythonConsole.exe > > > > > > The relevant version of Mono is: > > > > % mono --version > > Mono JIT compiler version 1.1.10, (C) 2002-2005 Novell, Inc and > Contributors. www.mono-project.com > > TLS: normal > > GC: Included Boehm (with typed GC) > > SIGSEGV : normal > > > > and the OS is > > > > % uname -a > > Darwin Ambica.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 > 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh > powerpc > > > > > > > > What am I doing wrong? Please do not hesitate to ask me if you need any > > further information. > > > > vishy > > > > ps: I am not subscribed to the list. So Pls cc me on the responses. > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > Anand B Pillai, > Staff Engineer (Development), > SpikeSource India Pvt Ltd, > Koramangala 3rd Block, > Bangalore, India. > > http://www.spikesource.com > > Blog: http://randombytes.blogspot.com > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From riltim at gmail.com Tue Dec 20 16:33:23 2005 From: riltim at gmail.com (Tim Riley) Date: Tue, 20 Dec 2005 10:33:23 -0500 Subject: [IronPython] IronPython on mac os X (newbie problems) In-Reply-To: References: <8548c5f30512191058h521a6b69x142ad0e55e58f507@mail.gmail.com> Message-ID: Actually, now I just tested it will mono-1.1.12 on win32 and it appears to be working. Possibly you need to upgrade your version of mono. C:\IronPython\bin>mono --version Mono JIT compiler version 1.1.12, (C) 2002-2005 Novell, Inc and Contributors. ww w.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal C:\IronPython\bin>mono IronPythonConsole.exe IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> On 12/20/05, Tim Riley wrote: > > I may be wrong but I was under the impression that the more recent > versions of IronPython utilized portions of the .NET 2 framework that have > yet to be implemented in mono. > > Regards, > Tim Riley > > On 12/19/05, Anand Pillai wrote: > > > > Incidentally, I got the same error with IronPython 0.9.6 and the > > latest version of mono > > on a FC3 (Fedora Core 3) box. > > > > I had installed IronPython to /opt/IronPython. Initially IronPython > > was running fine. Then I wanted to try out the tutorials and so I did > > the following: > > > > alias 'iron'='mono /opt/IronPython/bin/IronPythonConsole.exe' > > > > Then I tried to run the examples using 'iron '. At that > > point it started giving this error. > > > > I dont have the traceback since this happened in the office and I am > > posting from home. I can send it later if reqd. > > > > Thanks > > > > -Anand > > > > > > On 12/17/05, S V N Vishwanathan wrote: > > > Hi! > > > > > > I am a newbie to IronPython. Maybe I am missing something here ... > > > > > > I installed the latest version of Mono on my Mac OS X (10.4) box and > > > downloaded IronPython and tried > > > > > > % mono IronPythonConsole.exe > > > > > > ** (IronPythonConsole.exe:653): WARNING **: implement me 0x00 > > > > > > > > > ** ERROR **: file class.c: line 3030 (mono_class_from_mono_type): > > should not be reached > > > aborting... > > > zsh: abort mono IronPythonConsole.exe > > > > > > > > > The relevant version of Mono is: > > > > > > % mono --version > > > Mono JIT compiler version 1.1.10, (C) 2002-2005 Novell, Inc and > > Contributors. www.mono-project.com > > > TLS: normal > > > GC: Included Boehm (with typed GC) > > > SIGSEGV : normal > > > > > > and the OS is > > > > > > % uname -a > > > Darwin Ambica.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 > > 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh > > powerpc > > > > > > > > > > > > What am I doing wrong? Please do not hesitate to ask me if you need > > any > > > further information. > > > > > > vishy > > > > > > ps: I am not subscribed to the list. So Pls cc me on the responses. > > > _______________________________________________ > > > users mailing list > > > users at lists.ironpython.com > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > > -- > > Anand B Pillai, > > Staff Engineer (Development), > > SpikeSource India Pvt Ltd, > > Koramangala 3rd Block, > > Bangalore, India. > > > > http://www.spikesource.com > > > > Blog: http://randombytes.blogspot.com > > _______________________________________________ > > users mailing list > > users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vargaz at gmail.com Tue Dec 20 17:07:08 2005 From: vargaz at gmail.com (Zoltan Varga) Date: Tue, 20 Dec 2005 17:07:08 +0100 Subject: [IronPython] IronPython on mac os X (newbie problems) In-Reply-To: References: <8548c5f30512191058h521a6b69x142ad0e55e58f507@mail.gmail.com> Message-ID: <295e750a0512200807s6794af4cx23c4440249c6e801@mail.gmail.com> Hi, mono versions can usually run the latest version of IronPython at the date of their release, so 1.1.10 can run 0.9.5, 1.1.12 can run 0.9.6 etc. Zoltan On 12/20/05, Tim Riley wrote: > Actually, now I just tested it will mono-1.1.12 on win32 and it appears to > be working. Possibly you need to upgrade your version of mono. > > C:\IronPython\bin>mono --version > Mono JIT compiler version 1.1.12, (C) 2002-2005 Novell, Inc and > Contributors. ww > w.mono-project.com > TLS: normal > GC: Included Boehm (with typed GC) > SIGSEGV : normal > > C:\IronPython\bin>mono IronPythonConsole.exe > IronPython 0.9.6 on .NET 2.0.50727.42 > Copyright (c) Microsoft Corporation. All rights reserved. > > >>> > > > On 12/20/05, Tim Riley < riltim at gmail.com> wrote: > > I may be wrong but I was under the impression that the more recent > versions of IronPython utilized portions of the .NET 2 framework that have > yet to be implemented in mono. > > > > Regards, > > Tim Riley > > > > > > > > On 12/19/05, Anand Pillai wrote: > > > Incidentally, I got the same error with IronPython 0.9.6 and the > > > latest version of mono > > > on a FC3 (Fedora Core 3) box. > > > > > > I had installed IronPython to /opt/IronPython. Initially IronPython > > > was running fine. Then I wanted to try out the tutorials and so I did > > > the following: > > > > > > alias 'iron'='mono > /opt/IronPython/bin/IronPythonConsole.exe' > > > > > > Then I tried to run the examples using 'iron '. At that > > > point it started giving this error. > > > > > > I dont have the traceback since this happened in the office and I am > > > posting from home. I can send it later if reqd. > > > > > > Thanks > > > > > > -Anand > > > > > > > > > On 12/17/05, S V N Vishwanathan < vishy at mail.rsise.anu.edu.au> wrote: > > > > Hi! > > > > > > > > I am a newbie to IronPython. Maybe I am missing something here ... > > > > > > > > I installed the latest version of Mono on my Mac OS X (10.4) box and > > > > downloaded IronPython and tried > > > > > > > > % mono IronPythonConsole.exe > > > > > > > > ** (IronPythonConsole.exe:653): WARNING **: implement me 0x00 > > > > > > > > > > > > ** ERROR **: file class.c: line 3030 (mono_class_from_mono_type): > should not be reached > > > > aborting... > > > > zsh: abort mono IronPythonConsole.exe > > > > > > > > > > > > The relevant version of Mono is: > > > > > > > > % mono --version > > > > Mono JIT compiler version 1.1.10, (C) 2002-2005 Novell, Inc and > Contributors. www.mono-project.com > > > > TLS: normal > > > > GC: Included Boehm (with typed GC) > > > > SIGSEGV : normal > > > > > > > > and the OS is > > > > > > > > % uname -a > > > > Darwin Ambica.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 > 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh > powerpc > > > > > > > > > > > > > > > > What am I doing wrong? Please do not hesitate to ask me if you need > any > > > > further information. > > > > > > > > vishy > > > > > > > > ps: I am not subscribed to the list. So Pls cc me on the responses. > > > > _______________________________________________ > > > > users mailing list > > > > users at lists.ironpython.com > > > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > > > > > > -- > > > Anand B Pillai, > > > Staff Engineer (Development), > > > SpikeSource India Pvt Ltd, > > > Koramangala 3rd Block, > > > Bangalore, India. > > > > > > http://www.spikesource.com > > > > > > Blog: http://randombytes.blogspot.com > > > _______________________________________________ > > > users mailing list > > > users at lists.ironpython.com > > > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > > > > > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > From stan at phidani.be Wed Dec 21 10:27:44 2005 From: stan at phidani.be (Stanislas Pinte) Date: Wed, 21 Dec 2005 10:27:44 +0100 Subject: [IronPython] Simpy not working on IronPython because of type(generator) problem Message-ID: <1135157264.43a9201026b98@webmail.raincode.com> Hello, Internally we use a wonderful simulation framework written in python: http://simpy.sourceforge.net/ I cannot make it work on python because it rests on generators... the main loop of simpy uses type(myFunction) == types.GeneratorType) to determine if it is a generator or not... > if not (type(process) == types.GeneratorType): > raise Simerror("Fatal SimPy error: activating function which"+ > " is not a generator (contains no 'yield')") However, in IronPython: >>> import types >>> def gentest(): for i in range(0,10): yield i >>> print type(gentest) whereas in CPython it returns Any idea if we can fix this easely? thanks, Stan. From william at resolversystems.com Wed Dec 21 15:01:00 2005 From: william at resolversystems.com (William Reade) Date: Wed, 21 Dec 2005 14:01:00 +0000 Subject: [IronPython] Comparing enum to None Message-ID: <43A9601C.60806@resolversystems.com> Hi, we have a bug report. The following code: ------------------------------------------------------------------ import sys sys.LoadAssemblyByName("System.Windows.Forms") from System.Windows.Forms import * if 1 == None: print "won't happen" if DialogResult.Cancel == None: # boom! print "won't happen" ------------------------------------------------------------------ ...raises a NullReferenceException, as follows, at the marked line. ------------------------------------------------------------------ Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Objects.EnumOps.Equal(Object self, Object other) at IronPython.Objects.Ops.Equal(Object x, Object y) at __main__.Initialize() in H:\dev\current\sandbox\testenumnone.py:line 8 ------------------------------------------------------------------ We feel the expression should just evaluate to False. Incidentally, should we be bothering the list with these things, or should we put them directly into the bug tracker? Cheers William From jvm_cop at spamcop.net Wed Dec 21 17:56:55 2005 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 21 Dec 2005 11:56:55 -0500 Subject: [IronPython] Comparing enum to None In-Reply-To: <43A9601C.60806@resolversystems.com> Message-ID: <4.3.2.7.2.20051221115311.06ce4e30@mail.comcast.net> I for one would prefer for you to continue to send reports to the list. That way, I'll know about the issue, and will see any answer -- particularly one of the form "it's a bug, but we won't be able to fix it for a while [because ...], so do this instead" or "we'll fix it soon, but for now here's a workaround" or "not a bug, because ...". Thanks. At 09:01 AM 12/21/2005, William Reade wrote (in part) >Hi, we have a bug report. [snip] >Incidentally, should we be bothering the list with these things, or >should we put them directly into the bug tracker? J. Merrill / Analytical Software Corp From jvm_cop at spamcop.net Wed Dec 21 18:16:20 2005 From: jvm_cop at spamcop.net (J. Merrill) Date: Wed, 21 Dec 2005 12:16:20 -0500 Subject: [IronPython] Simpy not working on IronPython because of type(generator) problem In-Reply-To: <1135157264.43a9201026b98@webmail.raincode.com> Message-ID: <4.3.2.7.2.20051221115954.06dd7e30@mail.comcast.net> The new version of the Python Cookbook suggests using "isinstance" rather than direct comparison of types -- hopefully, the gentest() method "is a" generator. So you'd use if not isinstance(process, types.GeneratorType): I have not checked if that would work (in either current CPython or IronPython), and if it does that's what should be in simpy -- but isinstance wasn't added until 2.2 (I think) and simpy was probably built before that. You might want to look at this (long) thread: http://www.gossamer-threads.com/lists/python/python/365821?nohighlight=1#365821 which (it seems to me) somewhat suggests using if not hasattr(process, '__iter__'): in this case. Good luck... At 04:27 AM 12/21/2005, Stanislas Pinte wrote >Hello, > >Internally we use a wonderful simulation framework written in python: http://simpy.sourceforge.net/ > >I cannot make it work on python because it rests on generators... > >the main loop of simpy uses type(myFunction) == types.GeneratorType) to determine if it is a >generator or not... > >> if not (type(process) == types.GeneratorType): >> raise Simerror("Fatal SimPy error: activating function which"+ >> " is not a generator (contains no 'yield')") > >However, in IronPython: > >>>> import types >>>> def gentest(): > for i in range(0,10): > yield i >>>> print type(gentest) > > > >whereas in CPython it returns > > > >Any idea if we can fix this easely? > >thanks, > >Stan. J. Merrill / Analytical Software Corp From APliszka at AlienForceIT.Com Wed Dec 21 18:12:36 2005 From: APliszka at AlienForceIT.Com (Andrew Pliszka) Date: Wed, 21 Dec 2005 12:12:36 -0500 Subject: [IronPython] IronPython is leaking In-Reply-To: <4.3.2.7.2.20051221115311.06ce4e30@mail.comcast.net> Message-ID: Hi, I run a very simple speed/reliability test using IronPython, and then analysed the code using .Net Profiler. Current IronPython release seams to not release all the resources, because the memory usage of simple console application doubles in size from 62MN to 120MB, and analyzing .Net Profiler GC graphs there is a linear increase in memory usage. I run the same test using Boo (http://boo.codehaus.org/) and there was no problems. I am interested in using IronPython as a scripting language for my application. Is there a release date for production ready IronPython? Andrew ConsoleProgram.cs ... PythonEngine pe = new PythonEngine(); pe.AddToPath(Environment.CurrentDirectory); pe.Execute("import hello"); for (int j = 0; j < 1; j++) for (int i = 0; i < 6000; i++) pe.Evaluate("hello.speedLoop()") ... hello.py def speedLoop(): j = 0; i = 0; x = 0; while i < 10000: while x < 10000: j = i; x = x + 1; i = i + 1; return i; -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com]On Behalf Of J. Merrill Sent: Wednesday, December 21, 2005 11:57 AM To: Discussion of IronPython Subject: Re: [IronPython] Comparing enum to None I for one would prefer for you to continue to send reports to the list. That way, I'll know about the issue, and will see any answer -- particularly one of the form "it's a bug, but we won't be able to fix it for a while [because ...], so do this instead" or "we'll fix it soon, but for now here's a workaround" or "not a bug, because ...". Thanks. At 09:01 AM 12/21/2005, William Reade wrote (in part) >Hi, we have a bug report. [snip] >Incidentally, should we be bothering the list with these things, or >should we put them directly into the bug tracker? J. Merrill / Analytical Software Corp _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Wed Dec 21 18:44:02 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 21 Dec 2005 09:44:02 -0800 Subject: [IronPython] IronPython is leaking In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0A93@df-foxhound-msg.exchange.corp.microsoft.com> This is a known problem in IronPython. The code generated using Evaluate is currently not generated as garbage-collectable code. This is a something that we have yet to fix. In the meantime what might help is pre-compiling the code and then execute/eval the code already compiled. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Pliszka Sent: Wednesday, December 21, 2005 9:13 AM To: Discussion of IronPython Subject: [IronPython] IronPython is leaking Hi, I run a very simple speed/reliability test using IronPython, and then analysed the code using .Net Profiler. Current IronPython release seams to not release all the resources, because the memory usage of simple console application doubles in size from 62MN to 120MB, and analyzing .Net Profiler GC graphs there is a linear increase in memory usage. I run the same test using Boo (http://boo.codehaus.org/) and there was no problems. I am interested in using IronPython as a scripting language for my application. Is there a release date for production ready IronPython? Andrew ConsoleProgram.cs ... PythonEngine pe = new PythonEngine(); pe.AddToPath(Environment.CurrentDirectory); pe.Execute("import hello"); for (int j = 0; j < 1; j++) for (int i = 0; i < 6000; i++) pe.Evaluate("hello.speedLoop()") ... hello.py def speedLoop(): j = 0; i = 0; x = 0; while i < 10000: while x < 10000: j = i; x = x + 1; i = i + 1; return i; -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com]On Behalf Of J. Merrill Sent: Wednesday, December 21, 2005 11:57 AM To: Discussion of IronPython Subject: Re: [IronPython] Comparing enum to None I for one would prefer for you to continue to send reports to the list. That way, I'll know about the issue, and will see any answer -- particularly one of the form "it's a bug, but we won't be able to fix it for a while [because ...], so do this instead" or "we'll fix it soon, but for now here's a workaround" or "not a bug, because ...". Thanks. At 09:01 AM 12/21/2005, William Reade wrote (in part) >Hi, we have a bug report. [snip] >Incidentally, should we be bothering the list with these things, or >should we put them directly into the bug tracker? J. Merrill / Analytical Software Corp _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Wed Dec 21 18:51:31 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 21 Dec 2005 09:51:31 -0800 Subject: [IronPython] Comparing enum to None In-Reply-To: <43A9601C.60806@resolversystems.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0A9A@df-foxhound-msg.exchange.corp.microsoft.com> Thanks for the bug report, William, sending them to the alias is just fine. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Wednesday, December 21, 2005 6:01 AM To: Discussion of IronPython Subject: [IronPython] Comparing enum to None Hi, we have a bug report. The following code: ------------------------------------------------------------------ import sys sys.LoadAssemblyByName("System.Windows.Forms") from System.Windows.Forms import * if 1 == None: print "won't happen" if DialogResult.Cancel == None: # boom! print "won't happen" ------------------------------------------------------------------ ...raises a NullReferenceException, as follows, at the marked line. ------------------------------------------------------------------ Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Objects.EnumOps.Equal(Object self, Object other) at IronPython.Objects.Ops.Equal(Object x, Object y) at __main__.Initialize() in H:\dev\current\sandbox\testenumnone.py:line 8 ------------------------------------------------------------------ We feel the expression should just evaluate to False. Incidentally, should we be bothering the list with these things, or should we put them directly into the bug tracker? Cheers William _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Wed Dec 21 19:00:07 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 21 Dec 2005 10:00:07 -0800 Subject: [IronPython] IronPython is leaking Message-ID: But, but... If MN = Meganybble, then 62MN = 31MB. In which case, 31MB -> 120MB is nearly quadrupled, not doubled! ;) ----- Keith J. Farmer // kfarmer at thuban.org -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Pliszka Sent: Wednesday, 21 December 2005 09:13 application doubles in size from 62MN to 120MB, and analyzing .Net Profiler GC graphs there is a linear increase in memory usage. From Martin.Maly at microsoft.com Wed Dec 21 20:06:25 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 21 Dec 2005 11:06:25 -0800 Subject: [IronPython] Simpy not working on IronPython because of type(generator) problem In-Reply-To: <1135157264.43a9201026b98@webmail.raincode.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0B14@df-foxhound-msg.exchange.corp.microsoft.com> I believe this should be quite easy to fix. Barring any unexpected surprises, we should have fix for this soon. Thanks for the report! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Stanislas Pinte Sent: Wednesday, December 21, 2005 1:28 AM To: users at lists.ironpython.com Cc: simpy-users at lists.sourceforge.net Subject: [IronPython] Simpy not working on IronPython because of type(generator) problem Hello, Internally we use a wonderful simulation framework written in python: http://simpy.sourceforge.net/ I cannot make it work on python because it rests on generators... the main loop of simpy uses type(myFunction) == types.GeneratorType) to determine if it is a generator or not... > if not (type(process) == types.GeneratorType): > raise Simerror("Fatal SimPy error: activating function which"+ > " is not a generator (contains no 'yield')") However, in IronPython: >>> import types >>> def gentest(): for i in range(0,10): yield i >>> print type(gentest) whereas in CPython it returns Any idea if we can fix this easely? thanks, Stan. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From s.kobalczyk at softwaremind.pl Wed Dec 21 23:29:52 2005 From: s.kobalczyk at softwaremind.pl (Szymon Kobalczyk) Date: Wed, 21 Dec 2005 23:29:52 +0100 Subject: [IronPython] IronPython is leaking In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5AD0A93@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5AD0A93@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43A9D760.3000602@softwaremind.pl> Martin Maly wrote: >This is a known problem in IronPython. The code generated using Evaluate is currently not generated as garbage-collectable code. This is a something that we have yet to fix. In the meantime what might help is pre-compiling the code and then execute/eval the code already compiled. > >Martin > > > Actually for Evaluate not all is lost. You can set the IronPython.AST.Options.FastEval which causes IronPython to simply interpret the code rather then generate IL and run it. But for other cases the only way to limit allocations is to precompile all the scripts and reuse them for further execution. I started similar thread last month and here is suggested workaround: FrameCode code = Builtin.compile(script, "", "exec") as FrameCode; PythonModule eval = new PythonModule("", new Dictionary()); code.Run(new Frame(eval)); [This is to the IP team] Actually this reminded me of something: In last version You made a change that the first line doesn't return FrameCode but some other object (FunctionCall if I remember correct) that doesn't expose any methods to execute it. Can you fix it or provide some other alternative to produce something executable from script? [/end] Another reason you see IronPython allocating resources is that it builds internal "metadata" for all assemblies it encounters. In my case this consumes about 2MB (but this is allocated on first call only) and you can verify this quickly with CLR Profiller. It also takes some time so you might want to do this early on application startup instead on first call (e.g. during some GUI action). One more issue you might watch for is that if you pass some variables to PythonEngine, the references these objects can be held by IronPython even after finishing executing the script. For this I had to actually add ClearVariables method on the Engine. However, IronPython is so much valuable tool for us that we try to deal with these pitfalls and use it in production system with great success. So once again many thanks to the whole team. Szymon Kobalczyk. From jsacksteder at gmail.com Thu Dec 22 05:06:16 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Wed, 21 Dec 2005 23:06:16 -0500 Subject: [IronPython] DataGridView Message-ID: <51c8a7be0512212006p5e0d018ar1e06da733ad429ea@mail.gmail.com> Can someone point me to an example of using a DataGridView control? More generally, Are there any public repositories of example code? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Thu Dec 22 07:55:41 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 21 Dec 2005 22:55:41 -0800 Subject: [IronPython] DataGridView Message-ID: http://msdn.microsoft.com/msdnmag/issues/06/01/DevQA/default.aspx http://searchvb.techtarget.com/tip/1,289483,sid8_gci1136216,00.html http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/d v_fxmclictl/html/0a45c661-89dc-4390-9cc6-c47eee501488.asp Sample: http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/d v_fxsamples/html/141516e8-05c4-45e9-b344-ae7815e68c29.asp ... And many more from googling for datagridview. ----- Keith J. Farmer kfarmer at thuban.org ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Wednesday, 21 December 2005 20:06 To: users at lists.ironpython.com Subject: [IronPython] DataGridView Can someone point me to an example of using a DataGridView control? More generally, Are there any public repositories of example code? -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.kobalczyk at softwaremind.pl Thu Dec 22 08:36:41 2005 From: s.kobalczyk at softwaremind.pl (Szymon Kobalczyk) Date: Thu, 22 Dec 2005 08:36:41 +0100 Subject: [IronPython] DataGridView In-Reply-To: References: Message-ID: <43AA5789.3090301@softwaremind.pl> > > > Can someone point me to an example of using a DataGridView control? > > More generally, Are there any public repositories of example code? > I would also add the DataGridView FAQ: http://www.windowsforms.net/Samples/Go%20To%20Market/DataGridView/DataGridView%20FAQ.doc but there are many more WindowsForms FAQs and samples: http://www.windowsforms.net/Default.aspx?tabindex=5&tabid=60 In general the first stop for WinForms sample code is the: http://www.windowsforms. Szymon Kobalczyk. From APliszka at AlienForceIT.Com Thu Dec 22 13:08:26 2005 From: APliszka at AlienForceIT.Com (Andrew Pliszka) Date: Thu, 22 Dec 2005 07:08:26 -0500 Subject: [IronPython] IronPython is leaking In-Reply-To: <43A9D760.3000602@softwaremind.pl> Message-ID: Thanks a lot for all the suggestions. I think IronPython is a great thing and I am looking forward for production release. I am using Abstract Factory and Bridge patterns for my scripting features, so for now I will use Boo, and as soon as IronPython 1.0 will be released I will switch implementation to IronPython. Once again I appreciate all the work that is being done on IronPython. Andrew -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com]On Behalf Of Szymon Kobalczyk Sent: Wednesday, December 21, 2005 5:30 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython is leaking Martin Maly wrote: >This is a known problem in IronPython. The code generated using Evaluate is currently not generated as garbage-collectable code. This is a something that we have yet to fix. In the meantime what might help is pre-compiling the code and then execute/eval the code already compiled. > >Martin > > > Actually for Evaluate not all is lost. You can set the IronPython.AST.Options.FastEval which causes IronPython to simply interpret the code rather then generate IL and run it. But for other cases the only way to limit allocations is to precompile all the scripts and reuse them for further execution. I started similar thread last month and here is suggested workaround: FrameCode code = Builtin.compile(script, "", "exec") as FrameCode; PythonModule eval = new PythonModule("", new Dictionary()); code.Run(new Frame(eval)); [This is to the IP team] Actually this reminded me of something: In last version You made a change that the first line doesn't return FrameCode but some other object (FunctionCall if I remember correct) that doesn't expose any methods to execute it. Can you fix it or provide some other alternative to produce something executable from script? [/end] Another reason you see IronPython allocating resources is that it builds internal "metadata" for all assemblies it encounters. In my case this consumes about 2MB (but this is allocated on first call only) and you can verify this quickly with CLR Profiller. It also takes some time so you might want to do this early on application startup instead on first call (e.g. during some GUI action). One more issue you might watch for is that if you pass some variables to PythonEngine, the references these objects can be held by IronPython even after finishing executing the script. For this I had to actually add ClearVariables method on the Engine. However, IronPython is so much valuable tool for us that we try to deal with these pitfalls and use it in production system with great success. So once again many thanks to the whole team. Szymon Kobalczyk. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jsacksteder at gmail.com Thu Dec 22 16:13:55 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Thu, 22 Dec 2005 10:13:55 -0500 Subject: [IronPython] DataGridView In-Reply-To: <43AA5789.3090301@softwaremind.pl> References: <43AA5789.3090301@softwaremind.pl> Message-ID: <51c8a7be0512220713u77a6d47elee4f49db121a387f@mail.gmail.com> I'm sorry, I meant in Python. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan at acceleration.net Thu Dec 22 17:30:57 2005 From: ryan at acceleration.net (Ryan Davis) Date: Thu, 22 Dec 2005 11:30:57 -0500 Subject: [IronPython] .config files? Message-ID: <43AAD4C1.5050901@acceleration.net> Hello all, I'm trying to use IronPython in interactive mode to do odd database tasks against my C# DAL. All my connection strings are stored in an .config file, and the DAL looks there for it. I did some googling on using an app.config with ironpython, and found an old debate on here about env vars vs. a .config vs something else. Did that debate ever get resolved? Is there a way to specify the config file? Thanks, Ryan From Martin.Maly at microsoft.com Thu Dec 22 19:29:16 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 22 Dec 2005 10:29:16 -0800 Subject: [IronPython] .config files? In-Reply-To: <43AAD4C1.5050901@acceleration.net> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0D6B@df-foxhound-msg.exchange.corp.microsoft.com> We implemented support for site.py, but beyond that we didn't add support for other means of configuration via app.config. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ryan Davis Sent: Thursday, December 22, 2005 8:31 AM To: Discussion of IronPython Subject: [IronPython] .config files? Hello all, I'm trying to use IronPython in interactive mode to do odd database tasks against my C# DAL. All my connection strings are stored in an .config file, and the DAL looks there for it. I did some googling on using an app.config with ironpython, and found an old debate on here about env vars vs. a .config vs something else. Did that debate ever get resolved? Is there a way to specify the config file? Thanks, Ryan _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kfarmer at thuban.org Thu Dec 22 19:41:20 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Thu, 22 Dec 2005 10:41:20 -0800 Subject: [IronPython] DataGridView Message-ID: Instantiate away - the API will be the same. ----- Keith J. Farmer kfarmer at thuban.org ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Thursday, 22 December 2005 07:14 To: s.kobalczyk at softwaremind.pl; Discussion of IronPython Subject: Re: [IronPython] DataGridView I'm sorry, I meant in Python. -------------- next part -------------- An HTML attachment was scrubbed... URL: From william at resolversystems.com Thu Dec 22 20:35:33 2005 From: william at resolversystems.com (William Reade) Date: Thu, 22 Dec 2005 19:35:33 +0000 Subject: [IronPython] function/method comparison Message-ID: <43AB0005.3060900@resolversystems.com> Hi, we have another bug report. This one's a bit longer... In IronPythonConsole (0.9.6): ------------------------------------------------------------------ IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class C: ... def f(self): ... pass ... >>> c = C() >>> c.f == c.f False >>> C.f == C.f False ------------------------------------------------------------------ ...and in IronPythonConsole (0.9.5): ------------------------------------------------------------------ IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class C: ... def f(self): ... pass ... >>> c = C() >>> c.f == c.f False >>> C.f == C.f True ------------------------------------------------------------------ We believe that both comparisons should evaluate to True. Merry Christmas ;-) William From Martin.Maly at microsoft.com Thu Dec 22 20:54:28 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 22 Dec 2005 11:54:28 -0800 Subject: [IronPython] function/method comparison In-Reply-To: <43AB0005.3060900@resolversystems.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5AD0DB2@df-foxhound-msg.exchange.corp.microsoft.com> Great bug, Thanks! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, December 22, 2005 11:36 AM To: Discussion of IronPython Subject: [IronPython] function/method comparison Hi, we have another bug report. This one's a bit longer... In IronPythonConsole (0.9.6): ------------------------------------------------------------------ IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class C: ... def f(self): ... pass ... >>> c = C() >>> c.f == c.f False >>> C.f == C.f False ------------------------------------------------------------------ ...and in IronPythonConsole (0.9.5): ------------------------------------------------------------------ IronPython 0.9.5 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class C: ... def f(self): ... pass ... >>> c = C() >>> c.f == c.f False >>> C.f == C.f True ------------------------------------------------------------------ We believe that both comparisons should evaluate to True. Merry Christmas ;-) William _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From info at geatec.com Fri Dec 23 11:35:46 2005 From: info at geatec.com (J. de Hooge) Date: Fri, 23 Dec 2005 11:35:46 +0100 Subject: [IronPython] DataGridView In-Reply-To: <51c8a7be0512220713u77a6d47elee4f49db121a387f@mail.gmail.com> Message-ID: <000001c607ac$a59df640$6402a8c0@GEADELL> Jeff, I would not know any examples of using the DataGridView in Python. But I did use many other view classes in IronPython, since I've been working on a GUI framework in IP. What I used as doc was: .NET SDK 2.0 documentation and Python 2.4 Manuals. For me that worked fine. There's remarkably little difference between using them from C# and from IP, even at dealing with event handlers, properties and .NET datastructures. Since there probably aren't too many examples around yet, here's a fragment of code to illustrate this: - Instantiate a TreeView - Add an event handler to its MouseUp event to show a ContextMenuStrip that was built up by a widget creation function defined elsewhere from sys import * LoadAssemblyByName("System.Windows.Forms") from System.Windows import Forms . class .: def createWidget (self): . self.widget = Forms.TreeView () # Instantiate .NET class self.widget.Dock = Forms.DockStyle.Fill # Set properties, just like you would in C# self.widget.HideSelection = False # Same self.widget.AllowDrop = True # Same . if self.contextMenuView: self.widget.ContextMenuStrip = self.contextMenuView.createWidget () # Get populated context menu strip self.widget.MouseUp += lambda sender, event: event.Button != Forms.MouseButtons.Right or sender.ContextMenuStrip.Show (sender, event.Location) # Add event handler to show context menu at mouse up .NET datastructures can usually be betraversed with Python iterators without any special tricks: def bareWrite (self): expansionDictionary = {} self.fillExpansionDictionary (self.widget.Nodes, (), expansionDictionary) # Will traverse Nodes, see function def below self.widget.Nodes.Clear () # Call member, just like you would in C# self.writeTree (self.treeNode.new, self.widget.Nodes, (), expansionDictionary) # Pass Forms.TreeView.Nodes property as param, just like in C# def fillExpansionDictionary (self, treeViewNodes, hashPath, expansionDictionary): for treeViewNode in treeViewNodes: # Treat treeViewNodes as an ordinary Python iterable datastructure, even though it is a reference to Forms.TreeView.Nodes, an instance of public class TreeNodeCollection: IList, ICollection, IEnumerable if self.transformer: newHashPath = hashPath + (treeViewNode.Tag, ) # Use .NET properties just as you would in C# else: newHashPath = hashPath + (treeViewNode.Text, expansionDictionary [newHashPath] = treeViewNode.IsExpanded # Yet another property self.fillExpansionDictionary (treeViewNode.Nodes, newHashPath, expansionDictionary) Probably you just should start experimenting. What helped me tremendously is the fact that IP is interpreted, rather than compiled. I can experiment in seconds, even from the command line, although I prefer assembling small code fragments in an editor to try out stuff. Currently I am using IP 0.9.5 as interpreter, running IP 0.9.6 beforehand as a syntax checker, since that version has improved error reporting but some run time issues. (for wich a fix is already on this mailing list (thanks Dino) but I haven't yet found the time to try this out) Hope this helps Jacques de Hooge info at geatec.com -----Oorspronkelijk bericht----- Van: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] Namens jeff sacksteder Verzonden: Thursday, December 22, 2005 4:14 PM Aan: s.kobalczyk at softwaremind.pl; Discussion of IronPython Onderwerp: Re: [IronPython] DataGridView I'm sorry, I meant in Python. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredrik at pythonware.com Tue Dec 27 13:26:35 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue, 27 Dec 2005 13:26:35 +0100 Subject: [IronPython] Simpy not working on IronPython because of type(generator) problem References: <1135157264.43a9201026b98@webmail.raincode.com> <4.3.2.7.2.20051221115954.06dd7e30@mail.comcast.net> Message-ID: J. Merrill wrote: > I have not checked if that would work (in either current CPython or IronPython), > and if it does that's what should be in simpy -- but isinstance wasn't added until > 2.2 (I think) and simpy was probably built before that. you got that backwards: GeneratorType was added in Python 2.2, but isinstance has been around for a long time (1.5 or so). > You might want to look at this (long) thread: > > http://www.gossamer-threads.com/lists/python/python/365821?nohighlight=1#365821 > > which (it seems to me) somewhat suggests using > if not hasattr(process, '__iter__'): > in this case. without looking at SimPy, it sounds like the best way would simply be to remove the type test. if the code uses generators in the usual way, it will simply fail on the first __iter__ or next call if it's given the wrong kind of object... cheers /F From dinov at exchange.microsoft.com Tue Dec 27 20:11:14 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 27 Dec 2005 11:11:14 -0800 Subject: [IronPython] IronPython is leaking In-Reply-To: <43A9D760.3000602@softwaremind.pl> Message-ID: <4039D552ADAB094BB1EA670F3E96214ECC471F@df-foxhound-msg.exchange.corp.microsoft.com> Regarding the FunctionCall / FrameCode change... This is great feedback. One of the work items we have before the next release is to review & better define the public API surface. Any other feedback you (or anyone else) have on this would be great. Ultimately the public API surface should all be contained within the IronPython.Hosting namespace. The rest of the "public" functionality is really just our runtime. It'd be great to hear if there are other areas where the "non-public" API surface is being used so that we can make sure that there is supported functionality within Hosting that covers that. Obviously using the non-public API surface is a great workaround until we get this all settled. We'll look into providing something reasonable here for this specific scenario for the next release. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Szymon Kobalczyk Sent: Wednesday, December 21, 2005 2:30 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython is leaking Martin Maly wrote: >This is a known problem in IronPython. The code generated using Evaluate is currently not generated as garbage-collectable code. This is a something that we have yet to fix. In the meantime what might help is pre-compiling the code and then execute/eval the code already compiled. > >Martin > > > Actually for Evaluate not all is lost. You can set the IronPython.AST.Options.FastEval which causes IronPython to simply interpret the code rather then generate IL and run it. But for other cases the only way to limit allocations is to precompile all the scripts and reuse them for further execution. I started similar thread last month and here is suggested workaround: FrameCode code = Builtin.compile(script, "", "exec") as FrameCode; PythonModule eval = new PythonModule("", new Dictionary()); code.Run(new Frame(eval)); [This is to the IP team] Actually this reminded me of something: In last version You made a change that the first line doesn't return FrameCode but some other object (FunctionCall if I remember correct) that doesn't expose any methods to execute it. Can you fix it or provide some other alternative to produce something executable from script? [/end] Another reason you see IronPython allocating resources is that it builds internal "metadata" for all assemblies it encounters. In my case this consumes about 2MB (but this is allocated on first call only) and you can verify this quickly with CLR Profiller. It also takes some time so you might want to do this early on application startup instead on first call (e.g. during some GUI action). One more issue you might watch for is that if you pass some variables to PythonEngine, the references these objects can be held by IronPython even after finishing executing the script. For this I had to actually add ClearVariables method on the Engine. However, IronPython is so much valuable tool for us that we try to deal with these pitfalls and use it in production system with great success. So once again many thanks to the whole team. Szymon Kobalczyk. _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From imm at iain-mackay.org Wed Dec 28 01:25:18 2005 From: imm at iain-mackay.org (Iain Mackay) Date: Wed, 28 Dec 2005 00:25:18 -0000 Subject: [IronPython] Experience installing IP with the new WPF CTP In-Reply-To: Message-ID: <000001c60b45$2fdb7bc0$0201a8c0@Ness> I ran into several problems running the first Avalon example from the tutorial, using IP 0.9.6 I should mention that at this time I was running .net Framework 2.0 and the Dec 2005 CTP preview of WPF x64 versions without the Framework SDK; installing the SDK subsequently did not change the behaviour. I noticed three problems: - I couldn't set the Text attribute on a Window object - I couldn't set the TextContent attribute on a TextBlock object - the class RepeatBehaviour seems not to be imported. Another strange aspect is that I get this far when I enter the script interactively to the console, but when I put the script in a file and execute it from the command line I get the exception: "System.InvalidOperationException: The calling thread must be STA, as many UI components require this." on calling the Show method of the Window object. I think I might need to rebuild the console to sort this out - C# and .net threading models are rather a steep learning curve for this evening, so I've stuck to interactive experiments for now. Here's my console experience following the tutorial: G:\downloads\ironpython\IronPython-0.9.6\IronPython-0.9.6\Tutorial>ironpytho nconsole IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from avalon import * >>> w=Window () >>> w.Show () >>> w.Text="Avalon app" Traceback (most recent call last): at TypeError: can't set arbitrary attributes on built-in type System.Windows.Window This is quite right, because Windows do not have a Text attribute. However, if you set Title, all is well. >>> w.Content = TextBlock () >>> w.Content.TextContent = "Hello IronPython!" Traceback (most recent call last): at TypeError: can't set arbitrary attributes on built-in type System.Windows.Contro ls.TextBlock Similarly, w.Content.Text = "Hello IronPython", works just fine. You can discover the attributes of w of course just by: for (key, value) in w.__dict__.items (): print key, value (Iron)Python is so cool like that. >>> w.Content.FontSize = 50 >>> a=DoubleAnimation(0.0,Duration(TimeSpan.FromSeconds(3))) >>> a.RepeatBehaviour = RepeatBehaviour.Forever Traceback (most recent call last): at NameError: name 'RepeatBehaviour' is not defined >>> ^Z I didn't persist beyond here just yet. I suppose there have been some substantial changes in object properties during the evolution of WPF as seen in this latest preview, not yet reflected in the tutorial source - a life on the bleeding edge thing. >>> import sys >>> sys.path ['G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\Tutorial', 'G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\bin\\Lib'] >>> Anyway, a whole lot of wonderful things are working straight out of the box, including the XAML calculator. This is going to be a lot of fun. Thanks to everyone for getting things this far. Am I doing something silly to get the threading problem? Iain MacKay From Martin.Maly at microsoft.com Wed Dec 28 01:31:31 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Tue, 27 Dec 2005 16:31:31 -0800 Subject: [IronPython] Experience installing IP with the new WPF CTP In-Reply-To: <000001c60b45$2fdb7bc0$0201a8c0@Ness> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5BF37CC@df-foxhound-msg.exchange.corp.microsoft.com> Hi Iain, What an interesting coincidence. I just finished a sweep through the tutorial, updating it with the new Avalon samples that work with the December CTP. The WinFX has changed substantially between the September and December CTPs. You pretty much found the right solutions to all roadblocks that you encountered. As for the animation, I wasn't able to find what the new way of doing things was so it is the only thing that I didn't get working. However, the tutorial will be updated (as well as the Embed directory sample) in the next release. Thanks! Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain Mackay Sent: Tuesday, December 27, 2005 4:25 PM To: users at lists.ironpython.com Subject: [IronPython] Experience installing IP with the new WPF CTP I ran into several problems running the first Avalon example from the tutorial, using IP 0.9.6 I should mention that at this time I was running .net Framework 2.0 and the Dec 2005 CTP preview of WPF x64 versions without the Framework SDK; installing the SDK subsequently did not change the behaviour. I noticed three problems: - I couldn't set the Text attribute on a Window object - I couldn't set the TextContent attribute on a TextBlock object - the class RepeatBehaviour seems not to be imported. Another strange aspect is that I get this far when I enter the script interactively to the console, but when I put the script in a file and execute it from the command line I get the exception: "System.InvalidOperationException: The calling thread must be STA, as many UI components require this." on calling the Show method of the Window object. I think I might need to rebuild the console to sort this out - C# and .net threading models are rather a steep learning curve for this evening, so I've stuck to interactive experiments for now. Here's my console experience following the tutorial: G:\downloads\ironpython\IronPython-0.9.6\IronPython-0.9.6\Tutorial>ironpytho nconsole IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from avalon import * >>> w=Window () >>> w.Show () >>> w.Text="Avalon app" Traceback (most recent call last): at TypeError: can't set arbitrary attributes on built-in type System.Windows.Window This is quite right, because Windows do not have a Text attribute. However, if you set Title, all is well. >>> w.Content = TextBlock () >>> w.Content.TextContent = "Hello IronPython!" Traceback (most recent call last): at TypeError: can't set arbitrary attributes on built-in type System.Windows.Contro ls.TextBlock Similarly, w.Content.Text = "Hello IronPython", works just fine. You can discover the attributes of w of course just by: for (key, value) in w.__dict__.items (): print key, value (Iron)Python is so cool like that. >>> w.Content.FontSize = 50 >>> a=DoubleAnimation(0.0,Duration(TimeSpan.FromSeconds(3))) >>> a.RepeatBehaviour = RepeatBehaviour.Forever Traceback (most recent call last): at NameError: name 'RepeatBehaviour' is not defined >>> ^Z I didn't persist beyond here just yet. I suppose there have been some substantial changes in object properties during the evolution of WPF as seen in this latest preview, not yet reflected in the tutorial source - a life on the bleeding edge thing. >>> import sys >>> sys.path ['G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\Tutorial', 'G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\bin\\Lib'] >>> Anyway, a whole lot of wonderful things are working straight out of the box, including the XAML calculator. This is going to be a lot of fun. Thanks to everyone for getting things this far. Am I doing something silly to get the threading problem? Iain MacKay _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kgmuller at xs4all.nl Wed Dec 21 12:24:48 2005 From: kgmuller at xs4all.nl (Klaus Muller) Date: Wed, 21 Dec 2005 12:24:48 +0100 Subject: [IronPython] [Simpy-users] Simpy not working on IronPython because of type(generator) problem In-Reply-To: <1135157264.43a9201026b98@webmail.raincode.com> Message-ID: <200512211124.jBLBOpdp067815@smtp-vbr6.xs4all.nl> Stan, The simplest solution for the moment is to take out that test. If one calls activate with a non-generator parameter, it will just bomb out later. No problem! Klaus > -----Original Message----- > From: simpy-users-admin at lists.sourceforge.net > [mailto:simpy-users-admin at lists.sourceforge.net] On Behalf Of > Stanislas Pinte > Sent: Wednesday, December 21, 2005 10:28 AM > To: users at lists.ironpython.com > Cc: simpy-users at lists.sourceforge.net > Subject: [Simpy-users] Simpy not working on IronPython > because of type(generator) problem > > Hello, > > Internally we use a wonderful simulation framework written in > python: http://simpy.sourceforge.net/ > > I cannot make it work on python because it rests on generators... > > the main loop of simpy uses type(myFunction) == > types.GeneratorType) to determine if it is a generator or not... > > > if not (type(process) == types.GeneratorType): > > raise Simerror("Fatal SimPy error: activating > function which"+ > > " is not a generator (contains no 'yield')") > > However, in IronPython: > > >>> import types > >>> def gentest(): > for i in range(0,10): > yield i > >>> print type(gentest) > > > > whereas in CPython it returns > > > > Any idea if we can fix this easely? > > thanks, > > Stan. > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep > through log files for problems? Stop! Download the new AJAX > search engine that makes searching your log files as easy as > surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Simpy-users mailing list > Simpy-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/simpy-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3936 bytes Desc: not available URL: From Kirk.Olynyk at microsoft.com Wed Dec 21 23:09:52 2005 From: Kirk.Olynyk at microsoft.com (Kirk Olynyk) Date: Wed, 21 Dec 2005 14:09:52 -0800 Subject: [IronPython] Small formatting bug Message-ID: <310187D53C02434D8F2CF4CD951B734104E9E607@RED-MSG-60.redmond.corp.microsoft.com> At the console prompt type: "%10d" % (1) It is not formatted as in CPython. Cheers Kirk -------------- next part -------------- An HTML attachment was scrubbed... URL: From opindd at hotmail.com Sun Dec 25 08:02:48 2005 From: opindd at hotmail.com (opin2 hu) Date: Sun, 25 Dec 2005 07:02:48 +0000 Subject: [IronPython] how to change default encoding of string and file at runtime? Message-ID: I run IronPython0.9.6 in Win2000, System Default encoding is GBK( simplified Chinese ) in IronPythonConsole: >>>a= u'\u6211\u4eec' >>>print a >>>f = open("1.txt", "w") >>>f.write( a ) >>>f.close() open the file, only "??" in 1.txt I grep "Encoding.ASCII" in source files, then replace "Encoding.ASCII" with "Encoding.Default": AST/Parser.cs line 44 System.Text.Encoding.ASCII -> System.Text.Encoding.Default Objects/PythonFile.cs line 202 Encoding.ASCII -> Encoding.Default Objects/BaseStr.cs line 108 Encoding.ASCII -> Encoding.Default Objects/BaseStr.cs line 188 Encoding.ASCII -> Encoding.Default rebuild Ironpython, redo above test, everything works fine. I don't know whether it is a right way to solve the problem? how to change default encoding of string and file at runtime _________________________________________________________________ ?????????????? MSN Messenger: http://messenger.msn.com/cn From dinov at exchange.microsoft.com Wed Dec 28 01:57:32 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 27 Dec 2005 16:57:32 -0800 Subject: [IronPython] how to change default encoding of string and file at runtime? In-Reply-To: Message-ID: <4039D552ADAB094BB1EA670F3E96214ED92BCA@df-foxhound-msg.exchange.corp.microsoft.com> This is an interesting issue... If I take your same code and run it on CPython it raises an exception: a= u'\u6211\u4eec' f = open('1.txt', 'w') f.write(a) Traceback (most recent call last): File "", line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) (the print also raises on CPython, but I'm ignoring that for now :) ) But changing this to use the default encoding would probably break some compatibility w/ CPython. One immediate work around is to use the .NET file classes directly where you can supply the encoding yourself - but that would be more cumbersome then having some native support here. This one deserves some thought around getting the right solution. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of opin2 hu Sent: Saturday, December 24, 2005 11:03 PM To: users at lists.ironpython.com Subject: [IronPython] how to change default encoding of string and file at runtime? I run IronPython0.9.6 in Win2000, System Default encoding is GBK( simplified Chinese ) in IronPythonConsole: >>>a= u'\u6211\u4eec' >>>print a >>>f = open("1.txt", "w") >>>f.write( a ) >>>f.close() open the file, only "??" in 1.txt I grep "Encoding.ASCII" in source files, then replace "Encoding.ASCII" with "Encoding.Default": AST/Parser.cs line 44 System.Text.Encoding.ASCII -> System.Text.Encoding.Default Objects/PythonFile.cs line 202 Encoding.ASCII -> Encoding.Default Objects/BaseStr.cs line 108 Encoding.ASCII -> Encoding.Default Objects/BaseStr.cs line 188 Encoding.ASCII -> Encoding.Default rebuild Ironpython, redo above test, everything works fine. I don't know whether it is a right way to solve the problem? how to change default encoding of string and file at runtime _________________________________________________________________ ?????????????? MSN Messenger: http://messenger.msn.com/cn From dinov at exchange.microsoft.com Wed Dec 28 01:59:24 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 27 Dec 2005 16:59:24 -0800 Subject: [IronPython] Small formatting bug In-Reply-To: <310187D53C02434D8F2CF4CD951B734104E9E607@RED-MSG-60.redmond.corp.microsoft.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214ED92BCD@df-foxhound-msg.exchange.corp.microsoft.com> Thanks for the bug report. We know the string formatter is currently lacking but we've been treating it as a lower priority and have been extending it on an as-needed basis. But now that you've brought this to our attention we should be able to get this one fixed for the next release. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kirk Olynyk Sent: Wednesday, December 21, 2005 2:10 PM To: users at lists.ironpython.com Subject: [IronPython] Small formatting bug At the console prompt type: "%10d" % (1) It is not formatted as in CPython. Cheers Kirk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tinuviel at sparcs.kaist.ac.kr Wed Dec 28 04:01:12 2005 From: tinuviel at sparcs.kaist.ac.kr (Seo Sanghyeon) Date: Wed, 28 Dec 2005 12:01:12 +0900 Subject: [IronPython] how to change default encoding of string and file at runtime? In-Reply-To: <4039D552ADAB094BB1EA670F3E96214ED92BCA@df-foxhound-msg.exchange.corp.microsoft.com> References: <4039D552ADAB094BB1EA670F3E96214ED92BCA@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <20051228030111.GA23696@sparcs.kaist.ac.kr> On Tue, Dec 27, 2005 at 04:57:32PM -0800, Dino Viehland wrote: > This is an interesting issue... If I take your same code and run it > on CPython it raises an exception: (snip) Actually, this works when you set "defaultencoding". $ python Python 2.3.5 (#2, Nov 20 2005, 16:40:39) [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> s = u'\u6211' >>> import sys >>> sys.getdefaultencoding() 'ascii' >>> str(s) Traceback (most recent call last): File "", line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode character u'\u6211' in position 0: ordinal not in range(128) >>> reload(sys) >>> sys.setdefaultencoding('gbk') >>> sys.getdefaultencoding() 'gbk' >>> str(s) '\xce\xd2' >>> Hope this help, Seo Sanghyeon From dinov at exchange.microsoft.com Wed Dec 28 05:00:17 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Tue, 27 Dec 2005 20:00:17 -0800 Subject: [IronPython] how to change default encoding of string and file at runtime? In-Reply-To: <20051228030111.GA23696@sparcs.kaist.ac.kr> References: <4039D552ADAB094BB1EA670F3E96214ED92BCA@df-foxhound-msg.exchange.corp.microsoft.com>, <20051228030111.GA23696@sparcs.kaist.ac.kr> Message-ID: <4039D552ADAB094BB1EA670F3E96214E235C20@df-foxhound-msg.exchange.corp.microsoft.com> Cool, then obviously it's just a bug and we'll need to support this and I think there'll be no problems getting this in the next release. Thanks for pointing that out. ________________________________________ From: users-bounces at lists.ironpython.com On Behalf Of Seo Sanghyeon Sent: Tuesday, December 27, 2005 7:01 PM To: Discussion of IronPython Subject: Re: [IronPython] how to change default encoding of string and file at runtime? On Tue, Dec 27, 2005 at 04:57:32PM -0800, Dino Viehland wrote: > This is an interesting issue... If I take your same code and run it > on CPython it raises an exception: (snip) Actually, this works when you set "defaultencoding". $ python Python 2.3.5 (#2, Nov 20 2005, 16:40:39) [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> s = u'\u6211' >>> import sys >>> sys.getdefaultencoding() 'ascii' >>> str(s) Traceback (most recent call last): File "", line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode character u'\u6211' in position 0: ordinal not in range(128) >>> reload(sys) >>> sys.setdefaultencoding('gbk') >>> sys.getdefaultencoding() 'gbk' >>> str(s) '\xce\xd2' >>> Hope this help, Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From imm at iain-mackay.org Wed Dec 28 10:49:07 2005 From: imm at iain-mackay.org (Iain Mackay) Date: Wed, 28 Dec 2005 09:49:07 -0000 Subject: [IronPython] Installing IP with the new CTP In-Reply-To: Message-ID: <000101c60b93$f5a531e0$0201a8c0@Ness> Hi Martin Thank you for your update on the tutorial, good news. I can get by without animations for now - but do you know a solution for the threading problem in the new environment? I can only do more substantial work by running from scripts rather than interactively! It's the eventually deliverable IP/WinFX combination that I'm interested in; so I'd rather have something with shelf life despite the occasional roadblock than revert to an obsolescent configuration of system software - up to a point at least. Regards Iain MacKay From gregk at simdesk.com Wed Dec 28 17:59:53 2005 From: gregk at simdesk.com (Greg Kerr) Date: Wed, 28 Dec 2005 10:59:53 -0600 Subject: [IronPython] Experience installing IP with the new WPF CTP In-Reply-To: <000001c60b45$2fdb7bc0$0201a8c0@Ness> References: <000001c60b45$2fdb7bc0$0201a8c0@Ness> Message-ID: Did you spell it RepeatBehaviour or RepeatBehavior (shouldn't have the "u" on this side of the ocean. ;-) Greg Iain Mackay wrote: > I ran into several problems running the first Avalon example from the > tutorial, using IP 0.9.6 > > I should mention that at this time I was running .net Framework 2.0 and the > Dec 2005 CTP preview of WPF x64 versions without the Framework SDK; > installing the SDK subsequently did not change the behaviour. > > I noticed three problems: > > - I couldn't set the Text attribute on a Window object > - I couldn't set the TextContent attribute on a TextBlock object > - the class RepeatBehaviour seems not to be imported. > > Another strange aspect is that I get this far when I enter the script > interactively to the console, but when I put the script in a file and > execute it from the command line I get the exception: > "System.InvalidOperationException: The calling thread must be STA, as many > UI components require this." on calling the Show method of the Window > object. I think I might need to rebuild the console to sort this out - C# > and .net threading models are rather a steep learning curve for this > evening, so I've stuck to interactive experiments for now. > > Here's my console experience following the tutorial: > > G:\downloads\ironpython\IronPython-0.9.6\IronPython-0.9.6\Tutorial>ironpytho > nconsole > IronPython 0.9.6 on .NET 2.0.50727.42 > Copyright (c) Microsoft Corporation. All rights reserved. >>>> from avalon import * >>>> w=Window () >>>> w.Show () >>>> w.Text="Avalon app" > Traceback (most recent call last): > at > TypeError: can't set arbitrary attributes on built-in type > System.Windows.Window > > This is quite right, because Windows do not have a Text attribute. However, > if you set Title, all is well. > >>>> w.Content = TextBlock () >>>> w.Content.TextContent = "Hello IronPython!" > Traceback (most recent call last): > at > TypeError: can't set arbitrary attributes on built-in type > System.Windows.Contro > ls.TextBlock > > Similarly, w.Content.Text = "Hello IronPython", works just fine. You can > discover the attributes of w of course just by: > > for (key, value) in w.__dict__.items (): print key, value > > (Iron)Python is so cool like that. > >>>> w.Content.FontSize = 50 >>>> a=DoubleAnimation(0.0,Duration(TimeSpan.FromSeconds(3))) >>>> a.RepeatBehaviour = RepeatBehaviour.Forever > Traceback (most recent call last): > at > NameError: name 'RepeatBehaviour' is not defined >>>> ^Z > > I didn't persist beyond here just yet. I suppose there have been some > substantial changes in object properties during the evolution of WPF as seen > in this latest preview, not yet reflected in the tutorial source - a life on > the bleeding edge thing. > >>>> import sys >>>> sys.path > ['G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\Tutorial', > 'G:\\downloads\\ironpython\\IronPython-0.9.6\\IronPython-0.9.6\\bin\\Lib'] > > Anyway, a whole lot of wonderful things are working straight out of the box, > including the XAML calculator. This is going to be a lot of fun. Thanks to > everyone for getting things this far. Am I doing something silly to get the > threading problem? > > Iain MacKay From jsacksteder at gmail.com Wed Dec 28 20:01:36 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Wed, 28 Dec 2005 14:01:36 -0500 Subject: [IronPython] Bitwise boolean operators and Forms Message-ID: <51c8a7be0512281101r5bf0ee88o3e130955eca78587@mail.gmail.com> The code in this snippet fails, claiming the bitwise operator '|' is unsupported for for DockStyles. Is this an unimplemented item, bug, or misunderstanding on my part? * import sys sys.LoadAssemblyByName('System.Windows.Forms') from System.Windows.Forms import * my_control = RichTextBox() my_control.Dock = DockStyle.Right | DockStyle.Left my_control.AutoSize = True my_form = Form() my_form.Controls.Add(my_control) my_form.Show() Application.Run(my_form) * -------------- next part -------------- An HTML attachment was scrubbed... URL: From riltim at gmail.com Wed Dec 28 20:25:11 2005 From: riltim at gmail.com (Tim Riley) Date: Wed, 28 Dec 2005 14:25:11 -0500 Subject: [IronPython] Bitwise boolean operators and Forms In-Reply-To: <51c8a7be0512281101r5bf0ee88o3e130955eca78587@mail.gmail.com> References: <51c8a7be0512281101r5bf0ee88o3e130955eca78587@mail.gmail.com> Message-ID: I don't understand. Why would you use an or statement when assigning a dockstyle? ~Tim On 12/28/05, jeff sacksteder wrote: > > The code in this snippet fails, claiming the bitwise operator '|' is > unsupported for for DockStyles. Is this an unimplemented item, bug, or > misunderstanding on my part? > > * > import sys > sys.LoadAssemblyByName('System.Windows.Forms') > from System.Windows.Forms import * > > my_control = RichTextBox() > my_control.Dock = DockStyle.Right | DockStyle.Left > my_control.AutoSize = True > > my_form = Form() > my_form.Controls.Add(my_control) > my_form.Show() > > Application.Run(my_form) > * > _______________________________________________ > users mailing list > users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Wed Dec 28 21:02:29 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Wed, 28 Dec 2005 12:02:29 -0800 Subject: [IronPython] Bitwise boolean operators and Forms Message-ID: Perhaps he intends Anchor instead of Dock? ----- Keith J. Farmer kfarmer at thuban.org ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tim Riley Sent: Wednesday, 28 December 2005 11:25 I don't understand. Why would you use an or statement when assigning a dockstyle? On 12/28/05, jeff sacksteder < jsacksteder at gmail.com > wrote: The code in this snippet fails, claiming the bitwise operator '|' is unsupported for for DockStyles. Is this an unimplemented item, bug, or misunderstanding on my part? import sys sys.LoadAssemblyByName('System.Windows.Forms') from System.Windows.Forms import * my_control = RichTextBox() my_control.Dock = DockStyle.Right | DockStyle.Left my_control.AutoSize = True my_form = Form() my_form.Controls.Add(my_control) my_form.Show() Application.Run(my_form) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Martin.Maly at microsoft.com Wed Dec 28 17:29:29 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 28 Dec 2005 08:29:29 -0800 Subject: [IronPython] Installing IP with the new CTP In-Reply-To: <000101c60b93$f5a531e0$0201a8c0@Ness> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5BF3827@df-foxhound-msg.exchange.corp.microsoft.com> Hi Iain, The threading issue... It seems that STAThred is what works for most uses so in the next release we are making IronPython STA by default. We are also adding a command line parameter -X:MTA that will run the script / interactive prompt on MTAThread thread. Hope this helps Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain Mackay Sent: Wednesday, December 28, 2005 1:49 AM To: users at lists.ironpython.com Subject: [IronPython] Installing IP with the new CTP Hi Martin Thank you for your update on the tutorial, good news. I can get by without animations for now - but do you know a solution for the threading problem in the new environment? I can only do more substantial work by running from scripts rather than interactively! It's the eventually deliverable IP/WinFX combination that I'm interested in; so I'd rather have something with shelf life despite the occasional roadblock than revert to an obsolescent configuration of system software - up to a point at least. Regards Iain MacKay _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Martin.Maly at microsoft.com Wed Dec 28 20:15:16 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Wed, 28 Dec 2005 11:15:16 -0800 Subject: [IronPython] Bitwise boolean operators and Forms In-Reply-To: <51c8a7be0512281101r5bf0ee88o3e130955eca78587@mail.gmail.com> Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5BF386F@df-foxhound-msg.exchange.corp.microsoft.com> The DockStyle enum does not have the Flags attribute so IronPython doesn't add the bitwise operators. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Wednesday, December 28, 2005 11:02 AM To: users at lists.ironpython.com Subject: [IronPython] Bitwise boolean operators and Forms The code in this snippet fails, claiming the bitwise operator '|' is unsupported for for DockStyles. Is this an unimplemented item, bug, or misunderstanding on my part? import sys sys.LoadAssemblyByName('System.Windows.Forms') from System.Windows.Forms import * my_control = RichTextBox() my_control.Dock = DockStyle.Right | DockStyle.Left my_control.AutoSize = True my_form = Form() my_form.Controls.Add(my_control) my_form.Show() Application.Run(my_form) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsacksteder at gmail.com Thu Dec 29 00:12:54 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Wed, 28 Dec 2005 18:12:54 -0500 Subject: [IronPython] Bitwise boolean operators and Forms In-Reply-To: References: Message-ID: <51c8a7be0512281512w22b725dyf11f777274e23200@mail.gmail.com> I was unclear on the nature of Anchor & Dock. Mistakes were made. On 12/28/05, Keith J. Farmer wrote: > > Perhaps he intends Anchor instead of Dock? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Thu Dec 29 07:00:42 2005 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 29 Dec 2005 15:00:42 +0900 Subject: [IronPython] os.mkdir and os.rmdir Message-ID: <5b0248170512282200m2b259803i@mail.gmail.com> I'd like to see os.mkdir and os.rmdir implemented in the next release of IronPython. Until then, this seems to work: import System import os os.mkdir = System.IO.Directory.CreateDirectory os.rmdir = System.IO.Directory.Delete Seo Sanghyeon From sanxiyn at gmail.com Thu Dec 29 07:06:07 2005 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 29 Dec 2005 15:06:07 +0900 Subject: [IronPython] os.path functions give wrong result on non-Windows platforms Message-ID: <5b0248170512282206g39fbfadap@mail.gmail.com> Currently, os.path module is same as ntpath, and gives wrong result on non-Windows platforms. IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import os >>> os.path.join('a', 'b') 'a\\b' Currently, I have the following code in my site.py, but obviously this is not the correct solution: import System import os if str(System.Environment.OSVersion.Platform) == 'Unix': import posixpath os.path = posixpath Any idea? Seo Sanghyeon From sanxiyn at gmail.com Thu Dec 29 10:43:47 2005 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Thu, 29 Dec 2005 18:43:47 +0900 Subject: [IronPython] warnings module Message-ID: <5b0248170512290143n29f0200an@mail.gmail.com> I looked at RegressionTests wiki page and saw several mentions of warnings module not working. As I know this problem from working on PyPy, I want to inform you. The problem is this: $ python Python 2.4.2 (#2, Nov 20 2005, 17:04:48) [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import types >>> isinstance(Exception, types.ClassType) True >>> $ py.py PyPy 0.8.0 in StdObjSpace on top of Python 2.4.2 (startuptime: 3.20 secs) >>>> import types >>>> isinstance(Exception, types.ClassType) False >>>> Now, warnings.py does rather harmful sanity check, checking whether warnings to be filtered is instance of old-style class. There is no justification for this, and I think it's up to implementors to decide whether exceptions are old-style or new-style. PyPy's patched warnings.py is available from http://codespeak.net/svn/pypy/dist/lib-python/modified-2.4.1/ The only difference is commenting out of two lines where types.ClassType check appears. With patched warnings.py, IronPython passes test_warnings, and warnings module seems to work in general. Hope this help, Seo Sanghyeon From dinov at exchange.microsoft.com Thu Dec 29 17:24:10 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 29 Dec 2005 08:24:10 -0800 Subject: [IronPython] warnings module In-Reply-To: <5b0248170512290143n29f0200an@mail.gmail.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214ED92E19@df-foxhound-msg.exchange.corp.microsoft.com> We've actually already made a change for the next release to be fully compatible with the warnings test here. The wiki is just a little out of date right now. We've switched the exceptions over to using old-style classes and also improved the interop story between Python exceptions and CLR exceptions. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Thursday, December 29, 2005 1:44 AM To: users at lists.ironpython.com Subject: [IronPython] warnings module I looked at RegressionTests wiki page and saw several mentions of warnings module not working. As I know this problem from working on PyPy, I want to inform you. The problem is this: $ python Python 2.4.2 (#2, Nov 20 2005, 17:04:48) [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import types >>> isinstance(Exception, types.ClassType) True >>> $ py.py PyPy 0.8.0 in StdObjSpace on top of Python 2.4.2 (startuptime: 3.20 secs) >>>> import types >>>> isinstance(Exception, types.ClassType) False >>>> Now, warnings.py does rather harmful sanity check, checking whether warnings to be filtered is instance of old-style class. There is no justification for this, and I think it's up to implementors to decide whether exceptions are old-style or new-style. PyPy's patched warnings.py is available from http://codespeak.net/svn/pypy/dist/lib-python/modified-2.4.1/ The only difference is commenting out of two lines where types.ClassType check appears. With patched warnings.py, IronPython passes test_warnings, and warnings module seems to work in general. Hope this help, Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Thu Dec 29 17:31:36 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 29 Dec 2005 08:31:36 -0800 Subject: [IronPython] os.mkdir and os.rmdir In-Reply-To: <5b0248170512282200m2b259803i@mail.gmail.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214ED92E1B@df-foxhound-msg.exchange.corp.microsoft.com> Thanks for the bug report - it seems likely we can get this one in for the next release. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Wednesday, December 28, 2005 10:01 PM To: users at lists.ironpython.com Subject: [IronPython] os.mkdir and os.rmdir I'd like to see os.mkdir and os.rmdir implemented in the next release of IronPython. Until then, this seems to work: import System import os os.mkdir = System.IO.Directory.CreateDirectory os.rmdir = System.IO.Directory.Delete Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at exchange.microsoft.com Thu Dec 29 17:33:42 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Thu, 29 Dec 2005 08:33:42 -0800 Subject: [IronPython] os.path functions give wrong result on non-Windows platforms In-Reply-To: <5b0248170512282206g39fbfadap@mail.gmail.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214ED92E1C@df-foxhound-msg.exchange.corp.microsoft.com> Good catch... Another solution might be for us to implement ntmath as a built-in module that delegates to the BCL's path functionality which should get it right on a per-platform basis (or have cli recognized as it's own platform and have a clipath.py that does the right thing). I'll add this to our bug list but I don't know that we'll be able to get this one fixed for the next release. Your work around seems like a decent enough one for now. -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo Sent: Wednesday, December 28, 2005 10:06 PM To: users at lists.ironpython.com Subject: [IronPython] os.path functions give wrong result on non-Windows platforms Currently, os.path module is same as ntpath, and gives wrong result on non-Windows platforms. IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import os >>> os.path.join('a', 'b') 'a\\b' Currently, I have the following code in my site.py, but obviously this is not the correct solution: import System import os if str(System.Environment.OSVersion.Platform) == 'Unix': import posixpath os.path = posixpath Any idea? Seo Sanghyeon _______________________________________________ users mailing list users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fantasysoft at hotmail.com Thu Dec 29 17:36:24 2005 From: fantasysoft at hotmail.com (=?gb2312?B?zLcg07G7qg==?=) Date: Thu, 29 Dec 2005 16:36:24 +0000 Subject: [IronPython] Problem in Loading Assembly Message-ID: Dear All, According to Tutorial provided by IronPython itself, I tried the third: IronPython and COM interoperability. But I failed to receive the expecting result. At first, I encountered this error: Traceback (most recent call last): at System.InvalidCastException: Creating an instance of the COM component with CLSID {D45FD2FC-5C6E-11D1-9EC1-00C04FD7081F} from the IClassFactory failed due to the following error: 80004002. And I considered this as version problem. So I tried this tutorial using IronPython 0.9.4. I also encountered other problems. At last, I went back to IronPython 0.9.6 and tried again. How surpring, I didn't encounter the previous problem any more. But I encountered this error: Traceback (most recent call last): at RuntimeError: Could not load assembly AgentServerObjects.dll And more annoyed, I also failed to load all of other external .dll files.By the way, I use .NET 2.0.50727.42. Regards, Michael From Martin.Maly at microsoft.com Thu Dec 29 18:47:28 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Thu, 29 Dec 2005 09:47:28 -0800 Subject: [IronPython] Problem in Loading Assembly In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5BF395D@df-foxhound-msg.exchange.corp.microsoft.com> The failure is related to the STAThread attribute on IronPythonConsole's Main. We removed it recently to fix some problems, but we broke other scenarios. the fix will be in the upcoming release. For now, you can set STAThread attribute on the IronPythonConsole's Main and the COM exception should go away. Martin -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of ? ?? Sent: Thursday, December 29, 2005 8:36 AM To: users at lists.ironpython.com Subject: [IronPython] Problem in Loading Assembly Dear All, According to Tutorial provided by IronPython itself, I tried the third: IronPython and COM interoperability. But I failed to receive the expecting result. At first, I encountered this error: Traceback (most recent call last): at System.InvalidCastException: Creating an instance of the COM component with CLSID {D45FD2FC-5C6E-11D1-9EC1-00C04FD7081F} from the IClassFactory failed due to the following error: 80004002. And I considered this as version problem. So I tried this tutorial using IronPython 0.9.4. I also encountered other problems. At last, I went back to IronPython 0.9.6 and tried again. How surpring, I didn't encounter the previous problem any more. But I encountered this error: Traceback (most recent call last): at RuntimeError: Could not load assembly AgentServerObjects.dll And more annoyed, I also failed to load all of other external .dll files.By the way, I use .NET 2.0.50727.42. Regards, Michael From imm at iain-mackay.org Thu Dec 29 20:29:41 2005 From: imm at iain-mackay.org (Iain Mackay) Date: Thu, 29 Dec 2005 19:29:41 -0000 Subject: [IronPython] Installing IP with the new CTP In-Reply-To: Message-ID: <002001c60cae$378e18e0$0201a8c0@Ness> Thanks to Greg for pointing out my mis-Behavio(u)r. Those dyslexic moments can be a big sap on productivity :) Also, by more careful use of the message archive I see that some of my problems had been addressed already; though the PersistentAnimations roadblock remains so far as I can see. I rebuilt IP using the [STAThread] attribute; and a study of avalon.py shows how to get the tutorial code working: from avalon import * def UI (): w=Window () w.Show () w.Title = "Avalon app" w.Content = ScrollViewer () w.Content.Content = TextBlock () w.Content.Content.Text = "\n".join \ (["%s:\t%s" % (k, v) for (k, v) in w.Content.__dict__.items ()]) w.Content.Content.FontSize = 10 #a = DoubleAnimation(0.0, Duration(TimeSpan.FromSeconds(3))) #a.RepeatBehavior = RepeatBehavior.Forever #w.Content.Content.PersistentAnimations[Shape.OpacityProperty] = a CallBack (UI) I displayed the dictionary of the ScrollViewer hoping to get some clue to the replacement for PersistentAnimations in the new CTP. I can't find any reference to this change in the MS documentation - does anyone know about it I wonder? One thing I observe that is presumably nothing to do with IronPython is how slow the scrolling of the text window is on what I thought was a fast PC with lots of memory and a nice video card. Anyway - I can now get WPF examples working - and maybe move onwards to tbe brave new world of 3D! From gregk at simdesk.com Thu Dec 29 23:11:29 2005 From: gregk at simdesk.com (Greg Kerr) Date: Thu, 29 Dec 2005 16:11:29 -0600 Subject: [IronPython] Installing IP with the new CTP In-Reply-To: <002001c60cae$378e18e0$0201a8c0@Ness> References: <002001c60cae$378e18e0$0201a8c0@Ness> Message-ID: Not a problem, just don't use SolidColourBrush :-). Yes, IP/WPF is awesomely fun. Greg Iain Mackay wrote: > Thanks to Greg for pointing out my mis-Behavio(u)r. Those dyslexic moments > can be a big sap on productivity :) > > Also, by more careful use of the message archive I see that some of my > problems had been addressed already; though the PersistentAnimations > roadblock remains so far as I can see. > > I rebuilt IP using the [STAThread] attribute; and a study of avalon.py shows > how to get the tutorial code working: > > from avalon import * > > def UI (): > w=Window () > w.Show () > w.Title = "Avalon app" > w.Content = ScrollViewer () > w.Content.Content = TextBlock () > w.Content.Content.Text = "\n".join \ > (["%s:\t%s" % (k, v) for (k, v) in w.Content.__dict__.items > ()]) > w.Content.Content.FontSize = 10 > > #a = DoubleAnimation(0.0, Duration(TimeSpan.FromSeconds(3))) > #a.RepeatBehavior = RepeatBehavior.Forever > #w.Content.Content.PersistentAnimations[Shape.OpacityProperty] = a > > CallBack (UI) > > I displayed the dictionary of the ScrollViewer hoping to get some clue to > the replacement for PersistentAnimations in the new CTP. I can't find any > reference to this change in the MS documentation - does anyone know about it > I wonder? > > One thing I observe that is presumably nothing to do with IronPython is how > slow the scrolling of the text window is on what I thought was a fast PC > with lots of memory and a nice video card. > > Anyway - I can now get WPF examples working - and maybe move onwards to tbe > brave new world of 3D! From sanxiyn at gmail.com Fri Dec 30 08:51:32 2005 From: sanxiyn at gmail.com (Sanghyeon Seo) Date: Fri, 30 Dec 2005 16:51:32 +0900 Subject: [IronPython] str * bool Message-ID: <5b0248170512292351i284da37di@mail.gmail.com> A bug report. I think this is a bit nasty, but str * bool should be allowed: $ ./ip IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import posixpath >>> posixpath.normpath('/a') Traceback (most recent call last): in <0x00928> IronPython.Objects.Ops:Multiply (System.Object x, System.Object y) in <0x003ae> posixpath:normpath$f120 (System.Object path) in (wrapper delegate-invoke) System.MulticastDelegate:invoke_object_object (object) in <0x00020> IronPython.Objects.Function1:Call (System.Object arg0) in <0x00052> IronPython.Objects.Ops:Call (System.Object func, System.Object arg0) in <0x0004f> input_7:Run (IronPython.Objects.Frame frame) in <0x002ba> IronPython.Hosting.PythonEngine:DoOneInteractive (IronPython.Objects.Frame topFrame) in <0x00047> IronPython.Hosting.PythonEngine:RunInteractive () TypeError: unsupported operand type(s) for *: 'str' and 'bool' >>> Seo Sanghyeon From lcatalin at siadv.com Fri Dec 30 11:56:02 2005 From: lcatalin at siadv.com (Catalin Lungu) Date: Fri, 30 Dec 2005 11:56:02 +0100 Subject: [IronPython] IronPython GUI Message-ID: <001001c60d2f$a0ae2870$c800a8c0@catalin> I'm looking for a GUI editor for IronPython. Thanks in advance, Catalin -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan.chollet at lynanda.com Fri Dec 30 17:38:26 2005 From: ivan.chollet at lynanda.com (ivan chollet) Date: Fri, 30 Dec 2005 17:38:26 +0100 Subject: [IronPython] IronPython GUI In-Reply-To: <001001c60d2f$a0ae2870$c800a8c0@catalin> Message-ID: <20051230163825.09A14439C5@smtp3-g19.free.fr> Hi Catalin, I actually made last month a nice GUI editor for IPython. It?s written in C# and builds on the .NET 2.0. I embedded it in STP which is available at www.stocktradingplus.net . The name of the executable is ?TradingProgrammer.exe?. You will find it in the STP directory. Basically, I put all the features of VS.NET on this editor. It was an easy job. For the color highlighting features, what I did is a mix between Guido?s IDLE and VS.NET, so if you are not happy with the colors, feel free to modify the source code. If you want the source code or information regarding this editor, ask me on my personal email: ivan.chollet at free.fr Regards, Ivan _____ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Catalin Lungu Sent: vendredi 30 d?cembre 2005 11:56 To: users at lists.ironpython.com Subject: [IronPython] IronPython GUI I'm looking for a GUI editor for IronPython. Thanks in advance, Catalin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsacksteder at gmail.com Fri Dec 30 17:50:00 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Fri, 30 Dec 2005 11:50:00 -0500 Subject: [IronPython] tab completion? Message-ID: <51c8a7be0512300850y1dd799e0ged4ef6e3498a5edc@mail.gmail.com> In the demo video, it appears that Jim H. is using tab completion in the interpreter. If so, how does that feature operate? The tab key itself does nothing, and the keyboard is not visable in the video. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at exchange.microsoft.com Fri Dec 30 18:06:27 2005 From: dinov at exchange.microsoft.com (Dino Viehland) Date: Fri, 30 Dec 2005 09:06:27 -0800 Subject: [IronPython] tab completion? In-Reply-To: <51c8a7be0512300850y1dd799e0ged4ef6e3498a5edc@mail.gmail.com> Message-ID: <4039D552ADAB094BB1EA670F3E96214ED93027@df-foxhound-msg.exchange.corp.microsoft.com> It's a command line option: -X:TabCompletion enables it. ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Friday, December 30, 2005 8:50 AM To: Discussion of IronPython Subject: [IronPython] tab completion? In the demo video, it appears that Jim H. is using tab completion in the interpreter. If so, how does that feature operate? The tab key itself does nothing, and the keyboard is not visable in the video. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimhug at exchange.microsoft.com Sat Dec 31 03:02:51 2005 From: jimhug at exchange.microsoft.com (Jim Hugunin) Date: Fri, 30 Dec 2005 18:02:51 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! Message-ID: We've just released the first beta of IronPython 1.0 and are entering the home stretch to a 1.0 final build. This build includes many bug fixes for issues reported to us by the community as well as many changes to get better compatibility with CPython 2.4. With this build we've addressed the majority of major design issues for a 1.0 final. We're not sure that you'll agree with all of our answers, so pick it up and let us know what you think. You can download this release here: http://www.microsoft.com/downloads/details.aspx?FamilyID=94082d26-e689-4f7f-859b-fec6dacf3ae8&displaylang=en The fact that we've released a beta isn't going to change this project's frequent release schedule. You should expect to continue to see releases every 3 weeks for the near future. We're not going to commit to any fixed number of beta releases, but I can tell you that I'm a huge fan of single digit numbers and a beta 10 release would be unbelievably ugly to have to make. The major open design issues that we resolved for this release include: * Moved LoadAssembly* functions out of sys into new clr module See "Loading .NET libraries" in the shipped tutorial for more info * New exception system for better CPython compatibility AND CLI interoperability We've already sent email about this change and expect the discussion to continue now that you have real bits to play with * CLI methods are not exposed on Python types unless the accessing module uses "import clr" We owe you an email on this one in the next couple of days * Fixed many memory leaks when using eval/exec by using DynamicMethods This should make PythonEngine a much better script host We've also made some significant strides for cleanup of the release: * Updated the Avalon tutorial for the December CTP * Source code layout has been refactored * Fixed numerous PEVerification errors for generated code Finally, we're getting really strong on CPython compatibility: * From __future__ import division support * Support for -i command line option * More passing tests: test_warnings, test_opcodes, test_grammer, test_types????????? We'd like to thank everyone in the community for your bug reports and suggestions that helped make this a better release: Andrew Pliszka, Edward K. Ream, glchapman, grizlupo, Jacques de Hooge, Jan Stranik, Keith Farmer, Kirk Olynyk, Koly, Michael Shilman, Nicholas Jacobson, opin2 hu, opindd, Paul Viola, Sanghyeon Seo, shyamg, Stanislas Pinte, Sumit Basu, Szymon Kobalczyk, William Reade, ZZZZzzzz4?? Thanks and keep in touch, The IronPython Team More complete list of changes and bug fixes: ============================================ Fixed generators causing PEVerification errors Fixed list.index (regression in 0.9.6) Marked IronPythonConsole.exe's Main w/ STAThread, -X:MTA supported for running in MTA Many changes to the implementation of locals() Improved locals() support for execfile, eval, vars & dir Enabled access to protected members Debug builds of IronPython verify assemblies after running Conversions between str classes & str Fixes for intern, iter, min, sum, dir and eval Fix for operator.isMappingType Dict __getitem__ method can now be overridden by derived types None can now be converted to a string Can override .NET virtual properties Range support for big integers No longer convert from float to int automatically Parsing integers throws on base > 36 Execfile fixes Pow, readline, import fixes Simple buffer class support chr(x) now throws if x > 0xFF coerce supported for str->float transition tokenizer eats Unicode header compile validates flags execfile throws correct error if bogus file / directory passed ord fixed to work on strings and chars only __init__ and __new__ are now optimized PythonCompiler fixes & enhancements Various built-in function corner cases fixed Fix branch out of try block Fixed usage of user defined locals function when calling exec Fixed generators not being able to yield from an except block Fixed float('5\0') not throwing Fixed _ getting defined in locals dictionary Fixed Unicode console display and Unicode file bugs Recursive list comparison now throws Fixed generators not being able to yield from finally block Fixed generation of pdbs from compiler Fixed string representation of NoneType Expandtas now accepts n<=0 All generators now share a common type Fixed non-ascii identifiers Math precision improvements New methods on float type New flag for accessing private members Conversions from tuples/lists to CLR arrays, lists, ArrayLists Method dispatch prefers M(int) over M(int, params int[]) Comparing enum to None no longer throws Functions now compare to themselves property Fixed space-padded numeric string formatting Added a public API to re-use pre-compiled scripts Added support for getdefaultencoding / setdefaultencoding Print the correct type name for str(instance) Integer class renamed BigInteger. Engine debug mode is off by default CLR Namespaces & Python namespaces can now overlap and be combined From jsacksteder at gmail.com Sat Dec 31 03:19:54 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Fri, 30 Dec 2005 21:19:54 -0500 Subject: [IronPython] 1.0 Beta 1 is out now! In-Reply-To: References: Message-ID: <51c8a7be0512301819k6f7051c7wc1658e8f97746215@mail.gmail.com> Will MSI packaging happen in the beta timeframe or is that planned for just before 1.0-final? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimhug at exchange.microsoft.com Sat Dec 31 04:08:41 2005 From: jimhug at exchange.microsoft.com (Jim Hugunin) Date: Fri, 30 Dec 2005 19:08:41 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! In-Reply-To: <51c8a7be0512301819k6f7051c7wc1658e8f97746215@mail.gmail.com> Message-ID: MSI packaging has been very low on our list since my impression is that most IronPython users are happier with the zip file style of installation where you can know exactly where everything came from and went. If there's interest in an MSI installer we can prioritize it higher. We expect to split the release into an MSI binary installer and a source zip package as the two downloads sometime between now and 1.0 release candidate 1 but our current plans are for sometime very close to rc1. -Jim ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jeff sacksteder Sent: Friday, December 30, 2005 6:20 PM To: Discussion of IronPython Subject: Re: [IronPython] 1.0 Beta 1 is out now! Will MSI packaging happen in the beta timeframe or is that planned for just before 1.0-final? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Sat Dec 31 04:38:15 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 30 Dec 2005 19:38:15 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! References: Message-ID: MSI++ For the obvious benefits an MSI brings -- ActiveState's distribution is a very clean way to install. I'd also like to be able to just point PATH to a stable, non-versioned directory name if possible. I agree on the low-priority nature of the request, for that matter. (Jim, Martin, Dino, etc -- you guys in building 41? I start with the VC# team on the 16th, and just installed my household in temp housing yesterday. Still waiting to find out what time NEO is...) -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3500 bytes Desc: not available URL: From kfarmer at thuban.org Sat Dec 31 05:31:20 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 30 Dec 2005 20:31:20 -0800 Subject: [IronPython] IronPython and IUnknown References: Message-ID: A buddy of mine needs to be able to build a COM server that gets exposed to SQL Server 2k5 (as part of the analysis services plug-in architecture). He needs to be able to consume a component that, to his knowledge, exposes only the IUnknown interface. He recalls that CPython had available to it a library that was able to interrogate IUnknown, and wonders if IronPython has that facility. IE, does tlbimp offer a (IUnknown)Component interface in the generated assembly? I've rarely dealt with COM, if ever, so I am unable to answer this myself. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3468 bytes Desc: not available URL: From jsacksteder at gmail.com Sat Dec 31 06:00:02 2005 From: jsacksteder at gmail.com (jeff sacksteder) Date: Sat, 31 Dec 2005 00:00:02 -0500 Subject: [IronPython] 1.0 Beta 1 is out now! In-Reply-To: References: <51c8a7be0512301819k6f7051c7wc1658e8f97746215@mail.gmail.com> Message-ID: <51c8a7be0512302100g2ec6b290ub2e94f27d9325e92@mail.gmail.com> > > MSI packaging has been very low on our list since my impression is that > most IronPython users are happier with the zip file style of installation > where you can know exactly where everything came from and went. If there's > interest in an MSI installer we can prioritize it higher. We expect to > split the release into an MSI binary installer and a source zip package as > the two downloads sometime between now and 1.0 release candidate 1 but our > current plans are for sometime very close to rc1. > My 'user story' is perhaps different than the typical internal MS developer. Let me explain my expectations as an end-user. Please understand, I'm not complaining. I would hate to provoke a 'heated discussion' and keep you guys from coding. If I were to download a shiny, 1.0 release, I would expect: 1. To be able to do a start->run->ironpythonconsole and start the interpreter 2. Be able to remove all traces of the application with Add/Remove programs 3. Optionally associate .py files with IronPython at install, so I can run them by double-clicking in the shell The joy of IronPython lies in not having to learn vb.net or C#. Please don't make learn them before I can be a productive programmer. It would be great if you could get documentation into the standard dotnet sdk, but if that's not possible, make it as easy as possible to compare the two. Include simple example code for the most common projects- Common dialogs, data-bound controls, etc. The WxWidgets project has a great gallery of examples. To win me as a user, your 'competition' is WxPython and py2exe, not VS2005 and VB.Net. I suspect that the VB guys won't adopt IronPython in great numbers. I think that a year from now , most IronPython users will be refugees from other communities, developing on MS platforms for the first time. The VB crowd worships at the Temple of Visual Studio. For them, different code on the back end is a marginal improvement. IronPython is a HUGE win for progammers that actually write code. Using their fingers. With a keyboard. It allows 'Joe Notepad' to compete on a level playing field with 'Captain Corporate IDE'. I think that's where the real uptake will happen. Anyway, regarding MSI, I like the WiX toolkit quite a bit. I could whip up a package definition if your submission policy allows me to contribute. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfarmer at thuban.org Sat Dec 31 06:06:33 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 30 Dec 2005 21:06:33 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! References: <51c8a7be0512301819k6f7051c7wc1658e8f97746215@mail.gmail.com> <51c8a7be0512302100g2ec6b290ub2e94f27d9325e92@mail.gmail.com> Message-ID: I couldn't figure out how WiX went together in time to finish a project at my last job, and unfortunately the .sln/.proj convertor was a year out of date. A good example to refer to would be useful on general principle, and IronPython would be a good vehicle for that. ________________________________ From: users-bounces at lists.ironpython.com on behalf of jeff sacksteder Sent: Fri 12/30/2005 9:00 PM Anyway, regarding MSI, I like the WiX toolkit quite a bit. I could whip up a package definition if your submission policy allows me to contribute. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3616 bytes Desc: not available URL: From Martin.Maly at microsoft.com Sat Dec 31 06:16:38 2005 From: Martin.Maly at microsoft.com (Martin Maly) Date: Fri, 30 Dec 2005 21:16:38 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! In-Reply-To: Message-ID: <5C0A6F919D675745BB1DBA7412DB68F5BF3B9B@df-foxhound-msg.exchange.corp.microsoft.com> At one point we had an msi package (using wix) just as an experiment, but we decided to release in zip, I am pretty sure that the wix package definition (granted, much outdated), is still around. I am sure that it would be quite easy to bring it back to life and raise priority, as Jim suggests. Martin ________________________________ From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer Sent: Friday, December 30, 2005 9:07 PM To: Discussion of IronPython Subject: Re: [IronPython] 1.0 Beta 1 is out now! I couldn't figure out how WiX went together in time to finish a project at my last job, and unfortunately the .sln/.proj convertor was a year out of date. A good example to refer to would be useful on general principle, and IronPython would be a good vehicle for that. ________________________________ From: users-bounces at lists.ironpython.com on behalf of jeff sacksteder Sent: Fri 12/30/2005 9:00 PM Anyway, regarding MSI, I like the WiX toolkit quite a bit. I could whip up a package definition if your submission policy allows me to contribute. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ender at objectrealms.net Sat Dec 31 10:06:03 2005 From: ender at objectrealms.net (Kapil Thangavelu) Date: Sat, 31 Dec 2005 01:06:03 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! In-Reply-To: <5C0A6F919D675745BB1DBA7412DB68F5BF3B9B@df-foxhound-msg.exchange.corp.microsoft.com> References: <5C0A6F919D675745BB1DBA7412DB68F5BF3B9B@df-foxhound-msg.exchange.corp.microsoft.com> Message-ID: <43B649FB.4060207@objectrealms.net> as someone who uses ironpython under linux w/ mono, i prefer and appreciate the current binary zip distribution form, in addition to any future polished windows installer. cheers, -kapil Martin Maly wrote: > At one point we had an msi package (using wix) just as an experiment, > but we decided to release in zip, I am pretty sure that the wix package > definition (granted, much outdated), is still around. I am sure that it > would be quite easy to bring it back to life and raise priority, as Jim > suggests. > > > > Martin > > > > ------------------------------------------------------------------------ > > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Keith J. Farmer > *Sent:* Friday, December 30, 2005 9:07 PM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] 1.0 Beta 1 is out now! > > > > I couldn't figure out how WiX went together in time to finish a project > at my last job, and unfortunately the .sln/.proj convertor was a year > out of date. A good example to refer to would be useful on general > principle, and IronPython would be a good vehicle for that. > From kfarmer at thuban.org Sat Dec 31 20:35:41 2005 From: kfarmer at thuban.org (Keith J. Farmer) Date: Sat, 31 Dec 2005 11:35:41 -0800 Subject: [IronPython] 1.0 Beta 1 is out now! References: <5C0A6F919D675745BB1DBA7412DB68F5BF3B9B@df-foxhound-msg.exchange.corp.microsoft.com> <43B649FB.4060207@objectrealms.net> Message-ID: That's what's needed.. WiX for Linux -- could call it LiX. MSBuild should be able to handle such a beast. ________________________________ From: users-bounces at lists.ironpython.com on behalf of Kapil Thangavelu Sent: Sat 12/31/2005 1:06 AM as someone who uses ironpython under linux w/ mono, i prefer and appreciate the current binary zip distribution form, in addition to any future polished windows installer. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3584 bytes Desc: not available URL: