From sanxiyn at gmail.com Wed Jul 1 10:33:52 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 1 Jul 2009 17:33:52 +0900 Subject: [IronPython] Bazaar on IronPython In-Reply-To: References: Message-ID: <5b0248170907010133k2e1a2c5axc1189ab2dcdcbdd6@mail.gmail.com> 2009/6/30 Martin (gzlist) : > For anyone who is interested, I have done a little work getting the > DVCS bazaar working on IronPython 2.0 and 2.6 - please see this > message and attached patch: > You seem to use xmllib to get ElementTree working. If you need pyexpat for IronPython, you can use my implementation: http://fepy.svn.sourceforge.net/svnroot/fepy/trunk/lib/pyexpat.py Just drop it in sys.path. -- Seo Sanghyeon From itssivaguru at gmail.com Wed Jul 1 16:31:14 2009 From: itssivaguru at gmail.com (Sivaguru Perambalam) Date: Wed, 1 Jul 2009 10:31:14 -0400 Subject: [IronPython] How to capture a 'Carriage Return' in a windows form ? Message-ID: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> Hello , I have a Windows form with a text box and a button. What I want to implement it, when the user hits the 'Enter' key in the text box, the function that's linked to the ButtonClick event has to be invoked. Please give me like a code example of how this could be done in a simpler way, since I am not familiar with Forms or GUI stuff . Thanks ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.curtin at gmail.com Wed Jul 1 16:41:52 2009 From: brian.curtin at gmail.com (Brian Curtin) Date: Wed, 1 Jul 2009 09:41:52 -0500 Subject: [IronPython] How to capture a 'Carriage Return' in a windows form ? In-Reply-To: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> References: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> Message-ID: On Wed, Jul 1, 2009 at 09:31, Sivaguru Perambalam wrote: > Hello , > > I have a Windows form with a text box and a button. > What I want to implement it, when the user hits the 'Enter' key in the text > box, the function that's linked to the ButtonClick event has to be invoked. > Please give me like a code example of how this could be done in a simpler > way, since I am not familiar with Forms or GUI stuff . > > Thanks ! > You could check out the OnKeyDown event: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(loband).aspx. The C# example pretty easily translates to IronPython, so you could follow that and check when the KeyEventArgs.KeyCode is equal to Keys.Return, then call your ButtonClick method. -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Wed Jul 1 17:52:51 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 1 Jul 2009 08:52:51 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <70b2ab55-f9c2-42a1-8919-aed785f891c4@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/55800. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/IronPythonConsole/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/IronPythonWindow/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Properties/AssemblyInfo.cs From brannon at iterator.net Wed Jul 1 19:08:31 2009 From: brannon at iterator.net (Brannon Jones) Date: Wed, 1 Jul 2009 10:08:31 -0700 Subject: [IronPython] How to capture a 'Carriage Return' in a windows form ? In-Reply-To: References: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> Message-ID: <1653092d0907011008o5b36b88ej2f7ee2762afc9fd4@mail.gmail.com> Set the AcceptsReturn property on the TextBox: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.acceptsreturn.aspx You'll also need to set the AcceptButton property on the Form: http://msdn.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton.aspx Brannon On Wed, Jul 1, 2009 at 07:41, Brian Curtin wrote: > On Wed, Jul 1, 2009 at 09:31, Sivaguru Perambalam wrote: > >> Hello , >> >> I have a Windows form with a text box and a button. >> What I want to implement it, when the user hits the 'Enter' key in the >> text box, the function that's linked to the ButtonClick event has to be >> invoked. >> Please give me like a code example of how this could be done in a simpler >> way, since I am not familiar with Forms or GUI stuff . >> >> Thanks ! >> > > You could check out the OnKeyDown event: > http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(loband).aspx. > The C# example pretty easily translates to IronPython, so you could follow > that and check when the KeyEventArgs.KeyCode is equal to Keys.Return, then > call your ButtonClick method. > > _______________________________________________ > 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 gzlist at googlemail.com Thu Jul 2 19:27:59 2009 From: gzlist at googlemail.com (Martin (gzlist)) Date: Thu, 2 Jul 2009 18:27:59 +0100 Subject: [IronPython] Bazaar on IronPython In-Reply-To: <1A472770E042064698CB5ADC83A12ACD033E93DD@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD033E93DD@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: On 30/06/2009, Dino Viehland wrote: > Good work, it's very cool to see this - if you see an existing bug or > open a new please make sure to mention that it effects Bazaar and we'll > treat it with a higher priority. In general that goes for any large > body of existing Python code. Okay, I've written testcases for each of the changes I needed to make to get Bazaar to run that were due to IronPython bugs. Have just had a quick look at the IronPython source online and could submit patches for a few of the issues. However I don't see any information on the site about how you want fixes provided, and messages likes this: seem to imply that not only can you not take submissions, but you can't even look at them? Perhaps an entry in the faq addressing this would make things clearer. Don't want to make your lives harder, so for the moment will just say what and where: * Even non re.RE_Pattern objects shouldn't confuse warnings filtering (Regression in IronPython 2.6 beta 1) (too crazy for a bug entry) * Require the zlib module [workitem:2590] (other missing or broken modules not as crucial) * Making sys._getframe equal to None by default in 2.6 beta 1 lead to a happier logging module but a sadder doctest module. * The third argument to file should work as a keyword as well as positionally [workitem:23347] * The abspath function should not throw even for invalid windows paths. Or, if it's going to throw, it shouldn't spell 'pecified' without the 'S'. Fixed post-2.6 beta 1 by the workaround in nt._getfullpathname? (going by the code in IronPython_Main/Src/IronPython.Modules/nt.cs) * Removing a read-only file should raise an error with errno set to EACCES [workitem:23348] also related to [workitem:13702] * Removing a open file should raise an error with errno set to EACCES [workitem:23349] also related to [workitem:13702] * A buffer object should be directly writable to a cStringIO object [workitem:23350] * Opening an existing file with the O_CREAT should succeed [workitem:19310] (problem at FileModeFromFlags in IronPython_Main/Src/IronPython.Modules/nt.cs) CreateNew is the analogue of (O_CREAT | O_EXCL), just O_CREAT should be OpenAlways. Likewise, the O_TRUNC flag is not being correctly combined in there. * The mbcs codec for decoding windows 'ansi' strings should exist [workitem:23351] Martin From gzlist at googlemail.com Thu Jul 2 19:28:32 2009 From: gzlist at googlemail.com (Martin (gzlist)) Date: Thu, 2 Jul 2009 18:28:32 +0100 Subject: [IronPython] Bazaar on IronPython In-Reply-To: <5b0248170907010133k2e1a2c5axc1189ab2dcdcbdd6@mail.gmail.com> References: <5b0248170907010133k2e1a2c5axc1189ab2dcdcbdd6@mail.gmail.com> Message-ID: On 01/07/2009, Seo Sanghyeon wrote: > > You seem to use xmllib to get ElementTree working. If you need > pyexpat for IronPython, you can use my implementation: Yes, and I'm aware of Jeff's subprocess module as well. Was just trying to keep the number of extra things someone needed to download to try out the patch to a minimum. That said, I do wonder if implementing the ElementTree with System.Xml makes more sense than emulating expat, bzr complains about speed unless cElementTree is installed for instance. Martin From dinov at microsoft.com Thu Jul 2 20:00:39 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 2 Jul 2009 18:00:39 +0000 Subject: [IronPython] Bazaar on IronPython In-Reply-To: References: <1A472770E042064698CB5ADC83A12ACD033E93DD@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0340529A@TK5EX14MBXC116.redmond.corp.microsoft.com> Martin wrote: > However I don't see any information on the site about how you want > fixes provided, and messages likes this: > April/010114.html> > seem to imply that not only can you not take submissions, but you > can't even look at them? Perhaps an entry in the faq addressing this > would make things clearer. Yeah, unfortunately we can't accept changes back. :( Adding an entry to the FAQ on this sounds like a good idea. In the mean time good bug reports like this are a tremendous help. > Don't want to make your lives harder, so for the moment will just say > what and where: > > * Even non re.RE_Pattern objects shouldn't confuse warnings filtering > (Regression in IronPython 2.6 beta 1) (too crazy for a bug entry) Are you just saying that we have a bug in our re implementation which is breaking warning filtering? > > * Require the zlib module [workitem:2590] (other missing or broken > modules not as crucial) Hopefully Jeff Hardy's zlib fills the gap here as we don't have any immediate plans to implement this (the underlying .NET implementation simply isn't sufficient to build upon). > > * Making sys._getframe equal to None by default in 2.6 beta 1 lead to > a happier logging module but a sadder doctest module. Yeah, we actually want to patch the std lib for handling _getframe more consistently. We're working w/ our lawyers to make sure we can submit the changes back to CPython though. > > * The third argument to file should work as a keyword as well as > positionally [workitem:23347] > > * The abspath function should not throw even for invalid windows > paths. Or, if it's going to throw, it shouldn't spell 'pecified' > without the 'S'. Fixed post-2.6 beta 1 by the workaround in > nt._getfullpathname? (going by the code in > IronPython_Main/Src/IronPython.Modules/nt.cs) > > * Removing a read-only file should raise an error with errno set to > EACCES [workitem:23348] also related to [workitem:13702] > > * Removing a open file should raise an error with errno set to EACCES > [workitem:23349] also related to [workitem:13702] > > * A buffer object should be directly writable to a cStringIO object > [workitem:23350] > > * Opening an existing file with the O_CREAT should succeed > [workitem:19310] (problem at FileModeFromFlags in > IronPython_Main/Src/IronPython.Modules/nt.cs) CreateNew is the > analogue of (O_CREAT | O_EXCL), just O_CREAT should be OpenAlways. > Likewise, the O_TRUNC flag is not being correctly combined in there. These should all be simple to fix - 19310 is the only one that has me a little bit worried but hopefully it's not the issue I'm thinking of. I'll probably dig into these early next week. > * The mbcs codec for decoding windows 'ansi' strings should exist > [workitem:23351] I recently got started on some mbcs support so maybe this will be the reason to finish that off. From gzlist at googlemail.com Thu Jul 2 21:25:58 2009 From: gzlist at googlemail.com (Martin (gzlist)) Date: Thu, 2 Jul 2009 20:25:58 +0100 Subject: [IronPython] Bazaar on IronPython In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0340529A@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD033E93DD@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0340529A@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: On 02/07/2009, Dino Viehland wrote: > >> * Even non re.RE_Pattern objects shouldn't confuse warnings filtering >> (Regression in IronPython 2.6 beta 1) (too crazy for a bug entry) > > Are you just saying that we have a bug in our re implementation which is > breaking warning filtering? No, it's far more obscure than that. Bazaar replaces re.compile with a function that returns objects that behave like pattern objects but are really wrappers. It's not exactly a common use case I think you should be rushing to support. :) >> * Making sys._getframe equal to None by default in 2.6 beta 1 lead to >> a happier logging module but a sadder doctest module. > > Yeah, we actually want to patch the std lib for handling _getframe more > consistently. We're working w/ our lawyers to make sure we can submit > the changes back to CPython though. That sounds like the most sensible option by far. >> * Opening an existing file with the O_CREAT should succeed >> [workitem:19310] (problem at FileModeFromFlags in >> IronPython_Main/Src/IronPython.Modules/nt.cs) CreateNew is the >> analogue of (O_CREAT | O_EXCL), just O_CREAT should be OpenAlways. >> Likewise, the O_TRUNC flag is not being correctly combined in there. Whoops, OPEN_ALWAYS is actually OpenOrCreate in dot net speak. > These should all be simple to fix - 19310 is the only one that has me > a little bit worried but hopefully it's not the issue I'm thinking of. > I'll probably dig into these early next week. It may not be possible to get perfect emulation of the C way of opening files with System.IO but fixing the flags looks right on the surface. Thanks for looking over all these little issues. Martin From dinov at microsoft.com Fri Jul 3 01:45:39 2009 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 2 Jul 2009 23:45:39 +0000 Subject: [IronPython] Exception for setting attributes of built-in type In-Reply-To: <5b0248170906141209y4398defanacfd0bb62504e550@mail.gmail.com> References: <5b0248170906141209y4398defanacfd0bb62504e550@mail.gmail.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD034067D5@TK5EX14MBXC116.redmond.corp.microsoft.com> Seo wrote: > Exception for setting attributes of built-in type differs between > CPython and IronPython. This is not purely theoretical, as > zope.interface tries to set Implements declaration as __implemented__ > attribute of built-in type object, and excepts TypeError. > > Python 2.6.1 > >>> object.flag = True > TypeError: can't set attributes of built-in/extension type 'object' > > IronPython 2.6 > >>> object.flag = True > AttributeError: 'object' object has no attribute 'flag' > > I was surprised that CPython raises TypeError. Library Reference seems > to mention it here: > > exception AttributeError > Raised when an attribute reference or assignment fails. (When an > object does not support attribute references or attribute assignments > at all, TypeError is raised.) > http://docs.python.org/library/exceptions.html > > What does it mean that "an object does not support attribute > references or attribute assignments at all"? Even though Guido said we didn't have to match it I've updated IronPython so that we'll throw the same exception now. The change will be in tomorrow's source push to CodePlex. We've matched specific exceptions in the past and this one is at least documented :) From merllab at microsoft.com Fri Jul 3 17:52:52 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 3 Jul 2009 08:52:52 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/55895. ADDED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/ConversionResultKind.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/MemberRequestKind.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/ConvertToBinderHelper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/GetMemberBinderHelper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DeleteMemberBinderHelper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/MemberBinderHelper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/BinderHelper.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Old $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/SetMemberBinderHelper.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/ConversionResultKind.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/MemberRequestKind.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_codecs.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOverloadResolver.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.Operations.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/OverloadResolver.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.Invoke.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.DeleteMember.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.GetMember.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/ActionBinder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.Conversions.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.SetMember.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/DefaultBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/process_util.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonGetMemberBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Members.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/NewTypeMaker.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/NameConverter.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCompilerOptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/IntOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/FloatOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/EnumOps.cs $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_clrtype.py $/IronPython/IronPython_Main/Src/Tests/interop/com/apps/excel.py $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/LanguageContext.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/CompilerHelpers.cs $/IronPython/IronPython_Main/Src/Tests/interop/net/property/test_property.py $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/LongOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Importer.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/re.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/nt.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Tokenizer.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs $/IronPython/IronPython_Main/Src/Tests/test_nt.py $/IronPython/IronPython_Main/Src/Tests/test_help.py $/IronPython/IronPython_Main/Src/Tests/test_function.py $/IronPython/IronPython_Main/Src/Tests/test_file.py $/IronPython/IronPython_Main/Src/Tests/test_codecs.py $/IronPython/IronPython_Main/Src/Tests/test_cliclass.py $/IronPython/IronPython_Main/Src/Tests/test_class.py $/IronPython/IronPython_Main/Src/Tests/test_builtinfunc.py $/IronPython/IronPython_Main/Src/Tests/test_threadsafety.py $/IronPython/IronPython_Main/Src/Tests/test_superconsole.py $/IronPython/IronPython_Main/Src/Tests/test_re.py $/IronPython/IronPython_Main/Src/Tests/test_property.py $/IronPython/IronPython_Main/Src/Tests/versions/python26.py $/IronPython/IronPython_Main/Tutorial/Tutorial.htm CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 974318 Date: 7/2/2009 4:34:21 PM (dfugate) Extended __clrtype__ metaclass tests some more. (Shelveset: CLRTYPE2;REDMOND\dfugate | SNAP CheckinId: 8842) -------------------------------------------------------------------------------- Changeset Id: 974212 Date: 7/2/2009 3:33:38 PM (dinov) 20174 1 Medium TypeError: Scope is not callable Just removing an unnecessary set of the module back onto the importing module. 18614 1 Medium Some COM errors in Ipy 2 beta 5 Issue appears to be fixed, we have a test for DisplayAlerts, adding test for dir() 20377 1 Medium Tab Completion does not work with Office 2007 Primary Interop Assemblies Issue appears to be fixed (probably w/ the recent dir cleanup), adding test. 22131 1 Medium PythonType.AddSystemInterfaces - COM Interop Issues ?? We need to handle adding when interface mapping returns a null target method. There?s several different spots we need to handle this at. Added an IL-only test case to verify this scenario is working. 21361 1 Medium Cannot write bytes to files 22302 1 Medium help() on a CLR string[] fails with a stack trace 22966 1 Medium Problem with re module/groupindex property, incompatibility with CPython Add filtering for the special named groups we have to insert. 23143 bin(n > System.Int32.MaxValue) broken We?re going through our helpers for string formatting which don?t add the ? before the value and don?t expect negative values in general. Assert we have positive values, make the helpers which can?t handle negatives private, and define internal APIs w/ a simple signature which does it all. 3740 0 Medium Trivial: Overloaded properties (indexers) not handled by IronPython IronPython\2.6 This works via the same get_ method that C# supports. Adding test case to verify it keeps working. (Shelveset: StillMoreBugs;REDMOND\dinov | SNAP CheckinId: 8840) -------------------------------------------------------------------------------- Changeset Id: 973686 Date: 7/2/2009 10:43:08 AM (dinov) 3730: Trivial: Add DLLs directory in the default path Following Dave?s proposal in the bug to always add this 19521: 2.6: implement from __future__ import unicode_literals (PEP 3112) Switching to use the Unicode literal parser after this is done 19089: Implement __repr__ for enums Implement an improved repr when we have an exact value 20295 1 Medium property.__doc__ = None throws bad exception Handle the null instance 20250 1 Medium Bad exception when splatted args are None Throw TypeError instead of dereferencing the null pointer 19063 1 Medium max(tuple, none) -> nullpointer exception Already fixed, adding test case 22734 1 Medium nt.system('"...') should work Shouldn?t throw on the imbalanced quotes instead we should imply the end quote 8202 1 Low Trivial: gc.get_debug() returns the wrong value IronPython\2.6 Return an int instead of null 15546 1 Low codecs.charmap_encode throws TypeError for a dictionary with string values 18926 1 Low random module is not thread safe Fixed, adding test case 23251 - type.__clrtype__ shouldn't exist unless the clr or System modules have been imported Mark as PythonHidden, remove filtering of PythonHidden methods (in NameConverter) when defining base helper overloads 23244 - clrtype__ implementations returning None should throw a TypeError Throw ValueError if you return null Also: deleting all of the OldDynamicAction stuff ? this also implies updating the default binder so that we no longer flow OldDynamicAction?s in and instead now flow a MemberRequestKind enum instead. Fixing the exception thrown when ... (Shelveset: BugsAndRemoveOldBinders;REDMOND\dinov | SNAP CheckinId: 8835) From narinder.claire at googlemail.com Sat Jul 4 13:03:23 2009 From: narinder.claire at googlemail.com (Narinder Claire) Date: Sat, 04 Jul 2009 12:03:23 +0100 Subject: [IronPython] Python scripting on Excel spreadsheet Message-ID: <4A4F36FB.7050308@googlemail.com> We have been able to embed the the IronPython interpreter into an Excel xll addin allowing one to write Python functions straight onto a Excel spreadsheet which can then be used to evaluate the values of cells. This embedding is demonstrated in one of the 'Extra Examples' shipped with the free and open source software xlw. xlw ( v4 ) can be downloaded from here : http://sourceforge.net/project/showfiles.php?group_id=45222&package_id=37893&release_id=690866 The example was created as a demo of IronPython on a spreadsheet and is intended to be extended by the user for his/her own needs. If anyone would like to extend the example to be more 'sexier' and contribute the result to xlw for shipping with next release ( 4.0.0 ) that would be great. From m_tayseer82 at yahoo.com Tue Jul 7 11:11:10 2009 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Tue, 7 Jul 2009 02:11:10 -0700 (PDT) Subject: [IronPython] Running SPSS application from IronPython In-Reply-To: References: <4A7B019E-69F5-4E07-A7CA-ED9579E24C86@voidspace.org.uk> Message-ID: <722828.44645.qm@web31104.mail.mud.yahoo.com> It depends how the spss module itself is implemented, e.g. if it's a Python module it can be imported easily, but if it's a C module you can write a wrapper around it using ctypes. Mohammad Tayseer http://spellcoder.com/blogs/tayseer ________________________________ From: Sarah Abdel Razak To: Discussion of IronPython Sent: Monday, June 29, 2009 9:00:06 PM Subject: Re: [IronPython] Running SPSS application from IronPython No spss module is not a C-extension , I believe that part of it is implemented using java. At the begining of my module I add the following lines : import sys sys.path.extend([ r'c:\Python25\Lib', r'c:\Python25\Lib\site-packages', ]) sys.path.append(r'c:\Python25\Lib') sys.path.append(r'C:\Python25\Lib\site-packages') import spss ----> this line that throws the exception. I'm running the module from IronPython Studio. Regards -- Sarah Abdelrazak On Mon, Jun 29, 2009 at 10:40 AM, Brian Curtin wrote: On Mon, Jun 29, 2009 at 12:22, Sarah Abdel Razak wrote: > >Thanks for your reply I just knew that spss Python plugin has to be built for specific Python implementations. >> Unfortunately it does not support IronPython. >> >>Regards >>-- >>>> >>Sarah Abdelrazak > >Even though they don't support it, it will probably still work. Is this SPSS module a C-extension or does it involve C-extensions? Have you tried what Michael suggested? > >_______________________________________________ >>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 merllab at microsoft.com Tue Jul 7 17:53:02 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Tue, 7 Jul 2009 08:53:02 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56115. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonTracebackListener.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Compiler/GeneratorRewriter.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaOldInstance.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/BindingHelpers.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.Operations.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaMethod.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/ConditionalBuilder.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionCode.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionAttributes.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Method.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCallTargets.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/YieldExpression.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/TraceBack.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/socket.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/gc.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WhileStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TryStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonTracebackListener.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugContext.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugContext.GeneratorLoopProc.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebuggableLambdaBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugInfoRewriter.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/RuntimeOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/sys.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/OldInstance.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ReturnStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/NameExpression.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/IfStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/FunctionDefinition.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ForStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstGenerator.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/TraceEventKind.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/TracePipeline/TracePipeline.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/GeneratorRewriter.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/Instruction.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/ToDiskRewriter.cs $/IronPython/IronPython_Main/Src/Scripts/run_interactive.py $/IronPython/IronPython_Main/Src/Scripts/generate_calls.py $/IronPython/IronPython_Main/Src/Tests/test_superconsole.py $/IronPython/IronPython_Main/Src/Tests/test_memory.py $/IronPython/IronPython_Main/Src/Tests/test_function.py $/IronPython/IronPython_Main/Src/Tests/test_class.py $/IronPython/IronPython_Main/Src/Tests/test_sys.py $/IronPython/IronPython_Main/Tutorial/Tutorial.htm CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 977090 Date: 7/6/2009 4:54:14 PM (dinov) Adds sys.settrace/sys.gettrace/sys.call_tracing support. Also adds support via the extension methods for the hosting APIs. Enables test_trace.py with a few exceptions where we differ (due to GC, and testing some pretty extreme implementation details of CPython). This is a pretty big change. It alters our function implementation so that we can replace function implementations at runtime. It updates recursion enforcement to also use this new mechanism fixing the fact that recursion enforcement currently bleeds across runtimes. It also nearly finalizes fixing the relationship between function and function code objects so that we match CPython as we now load the delegate from the function code instead of the function. It also means we no longer need our ?FunctionInfo? class which was basically serving the same purpose. Another benefit is we no longer create a new function code object each time a function is created. Finally we also get func_code.co_freevars and exec on a closure code is now disallowed like CPython. Here?s how this works. We now maintain a global weak list of all function code objects in the system. Whenever we compile a function we create a new function code object and register it in this global list. When sys.settrace/sys.setrecursionlimit are called we walk the global list and fix all of the function code delegates. If we?re switching recursion on this is just simply wrapping the existing delegate in a recursion enforcement delegate. This means we no longer need to check the EnforceRecursion static field when recursion isn?t enforced. If we?re flipping on sys.settrace then we switch to the debuggable lambda ? we don?t actually initially do this as it?s a slow process instead we just switch back to the lazy delegate until the functions are called the 1st time. Then they?ll get compiled in the debuggable form. There?s also a bunch of tweaks to our parsing and code gen so that we match CPython when tracing is enabled. This includes having the ending ... (Shelveset: SysSetTraceFinal2;REDMOND\dinov | SNAP CheckinId: 8847) From simon.segal at bigpond.com Wed Jul 8 15:54:10 2009 From: simon.segal at bigpond.com (Simon Segal) Date: Wed, 8 Jul 2009 23:54:10 +1000 Subject: [IronPython] Running SPSS application from IronPython Message-ID: <00c001c9ffd3$92073ce0$b615b6a0$@segal@bigpond.com> Is the thread that starts from this post still the best way to facilitate implementing tab completion and new line functionality in your own console? Regards, Simon Segal Email: simon.segal at bigpond.com Web Site: http://www.simonsegal.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.segal at bigpond.com Wed Jul 8 15:57:47 2009 From: simon.segal at bigpond.com (Simon Segal) Date: Wed, 8 Jul 2009 23:57:47 +1000 Subject: [IronPython] - Custom interactive console Message-ID: <00cb01c9ffd4$132a03c0$397e0b40$@segal@bigpond.com> Sorry ignore my previous message it was a incorrectly given the wrong subject. My question: Is the thread that starts from this post still the best way to facilitate implementing tab completion and new line functionality in your own console? http://www.mail-archive.com/users at lists.ironpython.com/msg08846.html Regards, Simon Segal Email: simon.segal at bigpond.com Web Site: http://www.simonsegal.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.bromberek at gmail.com Wed Jul 8 17:45:47 2009 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Wed, 8 Jul 2009 10:45:47 -0500 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue Message-ID: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> I'm stuck. I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy console screen )app that I have created and successfully run multiple machines under my control. I've given the compiled app to other users. Half of the time it runs great, the other half it dies right away with a System.MissingMethodException :Method not found void.system.reflection.emit.dynamicmethod..ctor(....) error message. When I googled that string I read a post that reminded me that Ironpython requires .Net2.0 SP1. I had the affected users upgrade their installs to .NET framework 3.5 and the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in Wikipedia) The die at launch is still occuring. Can anyone point in the right direction to solve this problem and/or tell me what is causing it. In case it helps, I have listed the imports I'm using in the script in addition to standard 5 ironpython assemblies/dll import clr clr.AddReference('mscorlib') clr.AddReference('System') clr.AddReference('System.Data') clr.AddReference('System.Windows.Forms') clr.AddReference('System.Drawing') import sys import System import System.Data from System.IO import Directory, Path, File from System import DateTime from System.Windows.Forms import DialogResult, OpenFileDialog from System.Drawing import Size from System.Windows.Forms import Button, DockStyle, Panel, Form, FormBorderStyle, Padding, TextBox import time Bruce Bromberek -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Wed Jul 8 17:55:31 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 8 Jul 2009 08:55:31 -0700 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> Message-ID: When you run ipy.exe on these machines it starts up successfully, but when you start your app you get the MissingMethodException for that DynamicMethod constructor? On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek wrote: > I'm stuck. > > I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy console > screen )app that I have created and successfully run multiple machines under > my control. > > I've given the compiled app to other users. Half of the time it runs > great, the other half it dies right away with a > System.MissingMethodException :Method not found > void.system.reflection.emit.dynamicmethod..ctor(....) error message. When > I googled that string I read a post that reminded me that Ironpython > requires .Net2.0 SP1. > > I had the affected users upgrade their installs to .NET framework 3.5 and > the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in > Wikipedia) > > The die at launch is still occuring. > > Can anyone point in the right direction to solve this problem and/or tell > me what is causing it. In case it helps, I have listed the imports I'm > using in the script in addition to standard 5 ironpython assemblies/dll > > import clr > clr.AddReference('mscorlib') > clr.AddReference('System') > clr.AddReference('System.Data') > clr.AddReference('System.Windows.Forms') > clr.AddReference('System.Drawing') > > import sys > import System > import System.Data > from System.IO import Directory, Path, File > from System import DateTime > from System.Windows.Forms import DialogResult, OpenFileDialog > from System.Drawing import Size > from System.Windows.Forms import Button, DockStyle, Panel, Form, > FormBorderStyle, Padding, TextBox > import time > > > > Bruce Bromberek > > _______________________________________________ > 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 bruce.bromberek at gmail.com Wed Jul 8 17:57:59 2009 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Wed, 8 Jul 2009 10:57:59 -0500 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> Message-ID: <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> I do not have IronPython installed. I'm just distributing the compiled app and dlls in the folder. Script compiled using SharpDevelop 3.1 On Wed, Jul 8, 2009 at 10:55 AM, Curt Hagenlocher wrote: > When you run ipy.exe on these machines it starts up successfully, but when > you start your app you get the MissingMethodException for that DynamicMethod > constructor? > On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek > wrote: > >> I'm stuck. >> >> I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy >> console screen )app that I have created and successfully run multiple >> machines under my control. >> >> I've given the compiled app to other users. Half of the time it runs >> great, the other half it dies right away with a >> System.MissingMethodException :Method not found >> void.system.reflection.emit.dynamicmethod..ctor(....) error message. >> When I googled that string I read a post that reminded me that Ironpython >> requires .Net2.0 SP1. >> >> I had the affected users upgrade their installs to .NET framework 3.5 and >> the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in >> Wikipedia) >> >> The die at launch is still occuring. >> >> Can anyone point in the right direction to solve this problem and/or tell >> me what is causing it. In case it helps, I have listed the imports I'm >> using in the script in addition to standard 5 ironpython assemblies/dll >> >> import clr >> clr.AddReference('mscorlib') >> clr.AddReference('System') >> clr.AddReference('System.Data') >> clr.AddReference('System.Windows.Forms') >> clr.AddReference('System.Drawing') >> >> import sys >> import System >> import System.Data >> from System.IO import Directory, Path, File >> from System import DateTime >> from System.Windows.Forms import DialogResult, OpenFileDialog >> from System.Drawing import Size >> from System.Windows.Forms import Button, DockStyle, Panel, Form, >> FormBorderStyle, Padding, TextBox >> import time >> >> >> >> Bruce Bromberek >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Wed Jul 8 18:10:15 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 8 Jul 2009 09:10:15 -0700 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> Message-ID: How have you confirmed that they successfully installed SP1? One easy way is to give them ipy.exe to put into the same folder and have them try to run it. On Wed, Jul 8, 2009 at 8:57 AM, Bruce Bromberek wrote: > I do not have IronPython installed. I'm just distributing the compiled app > and dlls in the folder. Script compiled using SharpDevelop 3.1 > > > On Wed, Jul 8, 2009 at 10:55 AM, Curt Hagenlocher wrote: > >> When you run ipy.exe on these machines it starts up successfully, but when >> you start your app you get the MissingMethodException for that DynamicMethod >> constructor? >> On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek < >> bruce.bromberek at gmail.com> wrote: >> >>> I'm stuck. >>> >>> I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy >>> console screen )app that I have created and successfully run multiple >>> machines under my control. >>> >>> I've given the compiled app to other users. Half of the time it runs >>> great, the other half it dies right away with a >>> System.MissingMethodException :Method not found >>> void.system.reflection.emit.dynamicmethod..ctor(....) error message. >>> When I googled that string I read a post that reminded me that Ironpython >>> requires .Net2.0 SP1. >>> >>> I had the affected users upgrade their installs to .NET framework 3.5 >>> and the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in >>> Wikipedia) >>> >>> The die at launch is still occuring. >>> >>> Can anyone point in the right direction to solve this problem and/or tell >>> me what is causing it. In case it helps, I have listed the imports I'm >>> using in the script in addition to standard 5 ironpython assemblies/dll >>> >>> import clr >>> clr.AddReference('mscorlib') >>> clr.AddReference('System') >>> clr.AddReference('System.Data') >>> clr.AddReference('System.Windows.Forms') >>> clr.AddReference('System.Drawing') >>> >>> import sys >>> import System >>> import System.Data >>> from System.IO import Directory, Path, File >>> from System import DateTime >>> from System.Windows.Forms import DialogResult, OpenFileDialog >>> from System.Drawing import Size >>> from System.Windows.Forms import Button, DockStyle, Panel, Form, >>> FormBorderStyle, Padding, TextBox >>> import time >>> >>> >>> >>> Bruce Bromberek >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Wed Jul 8 19:09:42 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 8 Jul 2009 17:09:42 +0000 Subject: [IronPython] - Custom interactive console In-Reply-To: <00cb01c9ffd4$132a03c0$397e0b40$@segal@bigpond.com> References: <00cb01c9ffd4$132a03c0$397e0b40$@segal@bigpond.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0343ED20@TK5EX14MBXC116.redmond.corp.microsoft.com> That's the best way to do this stuff via the hosting APIs. For the 2.6 builds of the 2 bugs in that mail at least 1 of them has been fixed (22064) and it looks like 21881 has also been fixed - or at least we don't get the null object ref exception that we used to get. I'm not sure if the InteractiveInterpreter might fall down somewhere else though. So you might also be able to do it via pure Python code if you'd like. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Simon Segal Sent: Wednesday, July 08, 2009 6:58 AM To: 'Discussion of IronPython' Subject: [IronPython] - Custom interactive console Sorry ignore my previous message it was a incorrectly given the wrong subject. My question: Is the thread that starts from this post still the best way to facilitate implementing tab completion and new line functionality in your own console? http://www.mail-archive.com/users at lists.ironpython.com/msg08846.html Regards, Simon Segal Email: simon.segal at bigpond.com Web Site: http://www.simonsegal.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.bromberek at gmail.com Wed Jul 8 21:07:29 2009 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Wed, 8 Jul 2009 14:07:29 -0500 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> Message-ID: <58ad4a110907081207m2c1d2005p6b33fb250dc4ab61@mail.gmail.com> I sent them ipy.exe and it generated the same error. I wonder, does ipy really require SP2 for .NET20. That is the only difference I see between my install (.NET 3.5 SP1, .NET 2.0 SP2) and their install (.NET 3.5, .NET 2.0 SP1)? Bruce On Wed, Jul 8, 2009 at 11:10 AM, Curt Hagenlocher wrote: > How have you confirmed that they successfully installed SP1? One easy way > is to give them ipy.exe to put into the same folder and have them try to run > it. > > > On Wed, Jul 8, 2009 at 8:57 AM, Bruce Bromberek > wrote: > >> I do not have IronPython installed. I'm just distributing the compiled >> app and dlls in the folder. Script compiled using SharpDevelop 3.1 >> >> >> On Wed, Jul 8, 2009 at 10:55 AM, Curt Hagenlocher wrote: >> >>> When you run ipy.exe on these machines it starts up successfully, but >>> when you start your app you get the MissingMethodException for that >>> DynamicMethod constructor? >>> On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek < >>> bruce.bromberek at gmail.com> wrote: >>> >>>> I'm stuck. >>>> >>>> I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy >>>> console screen )app that I have created and successfully run multiple >>>> machines under my control. >>>> >>>> I've given the compiled app to other users. Half of the time it runs >>>> great, the other half it dies right away with a >>>> System.MissingMethodException :Method not found >>>> void.system.reflection.emit.dynamicmethod..ctor(....) error message. >>>> When I googled that string I read a post that reminded me that Ironpython >>>> requires .Net2.0 SP1. >>>> >>>> I had the affected users upgrade their installs to .NET framework 3.5 >>>> and the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in >>>> Wikipedia) >>>> >>>> The die at launch is still occuring. >>>> >>>> Can anyone point in the right direction to solve this problem and/or >>>> tell me what is causing it. In case it helps, I have listed the imports I'm >>>> using in the script in addition to standard 5 ironpython assemblies/dll >>>> >>>> import clr >>>> clr.AddReference('mscorlib') >>>> clr.AddReference('System') >>>> clr.AddReference('System.Data') >>>> clr.AddReference('System.Windows.Forms') >>>> clr.AddReference('System.Drawing') >>>> >>>> import sys >>>> import System >>>> import System.Data >>>> from System.IO import Directory, Path, File >>>> from System import DateTime >>>> from System.Windows.Forms import DialogResult, OpenFileDialog >>>> from System.Drawing import Size >>>> from System.Windows.Forms import Button, DockStyle, Panel, Form, >>>> FormBorderStyle, Padding, TextBox >>>> import time >>>> >>>> >>>> >>>> Bruce Bromberek >>>> >>>> _______________________________________________ >>>> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.bromberek at gmail.com Thu Jul 9 00:03:19 2009 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Wed, 8 Jul 2009 17:03:19 -0500 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: <58ad4a110907081207m2c1d2005p6b33fb250dc4ab61@mail.gmail.com> References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> <58ad4a110907081207m2c1d2005p6b33fb250dc4ab61@mail.gmail.com> Message-ID: <58ad4a110907081503s5f4d1229y141609540c07b03a@mail.gmail.com> Problem resolved? It appears that my users had copied the files to a network drive and were running from there instead of from their PC. Everything is working now with .NET2.0 SP1 and the files located on their C drive. Weird that file location would have an effect. Thanks for your help Curt. Bruce On Wed, Jul 8, 2009 at 2:07 PM, Bruce Bromberek wrote: > I sent them ipy.exe and it generated the same error. > > I wonder, does ipy really require SP2 for .NET20. That is the only > difference I see between my install (.NET 3.5 SP1, .NET 2.0 SP2) and their > install (.NET 3.5, .NET 2.0 SP1)? > > Bruce > > > On Wed, Jul 8, 2009 at 11:10 AM, Curt Hagenlocher wrote: > >> How have you confirmed that they successfully installed SP1? One easy way >> is to give them ipy.exe to put into the same folder and have them try to run >> it. >> >> >> On Wed, Jul 8, 2009 at 8:57 AM, Bruce Bromberek < >> bruce.bromberek at gmail.com> wrote: >> >>> I do not have IronPython installed. I'm just distributing the compiled >>> app and dlls in the folder. Script compiled using SharpDevelop 3.1 >>> >>> >>> On Wed, Jul 8, 2009 at 10:55 AM, Curt Hagenlocher wrote: >>> >>>> When you run ipy.exe on these machines it starts up successfully, but >>>> when you start your app you get the MissingMethodException for that >>>> DynamicMethod constructor? >>>> On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek < >>>> bruce.bromberek at gmail.com> wrote: >>>> >>>>> I'm stuck. >>>>> >>>>> I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy >>>>> console screen )app that I have created and successfully run multiple >>>>> machines under my control. >>>>> >>>>> I've given the compiled app to other users. Half of the time it runs >>>>> great, the other half it dies right away with a >>>>> System.MissingMethodException :Method not found >>>>> void.system.reflection.emit.dynamicmethod..ctor(....) error message. >>>>> When I googled that string I read a post that reminded me that Ironpython >>>>> requires .Net2.0 SP1. >>>>> >>>>> I had the affected users upgrade their installs to .NET framework 3.5 >>>>> and the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in >>>>> Wikipedia) >>>>> >>>>> The die at launch is still occuring. >>>>> >>>>> Can anyone point in the right direction to solve this problem and/or >>>>> tell me what is causing it. In case it helps, I have listed the imports I'm >>>>> using in the script in addition to standard 5 ironpython assemblies/dll >>>>> >>>>> import clr >>>>> clr.AddReference('mscorlib') >>>>> clr.AddReference('System') >>>>> clr.AddReference('System.Data') >>>>> clr.AddReference('System.Windows.Forms') >>>>> clr.AddReference('System.Drawing') >>>>> >>>>> import sys >>>>> import System >>>>> import System.Data >>>>> from System.IO import Directory, Path, File >>>>> from System import DateTime >>>>> from System.Windows.Forms import DialogResult, OpenFileDialog >>>>> from System.Drawing import Size >>>>> from System.Windows.Forms import Button, DockStyle, Panel, Form, >>>>> FormBorderStyle, Padding, TextBox >>>>> import time >>>>> >>>>> >>>>> >>>>> Bruce Bromberek >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Thu Jul 9 00:40:24 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 8 Jul 2009 15:40:24 -0700 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: <58ad4a110907081503s5f4d1229y141609540c07b03a@mail.gmail.com> References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> <58ad4a110907081207m2c1d2005p6b33fb250dc4ab61@mail.gmail.com> <58ad4a110907081503s5f4d1229y141609540c07b03a@mail.gmail.com> Message-ID: Very strange. Well, I'm glad it's working now! On Wed, Jul 8, 2009 at 3:03 PM, Bruce Bromberek wrote: > Problem resolved? > > It appears that my users had copied the files to a network drive and were > running from there instead of from their PC. Everything is working now with > .NET2.0 SP1 and the files located on their C drive. Weird that file > location would have an effect. > > Thanks for your help Curt. > > Bruce > > > On Wed, Jul 8, 2009 at 2:07 PM, Bruce Bromberek > wrote: > >> I sent them ipy.exe and it generated the same error. >> >> I wonder, does ipy really require SP2 for .NET20. That is the only >> difference I see between my install (.NET 3.5 SP1, .NET 2.0 SP2) and their >> install (.NET 3.5, .NET 2.0 SP1)? >> >> Bruce >> >> >> On Wed, Jul 8, 2009 at 11:10 AM, Curt Hagenlocher wrote: >> >>> How have you confirmed that they successfully installed SP1? One easy way >>> is to give them ipy.exe to put into the same folder and have them try to run >>> it. >>> >>> >>> On Wed, Jul 8, 2009 at 8:57 AM, Bruce Bromberek < >>> bruce.bromberek at gmail.com> wrote: >>> >>>> I do not have IronPython installed. I'm just distributing the compiled >>>> app and dlls in the folder. Script compiled using SharpDevelop 3.1 >>>> >>>> >>>> On Wed, Jul 8, 2009 at 10:55 AM, Curt Hagenlocher >>> > wrote: >>>> >>>>> When you run ipy.exe on these machines it starts up successfully, but >>>>> when you start your app you get the MissingMethodException for that >>>>> DynamicMethod constructor? >>>>> On Wed, Jul 8, 2009 at 8:45 AM, Bruce Bromberek < >>>>> bruce.bromberek at gmail.com> wrote: >>>>> >>>>>> I'm stuck. >>>>>> >>>>>> I have an Ironpython (2.0.0.0 .NET 2.0.50727.3082 according to ipy >>>>>> console screen )app that I have created and successfully run multiple >>>>>> machines under my control. >>>>>> >>>>>> I've given the compiled app to other users. Half of the time it runs >>>>>> great, the other half it dies right away with a >>>>>> System.MissingMethodException :Method not found >>>>>> void.system.reflection.emit.dynamicmethod..ctor(....) error message. >>>>>> When I googled that string I read a post that reminded me that Ironpython >>>>>> requires .Net2.0 SP1. >>>>>> >>>>>> I had the affected users upgrade their installs to .NET framework 3.5 >>>>>> and the .NET 2.0 version is 2.0.50727.1433 (SP1 according to a table in >>>>>> Wikipedia) >>>>>> >>>>>> The die at launch is still occuring. >>>>>> >>>>>> Can anyone point in the right direction to solve this problem and/or >>>>>> tell me what is causing it. In case it helps, I have listed the imports I'm >>>>>> using in the script in addition to standard 5 ironpython assemblies/dll >>>>>> >>>>>> import clr >>>>>> clr.AddReference('mscorlib') >>>>>> clr.AddReference('System') >>>>>> clr.AddReference('System.Data') >>>>>> clr.AddReference('System.Windows.Forms') >>>>>> clr.AddReference('System.Drawing') >>>>>> >>>>>> import sys >>>>>> import System >>>>>> import System.Data >>>>>> from System.IO import Directory, Path, File >>>>>> from System import DateTime >>>>>> from System.Windows.Forms import DialogResult, OpenFileDialog >>>>>> from System.Drawing import Size >>>>>> from System.Windows.Forms import Button, DockStyle, Panel, Form, >>>>>> FormBorderStyle, Padding, TextBox >>>>>> import time >>>>>> >>>>>> >>>>>> >>>>>> Bruce Bromberek >>>>>> >>>>>> _______________________________________________ >>>>>> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Jul 9 16:12:40 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 9 Jul 2009 08:12:40 -0600 Subject: [IronPython] Problem Running Compiled Ironpython APP .NET Issue In-Reply-To: <58ad4a110907081503s5f4d1229y141609540c07b03a@mail.gmail.com> References: <58ad4a110907080845t5721fdb4x24e9e0e3fdbf7f8b@mail.gmail.com> <58ad4a110907080857y3fef7880j2fcc2c46c6e7acd4@mail.gmail.com> <58ad4a110907081207m2c1d2005p6b33fb250dc4ab61@mail.gmail.com> <58ad4a110907081503s5f4d1229y141609540c07b03a@mail.gmail.com> Message-ID: On Wed, Jul 8, 2009 at 4:03 PM, Bruce Bromberek wrote: > Problem resolved? > > It appears that my users had copied the files to a network drive and were > running from there instead of from their PC.? Everything is working now with > .NET2.0 SP1 and the files located on their C drive.? Weird that file > location would have an effect. By default in 2.0 (IIRC) files running from a network share are run in partial trust instead of full trust. - Jeff From merllab at microsoft.com Thu Jul 9 17:52:55 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Thu, 9 Jul 2009 08:52:55 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56232. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPythonTest/ClrType.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPythonTest/ClrType.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComRuntimeHelpers.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComEventSinkProxy.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComObject.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/BoundDispEvent.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComEventSink.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/DispCallableMetaObject.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Errors.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComEventSinksContainer.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/ComBinder.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Src/IronPythonTest/IronPythonTest.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Variant.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/IDispatchComObject.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs $/IronPython/IronPython_Main/Src/Scripts/generate_comdispatch.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_clrtype.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 981035 Date: 7/8/2009 1:05:06 PM (dfugate) More clrtype verification: - added missing verification to test_sanity_static_dot_net_type. Looks like this is actually broken - see http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23426 - added test case which returns types implemented in C# as the return value of __clrtype__ - added test case where the type has multiple constructor overloads with each accepting a PythonType as the first param. This doesn't seem to work - see http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23419 - added test case for types providing a parameterless constructor - added test case to ensure garbage types (e.g., those having no constructors accepting a PythonType) can't be used with __clrtype__. Filed http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23418 (Shelveset: CLRTYPE3;REDMOND\dfugate | SNAP CheckinId: m9639) -------------------------------------------------------------------------------- Changeset Id: 981030 Date: 7/8/2009 1:03:12 PM (dfugate) - MS.Scripting.Debugging.dll wasn't being GAC'ed in the stress lab. Fixed - quite a few tests in the stress lab were failing because iptest.assert_util.load_iron_python_dll doesn't check the GAC for IronPython.dll. Fixed (Shelveset: STRESS01;REDMOND\dfugate | SNAP CheckinId: m9639) From itssivaguru at gmail.com Thu Jul 9 22:32:08 2009 From: itssivaguru at gmail.com (Summer_Intern) Date: Thu, 9 Jul 2009 13:32:08 -0700 (PDT) Subject: [IronPython] How to capture a 'Carriage Return' in a windows form ? In-Reply-To: References: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> Message-ID: <24417356.post@talk.nabble.com> Hello, Thanks for the Suggestion . I set the 'AcceptsReturn = True' for the textbox. But the problem I found is that its not able to recognize the 'Enter'key press . Here is the Code : def OnKeyPress(self,sender,args): print (args.KeyChar) if(args.KeyChar == Keys.Return): print 'Enter Key Pressed' 1) I tried args.KeyCode . It returned an exception 2) I tried if(args.KeyChar == Keys. Enter) , the if condition is not passing when I press the Enter Key . Where as a new line is printed on the console. 3) Same behavior when I have if(args.KeyChar == Keys.Return): I think its not able to understand the enum 'Keys'. I also tried doing 'from System.Windows.Forms import Keys'. but still no good . Any idea whats missing or incorrect ? Thanks ! briancurtin wrote: > > On Wed, Jul 1, 2009 at 09:31, Sivaguru Perambalam > wrote: > >> Hello , >> >> I have a Windows form with a text box and a button. >> What I want to implement it, when the user hits the 'Enter' key in the >> text >> box, the function that's linked to the ButtonClick event has to be >> invoked. >> Please give me like a code example of how this could be done in a simpler >> way, since I am not familiar with Forms or GUI stuff . >> >> Thanks ! >> > > You could check out the OnKeyDown event: > http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(loband).aspx. > The C# example pretty easily translates to IronPython, so you could follow > that and check when the KeyEventArgs.KeyCode is equal to Keys.Return, then > call your ButtonClick method. > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- View this message in context: http://www.nabble.com/How-to-capture-a-%27Carriage-Return%27-in-a-windows-form---tp24290861p24417356.html Sent from the IronPython mailing list archive at Nabble.com. From curt at hagenlocher.org Fri Jul 10 01:00:18 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 9 Jul 2009 16:00:18 -0700 Subject: [IronPython] How to capture a 'Carriage Return' in a windows form ? In-Reply-To: <24417356.post@talk.nabble.com> References: <12604cb0907010731t4761778fj610350d11bf546b8@mail.gmail.com> <24417356.post@talk.nabble.com> Message-ID: It sounds like you're hooking the KeyPress event instead of the KeyDown event. That's why you get a KeyChar instead of a KeyCode and it also might be why the code isn't working as you expect. I can get the Keys enumeration just fine: IronPython 2.6 Beta 1 DEBUG (2.6.0.10) on .NET 2.0.50727.3053 Type "help", "copyright", "credits" or "license" for more information. >>> import clr >>> clr.AddReference('System.Windows.Forms') >>> from System.Windows.Forms import Keys >>> Keys.Enter >>> On Thu, Jul 9, 2009 at 1:32 PM, Summer_Intern wrote: > > Hello, > > Thanks for the Suggestion . I set the 'AcceptsReturn = True' for the > textbox. > But the problem I found is that its not able to recognize the 'Enter'key > press . > > Here is the Code : > > def OnKeyPress(self,sender,args): > print (args.KeyChar) > if(args.KeyChar == Keys.Return): > print 'Enter Key Pressed' > > 1) I tried args.KeyCode . It returned an exception > 2) I tried if(args.KeyChar == Keys. Enter) , the if condition is not > passing > when I press the Enter Key . Where as a new line is printed on the console. > 3) Same behavior when I have if(args.KeyChar == Keys.Return): > > I think its not able to understand the enum 'Keys'. > I also tried doing 'from System.Windows.Forms import Keys'. but still no > good . > > Any idea whats missing or incorrect ? > > Thanks ! > > briancurtin wrote: > > > > On Wed, Jul 1, 2009 at 09:31, Sivaguru Perambalam > > wrote: > > > >> Hello , > >> > >> I have a Windows form with a text box and a button. > >> What I want to implement it, when the user hits the 'Enter' key in the > >> text > >> box, the function that's linked to the ButtonClick event has to be > >> invoked. > >> Please give me like a code example of how this could be done in a > simpler > >> way, since I am not familiar with Forms or GUI stuff . > >> > >> Thanks ! > >> > > > > You could check out the OnKeyDown event: > > > http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(loband).aspx > . > > The C# example pretty easily translates to IronPython, so you could > follow > > that and check when the KeyEventArgs.KeyCode is equal to Keys.Return, > then > > call your ButtonClick method. > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > View this message in context: > http://www.nabble.com/How-to-capture-a-%27Carriage-Return%27-in-a-windows-form---tp24290861p24417356.html > Sent from the IronPython mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kf9150 at gmail.com Fri Jul 10 08:34:26 2009 From: kf9150 at gmail.com (Kelie) Date: Thu, 9 Jul 2009 23:34:26 -0700 (PDT) Subject: [IronPython] Problem with Creating Executable using SharpDevelop Message-ID: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> Hello, I created a simple program with a few buttons, checkboxes, textboxes, etc. and it worked fine. The form was created in the latest SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the solution. In the release folder there were these files: IronPython.dll ManningsSolver.dll ManningsSolver.exe Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll When tried on two computers with IronPython installed and with the source code files, the program worked. But it failed on another computer that does not have these. And error message was very generic .NET error. I don't exactly remember what it was. Is this normal? Btw, since I have SharpDevelop installed, do I have to install IronPython in order to write programs in IronPython? Or does it matter which version of IronPython I install. The answer seems to be "No" because I see those .dll files for IronPython in this folder "C: \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings \PythonBinding" which are dated Feb 2009. Guess they're not the latest. Thanks, Kelie From merllab at microsoft.com Fri Jul 10 17:53:31 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Fri, 10 Jul 2009 08:53:31 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <9a2cbaed-f804-4d18-aeca-9aecb441a515@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56281. ADDED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_locale.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapGetMemberNamesToDirAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIEnumerableToContainsAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIDisposableToContextManagerAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIEnumerableToIterAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapICollectionToLenAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/imp.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/sys.cs $/IronPython/IronPython_Main/Src/IronPython/Modules $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeDataSlot.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/Win32Exception.cs $/IronPython/IronPython_Main/Src/Tests/Tools/baselines $/IronPython/IronPython_Main/Src/Tests/Tools/modulediff.py $/IronPython/IronPython_Main/Src/Tests/Tools/logmodule.py $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/xxsubtype.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/types_only.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/time.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/thread.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/sys.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/select.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/nt.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/gc.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/datetime.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/cStringIO.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/cPickle.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/copy_reg.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/array.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_winreg.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_weakref.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_sre.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_codecs.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/__builtin__.log DELETED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/NullImporter.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/sys.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/imp.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/locale.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_locale.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapGetMemberNamesToDirAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIEnumerableToContainsAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIDisposableToContextManagerAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapIEnumerableToIterAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/DontMapICollectionToLenAttribute.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/imp.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/sys.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeDataSlot.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/Win32Exception.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_codecs.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_bytesio.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_fileio.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_md5.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sha.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Field.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtrType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/ArrayType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/StructType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/FutureBuiltins.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/GeneratorRewriter.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_heapq.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonGlobalVariableExpression.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/BuiltinsDictionaryStorage.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_collections.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_warnings.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/BytesWarningException.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/NewStringFormatter.cs $/IronPython/IronPython_Main/Src/IronPython/Lib/iptest/assert_util.py $/IronPython/IronPython_Main/Src/IronPython.Modules/_struct.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.Operations.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaOldClass.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/ClassMethodDescriptor.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionCode.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Descriptors.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Method.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/cmath.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_winreg.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeInfo.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_functools.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/UnicodeWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/DeprecationWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/WarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/RuntimeWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/SystemExitException.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PendingDeprecationWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/OverflowWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/ImportWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/UserWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/FutureWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.Generated.cs $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_clrtype.py $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/CodeContextExpression.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/SyntaxWarningException.Generated.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/xxsubtype.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeSlot.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeTypeSlot.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinMethodDescriptor.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/ReflectedEvent.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/ReflectedExtensionProperty.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonTypeOps.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/array.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonTuple.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/OldInstance.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/DictProxy.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/ReflectedSlotProperty.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/TypeCache.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/OldClass.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ObjectOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/IntOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.Generated.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/LongOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Generator.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Slice.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/List.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonBuffer.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Interfaces.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/XRange.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFile.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Importer.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Enumerate.cs $/IronPython/IronPython_Main/Src/IronPythonTest/EngineTest.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_weakref.Generated.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_weakref.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_sre.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_random.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/thread.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/socket.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Tutorial/Tutorial.htm $/IronPython/IronPython_Main/Src/Scripts/generate_exceptions.py $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TryStatement.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/binascii.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/cPickle.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/cStringIO.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/datetime.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/errno.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/gc.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/IronPython.Modules.csproj $/IronPython/IronPython_Main/Src/IronPython.Modules/IterTools.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/marshal.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/math.cs $/IronPython/IronPython_Main/Src/Tests/test_codecs.py $/IronPython/IronPython_Main/Src/IronPython.Modules/nt.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/operator.cs $/IronPython/IronPython_Main/Src/Tests/test_cStringIO.py $/IronPython/IronPython_Main/Src/IronPython.Modules/select.cs $/IronPython/IronPython_Main/Src/Tests/test_exceptions.py $/IronPython/IronPython_Main/Src/Tests/test_file.py $/IronPython/IronPython_Main/Src/Tests/test_gc.py $/IronPython/IronPython_Main/Src/Tests/test_nt.py $/IronPython/IronPython_Main/Src/Tests/versions/python26.py $/IronPython/IronPython_Main/Src/Tests/interop/net/type/test_assembly.py $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/TryStatementBuilder.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/GeneratorExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/SkipInterpretExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/FinallyFlowControlExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/SymbolConstantExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/FieldBuilderExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/YieldExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LastFaultingLineExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs $/IronPython/IronPython_Main/Src/Tests/Tools/modulediff.py $/IronPython/IronPython_Main/Src/Tests/Tools/logmodule.py $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/xxsubtype.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/types_only.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/time.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/thread.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/sys.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/select.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/nt.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/gc.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/datetime.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/cStringIO.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/cPickle.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/copy_reg.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/array.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_winreg.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_weakref.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_sre.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/_codecs.log $/IronPython/IronPython_Main/Src/Tests/Tools/baselines/__builtin__.log CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 987915 Date: 7/9/2009 4:07:45 PM (dinov) 23348 Removing a read-only file should raise an error with errno set to EACCES 23349 Removing a open file should raise an error with errno set to EACCES 16453 Trivial: Throw WindowsError with errno set to 2 when os.stat fails Move error conversion from nt module into the WindowsError function. Add support for many more error conversions which are generated based upon the same error # conversions CPython is doing. I?ve also added a Win32Exception to Silverlight so we can have parity with the desktop CLR w/o lots of divergent code paths. I?ve also removed our own WarningException from non-Silverlight builds where we?re supposed to only be using System.ComponentModel.WarningException. And again I?ve left WarningException around for the Silverlight builds where the System.ComponentModel.WarningException is unusable due to lack of ctors. 23350 A buffer object should be directly writable to a cStringIO object Add overload that supports buffer objects, checked behavior of writelines as well. 23347 file objects need 'buffering' keyword argument Rename 3rd argument to buffering from bufsize. 19310 Incompat: Open existing file with O_CREAT Need to use Create instead of CreateNew flag when opening 8784 nt.open(filename,flags,mode) would throw exception while CPython works correctly Add a work around for the fact that .NET doesn?t allow us to create files w/ create and just read access. 23351 Implement 'mbcs' codec Implement mbcs codec ? this is just the current default encoding as reported by .NET. On US-English machines this is Windows-1252. Tests are added that are specific to 1252. Also fixing a regression in generators that was caused by the sys.settrace changes. I accidently made generators use an inner lambda that was getting repeatedly created via Delegate.CreateDelegate. This moves back to creating the delegate only once like we used to do it. (Shelveset: BazaarAndGenPerf;REDMOND\dinov | SNAP CheckinId: 8880) -------------------------------------------------------------------------------- Changeset Id: 985804 Date: 7/9/2009 12:46:52 PM (dfugate) - test_clrtype.py now runs properly under the "multiple execute" stress test mode (Shelveset: CLRTYPE4;REDMOND\dfugate | SNAP CheckinId: 8874) -------------------------------------------------------------------------------- Changeset Id: 985043 Date: 7/9/2009 9:18:27 AM (dinov) Fixes a bunch of ?Implement rest of? bugs. Adds a new difference tool which runs much faster than the existing one. It takes into account various core types and doesn?t include those in the differences. The modules are processed ignoring the core types and then the core-types are processed by themselves. There are baselines which are checked in and when the baseline is violated the generation script will need to be run again to update the baselines. The baselines can include comments to point at the specific bug (or lack therefore if it?s an ok difference). Changes include: Adding __doc__ strings to lots of modules Hiding various classes which shouldn?t be exposed out under their names Removing some special __*__ methods which shouldn?t exist on types ? new attributes are added to suppress certain mapping patterns (e.g. IDisposable -> __enter__/__exit__, IEnumerable -> __contains__, etc?) Explicitly implementing interfaces on types that are unlikely to be used via their interfaces Removing ISequence/IMUtableSequence interfaces in preference of IList/IList. Ensuring we implement both IList/IList on appropriate types. Add support for UTF-32 encodings Adding missing trivial properties/methods, removing some methods which shouldn?t exist Adding many missing attributes from weakref objects (we?re still missing __cmp__ but it?s tricky to add) Fixing cPickle to expose functions instead of types for creating new pickler objects. Moving modules in IronPython.dll into the IronPython.Modules namespace so all modules live there now regardless of the DLL. Add common base class for data descriptors and switch data descriptors to use it so they consistently have __set__ / __delete__ methods. Clear depreceted exc_* properties from sys after an exception is handled. (Shelveset: ImplementRestOfFinalFinal;REDMOND\dinov | SNAP CheckinId: 8871) From dinov at microsoft.com Fri Jul 10 17:58:33 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 15:58:33 +0000 Subject: [IronPython] Bazaar on IronPython In-Reply-To: References: <1A472770E042064698CB5ADC83A12ACD033E93DD@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344E957@TK5EX14MBXC116.redmond.corp.microsoft.com> Martin wrote: > * Even non re.RE_Pattern objects shouldn't confuse warnings filtering > (Regression in IronPython 2.6 beta 1) (too crazy for a bug entry) > > * Require the zlib module [workitem:2590] (other missing or broken > modules not as crucial) > > * Making sys._getframe equal to None by default in 2.6 beta 1 lead to > a happier logging module but a sadder doctest module. > > * The third argument to file should work as a keyword as well as > positionally [workitem:23347] > > * The abspath function should not throw even for invalid windows > paths. Or, if it's going to throw, it shouldn't spell 'pecified' > without the 'S'. Fixed post-2.6 beta 1 by the workaround in > nt._getfullpathname? (going by the code in > IronPython_Main/Src/IronPython.Modules/nt.cs) > > * Removing a read-only file should raise an error with errno set to > EACCES [workitem:23348] also related to [workitem:13702] > > * Removing a open file should raise an error with errno set to EACCES > [workitem:23349] also related to [workitem:13702] > > * A buffer object should be directly writable to a cStringIO object > [workitem:23350] > > * Opening an existing file with the O_CREAT should succeed > [workitem:19310] (problem at FileModeFromFlags in > IronPython_Main/Src/IronPython.Modules/nt.cs) CreateNew is the > analogue of (O_CREAT | O_EXCL), just O_CREAT should be OpenAlways. > Likewise, the O_TRUNC flag is not being correctly combined in there. > > * The mbcs codec for decoding windows 'ansi' strings should exist > [workitem:23351] With this morning's source push all of these should be fixed now except For the zlib and re.RE_Pattern issues. From dinov at microsoft.com Fri Jul 10 18:03:58 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 16:03:58 +0000 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> In general you need IronPython to be present to run IronPython apps - even if they're compiled. And IronPython will need to be next to the app unless IronPython has been installed into the GAC (which we do not do by default). Also you probably want to include IronPython.Modules.dll as well in addition to the DLLs you have here. I imagine at some point in the future we could add some sort of tree shaking compiler support that links in IronPython w/ the app but we're a ways off from making that a priority. The SharpDevelop specific question I'm less sure about. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Kelie > Sent: Thursday, July 09, 2009 11:34 PM > To: users at lists.ironpython.com > Subject: [IronPython] Problem with Creating Executable using > SharpDevelop > > Hello, > > I created a simple program with a few buttons, checkboxes, textboxes, > etc. and it worked fine. The form was created in the latest > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > solution. In the release folder there were these files: > > IronPython.dll > ManningsSolver.dll > ManningsSolver.exe > Microsoft.Scripting.Core.dll > Microsoft.Scripting.dll > Microsoft.Scripting.ExtensionAttribute.dll > > When tried on two computers with IronPython installed and with the > source code files, the program worked. But it failed on another > computer that does not have these. And error message was very > generic .NET error. I don't exactly remember what it was. Is this > normal? > > Btw, since I have SharpDevelop installed, do I have to install > IronPython in order to write programs in IronPython? Or does it matter > which version of IronPython I install. The answer seems to be "No" > because I see those .dll files for IronPython in this folder "C: > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > \PythonBinding" which are dated Feb 2009. Guess they're not the > latest. > > Thanks, > > Kelie > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From JDM at MarchRay.net Fri Jul 10 18:27:39 2009 From: JDM at MarchRay.net (Jonathan March) Date: Fri, 10 Jul 2009 11:27:39 -0500 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: Installing IP into the GAC is something apparently not much discussed in polite company (e.g. AFAICT not at all in "IP in Action" or "IP URLs".) For us .net ignorami: * What is the downside to installing IP into the GAC? Is it that different apps will be dependent on different IP versions so better just to keep the IP DLLs together with each app? * Is installing into GAC still done by invoking gacutil twice as described here:? http://www.manifold.net/doc/scripts.htm Thanks. On Fri, Jul 10, 2009 at 11:03 AM, Dino Viehland wrote: > In general you need IronPython to be present to run IronPython apps - even > if they're compiled. And IronPython will need to be next to the app > unless IronPython has been installed into the GAC (which we do not > do by default). Also you probably want to include IronPython.Modules.dll > as well in addition to the DLLs you have here. I imagine at some point > in the future we could add some sort of tree shaking compiler support > that links in IronPython w/ the app but we're a ways off from making > that a priority. > > The SharpDevelop specific question I'm less sure about. > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users- > > bounces at lists.ironpython.com] On Behalf Of Kelie > > Sent: Thursday, July 09, 2009 11:34 PM > > To: users at lists.ironpython.com > > Subject: [IronPython] Problem with Creating Executable using > > SharpDevelop > > > > Hello, > > > > I created a simple program with a few buttons, checkboxes, textboxes, > > etc. and it worked fine. The form was created in the latest > > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > > solution. In the release folder there were these files: > > > > IronPython.dll > > ManningsSolver.dll > > ManningsSolver.exe > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > When tried on two computers with IronPython installed and with the > > source code files, the program worked. But it failed on another > > computer that does not have these. And error message was very > > generic .NET error. I don't exactly remember what it was. Is this > > normal? > > > > Btw, since I have SharpDevelop installed, do I have to install > > IronPython in order to write programs in IronPython? Or does it matter > > which version of IronPython I install. The answer seems to be "No" > > because I see those .dll files for IronPython in this folder "C: > > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > > \PythonBinding" which are dated Feb 2009. Guess they're not the > > latest. > > > > Thanks, > > > > Kelie > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Jul 10 18:44:53 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 16:44:53 +0000 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> The big problem w/ installing into the GAC from our perspective is that assemblies in the GAC are fully trusted and can be loaded by anyone. Combine this w/ the AllowPartiallyTrustedCallers attribute which we apply to our assemblies and you potentially have a recipe for disaster. In theory we believe this is ok because we're also SecurityTransparent but we haven't had the deeper conversion w/ the CLR team about combining all 3 of these so we continue to be conservative and not install into the GAC. We should probably look into removing APTCA though - the reason why we applied it in the 1.x time frame was due to a performance problem w/ signed non-APTCA assemblies which may now be fixed in the CLR. As for actually doing the installation you now need to invoke gacutil 5 times - once for each DLL. IronPython, IronPython.Modules, Microsoft.Scripting, Microsoft.Scripting.Core, and Microsoft.Scripting.ExtensionAttribute. In 2.6 there'll be one more assembly to add to the list - Microsoft.Scripting.Debugging. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan March Sent: Friday, July 10, 2009 9:28 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop Installing IP into the GAC is something apparently not much discussed in polite company (e.g. AFAICT not at all in "IP in Action" or "IP URLs".) For us .net ignorami: * What is the downside to installing IP into the GAC? Is it that different apps will be dependent on different IP versions so better just to keep the IP DLLs together with each app? * Is installing into GAC still done by invoking gacutil twice as described here:? http://www.manifold.net/doc/scripts.htm Thanks. On Fri, Jul 10, 2009 at 11:03 AM, Dino Viehland > wrote: In general you need IronPython to be present to run IronPython apps - even if they're compiled. And IronPython will need to be next to the app unless IronPython has been installed into the GAC (which we do not do by default). Also you probably want to include IronPython.Modules.dll as well in addition to the DLLs you have here. I imagine at some point in the future we could add some sort of tree shaking compiler support that links in IronPython w/ the app but we're a ways off from making that a priority. The SharpDevelop specific question I'm less sure about. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Kelie > Sent: Thursday, July 09, 2009 11:34 PM > To: users at lists.ironpython.com > Subject: [IronPython] Problem with Creating Executable using > SharpDevelop > > Hello, > > I created a simple program with a few buttons, checkboxes, textboxes, > etc. and it worked fine. The form was created in the latest > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > solution. In the release folder there were these files: > > IronPython.dll > ManningsSolver.dll > ManningsSolver.exe > Microsoft.Scripting.Core.dll > Microsoft.Scripting.dll > Microsoft.Scripting.ExtensionAttribute.dll > > When tried on two computers with IronPython installed and with the > source code files, the program worked. But it failed on another > computer that does not have these. And error message was very > generic .NET error. I don't exactly remember what it was. Is this > normal? > > Btw, since I have SharpDevelop installed, do I have to install > IronPython in order to write programs in IronPython? Or does it matter > which version of IronPython I install. The answer seems to be "No" > because I see those .dll files for IronPython in this folder "C: > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > \PythonBinding" which are dated Feb 2009. Guess they're not the > latest. > > Thanks, > > Kelie > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jul 10 19:21:16 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 10 Jul 2009 11:21:16 -0600 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: On Fri, Jul 10, 2009 at 10:44 AM, Dino Viehland wrote: > The big problem w/ installing into the GAC from our perspective is that > assemblies in the GAC are fully trusted and can be loaded by anyone. > Combine this w/ the AllowPartiallyTrustedCallers attribute which we apply to > our assemblies and you potentially have a recipe for disaster.? In theory we > believe this is ok because we?re also SecurityTransparent but we haven?t had > the deeper conversion w/ the CLR team about combining all 3 of these so we > continue to be conservative and not install into the GAC. For the sake of simplifying the NWSGI usage instructions (or: think of the children!), please reconsider :). > > We should probably look into removing APTCA though ? the reason why we > applied it in the 1.x time frame was due to a performance problem w/ signed > non-APTCA assemblies which may now be fixed in the CLR. How would this affect partially-trusted applications? IIRC any assemblies they reference must have APTCA. This is quite important for web applications as they are often hosted in medium trust. - Jeff From dinov at microsoft.com Fri Jul 10 19:27:18 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 17:27:18 +0000 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344F226@TK5EX14MBXC116.redmond.corp.microsoft.com> Jeff wrote: > > How would this affect partially-trusted applications? IIRC any > assemblies they reference must have APTCA. This is quite important for > web applications as they are often hosted in medium trust. > Good point. If we confirm that APTCA, SecurityTransparent and GAC all mix perfectly fine then we could just leave APTCA. From dinov at microsoft.com Fri Jul 10 19:32:11 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 17:32:11 +0000 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344F293@TK5EX14MBXC116.redmond.corp.microsoft.com> Jeff wrote: > > For the sake of simplifying the NWSGI usage instructions (or: think of > the children!), please reconsider :). > Ok, we don't seem to have a issue on CodePlex for this so I've created one: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23450 Feel free to vote on it - I doubt we'd do it for 2.6 but who knows... From dinov at microsoft.com Fri Jul 10 19:42:13 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 10 Jul 2009 17:42:13 +0000 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD0344F317@TK5EX14MBXC116.redmond.corp.microsoft.com> Ok, I just confirmed that mixing APTCA + SecurityTransparent + GAC works as expected so putting ourselves in the GAC should be perfectly fine to do. There may be some additional internal process hurdles for us to jump over but we can look into that. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Friday, July 10, 2009 9:45 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop The big problem w/ installing into the GAC from our perspective is that assemblies in the GAC are fully trusted and can be loaded by anyone. Combine this w/ the AllowPartiallyTrustedCallers attribute which we apply to our assemblies and you potentially have a recipe for disaster. In theory we believe this is ok because we're also SecurityTransparent but we haven't had the deeper conversion w/ the CLR team about combining all 3 of these so we continue to be conservative and not install into the GAC. We should probably look into removing APTCA though - the reason why we applied it in the 1.x time frame was due to a performance problem w/ signed non-APTCA assemblies which may now be fixed in the CLR. As for actually doing the installation you now need to invoke gacutil 5 times - once for each DLL. IronPython, IronPython.Modules, Microsoft.Scripting, Microsoft.Scripting.Core, and Microsoft.Scripting.ExtensionAttribute. In 2.6 there'll be one more assembly to add to the list - Microsoft.Scripting.Debugging. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan March Sent: Friday, July 10, 2009 9:28 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop Installing IP into the GAC is something apparently not much discussed in polite company (e.g. AFAICT not at all in "IP in Action" or "IP URLs".) For us .net ignorami: * What is the downside to installing IP into the GAC? Is it that different apps will be dependent on different IP versions so better just to keep the IP DLLs together with each app? * Is installing into GAC still done by invoking gacutil twice as described here:? http://www.manifold.net/doc/scripts.htm Thanks. On Fri, Jul 10, 2009 at 11:03 AM, Dino Viehland > wrote: In general you need IronPython to be present to run IronPython apps - even if they're compiled. And IronPython will need to be next to the app unless IronPython has been installed into the GAC (which we do not do by default). Also you probably want to include IronPython.Modules.dll as well in addition to the DLLs you have here. I imagine at some point in the future we could add some sort of tree shaking compiler support that links in IronPython w/ the app but we're a ways off from making that a priority. The SharpDevelop specific question I'm less sure about. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Kelie > Sent: Thursday, July 09, 2009 11:34 PM > To: users at lists.ironpython.com > Subject: [IronPython] Problem with Creating Executable using > SharpDevelop > > Hello, > > I created a simple program with a few buttons, checkboxes, textboxes, > etc. and it worked fine. The form was created in the latest > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > solution. In the release folder there were these files: > > IronPython.dll > ManningsSolver.dll > ManningsSolver.exe > Microsoft.Scripting.Core.dll > Microsoft.Scripting.dll > Microsoft.Scripting.ExtensionAttribute.dll > > When tried on two computers with IronPython installed and with the > source code files, the program worked. But it failed on another > computer that does not have these. And error message was very > generic .NET error. I don't exactly remember what it was. Is this > normal? > > Btw, since I have SharpDevelop installed, do I have to install > IronPython in order to write programs in IronPython? Or does it matter > which version of IronPython I install. The answer seems to be "No" > because I see those .dll files for IronPython in this folder "C: > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > \PythonBinding" which are dated Feb 2009. Guess they're not the > latest. > > Thanks, > > Kelie > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From JDM at MarchRay.net Fri Jul 10 20:21:30 2009 From: JDM at MarchRay.net (Jonathan March) Date: Fri, 10 Jul 2009 13:21:30 -0500 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344F317@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344F317@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: Thanks for the quick response and forward motion! On Fri, Jul 10, 2009 at 12:42 PM, Dino Viehland wrote: > Ok, I just confirmed that mixing APTCA + SecurityTransparent + GAC works > as expected so putting ourselves in the GAC should be perfectly fine to do. > There may be some additional internal process hurdles for us to jump over > but we can look into that. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland > *Sent:* Friday, July 10, 2009 9:45 AM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Problem with Creating Executable using > SharpDevelop > > > > The big problem w/ installing into the GAC from our perspective is that > assemblies in the GAC are fully trusted and can be loaded by anyone. > Combine this w/ the AllowPartiallyTrustedCallers attribute which we apply to > our assemblies and you potentially have a recipe for disaster. In theory we > believe this is ok because we?re also SecurityTransparent but we haven?t had > the deeper conversion w/ the CLR team about combining all 3 of these so we > continue to be conservative and not install into the GAC. > > > > We should probably look into removing APTCA though ? the reason why we > applied it in the 1.x time frame was due to a performance problem w/ signed > non-APTCA assemblies which may now be fixed in the CLR. > > > > As for actually doing the installation you now need to invoke gacutil 5 > times ? once for each DLL. IronPython, IronPython.Modules, > Microsoft.Scripting, Microsoft.Scripting.Core, and > Microsoft.Scripting.ExtensionAttribute. In 2.6 there?ll be one more > assembly to add to the list ? Microsoft.Scripting.Debugging. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Jonathan March > *Sent:* Friday, July 10, 2009 9:28 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Problem with Creating Executable using > SharpDevelop > > > > Installing IP into the GAC is something apparently not much discussed in > polite company (e.g. AFAICT not at all in "IP in Action" or "IP URLs".) > > For us .net ignorami: > * What is the downside to installing IP into the GAC? Is it that different > apps will be dependent on different IP versions so better just to keep the > IP DLLs together with each app? > * Is installing into GAC still done by invoking gacutil twice as described > here:? > http://www.manifold.net/doc/scripts.htm > > Thanks. > > On Fri, Jul 10, 2009 at 11:03 AM, Dino Viehland > wrote: > > In general you need IronPython to be present to run IronPython apps - even > if they're compiled. And IronPython will need to be next to the app > unless IronPython has been installed into the GAC (which we do not > do by default). Also you probably want to include IronPython.Modules.dll > as well in addition to the DLLs you have here. I imagine at some point > in the future we could add some sort of tree shaking compiler support > that links in IronPython w/ the app but we're a ways off from making > that a priority. > > The SharpDevelop specific question I'm less sure about. > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users- > > bounces at lists.ironpython.com] On Behalf Of Kelie > > Sent: Thursday, July 09, 2009 11:34 PM > > To: users at lists.ironpython.com > > Subject: [IronPython] Problem with Creating Executable using > > SharpDevelop > > > > Hello, > > > > I created a simple program with a few buttons, checkboxes, textboxes, > > etc. and it worked fine. The form was created in the latest > > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > > solution. In the release folder there were these files: > > > > IronPython.dll > > ManningsSolver.dll > > ManningsSolver.exe > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > When tried on two computers with IronPython installed and with the > > source code files, the program worked. But it failed on another > > computer that does not have these. And error message was very > > generic .NET error. I don't exactly remember what it was. Is this > > normal? > > > > Btw, since I have SharpDevelop installed, do I have to install > > IronPython in order to write programs in IronPython? Or does it matter > > which version of IronPython I install. The answer seems to be "No" > > because I see those .dll files for IronPython in this folder "C: > > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > > \PythonBinding" which are dated Feb 2009. Guess they're not the > > latest. > > > > Thanks, > > > > Kelie > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jul 10 20:50:32 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 10 Jul 2009 19:50:32 +0100 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <4A578D78.40804@voidspace.org.uk> Are there issues around assembly versions and the GAC? I'm thinking particularly of where newer versions of IronPython are released as drop-in replacements so the version numbers are not updated. If a previous version is in the GAC isn't there a likelihood that an application that ships with a newer version will still load the GAC'd older version... ? My *impression* was that adding stuff to the GAC was a recipe for DLL hell and therefore it was better left to individual users rather than being automatic on installation. This opinion may be ill-informed however... Michael Dino Viehland wrote: > > The big problem w/ installing into the GAC from our perspective is > that assemblies in the GAC are fully trusted and can be loaded by > anyone. Combine this w/ the AllowPartiallyTrustedCallers attribute > which we apply to our assemblies and you potentially have a recipe for > disaster. In theory we believe this is ok because we?re also > SecurityTransparent but we haven?t had the deeper conversion w/ the > CLR team about combining all 3 of these so we continue to be > conservative and not install into the GAC. > > We should probably look into removing APTCA though ? the reason why we > applied it in the 1.x time frame was due to a performance problem w/ > signed non-APTCA assemblies which may now be fixed in the CLR. > > As for actually doing the installation you now need to invoke gacutil > 5 times ? once for each DLL. IronPython, IronPython.Modules, > Microsoft.Scripting, Microsoft.Scripting.Core, and > Microsoft.Scripting.ExtensionAttribute. In 2.6 there?ll be one more > assembly to add to the list ? Microsoft.Scripting.Debugging. > > *From:* users-bounces at lists.ironpython.com > [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *Jonathan March > *Sent:* Friday, July 10, 2009 9:28 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Problem with Creating Executable using > SharpDevelop > > Installing IP into the GAC is something apparently not much discussed > in polite company (e.g. AFAICT not at all in "IP in Action" or "IP URLs".) > > For us .net ignorami: > * What is the downside to installing IP into the GAC? Is it that > different apps will be dependent on different IP versions so better > just to keep the IP DLLs together with each app? > * Is installing into GAC still done by invoking gacutil twice as > described here:? > http://www.manifold.net/doc/scripts.htm > > Thanks. > > On Fri, Jul 10, 2009 at 11:03 AM, Dino Viehland > wrote: > > In general you need IronPython to be present to run IronPython apps - even > if they're compiled. And IronPython will need to be next to the app > unless IronPython has been installed into the GAC (which we do not > do by default). Also you probably want to include IronPython.Modules.dll > as well in addition to the DLLs you have here. I imagine at some point > in the future we could add some sort of tree shaking compiler support > that links in IronPython w/ the app but we're a ways off from making > that a priority. > > The SharpDevelop specific question I'm less sure about. > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com > [mailto:users- > > bounces at lists.ironpython.com ] > On Behalf Of Kelie > > Sent: Thursday, July 09, 2009 11:34 PM > > To: users at lists.ironpython.com > > Subject: [IronPython] Problem with Creating Executable using > > SharpDevelop > > > > Hello, > > > > I created a simple program with a few buttons, checkboxes, textboxes, > > etc. and it worked fine. The form was created in the latest > > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > > solution. In the release folder there were these files: > > > > IronPython.dll > > ManningsSolver.dll > > ManningsSolver.exe > > Microsoft.Scripting.Core.dll > > Microsoft.Scripting.dll > > Microsoft.Scripting.ExtensionAttribute.dll > > > > When tried on two computers with IronPython installed and with the > > source code files, the program worked. But it failed on another > > computer that does not have these. And error message was very > > generic .NET error. I don't exactly remember what it was. Is this > > normal? > > > > Btw, since I have SharpDevelop installed, do I have to install > > IronPython in order to write programs in IronPython? Or does it matter > > which version of IronPython I install. The answer seems to be "No" > > because I see those .dll files for IronPython in this folder "C: > > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > > \PythonBinding" which are dated Feb 2009. Guess they're not the > > latest. > > > > Thanks, > > > > Kelie > > > > _______________________________________________ > > 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 > -- http://www.ironpythoninaction.com/ From slide.o.mix at gmail.com Fri Jul 10 23:56:42 2009 From: slide.o.mix at gmail.com (Slide) Date: Fri, 10 Jul 2009 14:56:42 -0700 Subject: [IronPython] "IronPython in Action" and "Pro IronPython" Message-ID: I am assuming the authors of these two books are possibly on this mailing list, so I am not sure if this is really a good question to ask :-) , but can anyone comment on these two books, their accuracy to the latest IronPython versions and how they do at explaining embedding the runtime to make applications scriptable and such? http://www.amazon.com/IronPython-Action-Michael-Foord/dp/1933988339/ref=sr_1_1?ie=UTF8&s=books&qid=1247262876&sr=8-1 http://www.amazon.com/Pro-IronPython-Alan-Harris/dp/1430219629/ref=sr_1_2?ie=UTF8&s=books&qid=1247262876&sr=8-2 Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ From stephen.p.lepisto at intel.com Sat Jul 11 01:05:20 2009 From: stephen.p.lepisto at intel.com (Lepisto, Stephen P) Date: Fri, 10 Jul 2009 16:05:20 -0700 Subject: [IronPython] "IronPython in Action" and "Pro IronPython" In-Reply-To: References: Message-ID: <6AF28EB9F93A354894F2F3916DF6F96E0C75ED781D@orsmsx510.amr.corp.intel.com> "IronPython in Action" does a good job at explaining how to embed IronPython (an entire, lengthy chapter is devoted to it). It answered several questions I had about the process. It does not cover IronPython 2.6, but the approach is, I believe, very similar to 2.0. I have not read "Pro IronPython". -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Slide Sent: Friday, July 10, 2009 2:57 PM To: Discussion of IronPython Subject: [IronPython] "IronPython in Action" and "Pro IronPython" I am assuming the authors of these two books are possibly on this mailing list, so I am not sure if this is really a good question to ask :-) , but can anyone comment on these two books, their accuracy to the latest IronPython versions and how they do at explaining embedding the runtime to make applications scriptable and such? http://www.amazon.com/IronPython-Action-Michael-Foord/dp/1933988339/ref=sr_1_1?ie=UTF8&s=books&qid=1247262876&sr=8-1 http://www.amazon.com/Pro-IronPython-Alan-Harris/dp/1430219629/ref=sr_1_2?ie=UTF8&s=books&qid=1247262876&sr=8-2 Thanks, slide -- slide-o-blog http://slide-o-blog.blogspot.com/ _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From kf9150 at gmail.com Sat Jul 11 06:36:07 2009 From: kf9150 at gmail.com (Kelie) Date: Fri, 10 Jul 2009 21:36:07 -0700 (PDT) Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <56fa314b-622f-46b8-8943-5517a5aae6e0@q11g2000yqi.googlegroups.com> On Jul 10, 6:03?am, Dino Viehland wrote: > In general you need IronPython to be present to run IronPython apps - even > if they're compiled. ?And IronPython will need to be next to the app > unless IronPython has been installed into the GAC (which we do not > do by default). ?Also you probably want to include IronPython.Modules.dll > as well in addition to the DLLs you have here. ?I imagine at some point > in the future we could add some sort of tree shaking compiler support > that links in IronPython w/ the app but we're a ways off from making > that a priority. > > The SharpDevelop specific question I'm less sure about. I installed IronPython 2.01 (the same version that I have on my two computers) on the other computer and it still didn't work. Anything else I should try? Btw, is there a way to post attachment to this mailing list? The program I created is quite simple. Some of you might be able to spot the problem if you see the code. Thanks again. From curt at hagenlocher.org Sat Jul 11 06:46:44 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 10 Jul 2009 21:46:44 -0700 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <56fa314b-622f-46b8-8943-5517a5aae6e0@q11g2000yqi.googlegroups.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <56fa314b-622f-46b8-8943-5517a5aae6e0@q11g2000yqi.googlegroups.com> Message-ID: On Fri, Jul 10, 2009 at 9:36 PM, Kelie wrote: > > Btw, is there a way to post attachment to this mailing list? The > program I created is quite simple. Some of you might be able to spot > the problem if you see the code. Thanks again. It would probably be more immediately useful if you were to provide the specific error message and a listing of the directory from which you're trying to run the program. Given that it works on at least one machine, it's likely to be context-related rather than code-related. -- Curt Hagenlocher curt at hagenlocher.org From jdhardy at gmail.com Mon Jul 13 03:28:33 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 12 Jul 2009 19:28:33 -0600 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <4A578D78.40804@voidspace.org.uk> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> Message-ID: On Fri, Jul 10, 2009 at 12:50 PM, Michael Foord wrote: > Are there issues around assembly versions and the GAC? I'm thinking > particularly of where newer versions of IronPython are released as drop-in > replacements so the version numbers are not updated. If a previous version > is in the GAC isn't there a likelihood that an application that ships with a > newer version will still load the GAC'd older version... ? > > My *impression* was that adding stuff to the GAC was a recipe for DLL hell > and therefore it was better left to individual users rather than being > automatic on installation. This opinion may be ill-informed however... You just have to be *really* careful with you assembly versions, and what kinds of changes cause a rev of version numbers. However, I don't think it should be the default, but it would be nice to have the option during installation. I think gacutil is only included in the SDK anyway. - Jeff From fuzzyman at voidspace.org.uk Mon Jul 13 13:00:10 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 13 Jul 2009 12:00:10 +0100 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> Message-ID: <4A5B13BA.4040608@voidspace.org.uk> Jeff Hardy wrote: > On Fri, Jul 10, 2009 at 12:50 PM, Michael > Foord wrote: > >> Are there issues around assembly versions and the GAC? I'm thinking >> particularly of where newer versions of IronPython are released as drop-in >> replacements so the version numbers are not updated. If a previous version >> is in the GAC isn't there a likelihood that an application that ships with a >> newer version will still load the GAC'd older version... ? >> >> My *impression* was that adding stuff to the GAC was a recipe for DLL hell >> and therefore it was better left to individual users rather than being >> automatic on installation. This opinion may be ill-informed however... >> > > You just have to be *really* careful with you assembly versions, and > what kinds of changes cause a rev of version numbers. However, I don't > think it should be the default, but it would be nice to have the > option during installation. I think gacutil is only included in the > SDK anyway. > > Right. I think the issue of version numbering is tricky, which is why I'm nervous about IronPython being GAC'd. As an example, the IronPython 2.0.1 and 2.0 assemblies have the same version numbers - and I understand why and don't disagree with this decision - but the net result is that Resolver One required 2.0.1 and would probably fail if the user has 2.0 in the GAC. I certainly wouldn't object to it being an installer option, but it would still make me nervous... :-) Having minor IronPython versions have new assembly versions would probably help - but with the disadvantage that they are no longer drop-in replacements. Michael > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dfugate at microsoft.com Mon Jul 13 18:26:01 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 13 Jul 2009 09:26:01 -0700 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <4A5B13BA.4040608@voidspace.org.uk> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> <4A5B13BA.4040608@voidspace.org.uk> Message-ID: On a related note, I strongly suspect we'll be using different assembly version numbers for IronPython 2.6.0/2.6.1/etc... Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, July 13, 2009 4:00 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop Jeff Hardy wrote: > On Fri, Jul 10, 2009 at 12:50 PM, Michael > Foord wrote: > >> Are there issues around assembly versions and the GAC? I'm thinking >> particularly of where newer versions of IronPython are released as drop-in >> replacements so the version numbers are not updated. If a previous version >> is in the GAC isn't there a likelihood that an application that ships with a >> newer version will still load the GAC'd older version... ? >> >> My *impression* was that adding stuff to the GAC was a recipe for DLL hell >> and therefore it was better left to individual users rather than being >> automatic on installation. This opinion may be ill-informed however... >> > > You just have to be *really* careful with you assembly versions, and > what kinds of changes cause a rev of version numbers. However, I don't > think it should be the default, but it would be nice to have the > option during installation. I think gacutil is only included in the > SDK anyway. > > Right. I think the issue of version numbering is tricky, which is why I'm nervous about IronPython being GAC'd. As an example, the IronPython 2.0.1 and 2.0 assemblies have the same version numbers - and I understand why and don't disagree with this decision - but the net result is that Resolver One required 2.0.1 and would probably fail if the user has 2.0 in the GAC. I certainly wouldn't object to it being an installer option, but it would still make me nervous... :-) Having minor IronPython versions have new assembly versions would probably help - but with the disadvantage that they are no longer drop-in replacements. Michael > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Tue Jul 14 14:51:00 2009 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 14 Jul 2009 06:51:00 -0600 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> <4A5B13BA.4040608@voidspace.org.uk> Message-ID: On Mon, Jul 13, 2009 at 10:26 AM, Dave Fugate wrote: > On a related note, I strongly suspect we'll be using different assembly version numbers for IronPython 2.6.0/2.6.1/etc... I'd prefer not to have to respin NWSGI for every minor version of IronPython. I know about assemblyBinding, and I can make it work, but it hurts the user experience having to know exactly what version of IronPython is installed. This isn't the case for CPython, where extensions target the 2.6 version only, no 2.6.2. I see it as similar to the .NET FX service packs - the assembly versions remain the same, even though there are changes to the assembly, and it seems to work out (mostly, anyway). Does anyone know if there's a way, in a .config file, to tell .NET to use a local copy instead of the GAC? Some combination of assemblyBinding elemnts should do it, but I'm unable to try right now. - Jeff From simon.dahlbacka at gmail.com Tue Jul 14 14:56:11 2009 From: simon.dahlbacka at gmail.com (Simon Dahlbacka) Date: Tue, 14 Jul 2009 15:56:11 +0300 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> <4A5B13BA.4040608@voidspace.org.uk> Message-ID: <57124720907140556h43ff3a8aja8aa18cc6fe7dc24@mail.gmail.com> On Mon, Jul 13, 2009 at 7:26 PM, Dave Fugate wrote: > On a related note, I strongly suspect we'll be using different assembly > version numbers for IronPython 2.6.0/2.6.1/etc... > > Can't you update AssemblyFileVersion and leave AssemblyVersion or is there a problem with that too? > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, July 13, 2009 4:00 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Problem with Creating Executable using > SharpDevelop > > Jeff Hardy wrote: > > On Fri, Jul 10, 2009 at 12:50 PM, Michael > > Foord wrote: > > > >> Are there issues around assembly versions and the GAC? I'm thinking > >> particularly of where newer versions of IronPython are released as > drop-in > >> replacements so the version numbers are not updated. If a previous > version > >> is in the GAC isn't there a likelihood that an application that ships > with a > >> newer version will still load the GAC'd older version... ? > >> > >> My *impression* was that adding stuff to the GAC was a recipe for DLL > hell > >> and therefore it was better left to individual users rather than being > >> automatic on installation. This opinion may be ill-informed however... > >> > > > > You just have to be *really* careful with you assembly versions, and > > what kinds of changes cause a rev of version numbers. However, I don't > > think it should be the default, but it would be nice to have the > > option during installation. I think gacutil is only included in the > > SDK anyway. > > > > > > Right. I think the issue of version numbering is tricky, which is why > I'm nervous about IronPython being GAC'd. > > As an example, the IronPython 2.0.1 and 2.0 assemblies have the same > version numbers - and I understand why and don't disagree with this > decision - but the net result is that Resolver One required 2.0.1 and > would probably fail if the user has 2.0 in the GAC. > > I certainly wouldn't object to it being an installer option, but it > would still make me nervous... :-) > > Having minor IronPython versions have new assembly versions would > probably help - but with the disadvantage that they are no longer > drop-in replacements. > > > Michael > > > - Jeff > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dfugate at microsoft.com Tue Jul 14 18:54:22 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Tue, 14 Jul 2009 09:54:22 -0700 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <57124720907140556h43ff3a8aja8aa18cc6fe7dc24@mail.gmail.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <1A472770E042064698CB5ADC83A12ACD0344EDB7@TK5EX14MBXC116.redmond.corp.microsoft.com> <4A578D78.40804@voidspace.org.uk> <4A5B13BA.4040608@voidspace.org.uk> <57124720907140556h43ff3a8aja8aa18cc6fe7dc24@mail.gmail.com> Message-ID: We've kept assembly version numbers the same for 2.0.x (and change the assembly file version for each patch release) so that hosted IronPython applications do not need to be rebuilt for each release. This approach is great as it ensures binary compatibility for compiled applications built on top of IronPython but it also has one major disadvantage: we have to be incredibly conservative in terms of bug fixing for patch releases. This means zero changes to any method signature whether it's in the DLR or IronPython. Also, we outright reject a number of bug fixes for patch releases based on their complexity alone which might cause instability in other areas. Our current 2.6.x planning entails not only fixing a lot of "hard" bugs where the fixes themselves might cause new instability, but also far more bugs than any prior IronPython release series. As such, we need the flexibility to change method signatures (without injecting public API incompatibilities in areas like hosting of course) between patch releases. The safest way to do this for those building compiled applications with IronPython is to rev assembly version numbers for each release of 2.6. Finally, please recall that earlier I said we "strongly suspect" we'll be using different assembly version numbers for 2.6. This isn't set in stone yet:) If you feel strongly on this one way or another, please let us know as this will influence the final decision. Thanks, Dave From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Simon Dahlbacka Sent: Tuesday, July 14, 2009 5:56 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop On Mon, Jul 13, 2009 at 7:26 PM, Dave Fugate > wrote: On a related note, I strongly suspect we'll be using different assembly version numbers for IronPython 2.6.0/2.6.1/etc... Can't you update AssemblyFileVersion and leave AssemblyVersion or is there a problem with that too? -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, July 13, 2009 4:00 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop Jeff Hardy wrote: > On Fri, Jul 10, 2009 at 12:50 PM, Michael > Foord> wrote: > >> Are there issues around assembly versions and the GAC? I'm thinking >> particularly of where newer versions of IronPython are released as drop-in >> replacements so the version numbers are not updated. If a previous version >> is in the GAC isn't there a likelihood that an application that ships with a >> newer version will still load the GAC'd older version... ? >> >> My *impression* was that adding stuff to the GAC was a recipe for DLL hell >> and therefore it was better left to individual users rather than being >> automatic on installation. This opinion may be ill-informed however... >> > > You just have to be *really* careful with you assembly versions, and > what kinds of changes cause a rev of version numbers. However, I don't > think it should be the default, but it would be nice to have the > option during installation. I think gacutil is only included in the > SDK anyway. > > Right. I think the issue of version numbering is tricky, which is why I'm nervous about IronPython being GAC'd. As an example, the IronPython 2.0.1 and 2.0 assemblies have the same version numbers - and I understand why and don't disagree with this decision - but the net result is that Resolver One required 2.0.1 and would probably fail if the user has 2.0 in the GAC. I certainly wouldn't object to it being an installer option, but it would still make me nervous... :-) Having minor IronPython versions have new assembly versions would probably help - but with the disadvantage that they are no longer drop-in replacements. Michael > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Wed Jul 15 01:42:22 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Tue, 14 Jul 2009 16:42:22 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56486. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/Microsoft.Scripting.Debugging.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Microsoft.Scripting.Silverlight.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/Instruction.cs $/IronPython/IronPython_Main/Src/IronPythonTest/IronPythonTest.csproj $/IronPython/IronPython_Main/Src/IronPython.Modules/IronPython.Modules.csproj $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/ArrayUtils.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightCompiler.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/CollectionUtils.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/ContractUtils.cs $/IronPython/IronPython_Main/Src/Tests/ClrAssembly/ClrAssembly.csproj From bernd.viehmann at gmx.net Wed Jul 15 09:31:01 2009 From: bernd.viehmann at gmx.net (Bernd Viehmann) Date: Wed, 15 Jul 2009 09:31:01 +0200 Subject: [IronPython] Q:ASP.NET developing with IPY.Deploying on IIS or Apache? Message-ID: <4A5D85B5.2000903@gmx.net> Hello, I have just finished reading the ASP.NET part in the book "IronPython in Action" which is excellent. I have played a little bit with it using Visual Studio and it ooks like IPY will make the job of developing ASP.NET websites much easier. But unfortunatly in the book is nothing about deploying the work to an IIS web-server. I think this should be fixed in the next version of the book, Micheal & Christian ;-) Even if it might be easy until now I am unable to get things running. So help me please: What must be done when taking the *.aspx.py productive? Can not find an config-tutorial in the web. Is IronPython stable enough to develop larger ASP.NET applications in Python? Is it recommended by Microsoft, or should we wait for .net 4.0? Can it be done on Server 2003 and what IIS version is needed? Can Apache on windows be used also with Mono? And Linux? A lot of questions, I know. So you don't have to answer all of them. I will be happy for every answer that comes :-) Regards Bernd (on the border between Germany and Netherlands) From sanxiyn at gmail.com Wed Jul 15 09:43:07 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 15 Jul 2009 16:43:07 +0900 Subject: [IronPython] FePy status update Message-ID: <5b0248170907150043m3241e1fcmfd48b4d2015ee581@mail.gmail.com> Now I updated FePy's NAnt build file to include newly introduced Microsoft.System.Debugging.dll. I also found that I need to define CLR2 symbol to compile Microsoft.Dynamic.dll. Without the symbol it won't compile. What is the purpose of this symbol? Sorry for the delay, -- Seo Sanghyeon From empirebuilder at gmail.com Wed Jul 15 15:15:01 2009 From: empirebuilder at gmail.com (Dody Gunawinata) Date: Wed, 15 Jul 2009 16:15:01 +0300 Subject: [IronPython] Q:ASP.NET developing with IPY.Deploying on IIS or Apache? In-Reply-To: <4A5D85B5.2000903@gmx.net> References: <4A5D85B5.2000903@gmx.net> Message-ID: <8cd017b80907150615k2eef18f9ia76f4af6461c438b@mail.gmail.com> 1. There is nothing special to make it work on IIS. Simply download http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17613 and run the example which contains all the web.config you need.2. We have been using it extensively for the past 2 years on production. The latest version is stable. There's no need to wait for .Net 4.0 3. It works on IIS 6.0 and 7.0 on Windows 2003 32/64 bit and Windows 2008 32/64 bit. 4. Not sure about the apache scenario. On Wed, Jul 15, 2009 at 10:31 AM, Bernd Viehmann wrote: > Hello, > > I have just finished reading the ASP.NET part in the book "IronPython in > Action" which is excellent. I have played a little bit with it using Visual > Studio and it ooks like IPY will make the job of developing ASP.NETwebsites much easier. But unfortunatly in the book is nothing about > deploying the work to an IIS web-server. I think this should be fixed in the > next version of the book, Micheal & Christian ;-) Even if it might be easy > until now I am unable to get things running. > > So help me please: > > What must be done when taking the *.aspx.py productive? Can not find an > config-tutorial in the web. > Is IronPython stable enough to develop larger ASP.NET applications in > Python? Is it recommended by Microsoft, or should we wait for .net 4.0? > Can it be done on Server 2003 and what IIS version is needed? > Can Apache on windows be used also with Mono? And Linux? > > A lot of questions, I know. So you don't have to answer all of them. I will > be happy for every answer that comes :-) > > Regards > > Bernd (on the border between Germany and Netherlands) > > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- nomadlife.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From mads.weitling at gmail.com Wed Jul 15 16:57:11 2009 From: mads.weitling at gmail.com (Mads Weitling) Date: Wed, 15 Jul 2009 16:57:11 +0200 Subject: [IronPython] sys.builtin_module_names and embedding Message-ID: I am trying to run som IronPython code using the 2.6b1 hosting API but cannot seem to import the basic 'builtins' defined in IronPython.Modules.dll from my IronPython host. When using ipy.exe, things work fine: ipy.exe -v >>> import sys >>> sys.builtin_module_names ('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions', '_weakref', '_struct', '_winreg', '_warnings', '_sre', '_random', '_functools', 'xxsubtype', 'time', 'thread', '_heapq', '_ctypes_test', '_ctypes', 'socket', '_sha512', '_sha256', '_sha', 'select', 're', 'operator', 'nt', '_md5', 'math', 'marshal', '_locale', 'itertools', 'imp', 'gc', 'errno', 'datetime', 'cStringIO', 'cPickle', 'copy_reg', '_collections', '_codecs', 'cmath', 'binascii', 'array') Running from an embedded IronPython, I see only a few builtins: ('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions') How can I make the missing builtins available to my embedded interpreter? /Mads -------------- next part -------------- An HTML attachment was scrubbed... URL: From merllab at microsoft.com Wed Jul 15 17:52:53 2009 From: merllab at microsoft.com (merllab at microsoft.com) Date: Wed, 15 Jul 2009 08:52:53 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56532. ADDED SOURCES $/IronPython/IronPython_Main/Src/Tests/plans/generic_plan_template.py MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Tests/plans/generic_plan_template.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 996184 Date: 7/14/2009 5:59:01 PM generic_plan_template.py, as its name would imply, is a generic test plan template written entirely in Python docstrings. From dinov at microsoft.com Wed Jul 15 18:06:58 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 15 Jul 2009 16:06:58 +0000 Subject: [IronPython] FePy status update In-Reply-To: <5b0248170907150043m3241e1fcmfd48b4d2015ee581@mail.gmail.com> References: <5b0248170907150043m3241e1fcmfd48b4d2015ee581@mail.gmail.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD03477028@TK5EX14MBXC116.redmond.corp.microsoft.com> We recently made the call that Microsoft.Dynamic's API surface would ship in .NET 4 as all internal API surface. It's still open source so anyone can pick it up and include it in their own languages to get COM support but C# needs it in the box somewhere so they can provide COM support as well. But we're not really sure what we want .NET COM support to look like long term yet so we don't want to commit to shipping the API forever just yet. The CLR2 flag allows us to build it as publicly accessible APIs on .NET 2/3/3.5 and build it as internal APIs in our internal builds for .NET 4. ________________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] on behalf of Seo Sanghyeon [sanxiyn at gmail.com] Sent: Wednesday, July 15, 2009 2:43 AM To: Discussion of IronPython Subject: [IronPython] FePy status update Now I updated FePy's NAnt build file to include newly introduced Microsoft.System.Debugging.dll. I also found that I need to define CLR2 symbol to compile Microsoft.Dynamic.dll. Without the symbol it won't compile. What is the purpose of this symbol? Sorry for the delay, -- Seo Sanghyeon _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Wed Jul 15 18:09:26 2009 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 15 Jul 2009 16:09:26 +0000 Subject: [IronPython] sys.builtin_module_names and embedding In-Reply-To: References: Message-ID: <1A472770E042064698CB5ADC83A12ACD03477037@TK5EX14MBXC116.redmond.corp.microsoft.com> IronPython.Modules.dll is probably not being copied for your host application. It should be next to IronPython.dll. If it's not available then we'll just continue to run w/o the modules available. ________________________________ From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] on behalf of Mads Weitling [mads.weitling at gmail.com] Sent: Wednesday, July 15, 2009 9:57 AM To: users at lists.ironpython.com Subject: [IronPython] sys.builtin_module_names and embedding I am trying to run som IronPython code using the 2.6b1 hosting API but cannot seem to import the basic 'builtins' defined in IronPython.Modules.dll from my IronPython host. When using ipy.exe, things work fine: ipy.exe -v >>> import sys >>> sys.builtin_module_names ('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions', '_weakref', '_struct', '_winreg', '_warnings', '_sre', '_random', '_functools', 'xxsubtype', 'time', 'thread', '_heapq', '_ctypes_test', '_ctypes', 'socket', '_sha512', '_sha256', '_sha', 'select', 're', 'operator', 'nt', '_md5', 'math', 'marshal', '_locale', 'itertools', 'imp', 'gc', 'errno', 'datetime', 'cStringIO', 'cPickle', 'copy_reg', '_collections', '_codecs', 'cmath', 'binascii', 'array') Running from an embedded IronPython, I see only a few builtins: ('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions') How can I make the missing builtins available to my embedded interpreter? /Mads -------------- next part -------------- An HTML attachment was scrubbed... URL: From calmasy at gmail.com Wed Jul 15 19:13:14 2009 From: calmasy at gmail.com (=?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?=) Date: Wed, 15 Jul 2009 11:13:14 -0600 Subject: [IronPython] IronPython support needed in MonoDevelop Message-ID: MonoDevelop is the IDE of choice for .NET languages on Linux. But currently there's no IronPython support for it. There are a couple starting points available in the svn sources, but someone would need to take a fresh look at it and write a new IronPython binding. Anyway, if there's any initiative to increase IronPython use on non-Windows platforms, this might be one way to help that. Some references-- * http://monodevelop.com/ * http://lists.ximian.com/pipermail/monodevelop-list/2009-July/009964.html -- Cheers, L?szl? From fuzzyman at voidspace.org.uk Fri Jul 17 14:34:20 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 17 Jul 2009 13:34:20 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A118C55.8020502@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> Message-ID: <4A606FCC.1050609@voidspace.org.uk> I never got a reply to this. The C# code below throws an import error and I want to know if this is my fault or a problem with the IronPython / Silverlight integration. Michael Michael Foord wrote: > Ha - dammit, no. > > With Silverlight this still throws an ImportError when embedded Python > code executed from C# like this tries to import from the xap file. :-( > > Michael > > Michael Foord wrote: >> Thanks to some help from William Reade, this code *seems* to work >> fine. I need to try it from Silverlight and check the Python code it >> contains is able to import: >> >> using System; >> using System.Collections.Generic; >> using System.Text; >> >> >> using IronPython.Hosting; >> using IronPython.Runtime; >> using IronPython.Runtime.Types; >> >> using Microsoft.Scripting; >> using Microsoft.Scripting.Hosting; >> using Microsoft.Scripting.Runtime; >> >> >> namespace ExecutePython >> { >> public class ExecutePython >> { >> static string code = @" >> class Foo(object): >> attribute = 'weeeee' >> >> "; >> public static Scope CreateModule(CodeContext context) >> { >> PythonContext python = PythonContext.GetContext(context); >> >> PythonDictionary globals = new PythonDictionary(); >> globals["__name__"] = "AModule"; >> Scope module = new Scope(globals); >> SourceUnit script = python.CreateSnippet(code, >> SourceCodeKind.Statements); >> script.Execute(module); >> return module; >> } >> } >> } >> >> >> All the best, >> >> >> Michael >> >> >> Michael Foord wrote: >>> Jimmy - did you get a chance to look at this? >>> >>> If the code shown below *genuinely* gets a reference to the current >>> engine then shouldn't the search path be setup already? >>> >>> Can you see what is wrong with the code below? >>> >>> Thanks >>> >>> Michael >>> >>> Michael Foord wrote: >>>> Hello guys, >>>> >>>> I have a second use case for embedding IronPython in Silverlight. >>>> This is actually a dynamic application with a C# component that >>>> needs to programattically build a Python module. >>>> >>>> Again I have the same problem - imports in Python code fail. I >>>> would have expected that accessing the current runtime and fetching >>>> a Python engine would fetch the current Python engine, with the >>>> browser host correctly setup. Unfortunately that seems not to be >>>> the case. Can anyone spot problems with the following code: >>>> >>>> >>>> using Microsoft.Scripting.Silverlight; >>>> using IronPython; >>>> using IronPython.Hosting; >>>> using Microsoft.Scripting; >>>> using Microsoft.Scripting.Hosting; >>>> >>>> namespace EmbeddedSLModule >>>> { >>>> public class EmbeddedSLModule >>>> { >>>> private static string source = @" >>>> import something >>>> "; >>>> public static ScriptScope GetModule(){ >>>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>>> ScriptEngine engine = runtime.GetEngine("Python"); >>>> ScriptScope scope = engine.CreateScope(); >>>> ScriptSource script = >>>> engine.CreateScriptSourceFromString(source, >>>> SourceCodeKind.Statements); >>>> script.Execute(scope); >>>> >>>> return scope; >>>> >>>> } >>>> } >>>> } >>>> >>>> >>>> It works fine for code that doesn't import anything - but imports >>>> from within the xap file fail. >>>> >>>> Thanks >>>> >>>> Michael Foord >>>> >>> >>> >> >> > > -- http://www.ironpythoninaction.com/ From dfugate at microsoft.com Fri Jul 17 20:33:09 2009 From: dfugate at microsoft.com (dfugate at microsoft.com) Date: Fri, 17 Jul 2009 11:33:09 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <9c587447-7cca-4e8d-9546-44d1342e399a@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56669. ADDED SOURCES $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Settings.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicAppManifest.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/BrowserVirtualFilesystem.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicEngine.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.Generated.cs DELETED SOURCES $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Extension.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Configuration.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Package.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/BrowserPAL.cs MODIFIED SOURCES $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Settings.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicAppManifest.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/BrowserVirtualFilesystem.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicEngine.cs $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Repl.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_codecs.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/PointerType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtr.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Field.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/_ctypes.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/UnionType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleCData.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/CFuncPtrType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Array.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/INativeType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/Pointer.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/SimpleType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/ArrayType.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/StructType.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/App.config $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/BrowserScriptHost.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/AppManifestTemplate.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Microsoft.Scripting.Silverlight.csproj $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/ErrorFormatter.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/XapBuilder.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicApplication.cs $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/Chiron.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/IFastInvokable.cs $/IronPython/IronPython_Main/Src/IronPython.Modules/_collections.cs $/IronPython/IronPython_Main/Config/Unsigned/App.config $/IronPython/IronPython_Main/Config/Signed/App.config $/IronPython/IronPython_Main/Src/App.config $/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs $/IronPython/IronPython_Main/Src/AssemblyVersion.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonOptionsParser.cs $/IronPython/IronPython_Main/Src/IronPython/Hosting/PythonCommandLine.cs $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstGenerator.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.Generated.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonOptions.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Calls.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Descriptors.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonDictionary.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/ObjectOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/StringOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/InstanceOps.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/List.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs $/IronPython/IronPython_Main/Src/IronPython/Runtime/Set.cs $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj $/IronPython/IronPython_Main/Readme.html $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Tests/DlrComLibrary/IndexedProp.cpp $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Math/BigInteger.cs $/IronPython/IronPython_Main/Src/Tests/Inputs/RemoteConsole.py $/IronPython/IronPython_Main/Src/Scripts/generate_calls.py $/IronPython/IronPython_Main/Src/Scripts/generate.py $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Debug.out $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleHelp.Release.out $/IronPython/IronPython_Main/Src/Tests/Modes/ConsoleFlags.ps1 $/IronPython/IronPython_Main/Src/Tests/test_class.py $/IronPython/IronPython_Main/Src/Tests/test_str.py $/IronPython/IronPython_Main/Src/Tests/versions/python26.py CHECKIN COMMENTS -------------------------------------------------------------------------------- Changeset Id: 1001128 Date: 7/15/2009 5:31:19 PM (dinov) Fixes: 19585 2.6: object.__init__ should not accept arbitrary arguments (http://bugs.python.org/issue1683368) This adds the appropriate checks to object.__init__. We now cache whether or not __init__ / __new__ is object.__init__ / object.__new__ in types and update it when it changes. We don?t invalidate this cache when the values are deleted to match the current (buggy? I?ve sent a mail to python-dev) CPython behavior. This change also showed several different types that didn?t have their ctors defined quite right. List/set/deque all need new?s. Also added some overloads so that we don?t need to construct params arrays / kw dicts. Switched to using a shared lock when updating subtypes so traversing the subclass hierarchy can?t get into weird lock ordering issues. 23499 String Formatting Operations error PythonDict.TryGetValue should call __missing__ if it?s defined ? this is just moving the code from GetItem. Also adds pre-compiled rules for creating types. The code to support this lives in PythonType.Generated.cs and PythonType becomes IFastInvokable. These support a subset of the full path ? basically just calling classes that only have default ctors where the type may have user defined __new__ or __init__ if they?re just simple functions. Also making the BuiltinFunction?s used to call the base class ctor to be shared between all subtypes. Combined this gives around a 10-15% improvement on ParrotBench which should bring is back to where we were before auto-templating was removed. (Shelveset: TypeCtorsFinal;REDMOND\dinov | SNAP CheckinId: m9707) -------------------------------------------------------------------------------- Changeset Id: 1001127 Date: 7/15/2009 5:29:52 PM (dinov) Updates assembly versions for the 2.6B2 release. Versions are rev?d to 2.6.0.20 / 0.9.6.20. This effects IronPython, DLR (including the inner layer w/ updates to files that don?t effect the System.Core build). (Shelveset: UpdateVersions262_Final;REDMOND\dinov | SNAP CheckinId: m9707) -------------------------------------------------------------------------------- Changeset Id: 1000980 Date: 7/15/2009 4:17:29 PM (dinov) Fixes a few lifetime management issues w/ ctypes and adds a ?X:GCStress command line option to help flush issues like these out. These fixes all come from a run of test_ctypes.py under ?X:GCStress 2 mode. This forces a full gen-2 collection for every single Python statement. For the most part the issues are all things which test_ctypes is actually testing for but we didn?t see before due to our GC taking some time to kick in. There?s still 1 remaining failure under ?X:GCStress mode but that is a test issue (they read from invalid memory and don?t even expect to get a valid value back). This also fixes 64-bit ctypes by properly defining the code in a dynamic method (previously the #ifdef?s were switched so we would define it into a type). To test 64-bit I had to add our own version of _ctypes_test.cpp because the CRT makes picking up and running w/ CPython?s _ctypes_test.pyd I huge pain. We now pass all of the tests on 64-bit. For one of the functions in _ctypes_test I don?t know how to implement it so it just returns the value the test is expecting for the time being. I?ve also fixed print(None). 23132 1 High print(None) broken IronPython\2.6 Beta 2 22900 1 High _ctypes largely broken under x64 OSes IronPython\2.6 dinov_cp (Shelveset: CtypesAndGCStressFinal;REDMOND\dinov | SNAP CheckinId: m9704) -------------------------------------------------------------------------------- Changeset Id: 998550 Date: 7/15/2009 12:50:14 PM (dfugate) Fixed a couple of PoliCheck violations, and we now run PoliCheck on (IronPython) CodePlex zips for every SNAP checkin. (Shelveset: IP_POLI01;REDMOND\dfugate | SNAP CheckinId: 8918) -------------------------------------------------------------------------------- Changeset Id: 996184 Date: 7/14/2009 5:59:01 PM generic_plan_template.py, as its name would imply, is a generic test plan template written entirely in Python docstrings. -------------------------------------------------------------------------------- Changeset Id: 1001127 Date: 7/15/2009 5:29:52 PM (dinov) Updates assembly versions for the 2.6B2 release. Versions are rev?d to 2.6.0.20 / 0.9.6.20. This effects IronPython, DLR (including the inner layer w/ updates to files that don?t effect the System.Core build). (Shelveset: UpdateVersions262_Final;REDMOND\dinov | SNAP CheckinId: m9707) -------------------------------------------------------------------------------- Changeset Id: 997783 Date: 7/15/2009 11:39:21 AM (dfugate) checkin_comments.py: - adjusted get_recent_comments to look for checkin comments in multiple directories within a TFS enlistment - added 'Hosts\Silverlight' to the list of blessed directories that trigger IronPython Mailing List changeset descriptions Added a single whitespace to Hosts\Silverlight\README.markdown to test out the change above. (Shelveset: SL_COMMENTS;REDMOND\dfugate | SNAP CheckinId: 8917) From bruce.bromberek at gmail.com Fri Jul 17 22:07:56 2009 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Fri, 17 Jul 2009 15:07:56 -0500 Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> Message-ID: <58ad4a110907171307o5db93cdcnea0ff80ba83154ff@mail.gmail.com> Kelie- I just went through this process recently myself. My rules of thumb are as follows: *When building the App:* Look at your references to the 5 ironpython DLLs. Decide right now: Are you going to use the ones that ship with SharpDevelop or the ones using that come with IronPython. Choose one and be consistent. I'm still working though how to Build a WIX installer project , so I currently ZIP up the release folder generated by SharpDevelop and make sure everything is there. Here's an example for a simple program I have distributed to coworkers. AIIMTool.dll AIIMTool.exe ICSharpCode.SharpZipLib.dll IronMath.dll IronPython.dll IronPython.Modules.dll IronPythonTest.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll * Make sure the Target machine has been upgraded to .Net 3.5 SP1. Don't take any flack - make them upgrade.* *Make sure they are not running on a network share. Weird things with trust can happen with shares. See my recent cry for help on this list for more info.* -Bruce On Fri, Jul 10, 2009 at 1:34 AM, Kelie wrote: > Hello, > > I created a simple program with a few buttons, checkboxes, textboxes, > etc. and it worked fine. The form was created in the latest > SharpDevelop beta version (Version : 3.1.0.4077). Then I compiled the > solution. In the release folder there were these files: > > IronPython.dll > ManningsSolver.dll > ManningsSolver.exe > Microsoft.Scripting.Core.dll > Microsoft.Scripting.dll > Microsoft.Scripting.ExtensionAttribute.dll > > When tried on two computers with IronPython installed and with the > source code files, the program worked. But it failed on another > computer that does not have these. And error message was very > generic .NET error. I don't exactly remember what it was. Is this > normal? > > Btw, since I have SharpDevelop installed, do I have to install > IronPython in order to write programs in IronPython? Or does it matter > which version of IronPython I install. The answer seems to be "No" > because I see those .dll files for IronPython in this folder "C: > \Program Files\SharpDevelop\3.0\AddIns\AddIns\BackendBindings > \PythonBinding" which are dated Feb 2009. Guess they're not the > latest. > > Thanks, > > Kelie > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jul 17 22:55:02 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 17 Jul 2009 21:55:02 +0100 Subject: [IronPython] Issue 22239 closed as 'by design' Message-ID: <4A60E526.1060705@voidspace.org.uk> Issue 22239 has been closed as 'by design'. http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22239&ProjectName=IronPython Dino described this as a serious bug when it was pointed out and it is both extremely unintuitive and problematic - why should separate scopes (modules) be linked this way when used from the hosting API? This seems like a very odd decision. All the best, Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From Jimmy.Schementi at microsoft.com Fri Jul 17 23:22:25 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 17 Jul 2009 21:22:25 +0000 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <4A606FCC.1050609@voidspace.org.uk> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> <4A606FCC.1050609@voidspace.org.uk> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18B55E18@tk5ex14mbxc105.redmond.corp.microsoft.com> Michael, Oh, sorry to leave you hanging. Here's a SL3 VS solution which imports a python file from C#: http://jimmy.schementi.com/silverlight/foord-repro.zip // App.xaml.cs public class EmbeddedSLModule { public static ScriptScope GetModule() { var pyfile = "toimport.py"; ScriptEngine engine = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)).GetEngine("IronPython"); var code = new XapVirtualFilesystem().GetFileContents(pyfile); ScriptScope scope = engine.CreateScope(); ScriptSource script = engine.CreateScriptSourceFromString(code, pyfile); script.Execute(scope); return scope; } } # toimport.py import something # something.py import clr clr.AddReference("System.Windows") from System.Windows import Application Application.Current.RootVisual.FindName("Message").Text = "Hi from IronPython!" The binaries are the latest in the IronPython codeplex source tree, but are also included in the zip. For the "CreateModule" example, where does that have to do with importing from the XAP file? If you give me an example working on the desktop, I'll see if any modifications need to be made to work in SL, but if this doesn't work in SL it would seem to be a bug in IronPython. ~js > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Michael Foord > Sent: Friday, July 17, 2009 5:34 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) > > I never got a reply to this. The C# code below throws an import error and I > want to know if this is my fault or a problem with the IronPython / Silverlight > integration. > > Michael > > Michael Foord wrote: > > Ha - dammit, no. > > > > With Silverlight this still throws an ImportError when embedded Python > > code executed from C# like this tries to import from the xap file. :-( > > > > Michael > > > > Michael Foord wrote: > >> Thanks to some help from William Reade, this code *seems* to work > >> fine. I need to try it from Silverlight and check the Python code it > >> contains is able to import: > >> > >> using System; > >> using System.Collections.Generic; > >> using System.Text; > >> > >> > >> using IronPython.Hosting; > >> using IronPython.Runtime; > >> using IronPython.Runtime.Types; > >> > >> using Microsoft.Scripting; > >> using Microsoft.Scripting.Hosting; > >> using Microsoft.Scripting.Runtime; > >> > >> > >> namespace ExecutePython > >> { > >> public class ExecutePython > >> { > >> static string code = @" > >> class Foo(object): > >> attribute = 'weeeee' > >> > >> "; > >> public static Scope CreateModule(CodeContext context) > >> { > >> PythonContext python = PythonContext.GetContext(context); > >> > >> PythonDictionary globals = new PythonDictionary(); > >> globals["__name__"] = "AModule"; > >> Scope module = new Scope(globals); > >> SourceUnit script = python.CreateSnippet(code, > >> SourceCodeKind.Statements); > >> script.Execute(module); > >> return module; > >> } > >> } > >> } > >> > >> > >> All the best, > >> > >> > >> Michael > >> > >> > >> Michael Foord wrote: > >>> Jimmy - did you get a chance to look at this? > >>> > >>> If the code shown below *genuinely* gets a reference to the current > >>> engine then shouldn't the search path be setup already? > >>> > >>> Can you see what is wrong with the code below? > >>> > >>> Thanks > >>> > >>> Michael > >>> > >>> Michael Foord wrote: > >>>> Hello guys, > >>>> > >>>> I have a second use case for embedding IronPython in Silverlight. > >>>> This is actually a dynamic application with a C# component that > >>>> needs to programattically build a Python module. > >>>> > >>>> Again I have the same problem - imports in Python code fail. I > >>>> would have expected that accessing the current runtime and fetching > >>>> a Python engine would fetch the current Python engine, with the > >>>> browser host correctly setup. Unfortunately that seems not to be > >>>> the case. Can anyone spot problems with the following code: > >>>> > >>>> > >>>> using Microsoft.Scripting.Silverlight; using IronPython; using > >>>> IronPython.Hosting; using Microsoft.Scripting; using > >>>> Microsoft.Scripting.Hosting; > >>>> > >>>> namespace EmbeddedSLModule > >>>> { > >>>> public class EmbeddedSLModule > >>>> { > >>>> private static string source = @" > >>>> import something > >>>> "; > >>>> public static ScriptScope GetModule(){ > >>>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; > >>>> ScriptEngine engine = runtime.GetEngine("Python"); > >>>> ScriptScope scope = engine.CreateScope(); > >>>> ScriptSource script = > >>>> engine.CreateScriptSourceFromString(source, > >>>> SourceCodeKind.Statements); > >>>> script.Execute(scope); > >>>> > >>>> return scope; > >>>> > >>>> } > >>>> } > >>>> } > >>>> > >>>> > >>>> It works fine for code that doesn't import anything - but imports > >>>> from within the xap file fail. > >>>> > >>>> Thanks > >>>> > >>>> Michael Foord > >>>> > >>> > >>> > >> > >> > > > > > > > -- > http://www.ironpythoninaction.com/ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From fuzzyman at voidspace.org.uk Fri Jul 17 23:24:27 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 17 Jul 2009 22:24:27 +0100 Subject: [IronPython] Access to current Python engine in C# (Silverlight) In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18B55E18@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <4A0581F2.6010603@voidspace.org.uk> <4A102CD2.40108@voidspace.org.uk> <4A11811D.7010406@voidspace.org.uk> <4A118C55.8020502@voidspace.org.uk> <4A606FCC.1050609@voidspace.org.uk> <0047ECBFA2E0DF4A834AA369282A5AFC18B55E18@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <4A60EC0B.5020502@voidspace.org.uk> Jimmy Schementi wrote: > Michael, > > Oh, sorry to leave you hanging. Here's a SL3 VS solution which imports a python file from C#: http://jimmy.schementi.com/silverlight/foord-repro.zip > Thanks - the goal is actually to import a Python module using the *current* Python engine without creating a new one (hence the use of the PythonContext). Thanks Michael > // App.xaml.cs > public class EmbeddedSLModule { > public static ScriptScope GetModule() { > var pyfile = "toimport.py"; > ScriptEngine engine = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)).GetEngine("IronPython"); > var code = new XapVirtualFilesystem().GetFileContents(pyfile); > ScriptScope scope = engine.CreateScope(); > ScriptSource script = engine.CreateScriptSourceFromString(code, pyfile); > script.Execute(scope); > return scope; > } > } > > > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" > > > > > > > # toimport.py > import something > > # something.py > import clr > clr.AddReference("System.Windows") > from System.Windows import Application > Application.Current.RootVisual.FindName("Message").Text = "Hi from IronPython!" > > The binaries are the latest in the IronPython codeplex source tree, but are also included in the zip. > > For the "CreateModule" example, where does that have to do with importing from the XAP file? If you give me an example working on the desktop, I'll see if any modifications need to be made to work in SL, but if this doesn't work in SL it would seem to be a bug in IronPython. > > ~js > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Michael Foord >> Sent: Friday, July 17, 2009 5:34 AM >> To: Discussion of IronPython >> Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) >> >> I never got a reply to this. The C# code below throws an import error and I >> want to know if this is my fault or a problem with the IronPython / Silverlight >> integration. >> >> Michael >> >> Michael Foord wrote: >> >>> Ha - dammit, no. >>> >>> With Silverlight this still throws an ImportError when embedded Python >>> code executed from C# like this tries to import from the xap file. :-( >>> >>> Michael >>> >>> Michael Foord wrote: >>> >>>> Thanks to some help from William Reade, this code *seems* to work >>>> fine. I need to try it from Silverlight and check the Python code it >>>> contains is able to import: >>>> >>>> using System; >>>> using System.Collections.Generic; >>>> using System.Text; >>>> >>>> >>>> using IronPython.Hosting; >>>> using IronPython.Runtime; >>>> using IronPython.Runtime.Types; >>>> >>>> using Microsoft.Scripting; >>>> using Microsoft.Scripting.Hosting; >>>> using Microsoft.Scripting.Runtime; >>>> >>>> >>>> namespace ExecutePython >>>> { >>>> public class ExecutePython >>>> { >>>> static string code = @" >>>> class Foo(object): >>>> attribute = 'weeeee' >>>> >>>> "; >>>> public static Scope CreateModule(CodeContext context) >>>> { >>>> PythonContext python = PythonContext.GetContext(context); >>>> >>>> PythonDictionary globals = new PythonDictionary(); >>>> globals["__name__"] = "AModule"; >>>> Scope module = new Scope(globals); >>>> SourceUnit script = python.CreateSnippet(code, >>>> SourceCodeKind.Statements); >>>> script.Execute(module); >>>> return module; >>>> } >>>> } >>>> } >>>> >>>> >>>> All the best, >>>> >>>> >>>> Michael >>>> >>>> >>>> Michael Foord wrote: >>>> >>>>> Jimmy - did you get a chance to look at this? >>>>> >>>>> If the code shown below *genuinely* gets a reference to the current >>>>> engine then shouldn't the search path be setup already? >>>>> >>>>> Can you see what is wrong with the code below? >>>>> >>>>> Thanks >>>>> >>>>> Michael >>>>> >>>>> Michael Foord wrote: >>>>> >>>>>> Hello guys, >>>>>> >>>>>> I have a second use case for embedding IronPython in Silverlight. >>>>>> This is actually a dynamic application with a C# component that >>>>>> needs to programattically build a Python module. >>>>>> >>>>>> Again I have the same problem - imports in Python code fail. I >>>>>> would have expected that accessing the current runtime and fetching >>>>>> a Python engine would fetch the current Python engine, with the >>>>>> browser host correctly setup. Unfortunately that seems not to be >>>>>> the case. Can anyone spot problems with the following code: >>>>>> >>>>>> >>>>>> using Microsoft.Scripting.Silverlight; using IronPython; using >>>>>> IronPython.Hosting; using Microsoft.Scripting; using >>>>>> Microsoft.Scripting.Hosting; >>>>>> >>>>>> namespace EmbeddedSLModule >>>>>> { >>>>>> public class EmbeddedSLModule >>>>>> { >>>>>> private static string source = @" >>>>>> import something >>>>>> "; >>>>>> public static ScriptScope GetModule(){ >>>>>> ScriptRuntime runtime = DynamicApplication.Current.Runtime; >>>>>> ScriptEngine engine = runtime.GetEngine("Python"); >>>>>> ScriptScope scope = engine.CreateScope(); >>>>>> ScriptSource script = >>>>>> engine.CreateScriptSourceFromString(source, >>>>>> SourceCodeKind.Statements); >>>>>> script.Execute(scope); >>>>>> >>>>>> return scope; >>>>>> >>>>>> } >>>>>> } >>>>>> } >>>>>> >>>>>> >>>>>> It works fine for code that doesn't import anything - but imports >>>>>> from within the xap file fail. >>>>>> >>>>>> Thanks >>>>>> >>>>>> Michael Foord >>>>>> >>>>>> >>>>> >>>> >>> >> -- >> http://www.ironpythoninaction.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 > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From curt at hagenlocher.org Fri Jul 17 23:26:18 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 17 Jul 2009 14:26:18 -0700 Subject: [IronPython] Issue 22239 closed as 'by design' In-Reply-To: <4A60E526.1060705@voidspace.org.uk> References: <4A60E526.1060705@voidspace.org.uk> Message-ID: I believe this was fixed for 2.6, but that the fix is too disruptive to backport (by a long shot!) On Fri, Jul 17, 2009 at 1:55 PM, Michael Foord wrote: > Issue 22239 has been closed as 'by design'. > > > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22239&ProjectName=IronPython > > Dino described this as a serious bug when it was pointed out and it is both > extremely unintuitive and problematic - why should separate scopes (modules) > be linked this way when used from the hosting API? > > This seems like a very odd decision. > > All the best, > > Michael Foord > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri Jul 17 23:27:10 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 17 Jul 2009 22:27:10 +0100 Subject: [IronPython] Issue 22239 closed as 'by design' In-Reply-To: References: <4A60E526.1060705@voidspace.org.uk> Message-ID: <4A60ECAE.801@voidspace.org.uk> Curt Hagenlocher wrote: > I believe this was fixed for 2.6, but that the fix is too disruptive > to backport (by a long shot!) Ah - so it is just the backport that is closed. Fair enough. Sorry for the noise. Michael > > On Fri, Jul 17, 2009 at 1:55 PM, Michael Foord > > wrote: > > Issue 22239 has been closed as 'by design'. > > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22239&ProjectName=IronPython > > > Dino described this as a serious bug when it was pointed out and > it is both extremely unintuitive and problematic - why should > separate scopes (modules) be linked this way when used from the > hosting API? > > This seems like a very odd decision. > > All the best, > > Michael Foord > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > 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 > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Fri Jul 17 23:32:32 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 17 Jul 2009 21:32:32 +0000 Subject: [IronPython] Issue 22239 closed as 'by design' In-Reply-To: <4A60ECAE.801@voidspace.org.uk> References: <4A60E526.1060705@voidspace.org.uk> <4A60ECAE.801@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD03487BD6@TK5EX14MBXC116.redmond.corp.microsoft.com> Michael wrote: > Curt Hagenlocher wrote: > > I believe this was fixed for 2.6, but that the fix is too disruptive > > to backport (by a long shot!) > Ah - so it is just the backport that is closed. Fair enough. Sorry for > the noise. Actually the title is just wrong - this was fixed in 2.0.2 (it's a simpler fix then what went into 2.6 which included some additional cleanup though). From curt at hagenlocher.org Fri Jul 17 23:32:50 2009 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Fri, 17 Jul 2009 14:32:50 -0700 Subject: [IronPython] Issue 22239 closed as 'by design' In-Reply-To: References: <4A60E526.1060705@voidspace.org.uk> Message-ID: ...and here's a reference to the original thread http://www.mail-archive.com/users at lists.ironpython.com/msg08978.html On Fri, Jul 17, 2009 at 2:26 PM, Curt Hagenlocher wrote: > I believe this was fixed for 2.6, but that the fix is too disruptive to > backport (by a long shot!) > > > On Fri, Jul 17, 2009 at 1:55 PM, Michael Foord wrote: > >> Issue 22239 has been closed as 'by design'. >> >> >> http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22239&ProjectName=IronPython >> >> Dino described this as a serious bug when it was pointed out and it is >> both extremely unintuitive and problematic - why should separate scopes >> (modules) be linked this way when used from the hosting API? >> >> This seems like a very odd decision. >> >> All the best, >> >> Michael Foord >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> 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 jwiles at webworks.com Sat Jul 18 00:04:55 2009 From: jwiles at webworks.com (Jesse Wiles) Date: Fri, 17 Jul 2009 17:04:55 -0500 Subject: [IronPython] How to set __name__ for scriptengine instance? Message-ID: <6a6c05630907171504x36178aecm5ed4b80372cd202@mail.gmail.com> Hi, I looked in the archives a bit but nothing jumped out. I'm trying to figure out how to set the __name__ for an embedded engine instance. Here's what I'm working with... // I'm guessing here; not sure what these options should be and it was not obvious in tracing through the source // ?? ? ?Dictionary options = new Dictionary(); ? ? ? options["ExceptionDetail"] = true; ? ? ? options["ShowClrExceptions"] = true; ? ? ? ScriptEngine engine = Python.CreateEngine(options); // Again, grasping at straws... // ? ? ? IAttributesCollection symbols = new SymbolDictionary(); ? ? ? symbols[Symbols.Name] = "__main__"; ? ? ? ScriptScope scope = engine.CreateScope(symbols); ? ? ? scope.SetVariable("MyFooHash", new Dictionary()); ? ? ? engine.ExecuteFile(this.mPathTextBox.Text, scope); Thanks, Jesse Wiles From fuzzyman at voidspace.org.uk Sat Jul 18 00:06:51 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 17 Jul 2009 23:06:51 +0100 Subject: [IronPython] How to set __name__ for scriptengine instance? In-Reply-To: <6a6c05630907171504x36178aecm5ed4b80372cd202@mail.gmail.com> References: <6a6c05630907171504x36178aecm5ed4b80372cd202@mail.gmail.com> Message-ID: <4A60F5FB.3000901@voidspace.org.uk> Jesse Wiles wrote: > Hi, > I looked in the archives a bit but nothing jumped out. I'm trying to > figure out how to set the __name__ for an embedded engine instance. > Here's what I'm working with... > __name__ should be set per scope. How about: scope.SetVariable("__name__", "__main__"); Michael > // I'm guessing here; not sure what these options should be and > it was not obvious in tracing through the source > // > Dictionary options = new Dictionary(); > options["ExceptionDetail"] = true; > options["ShowClrExceptions"] = true; > > ScriptEngine engine = Python.CreateEngine(options); > > // Again, grasping at straws... > // > IAttributesCollection symbols = new SymbolDictionary(); > symbols[Symbols.Name] = "__main__"; > ScriptScope scope = engine.CreateScope(symbols); > > scope.SetVariable("MyFooHash", new Dictionary()); > > engine.ExecuteFile(this.mPathTextBox.Text, scope); > > Thanks, > Jesse Wiles > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From dinov at microsoft.com Sat Jul 18 00:12:19 2009 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 17 Jul 2009 22:12:19 +0000 Subject: [IronPython] How to set __name__ for scriptengine instance? In-Reply-To: <4A60F5FB.3000901@voidspace.org.uk> References: <6a6c05630907171504x36178aecm5ed4b80372cd202@mail.gmail.com> <4A60F5FB.3000901@voidspace.org.uk> Message-ID: <1A472770E042064698CB5ADC83A12ACD03487EC6@TK5EX14MBXC116.redmond.corp.microsoft.com> Michael wrote: > > Jesse Wiles wrote: > > Hi, > > I looked in the archives a bit but nothing jumped out. I'm trying to > > figure out how to set the __name__ for an embedded engine instance. > > Here's what I'm working with... > > > > __name__ should be set per scope. How about: > > scope.SetVariable("__name__", "__main__"); > The one gotcha here is that for a SourceCodeKind of File we will set __name__ in the generated code. Instead creating the code like: var code = Engine.CreateScriptSourceFromFile(filename, Encoding.Default, SourceCodeKind.Statements); code.Execute(scope); should result in __name__ not being overwritten. From dfugate at microsoft.com Sat Jul 18 00:33:44 2009 From: dfugate at microsoft.com (dfugate at microsoft.com) Date: Fri, 17 Jul 2009 15:33:44 -0700 Subject: [IronPython] IronPython 2.6 CodePlex Source Update Message-ID: <55073be0-dcae-44d3-b406-b6e66baa5be2@tk5-exsmh-c102.redmond.corp.microsoft.com> This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/56686. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython.Modules/_ctypes/NativeFunctions.cs From freecode at cox.net Sat Jul 18 06:34:50 2009 From: freecode at cox.net (Brian Parma) Date: Fri, 17 Jul 2009 21:34:50 -0700 Subject: [IronPython] IronPython+Gtk#+.NET? Message-ID: <4A6150EA.70107@cox.net> I've been trying to make a simple IronPython+Gtk# app that draws an image to the screen, and I'm having trouble getting it to run in windows (.NET). It's pretty simple so I attached it at the end. It runs fine in Mono on Ubuntu and Windows, but when I try to run it on windows using .NET I get the following error followed by a really long calltrace: Marshaling expose_event signal Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.Reflection.TargetInvocationException: Exception has been thrown by the ta rget of an invocation. ---> System.NotSupportedException: The invoked member is not supported in a dynamic assembly. at System.Reflection.Emit.AssemblyBuilder.get_Location() at GLib.GType.LookupType(IntPtr typeid) at ... I have the latest 'Gtk# for .NET' package from the Mono site, and I've tried with IP 2.0.1 and IP 2.6 Beta, they give the same results. I rewrote the program in C# and it works fine in .NET (without Mono), using #Develop IDE. Is this possible? code: import clr clr.AddReference('gtk-sharp') clr.AddReference('gdk-sharp') import Gtk import Gdk class MyWindow(Gtk.Window): def __init__(self, title='Main Window'): Gtk.Window.__init__(self, title) self.pb = Gdk.Pixbuf('image.jpg').ScaleSimple(600,436, Gdk.InterpType.Bilinear ) self.da = Gtk.DrawingArea() self.da.SetSizeRequest(self.pb.Width, self.pb.Height) self.Add(self.da) self.Decorated = False self.DeleteEvent += self.delete_event self.da.ExposeEvent += self.expose_event def expose_event(self, *args): self.da.GdkWindow.DrawPixbuf( self.Style.BackgroundGC(self.State), self.pb, 0, 0, 0, 0,-1, -1, Gdk.RgbDither.None, 0, 0) def delete_event(self, *args): Gtk.Application.Quit() if __name__ in ['__main__','Program']: Gtk.Application.Init() mw = MyWindow('Test') mw.ShowAll() Gtk.Application.Run() From calmasy at gmail.com Sat Jul 18 08:32:04 2009 From: calmasy at gmail.com (=?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?=) Date: Sat, 18 Jul 2009 00:32:04 -0600 Subject: [IronPython] Trying to set field to bool, get "TypeError: Argument cannot be null." Message-ID: I need some help understanding what I'm doing wrong here. Settings.ALWAYS_DECODE_OBJECTS is set in C# like the following: public bool ALWAYS_DECODE_OBJECTS = true; But trying to set it to "True" in IPy blows up with the following traceback: IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1433 Type "help", "copyright", "credits" or "license" for more information. >>> import clr >>> clr.AddReference("OpenMetaverse.dll") >>> clr.AddReference("OpenMetaverseTypes.dll") >>> from OpenMetaverse import * >>> >>> Settings.ALWAYS_DECODE_OBJECTS = True Traceback (most recent call last): File "", line 1, in File "Microsoft.Scripting.Core", line unknown, in Convert File "Microsoft.Scripting.Core", line unknown, in Convert File "Microsoft.Scripting.Core", line unknown, in RequiresCanRead TypeError: Argument cannot be null. Parameter name: expression >>> -- Cheers, L?szl? From Jimmy.Schementi at microsoft.com Sat Jul 18 12:34:20 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sat, 18 Jul 2009 10:34:20 +0000 Subject: [IronPython] [Code Review] "XAP-less" Silverlight application support Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18B56732@tk5ex14mbxc105.redmond.corp.microsoft.com> (Sending this review broadly as it shows a new direction DLR Silverlight apps are taking) http://github.com/jschementi/ironruby/commit/da6b54e226adfd3a18d8ad98d618c2350ebd8351 Beginnings of "XAP-less" Silverlight application support. Note: Silverlight apps are *required* to have a XAP file, but with this change it can get down to just a container for the AppManifest.xaml file. Python/Ruby would ship with a single XAP file pointing to the .slvx files for a given release. Adds a "downloadScripts" initParam to indicate whether paths to script files and XAML files should be resolved to the web-server (relative to the XAP), if the file is not found in the XAP. Also adds "downloadScriptsFrom" to customize what path they are based off of. Because of the opt-in nature of this change, existing DLR Silverlight apps should not break. Files are downloaded synchronously as code runs, by having the PlatformAdaptationLayer use a new BrowserVirtualFilesystem: HttpVirtualFilesystem. So when a language's include mechanism is used (require , load, import, etc), it will download the file by using XmlHttpRequest in synchronous mode. It will also cache each downloaded file's contents, so a file will only be downloaded once, even if it is included multiple times. Note: future work will hopefully allow asynchronous includes, so this can be production-ready. For now, it should only be used for development. Note: this change decreases the need for Chiron significantly. In this mode, Chiron only creates a XAP file with the necessary assemblies and AppManifest.xaml, if it doesn't exist already. One could imagine providing a XAP file for each language, and then Chiron wouldn't be needed for development. However, for using the latest language assemblies, and auto-detection of languages used, it's still useful for development. So some changes have been made to Chiron to support this better: A "localApplicationRoot" appSetting has been added to Chiron to adjust where it looks for script files (when determining what languages are used). This allows you to make sure Chiron is looking in the same place your application is downloading scripts or xaml from, so it can still generate a correct XAP file for you. "application/ruby" and "application/python" mime-types have been also added to Chiron also to enable downloading of those script files. All of Chiron's appSettings are now override-able as command-line switches: /u[rlPrefix], /e[xtUrlPrefix], /l[ocalAppRoot] Run Merlin/Main/Hosts/SilverLight/Tests/tests/manual/test_foox/run.bat for an example of how this works (it requires a Silverlight Debug build, so if you run Merlin/Main/Languages/Ruby/Scripts/Dev.bat, just run "bsd" and that will *b*uild *s*ilverlight in *d*ebug mode) Adds a stub for similar support through IsolatedStorage, but that will come later. Also tweaks the DynamicEngine.CreateRuntimeSetup method to better support other DLR-hosts in Silverlight (http://lists.ironpython.com/pipermail/users-ironpython.com/2009-July/010780.html). -------------- next part -------------- A non-text attachment was scrubbed... Name: da6b54e226adfd3a18d8ad98d618c2350ebd8351.patch Type: application/octet-stream Size: 32900 bytes Desc: da6b54e226adfd3a18d8ad98d618c2350ebd8351.patch URL: From dinov at microsoft.com Sat Jul 18 20:45:54 2009 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 18 Jul 2009 18:45:54 +0000 Subject: [IronPython] Trying to set field to bool, get "TypeError: Argument cannot be null." In-Reply-To: References: Message-ID: <1A472770E042064698CB5ADC83A12ACD0348F03C@TK5EX14MBXC116.redmond.corp.microsoft.com> I think you need an instance of Settings - e.g. Settings().ALWAYS_DECODE_OBJECTS. That being said the exception you're getting is a bug - it should be telling you that you need an instance. I've created bug 23545: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23545 > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Count L?szl? de Alm?sy > Sent: Friday, July 17, 2009 11:32 PM > To: users at lists.ironpython.com > Subject: [IronPython] Trying to set field to bool, get "TypeError: > Argument cannot be null." > > I need some help understanding what I'm doing wrong here. > Settings.ALWAYS_DECODE_OBJECTS is set in C# like the following: > > public bool ALWAYS_DECODE_OBJECTS = true; > > But trying to set it to "True" in IPy blows up with the following > traceback: > > IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1433 > Type "help", "copyright", "credits" or "license" for more information. > >>> import clr > >>> clr.AddReference("OpenMetaverse.dll") > >>> clr.AddReference("OpenMetaverseTypes.dll") > >>> from OpenMetaverse import * > >>> > >>> Settings.ALWAYS_DECODE_OBJECTS = True > Traceback (most recent call last): > File "", line 1, in > File "Microsoft.Scripting.Core", line unknown, in Convert > File "Microsoft.Scripting.Core", line unknown, in Convert > File "Microsoft.Scripting.Core", line unknown, in RequiresCanRead > TypeError: Argument cannot be null. > Parameter name: expression > >>> > > -- > Cheers, L?szl? > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Sat Jul 18 21:00:24 2009 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 18 Jul 2009 19:00:24 +0000 Subject: [IronPython] IronPython+Gtk#+.NET? In-Reply-To: <4A6150EA.70107@cox.net> References: <4A6150EA.70107@cox.net> Message-ID: <1A472770E042064698CB5ADC83A12ACD0348F14B@TK5EX14MBXC116.redmond.corp.microsoft.com> >From the stack trace this looks like it's Gtk# not interacting well w/ dynamic defined subclasses on .NET. My guess here is it's because IronPython defines a subclass of Gtk.Window which lives in an AssemblyBuilder instance. This is an in-memory only assembly and therefore .NET throws NotSupportedException when you try and get the location. Mono probably returns some value - that value may or may not make sense instead but at least it lets other code muddle along. Given that this works on Mono my guess is the location isn't all that important to Gtk here or they're handling the odd value Mono returns already. So the correct thing would be either for Mono to throw the same exception and Gtk# to deal w/ that, for Gtk# to deal w/ both, or for .NET to not throw the exception and return a value like Mono does. I'm not sure which one of those it is but the good news is it should be easy to work around in the latest IronPython. That's because we have a pre-compiled types feature that's new in IronPython 2.6. It's primarily there for startup perf but it should work for this too. You can probably just do: import clr clr.AddReference('gtk-sharp') import Gtk class MyWindow(Gtk.Window): pass clr.CompileSubclassTypes('mytypes', *clr.GetSubclassedTypes()) Then just copy mytypes.dll to the DLLs directory or clr.AddReference it at the start of your app. You'll then get an on-disk version of the subclass for Gtk.Window and the call to Location should now be fine. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Brian Parma > Sent: Friday, July 17, 2009 9:35 PM > To: users at lists.ironpython.com > Subject: [IronPython] IronPython+Gtk#+.NET? > > I've been trying to make a simple IronPython+Gtk# app that draws an > image to the screen, and I'm having trouble getting it to run in > windows > (.NET). It's pretty simple so I attached it at the end. > > It runs fine in Mono on Ubuntu and Windows, but when I try to run it on > windows using .NET I get the following error followed by a really long > calltrace: > > Marshaling expose_event signal > Exception in Gtk# callback delegate > Note: Applications can use GLib.ExceptionManager.UnhandledException > to > handle > the exception. > System.Reflection.TargetInvocationException: Exception has been thrown > by the ta > rget of an invocation. ---> System.NotSupportedException: The invoked > member is > not supported in a dynamic assembly. > at System.Reflection.Emit.AssemblyBuilder.get_Location() > at GLib.GType.LookupType(IntPtr typeid) > at ... > > > I have the latest 'Gtk# for .NET' package from the Mono site, and I've > tried with IP 2.0.1 and IP 2.6 Beta, they give the same results. > > I rewrote the program in C# and it works fine in .NET (without Mono), > using #Develop IDE. > > Is this possible? > > code: > > import clr > clr.AddReference('gtk-sharp') > clr.AddReference('gdk-sharp') > import Gtk > import Gdk > > > class MyWindow(Gtk.Window): > def __init__(self, title='Main Window'): > Gtk.Window.__init__(self, title) > > self.pb = Gdk.Pixbuf('image.jpg').ScaleSimple(600,436, > Gdk.InterpType.Bilinear ) > self.da = Gtk.DrawingArea() > self.da.SetSizeRequest(self.pb.Width, self.pb.Height) > self.Add(self.da) > self.Decorated = False > > self.DeleteEvent += self.delete_event > self.da.ExposeEvent += self.expose_event > > def expose_event(self, *args): > self.da.GdkWindow.DrawPixbuf( > self.Style.BackgroundGC(self.State), self.pb, 0, 0, 0, 0,-1, -1, > Gdk.RgbDither.None, 0, 0) > > def delete_event(self, *args): > Gtk.Application.Quit() > > > if __name__ in ['__main__','Program']: > Gtk.Application.Init() > mw = MyWindow('Test') > mw.ShowAll() > Gtk.Application.Run() > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From calmasy at gmail.com Sat Jul 18 22:02:29 2009 From: calmasy at gmail.com (=?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?=) Date: Sat, 18 Jul 2009 14:02:29 -0600 Subject: [IronPython] Trying to set field to bool, get "TypeError: Argument cannot be null." In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0348F03C@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <1A472770E042064698CB5ADC83A12ACD0348F03C@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: Thanks Dino! On Sat, Jul 18, 2009 at 12:45 PM, Dino Viehland wrote: > I think you need an instance of Settings - e.g. Settings().ALWAYS_DECODE_OBJECTS. > > That being said the exception you're getting is a bug - it should be telling you > that you need an instance. > > I've created bug 23545: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23545 > > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Count L?szl? de Alm?sy >> Sent: Friday, July 17, 2009 11:32 PM >> To: users at lists.ironpython.com >> Subject: [IronPython] Trying to set field to bool, get "TypeError: >> Argument cannot be null." >> >> I need some help understanding what I'm doing wrong here. >> Settings.ALWAYS_DECODE_OBJECTS is set in C# like the following: >> >> public bool ALWAYS_DECODE_OBJECTS = true; >> >> But trying to set it to "True" in IPy blows up with the following >> traceback: >> >> IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1433 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import clr >> >>> clr.AddReference("OpenMetaverse.dll") >> >>> clr.AddReference("OpenMetaverseTypes.dll") >> >>> from OpenMetaverse import * >> >>> >> >>> Settings.ALWAYS_DECODE_OBJECTS = True >> Traceback (most recent call last): >> ? File "", line 1, in >> ? File "Microsoft.Scripting.Core", line unknown, in Convert >> ? File "Microsoft.Scripting.Core", line unknown, in Convert >> ? File "Microsoft.Scripting.Core", line unknown, in RequiresCanRead >> TypeError: Argument cannot be null. >> Parameter name: expression >> >>> >> >> -- >> Cheers, L?szl? >> _______________________________________________ >> 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 > -- Cheers, L?szl? From tony.meyer at gmail.com Sun Jul 19 00:52:04 2009 From: tony.meyer at gmail.com (Tony Meyer) Date: Sun, 19 Jul 2009 10:52:04 +1200 Subject: [IronPython] "code" module in 2.0.1 but missing in 2.6b1 Message-ID: <6c63de570907181552lf756b2bn5c33dfd6818d8625@mail.gmail.com> Hi, The code module (used for providing an interactive interpreter) isn't included in IronPython 2.6b1 (it is in 2.0.1). Copying the code (and codeop) module from 2.0.1 to 2.6b1 seems to work fine, however. Is this a deliberate change? One that will be addressed by 2.6 final? (I did try searching the web and the issue tracker, but I may have missed something - searching for "import code" doesn't work amazingly well). Thanks, Tony From freecode at cox.net Sun Jul 19 05:04:37 2009 From: freecode at cox.net (Brian Parma) Date: Sat, 18 Jul 2009 20:04:37 -0700 Subject: [IronPython] IronPython+Gtk#+.NET? In-Reply-To: <1A472770E042064698CB5ADC83A12ACD0348F14B@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <4A6150EA.70107@cox.net> <1A472770E042064698CB5ADC83A12ACD0348F14B@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <4A628D45.5060803@cox.net> Cool, this made it work with 2.6 beta. Dino Viehland wrote: > >From the stack trace this looks like it's Gtk# not interacting well > w/ dynamic defined subclasses on .NET. > > My guess here is it's because IronPython defines a subclass of Gtk.Window > which lives in an AssemblyBuilder instance. This is an in-memory only > assembly and therefore .NET throws NotSupportedException when you try > and get the location. Mono probably returns some value - that value > may or may not make sense instead but at least it lets other code > muddle along. Given that this works on Mono my guess is the location > isn't all that important to Gtk here or they're handling the odd value > Mono returns already. > > So the correct thing would be either for Mono to throw the same exception > and Gtk# to deal w/ that, for Gtk# to deal w/ both, or for .NET to > not throw the exception and return a value like Mono does. I'm not > sure which one of those it is but the good news is it should be easy to work > around in the latest IronPython. That's because we have a pre-compiled > types feature that's new in IronPython 2.6. It's primarily there for > startup perf but it should work for this too. > > You can probably just do: > > import clr > clr.AddReference('gtk-sharp') > import Gtk > class MyWindow(Gtk.Window): pass > > clr.CompileSubclassTypes('mytypes', *clr.GetSubclassedTypes()) > > Then just copy mytypes.dll to the DLLs directory or clr.AddReference > it at the start of your app. You'll then get an on-disk version > of the subclass for Gtk.Window and the call to Location should now > be fine. > > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Brian Parma >> Sent: Friday, July 17, 2009 9:35 PM >> To: users at lists.ironpython.com >> Subject: [IronPython] IronPython+Gtk#+.NET? >> >> I've been trying to make a simple IronPython+Gtk# app that draws an >> image to the screen, and I'm having trouble getting it to run in >> windows >> (.NET). It's pretty simple so I attached it at the end. >> >> It runs fine in Mono on Ubuntu and Windows, but when I try to run it on >> windows using .NET I get the following error followed by a really long >> calltrace: >> >> Marshaling expose_event signal >> Exception in Gtk# callback delegate >> Note: Applications can use GLib.ExceptionManager.UnhandledException >> to >> handle >> the exception. >> System.Reflection.TargetInvocationException: Exception has been thrown >> by the ta >> rget of an invocation. ---> System.NotSupportedException: The invoked >> member is >> not supported in a dynamic assembly. >> at System.Reflection.Emit.AssemblyBuilder.get_Location() >> at GLib.GType.LookupType(IntPtr typeid) >> at ... >> >> >> I have the latest 'Gtk# for .NET' package from the Mono site, and I've >> tried with IP 2.0.1 and IP 2.6 Beta, they give the same results. >> >> I rewrote the program in C# and it works fine in .NET (without Mono), >> using #Develop IDE. >> >> Is this possible? >> >> code: >> >> import clr >> clr.AddReference('gtk-sharp') >> clr.AddReference('gdk-sharp') >> import Gtk >> import Gdk >> >> >> class MyWindow(Gtk.Window): >> def __init__(self, title='Main Window'): >> Gtk.Window.__init__(self, title) >> >> self.pb = Gdk.Pixbuf('image.jpg').ScaleSimple(600,436, >> Gdk.InterpType.Bilinear ) >> self.da = Gtk.DrawingArea() >> self.da.SetSizeRequest(self.pb.Width, self.pb.Height) >> self.Add(self.da) >> self.Decorated = False >> >> self.DeleteEvent += self.delete_event >> self.da.ExposeEvent += self.expose_event >> >> def expose_event(self, *args): >> self.da.GdkWindow.DrawPixbuf( >> self.Style.BackgroundGC(self.State), self.pb, 0, 0, 0, 0,-1, -1, >> Gdk.RgbDither.None, 0, 0) >> >> def delete_event(self, *args): >> Gtk.Application.Quit() >> >> >> if __name__ in ['__main__','Program']: >> Gtk.Application.Init() >> mw = MyWindow('Test') >> mw.ShowAll() >> Gtk.Application.Run() >> >> _______________________________________________ >> 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 maxyaffe at comcast.net Sun Jul 19 19:59:00 2009 From: maxyaffe at comcast.net (Max R. Yaffe) Date: Sun, 19 Jul 2009 13:59:00 -0400 Subject: [IronPython] Current VS 2008 integration status Message-ID: <000101ca089a$98a64620$6a01a8c0@Gamry.com> I've read several posts about IronPython Studio and Visual Studio 2008. I need to use VS2008 since my project will utilize several .Net languages, but the wisdom seems to be that IronPython Studio is too fragile for real use. Is there any chance of getting a more robust version of the IronPython integration sample or IronPython Studio, or should I get the VS 2010 beta? Thanks in advance for your help, Max From fuzzyman at voidspace.org.uk Mon Jul 20 14:48:51 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 20 Jul 2009 13:48:51 +0100 Subject: [IronPython] IronPython training in Stockholm 23-24th September Message-ID: <4A6467B3.3080006@voidspace.org.uk> Hello all, September 23-24th I'll be presenting a two day training session in Stockholm (the training is in English) with addskills. It is aimed at .NET developers looking to use IronPython for application development, scripting, embedding, testing or just as another useful tool. It will be a comprehensive training session for those with .NET experience who are interested in making practical use of IronPython. For more information please see: * http://www.addskills.se/Utbildning/Kurs/?CourseID=469# * http://www.voidspace.org.uk/python/weblog/arch_d7_2009_07_18.shtml#e1109 This course is about how to make the most of dynamic languages like IronPython and IronRuby on the .NET framework; with a particular focus on IronPython. The dynamic language runtime, which is being incorporated into .NET 4.0 and is the basis of IronPython and IronRuby, enables a new class of language to run on the .NET framework. In the last few years dynamic languages have gained a reputation for increased developer productivity and being easy to learn. These new languages for the .NET framework have potential applications in everything from scripting tasks to application development to embedding in .NET programs as ready made scripting engines. Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From jregele23 at gmail.com Mon Jul 20 15:22:08 2009 From: jregele23 at gmail.com (Justin Regele) Date: Mon, 20 Jul 2009 06:22:08 -0700 Subject: [IronPython] Current VS 2008 integration status In-Reply-To: <000101ca089a$98a64620$6a01a8c0@Gamry.com> References: <000101ca089a$98a64620$6a01a8c0@Gamry.com> Message-ID: <8429660907200622s5fc29e52n3d65be8889729db2@mail.gmail.com> I'm in a similar situation, where VS2008 is necessary. It definitely can work, but I've found its best to: 1. Turn off autocompletion for IronPython 2. show whitespace 3. turn off intellisense for ironpython On Sun, Jul 19, 2009 at 10:59 AM, Max R. Yaffe wrote: > I've read several posts about IronPython Studio and Visual Studio 2008. I > need to use VS2008 since my project will utilize several .Net languages, > but > the wisdom seems to be that IronPython Studio is too fragile for real use. > Is there any chance of getting a more robust version of the IronPython > integration sample or IronPython Studio, or should I get the VS 2010 beta? > > Thanks in advance for your help, > Max > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Mon Jul 20 15:24:02 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 20 Jul 2009 14:24:02 +0100 Subject: [IronPython] Current VS 2008 integration status In-Reply-To: <000101ca089a$98a64620$6a01a8c0@Gamry.com> References: <000101ca089a$98a64620$6a01a8c0@Gamry.com> Message-ID: <4A646FF2.8080102@voidspace.org.uk> Max R. Yaffe wrote: > I've read several posts about IronPython Studio and Visual Studio 2008. I > need to use VS2008 since my project will utilize several .Net languages, but > the wisdom seems to be that IronPython Studio is too fragile for real use. > Is there any chance of getting a more robust version of the IronPython > integration sample or IronPython Studio, or should I get the VS 2010 beta? > > There is also integration under the SDK - through the experimental hive. Does that still work on 2008? (It used to work on 2005.) Michael > Thanks in advance for your help, > Max > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From william at resolversystems.com Mon Jul 20 18:37:47 2009 From: william at resolversystems.com (William Reade) Date: Mon, 20 Jul 2009 17:37:47 +0100 Subject: [IronPython] object lifecycle issues Message-ID: <4A649D5B.1020807@resolversystems.com> Hi all I have two problems that are at least somewhat related: +++ Issue 1 (probably your bug): --------------------------------------------------------------- C:\dev\ironclad - Copy>ipy y.py real new stub new real init real del C:\dev\ironclad - Copy>python y.py real new stub new stub init real del --------------------------------------------------------------- I freely admit that the attached code is pretty weird, but I really do need to do stuff like this in Ironclad. The difference in behaviour may or may not be responsible for certain failing numpy/scipy tests -- I'm not sure how to tell -- but I'd enormously appreciate a fix. I'd report the issue on Codeplex, but trying to visit the issue tracker just leaves my browser spinning forever. Speaking of which: is there any alternative way of reporting bugs that doesn't make me feel as if I'm spamming the list with out-of-band noise? I'm pretty sure that a few bugs have just dropped off my stack in the last few months, just because I got tired of waiting for Codeplex to start working. +++ Issue 2 (almost certainly my bug): In a nearly identical* situation -- close enough that I can't say how it's actually different -- f will never get its __del__ method called (the object is destroyed -- a WeakReference to it knows it's dead -- but the __del__ call never happens). For context: I have *very* similar classes, whose instances are constructed in exactly the weird way demonstrated in the attached file, and which work fine. The only difference between the cases that work and the cases that don't is that the broken cases multiply inherit from ipy types which wrap CLR types (int and float (and maybe str, although I haven't tested that one)), while the working cases have simple chains of single inheritance from user-defined types all the way up to object. However, the attached repro doesn't show my problem, so it's clearly not *just* to do with multiply inheriting from CLR types. Does anyone have any idea what I might be doing wrong? I know this is a vague request, but I'm running out of ideas, and I'd really appreciate some input from someone who understands precisely what all those ipy MetaFoo classes are doing. Cheers william * the attached file started life as an attempt to repro the __del__ issue, and I incidentally noticed the __init__ issue. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: y.py URL: From dinov at microsoft.com Mon Jul 20 18:57:38 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 20 Jul 2009 16:57:38 +0000 Subject: [IronPython] object lifecycle issues In-Reply-To: <4A649D5B.1020807@resolversystems.com> References: <4A649D5B.1020807@resolversystems.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD034981FA@TK5EX14MBXC116.redmond.corp.microsoft.com> #1's definitely our bug. We're caching the lookup of __init__ from Real and invoking that instead of doing the lookup each time. It should be easy enough to fix. I've opened a bug (23555 - http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23555) #2 I'd guess could be either that for some reason we're failing to detect the presence of __del__ or that when we run the finalizer cleanup that we believe it's part of cyclic trash and don't think we should cleanup. Of those I'd think it'd be the cyclic trash detection that'd be most likely to go wrong. I'd suggest putting a break point or some logging in PythonOps.InitializeForFinalization and in WeakRefTracker's finalizer and see what's happening there. As for CodePlex I guess you can't even open a bug to complain to CodePlex :(. If you want to send us your browser/OS info we could open a bug for you against CodePlex. You could also try the old heavy hammer of clearing cookies as maybe CodePlex has built up some bad browser state. You could also try using TeamExplorer to open the bugs but I'm not sure if you'll have permissions there to do that or not. > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of William Reade > Sent: Monday, July 20, 2009 9:38 AM > To: Discussion of IronPython > Subject: [IronPython] object lifecycle issues > > Hi all > > I have two problems that are at least somewhat related: > > +++ Issue 1 (probably your bug): > > --------------------------------------------------------------- > C:\dev\ironclad - Copy>ipy y.py > real new > stub new > real init > real del > > C:\dev\ironclad - Copy>python y.py > real new > stub new > stub init > real del > --------------------------------------------------------------- > > I freely admit that the attached code is pretty weird, but I really do > need to do stuff like this in Ironclad. The difference in behaviour may > or may not be responsible for certain failing numpy/scipy tests -- I'm > not sure how to tell -- but I'd enormously appreciate a fix. > > I'd report the issue on Codeplex, but trying to visit the issue tracker > just leaves my browser spinning forever. Speaking of which: is there > any alternative way of reporting bugs that doesn't make me feel as if > I'm spamming the list with out-of-band noise? I'm pretty sure that a > few bugs have just dropped off my stack in the last few months, just > because I got tired of waiting for Codeplex to start working. > > +++ Issue 2 (almost certainly my bug): > > In a nearly identical* situation -- close enough that I can't say how > it's actually different -- f will never get its __del__ method called > (the object is destroyed -- a WeakReference to it knows it's dead -- > but the __del__ call never happens). > > For context: I have *very* similar classes, whose instances are > constructed in exactly the weird way demonstrated in the attached file, > and which work fine. The only difference between the cases that work > and the cases that don't is that the broken cases multiply inherit from > ipy types which wrap CLR types (int and float (and maybe str, although > I haven't tested that one)), while the working cases have simple chains > of single inheritance from user-defined types all the way up to object. > However, the attached repro doesn't show my problem, so it's clearly > not > *just* to do with multiply inheriting from CLR types. > > Does anyone have any idea what I might be doing wrong? I know this is a > vague request, but I'm running out of ideas, and I'd really appreciate > some input from someone who understands precisely what all those ipy > MetaFoo classes are doing. > > Cheers > william > > > * the attached file started life as an attempt to repro the __del__ > issue, and I incidentally noticed the __init__ issue. From tony.meyer at gmail.com Mon Jul 20 22:26:39 2009 From: tony.meyer at gmail.com (Tony Meyer) Date: Tue, 21 Jul 2009 08:26:39 +1200 Subject: [IronPython] Current VS 2008 integration status In-Reply-To: <4A646FF2.8080102@voidspace.org.uk> References: <000101ca089a$98a64620$6a01a8c0@Gamry.com> <4A646FF2.8080102@voidspace.org.uk> Message-ID: <6c63de570907201326j3230e03x3649eaab47fae446@mail.gmail.com> On Tue, Jul 21, 2009 at 1:24 AM, Michael Foord wrote: > There is also integration under the SDK - through the experimental hive. > Does that still work on 2008? (It used to work on 2005.) It worked fine for me (with the full Visual Studio - I didn't try an Express version), although I only ran it through a few tests - I plan to use it more frequently later on this year. Cheers, Tony From dfugate at microsoft.com Mon Jul 20 22:44:33 2009 From: dfugate at microsoft.com (Dave Fugate) Date: Mon, 20 Jul 2009 20:44:33 +0000 Subject: [IronPython] Current VS 2008 integration status In-Reply-To: <000101ca089a$98a64620$6a01a8c0@Gamry.com> References: <000101ca089a$98a64620$6a01a8c0@Gamry.com> Message-ID: <7CEEC335D70FFE4B957737DDE836F51B013C1C@TK5EX14MBXC125.redmond.corp.microsoft.com> My recommendation for getting full (Iron)Python support from within Visual Studio is to submit feedback (https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=12362) that this is a feature you need. If enough people were to request this...it might just happen for a future release=) Dave -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Max R. Yaffe Sent: Sunday, July 19, 2009 10:59 AM To: users at lists.ironpython.com Subject: [IronPython] Current VS 2008 integration status I've read several posts about IronPython Studio and Visual Studio 2008. I need to use VS2008 since my project will utilize several .Net languages, but the wisdom seems to be that IronPython Studio is too fragile for real use. Is there any chance of getting a more robust version of the IronPython integration sample or IronPython Studio, or should I get the VS 2010 beta? Thanks in advance for your help, Max _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From Jimmy.Schementi at microsoft.com Tue Jul 21 00:28:33 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 20 Jul 2009 22:28:33 +0000 Subject: [IronPython] object lifecycle issues In-Reply-To: <1A472770E042064698CB5ADC83A12ACD034981FA@TK5EX14MBXC116.redmond.corp.microsoft.com> References: <4A649D5B.1020807@resolversystems.com> <1A472770E042064698CB5ADC83A12ACD034981FA@TK5EX14MBXC116.redmond.corp.microsoft.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18B5842E@tk5ex14mbxc105.redmond.corp.microsoft.com> WRT the Codeplex issues, http://codeplex.codeplex.com is the place to post issues about codeplex itself: http://codeplex.codeplex.com/WorkItem/List.aspx. Let us know when you open a bug so we can reinforce the complaints. ~js > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Dino Viehland > Sent: Monday, July 20, 2009 9:58 AM > To: Discussion of IronPython > Subject: Re: [IronPython] object lifecycle issues > > #1's definitely our bug. We're caching the lookup of __init__ from Real and > invoking that instead of doing the lookup each time. It should be easy > enough to fix. I've opened a bug (23555 - > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23555) > > #2 I'd guess could be either that for some reason we're failing to detect the > presence of __del__ or that when we run the finalizer cleanup that we > believe it's part of cyclic trash and don't think we should cleanup. > Of those I'd think it'd be the cyclic trash detection that'd be most likely to go > wrong. > > I'd suggest putting a break point or some logging in > PythonOps.InitializeForFinalization and in WeakRefTracker's finalizer and see > what's happening there. > > As for CodePlex I guess you can't even open a bug to complain to CodePlex > :(. If you want to send us your browser/OS info we could open a bug for you > against CodePlex. You could also try the old heavy hammer of clearing > cookies as maybe CodePlex has built up some bad browser state. You could > also try using TeamExplorer to open the bugs but I'm not sure if you'll have > permissions there to do that or not. > > > > -----Original Message----- > > From: users-bounces at lists.ironpython.com [mailto:users- > > bounces at lists.ironpython.com] On Behalf Of William Reade > > Sent: Monday, July 20, 2009 9:38 AM > > To: Discussion of IronPython > > Subject: [IronPython] object lifecycle issues > > > > Hi all > > > > I have two problems that are at least somewhat related: > > > > +++ Issue 1 (probably your bug): > > > > --------------------------------------------------------------- > > C:\dev\ironclad - Copy>ipy y.py > > real new > > stub new > > real init > > real del > > > > C:\dev\ironclad - Copy>python y.py > > real new > > stub new > > stub init > > real del > > --------------------------------------------------------------- > > > > I freely admit that the attached code is pretty weird, but I really do > > need to do stuff like this in Ironclad. The difference in behaviour > > may or may not be responsible for certain failing numpy/scipy tests -- > > I'm not sure how to tell -- but I'd enormously appreciate a fix. > > > > I'd report the issue on Codeplex, but trying to visit the issue > > tracker just leaves my browser spinning forever. Speaking of which: is > > there any alternative way of reporting bugs that doesn't make me feel > > as if I'm spamming the list with out-of-band noise? I'm pretty sure > > that a few bugs have just dropped off my stack in the last few months, > > just because I got tired of waiting for Codeplex to start working. > > > > +++ Issue 2 (almost certainly my bug): > > > > In a nearly identical* situation -- close enough that I can't say how > > it's actually different -- f will never get its __del__ method called > > (the object is destroyed -- a WeakReference to it knows it's dead -- > > but the __del__ call never happens). > > > > For context: I have *very* similar classes, whose instances are > > constructed in exactly the weird way demonstrated in the attached > > file, and which work fine. The only difference between the cases that > > work and the cases that don't is that the broken cases multiply > > inherit from ipy types which wrap CLR types (int and float (and maybe > > str, although I haven't tested that one)), while the working cases > > have simple chains of single inheritance from user-defined types all the > way up to object. > > However, the attached repro doesn't show my problem, so it's clearly > > not > > *just* to do with multiply inheriting from CLR types. > > > > Does anyone have any idea what I might be doing wrong? I know this is > > a vague request, but I'm running out of ideas, and I'd really > > appreciate some input from someone who understands precisely what all > > those ipy MetaFoo classes are doing. > > > > Cheers > > william > > > > > > * the attached file started life as an attempt to repro the __del__ > > issue, and I incidentally noticed the __init__ issue. > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From dinov at microsoft.com Tue Jul 21 00:48:54 2009 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 20 Jul 2009 22:48:54 +0000 Subject: [IronPython] object lifecycle issues In-Reply-To: <4A649D5B.1020807@resolversystems.com> References: <4A649D5B.1020807@resolversystems.com> Message-ID: <1A472770E042064698CB5ADC83A12ACD03499908@TK5EX14MBXC116.redmond.corp.microsoft.com> Could this be issue 2? class Real(object): def __new__(cls, *args, **kwargs): print 'real new' return object.__new__(Stub) #def __del__(self): pass # uncomment me and this works as expected class Stub(Real): def __del__(self): print "I've been finalized" f = Real(1.0) del f import sys if sys.platform == 'clr': import clr from System import GC for _ in range(4): GC.Collect() GC.WaitForPendingFinalizers() > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of William Reade > Sent: Monday, July 20, 2009 9:38 AM > To: Discussion of IronPython > Subject: [IronPython] object lifecycle issues > > Hi all > > I have two problems that are at least somewhat related: > > +++ Issue 1 (probably your bug): > > --------------------------------------------------------------- > C:\dev\ironclad - Copy>ipy y.py > real new > stub new > real init > real del > > C:\dev\ironclad - Copy>python y.py > real new > stub new > stub init > real del > --------------------------------------------------------------- > > I freely admit that the attached code is pretty weird, but I really do > need to do stuff like this in Ironclad. The difference in behaviour may > or may not be responsible for certain failing numpy/scipy tests -- I'm > not sure how to tell -- but I'd enormously appreciate a fix. > > I'd report the issue on Codeplex, but trying to visit the issue tracker > just leaves my browser spinning forever. Speaking of which: is there > any alternative way of reporting bugs that doesn't make me feel as if > I'm spamming the list with out-of-band noise? I'm pretty sure that a > few bugs have just dropped off my stack in the last few months, just > because I got tired of waiting for Codeplex to start working. > > +++ Issue 2 (almost certainly my bug): > > In a nearly identical* situation -- close enough that I can't say how > it's actually different -- f will never get its __del__ method called > (the object is destroyed -- a WeakReference to it knows it's dead -- > but the __del__ call never happens). > > For context: I have *very* similar classes, whose instances are > constructed in exactly the weird way demonstrated in the attached file, > and which work fine. The only difference between the cases that work > and the cases that don't is that the broken cases multiply inherit from > ipy types which wrap CLR types (int and float (and maybe str, although > I haven't tested that one)), while the working cases have simple chains > of single inheritance from user-defined types all the way up to object. > However, the attached repro doesn't show my problem, so it's clearly > not > *just* to do with multiply inheriting from CLR types. > > Does anyone have any idea what I might be doing wrong? I know this is a > vague request, but I'm running out of ideas, and I'd really appreciate > some input from someone who understands precisely what all those ipy > MetaFoo classes are doing. > > Cheers > william > > > * the attached file started life as an attempt to repro the __del__ > issue, and I incidentally noticed the __init__ issue. From brannon at iterator.net Tue Jul 21 01:46:12 2009 From: brannon at iterator.net (Brannon Jones) Date: Mon, 20 Jul 2009 16:46:12 -0700 Subject: [IronPython] Current VS 2008 integration status In-Reply-To: <7CEEC335D70FFE4B957737DDE836F51B013C1C@TK5EX14MBXC125.redmond.corp.microsoft.com> References: <000101ca089a$98a64620$6a01a8c0@Gamry.com> <7CEEC335D70FFE4B957737DDE836F51B013C1C@TK5EX14MBXC125.redmond.corp.microsoft.com> Message-ID: <1653092d0907201646p4d192033la8e1816eacb7362c@mail.gmail.com> All, Michael Foord opened the following feedback entry: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=475830 We should vote and comment on this one, rather than opening a flood of new requests (I've seen several already). Brannon On Mon, Jul 20, 2009 at 13:44, Dave Fugate wrote: > My recommendation for getting full (Iron)Python support from within Visual > Studio is to submit feedback ( > https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=12362) > that this is a feature you need. If enough people were to request this...it > might just happen for a future release=) > > Dave > > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] On Behalf Of Max R. Yaffe > Sent: Sunday, July 19, 2009 10:59 AM > To: users at lists.ironpython.com > Subject: [IronPython] Current VS 2008 integration status > > I've read several posts about IronPython Studio and Visual Studio 2008. I > need to use VS2008 since my project will utilize several .Net languages, > but > the wisdom seems to be that IronPython Studio is too fragile for real use. > Is there any chance of getting a more robust version of the IronPython > integration sample or IronPython Studio, or should I get the VS 2010 beta? > > Thanks in advance for your help, > Max > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kf9150 at gmail.com Tue Jul 21 08:47:29 2009 From: kf9150 at gmail.com (Kelie) Date: Mon, 20 Jul 2009 23:47:29 -0700 (PDT) Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <1A472770E042064698CB5ADC83A12ACD0344E99C@TK5EX14MBXC116.redmond.corp.microsoft.com> <56fa314b-622f-46b8-8943-5517a5aae6e0@q11g2000yqi.googlegroups.com> Message-ID: On Jul 10, 6:46?pm, Curt Hagenlocher wrote: > It would probably be more immediately useful if you were to provide > the specific error message and a listing of the directory from which > you're trying to run the program. Given that it works on at least one > machine, it's likely to be context-related rather than code-related. > Thanks Curt. I'll run the program again and get back to you on this. From kf9150 at gmail.com Tue Jul 21 08:49:12 2009 From: kf9150 at gmail.com (Kelie) Date: Mon, 20 Jul 2009 23:49:12 -0700 (PDT) Subject: [IronPython] Problem with Creating Executable using SharpDevelop In-Reply-To: <58ad4a110907171307o5db93cdcnea0ff80ba83154ff@mail.gmail.com> References: <71f63e92-aadd-4a1e-8c75-a9d19338c007@x5g2000prf.googlegroups.com> <58ad4a110907171307o5db93cdcnea0ff80ba83154ff@mail.gmail.com> Message-ID: <7927de91-9d1e-4a2c-887c-1eb01cbdef66@j9g2000prh.googlegroups.com> On Jul 17, 10:07?am, Bruce Bromberek wrote: > Look at your references to the 5 ironpython DLLs. ?Decide right now: ?Are > you going to use the ones that ship with SharpDevelop or the ones using that > come with IronPython. ?Choose one and be consistent. > > I'm still working though how to Build a WIX installer project , so I > currently ZIP up the release folder generated by SharpDevelop and make sure > everything is there. ?Here's an example for a simple program I have > distributed to coworkers. > Make sure the Target machine has been upgraded to .Net 3.5 SP1. ?Don't take > any flack - make them upgrade.* > > *Make sure they are not running on a network share. ?Weird things with trust > can happen with shares. ?See my recent cry for help on this list for more > info.* > Bruce, thanks a lot for sharing your experience. I'll try your suggestions. From fuzzyman at voidspace.org.uk Tue Jul 21 11:37:12 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 21 Jul 2009 10:37:12 +0100 Subject: [IronPython] [Code Review] "XAP-less" Silverlight application support In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18B56732@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC18B56732@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <4A658C48.5010001@voidspace.org.uk> Hello Jimmy, Will xap-less be an 'alternative' deployment scenario for dynamic silverlight applications or the 'new and only' deployment scenario? If it becomes the 'right' way to do it please realise that you are in one swoop obsoleting all the articles, tutorials, examples (and books) on developing Silverlight applications with IronPython / IronRuby. There better be a big payoff for such a hugely backwards incompatible move... When the move to xap files happened we were told this was a big win for dynamic languages as all needed Python (or Ruby) files would be downloaded compressed - and this was *much* faster than downloading them synchronously on import (as the integration in Silverlight 1.1 originally did). What is the motivation for the change? Does this change allow the IronPython assemblies to be shared between applications (and cached)? I realise this can be done already (I use it with my examples) - but I still see the IronPython assemblies being re-downloaded every time you refresh the page or go to a new example, even though they are from the same location. Michael Jimmy Schementi wrote: > (Sending this review broadly as it shows a new direction DLR Silverlight apps are taking) > > http://github.com/jschementi/ironruby/commit/da6b54e226adfd3a18d8ad98d618c2350ebd8351 > > Beginnings of "XAP-less" Silverlight application support. Note: Silverlight apps are *required* to have a XAP file, but with this change it can get down to just a container for the AppManifest.xaml file. Python/Ruby would ship with a single XAP file pointing to the .slvx files for a given release. > > Adds a "downloadScripts" initParam to indicate whether paths to script files and XAML files should be resolved to the web-server (relative to the XAP), if the file is not found in the XAP. Also adds "downloadScriptsFrom" to customize what path they are based off of. Because of the opt-in nature of this change, existing DLR Silverlight apps should not break. > > Files are downloaded synchronously as code runs, by having the PlatformAdaptationLayer use a new BrowserVirtualFilesystem: HttpVirtualFilesystem. So when a language's include mechanism is used (require , load, import, etc), it will download the file by using XmlHttpRequest in synchronous mode. It will also cache each downloaded file's contents, so a file will only be downloaded once, even if it is included multiple times. Note: future work will hopefully allow asynchronous includes, so this can be production-ready. For now, it should only be used for development. > > Note: this change decreases the need for Chiron significantly. In this mode, Chiron only creates a XAP file with the necessary assemblies and AppManifest.xaml, if it doesn't exist already. One could imagine providing a XAP file for each language, and then Chiron wouldn't be needed for development. However, for using the latest language assemblies, and auto-detection of languages used, it's still useful for development. So some changes have been made to Chiron to support this better: > > A "localApplicationRoot" appSetting has been added to Chiron to adjust where it looks for script files (when determining what languages are used). This allows you to make sure Chiron is looking in the same place your application is downloading scripts or xaml from, so it can still generate a correct XAP file for you. "application/ruby" and "application/python" mime-types have been also added to Chiron also to enable downloading of those script files. > > All of Chiron's appSettings are now override-able as command-line switches: /u[rlPrefix], /e[xtUrlPrefix], /l[ocalAppRoot] > > Run Merlin/Main/Hosts/SilverLight/Tests/tests/manual/test_foox/run.bat for an example of how this works (it requires a Silverlight Debug build, so if you run Merlin/Main/Languages/Ruby/Scripts/Dev.bat, just run "bsd" and that will *b*uild *s*ilverlight in *d*ebug mode) > > Adds a stub for similar support through IsolatedStorage, but that will come later. > > Also tweaks the DynamicEngine.CreateRuntimeSetup method to better support other DLR-hosts in Silverlight (http://lists.ironpython.com/pipermail/users-ironpython.com/2009-July/010780.html). > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.ironpythoninaction.com/ From william at resolversystems.com Tue Jul 21 12:53:19 2009 From: william at resolversystems.com (William Reade) Date: Tue, 21 Jul 2009 11:53:19 +0100 Subject: [IronPython] object lifecycle issues In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18B5842E@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <4A649D5B.1020807@resolversystems.com> <1A472770E042064698CB5ADC83A12ACD034981FA@TK5EX14MBXC116.redmond.corp.microsoft.com> <0047ECBFA2E0DF4A834AA369282A5AFC18B5842E@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <4A659E1F.4090401@resolversystems.com> Clearing cookies worked -- thanks guys. http://codeplex.codeplex.com/WorkItem/View.aspx?WorkItemId=23563 Jimmy Schementi wrote: > WRT the Codeplex issues, http://codeplex.codeplex.com is the place to post issues about codeplex itself: http://codeplex.codeplex.com/WorkItem/List.aspx. Let us know when you open a bug so we can reinforce the complaints. > > ~js > > >> -----Original Message----- >> From: users-bounces at lists.ironpython.com [mailto:users- >> bounces at lists.ironpython.com] On Behalf Of Dino Viehland >> Sent: Monday, July 20, 2009 9:58 AM >> To: Discussion of IronPython >> Subject: Re: [IronPython] object lifecycle issues >> >> #1's definitely our bug. We're caching the lookup of __init__ from Real and >> invoking that instead of doing the lookup each time. It should be easy >> enough to fix. I've opened a bug (23555 - >> http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23555) >> >> #2 I'd guess could be either that for some reason we're failing to detect the >> presence of __del__ or that when we run the finalizer cleanup that we >> believe it's part of cyclic trash and don't think we should cleanup. >> Of those I'd think it'd be the cyclic trash detection that'd be most likely to go >> wrong. >> >> I'd suggest putting a break point or some logging in >> PythonOps.InitializeForFinalization and in WeakRefTracker's finalizer and see >> what's happening there. >> >> As for CodePlex I guess you can't even open a bug to complain to CodePlex >> :(. If you want to send us your browser/OS info we could open a bug for you >> against CodePlex. You could also try the old heavy hammer of clearing >> cookies as maybe CodePlex has built up some bad browser state. You could >> also try using TeamExplorer to open the bugs but I'm not sure if you'll have >> permissions there to do that or not. >> >> >> >>> -----Original Message----- >>> From: users-bounces at lists.ironpython.com [mailto:users- >>> bounces at lists.ironpython.com] On Behalf Of William Reade >>> Sent: Monday, July 20, 2009 9:38 AM >>> To: Discussion of IronPython >>> Subject: [IronPython] object lifecycle issues >>> >>> Hi all >>> >>> I have two problems that are at least somewhat related: >>> >>> +++ Issue 1 (probably your bug): >>> >>> --------------------------------------------------------------- >>> C:\dev\ironclad - Copy>ipy y.py >>> real new >>> stub new >>> real init >>> real del >>> >>> C:\dev\ironclad - Copy>python y.py >>> real new >>> stub new >>> stub init >>> real del >>> --------------------------------------------------------------- >>> >>> I freely admit that the attached code is pretty weird, but I really do >>> need to do stuff like this in Ironclad. The difference in behaviour >>> may or may not be responsible for certain failing numpy/scipy tests -- >>> I'm not sure how to tell -- but I'd enormously appreciate a fix. >>> >>> I'd report the issue on Codeplex, but trying to visit the issue >>> tracker just leaves my browser spinning forever. Speaking of which: is >>> there any alternative way of reporting bugs that doesn't make me feel >>> as if I'm spamming the list with out-of-band noise? I'm pretty sure >>> that a few bugs have just dropped off my stack in the last few months, >>> just because I got tired of waiting for Codeplex to start working. >>> >>> +++ Issue 2 (almost certainly my bug): >>> >>> In a nearly identical* situation -- close enough that I can't say how >>> it's actually different -- f will never get its __del__ method called >>> (the object is destroyed -- a WeakReference to it knows it's dead -- >>> but the __del__ call never happens). >>> >>> For context: I have *very* similar classes, whose instances are >>> constructed in exactly the weird way demonstrated in the attached >>> file, and which work fine. The only difference between the cases that >>> work and the cases that don't is that the broken cases multiply >>> inherit from ipy types which wrap CLR types (int and float (and maybe >>> str, although I haven't tested that one)), while the working cases >>> have simple chains of single inheritance from user-defined types all the >>> >> way up to object. >> >>> However, the attached repro doesn't show my problem, so it's clearly >>> not >>> *just* to do with multiply inheriting from CLR types. >>> >>> Does anyone have any idea what I might be doing wrong? I know this is >>> a vague request, but I'm running out of ideas, and I'd really >>> appreciate some input from someone who understands precisely what all >>> those ipy MetaFoo classes are doing. >>> >>> Cheers >>> william >>> >>> >>> * the attached file started life as an attempt to repro the __del__ >>> issue, and I incidentally noticed the __init__ issue. >>> >> _______________________________________________ >> 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 Jimmy.Schementi at microsoft.com Tue Jul 21 13:21:51 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 21 Jul 2009 11:21:51 +0000 Subject: [IronPython] [Code Review] "XAP-less" Silverlight application support In-Reply-To: <4A658C48.5010001@voidspace.org.uk> References: <0047ECBFA2E0DF4A834AA369282A5AFC18B56732@tk5ex14mbxc105.redmond.corp.microsoft.com>, <4A658C48.5010001@voidspace.org.uk> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18B5A4FA@tk5ex14mbxc105.redmond.corp.microsoft.com> Michael, You just had to ask now =P ... I was going to blog about this more extensively tomorrow, but here's a preview of my thinking about this: My motivation behind xap-less is to make DLR Silverlight apps less complex, and more like how the web works. This change is just an experiment in that direction, and I'm very open to any opinions folks have about this. First things first though, this change make xap-less completely opt-in ... you have to use the "downloadScripts=true" InitParams setting to enable it. Without this param it will behave as it used to. Also, even with this setting it will not download the file if it exists in the XAP. I was very conservative about this change, as I'm just playing around with some ideas. Also, even if xap-less becomes the default, I'd make sure existing deployments did not break; in the xap will always be an option for deployment (and quite possibly the preferred way), but I want to get back to the place where we didn't need a XAP file and didn't need Chiron for development. Eh, I know that was the messaging around XAP files being compressed and faster for download times, but that's because they were synchronously downloaded and the browser can only handle one of those at once. If you use gzip-compression on your web-server and download each file asynchronously, I don't think you'll see much of a difference. However, "minifying" Ruby or Python like most JavaScript is really not possible, so people could always opt for a XAP file. But I really want to give back the text-only experience, even for deployment. There are still good ways to support asynchronous downloading of files that get imported (I'll talk about that below), so we should still explore those ... especially since this is the way browsers work today. Imagine if Ruby and Python in the browser felt not that much different than JavaScript, but allow for other deployment options if the app needs it. For example, a Python Silverlight Hello World app should just be this:
Very simple and clean. No need to start a web-server or install Mono on the Mac just to make a client-side page. The JS file hosts Silverlight, and then Microsoft.Scripting.Silverlight scans the HTML page looking for If an import failed against the XAP, it could look on the web-server. Though today's implementation is synchronous, that needs to change. So the guidance would be to either to put those files in the XAP, or allow the app-author to specify their dependencies up-front (like JavaScript does, it could even be with
Very simple and clean. No need to start a web-server or install Mono on the Mac just to make a client-side page. The JS file hosts Silverlight, and then Microsoft.Scripting.Silverlight scans the HTML page looking for If an import failed against the XAP, it could look on the web-server. Though today's implementation is synchronous, that needs to change. So the guidance would be to either to put those files in the XAP, or allow the app-author to specify their dependencies up-front (like JavaScript does, it could even be with >
> > > Very simple and clean. No need to start a web-server or install Mono on the Mac just to make a client-side page. The JS file hosts Silverlight, and then Microsoft.Scripting.Silverlight scans the HTML page looking for > > If an import failed against the XAP, it could look on the web-server. Though today's implementation is synchronous, that needs to change. So the guidance would be to either to put those files in the XAP, or allow the app-author to specify their dependencies up-front (like JavaScript does, it could even be with