From no_reply at codeplex.com Sun Apr 1 15:12:09 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 1 Apr 2012 06:12:09 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 3/31/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Infinite loop crashes IronPython StackOverflowException 2. [New comment] Infinite loop crashes IronPython StackOverflowException 3. [New comment] Infinite loop crashes IronPython StackOverflowException ---------------------------------------------- ISSUES 1. [New issue] Infinite loop crashes IronPython StackOverflowException http://ironpython.codeplex.com/workitem/32515 User dsblank has proposed the issue: "At first I thought that this was a Mono runtime or compile issue, but trying on Windows with .NET runtime and direct binaries, I get a crash in all situations. (Although, I believe that in earlier versions of IronPython, it did work on .NET but not Mono, so there may be an additional problem with Mono). Sample code: """ def loop(): loop() loop() """ Sample run on Windows 7: C:\Users\dblank\Desktop>cd IronPython-2.7.2.1 C:\Users\dblank\Desktop\IronPython-2.7.2.1>ipy.exe IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> def loop(): ... loop() ... >>> loop() Process is terminated due to StackOverflowException. Sample run on Mono/Linux: $ mono bin/ipy.exe IronPython 3.0 (3.0.0.0) on .NET 2.0.50727.1433 Type "help", "copyright", "credits" or "license" for more information. >>> def loop(): ... loop() ... >>> loop() Stacktrace: Native stacktrace: mono() [0x80e126c] mono() [0x812046c] mono() [0x805fe7d] [0x20240c] mono() [0x812040b] mono() [0x805fe7d] [0x20240c] [0x962367] [0x9622e8] [0x961d6b] [0x573cec] [0x221450] [0xd0c1e0] [0x17bee8] [0x1e29ab] [0x17befd] [0x1e29ab] [0x17befd] (these two repeat about 120 times) Debug info from gdb: Could not attach to process. If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf ptrace: Operation not permitted. No threads. ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Aborted"----------------- 2. [New comment] Infinite loop crashes IronPython StackOverflowException http://ironpython.codeplex.com/workitem/32515 User slide_o_mix has commented on the issue: "To enable recursion limit tracking, you need to add -X:MaxRecursion to the command line options to ipy.exe, otherwise recursion limit tracking is turned off."----------------- 3. [New comment] Infinite loop crashes IronPython StackOverflowException http://ironpython.codeplex.com/workitem/32515 User dsblank has commented on the issue: "Yes, you are correct: adding the -X:MaxRecursion flag works on .NET and Mono; thanks! But, shouldn't this have a default value that makes it match CPython's behavior?" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Mon Apr 2 22:20:58 2012 From: rome at Wintellect.com (Keith Rome) Date: Mon, 2 Apr 2012 20:20:58 +0000 Subject: [Ironpython-users] Resource-based ZIP importer / meta_path importer Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0212A2@BY2PRD0710MB389.namprd07.prod.outlook.com> Following up on this topic from a few weeks ago.... I did not file an issue on it, because it isn't directly a part of the python spec, so it's more "something I would like to see" and less "something isn't working right". Anyhow, I have been doing some tinkering. I feel like I am right at the goal line, and just need a tiny bit of help to cross over it. The zipimport module is an implementation of "PEP 273: Import Modules from Zip Archives". My first tinkerings were with modifying the zipimport class and ZimImportModule class to facilitate using a URI path as in my suggestion in the previous email. I ran into a brick wall with this however, because PythonContext.InitializeModule() still makes calls to both System.IO.Path directly as well as the GetFullPath() method of the current PAL. Both of those things prevent me from being able to use anything but a path value that is valid on the current file system (i.e., I can't use a "://
/" scheme). In reading the details of PEP 273, I also learned about "PEP 302: New Import Hooks" (http://www.python.org/dev/peps/pep-0302/). This PEP looks to be exactly what I want, because it is totally transparent to sys.path, and therefore has no need for any of the path canonicalization workarounds that I was running into with a PEP 273 solution. PEP 302 appears to already be implemented in IronPython... at least sys.meta_path is there, and the IronPython.Runtime.Importer class attempts to make use of it. So I fully implemented a zip resource based meta_path importer by following the example of zipimport but adapting it for how meta_path is intended to work. It appears to work fine for simple imports. But there is a major problem I have encountered. The meta_path functionality does not appear to be re-entrant, and I have not yet been able to figure out why. Implementing a meta_path importer is fairly simple (easier than a path hook importer like zipimport). I just have to implement find_module() and load_module() and append my importer to sys.meta_path. These work as expected. But the final step of the importer protocol dictates that "If the module is a Python module (as opposed to a built-in module or a dynamically loaded extension), it should execute the module's code in the module's global name space (module.__dict__)." This is easy enough, and works exactly like in zipimport. PythonContext.CompileModule() produces an executable ScriptCode object, and I simply Run() it using the module's Scope. This then proceeds to execute the module initialization code, which invariably does some imports of its own. As a test case, I use the following script: "from multiprocessing import process". The multiprocessing module attempts to "import os" among other things. I would expect this to invoke find_module('os') and subsequently load_module('os') on my meta_path importer. But it does not. For whatever reason, when initializing a module, any internal attempts to resolve further imports seem to be ignoring meta_path importers. These imports fail because they should have been serviced by my meta_path importer, which was not invoked. 1. Has anyone implemented a meta_path importer in IronPython that could maybe shed some light on this? 2. Is this working as intended? (doesn't seem to be) 3. Is the PEP 302 support perhaps incomplete? 4. Am I maybe missing a step somewhere? I have followed the advice in PEP 302. In addition to everything zipimport does, I am also setting __file__ to "", and setting __path__ to an empty List. I also ensure that the module is added to sys.modules before executing the initialization code, and I check sys.modules at the very start of my load_module() method to prevent double-loading. Although it would seem that none of those things would have any bearing on this particular issue. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: Slide [mailto:slide.o.mix at gmail.com] Sent: Monday, March 12, 2012 10:03 AM To: Keith Rome Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] IronPython 2.7.2 Released This is a great idea, this functionality does not currently exist, could you please file a new issue at http://ironpython.codeplex.com? Thanks, slide On Sun, Mar 11, 2012 at 11:23 PM, Keith Rome > wrote: Thanks for the great work! Regarding the new zipimport functionality - is it possible to specify an embedded resource name for the path to the zip? For example, if I wanted to distribute a library by just packaging it up within an assembly? Or is it necessary to write the resource out to a file on disk first? Example: Instead of: sys.path.insert(0, '/path/lib.zip') Something like: sys.path.insert(0, 'resource:path.lib.zip') The primary reason behind wanting to deliver via embedded resource is to prevent tinkering/tampering by end users. But there are additional reasons such as simpler deployment under Silverlight and not having to deal with versioning of extra "satellite" external resources when using our scripting runtime environment in multiple projects. All of those issues go away when we can package everything directly within the assembly(s). I am currently using a custom PlatformAdaptationLayer to supply the file contents at runtime and msbuild wildcard inclusion of the libraries and all subfolders to embed them as resources (something that msbuild tolerates, but Visual Studio does not). It would be much cleaner to just use zipimport, as well as much easier to maintain (and the distributed assembly would also be much smaller due to zip compression). Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Apr 2 23:14:30 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 2 Apr 2012 14:14:30 -0700 Subject: [Ironpython-users] Resource-based ZIP importer / meta_path importer In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0212A2@BY2PRD0710MB389.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0212A2@BY2PRD0710MB389.namprd07.prod.outlook.com> Message-ID: I actually started implementing the zipimport updates to support res:// urls, I haven't run into the same issue you have, I get the call to zipimporter with the res:// just fine. Where specifically were you running into issues with this? slide On Mon, Apr 2, 2012 at 1:20 PM, Keith Rome wrote: > Following up on this topic from a few weeks ago?. > > > > I did not file an issue on it, because it isn?t directly a part of the > python spec, so it?s more ?something I would like to see? and less > ?something isn?t working right?. > > > > Anyhow, I have been doing some tinkering. ?I feel like I am right at the > goal line, and just need a tiny bit of help to cross over it. > > > > The zipimport module is an implementation of ?PEP 273: Import Modules from > Zip Archives?. My first tinkerings were with modifying the zipimport class > and ZimImportModule class to facilitate using a URI path as in my suggestion > in the previous email. I ran into a brick wall with this however, because > PythonContext.InitializeModule() still makes calls to both System.IO.Path > directly as well as the GetFullPath() method of the current PAL. Both of > those things prevent me from being able to use anything but a path value > that is valid on the current file system (i.e., I can?t use a > ?://
/? scheme). > > > > In reading the details of PEP 273, I also learned about ?PEP 302: New Import > Hooks? (http://www.python.org/dev/peps/pep-0302/). This PEP looks to be > exactly what I want, because it is totally transparent to sys.path, and > therefore has no need for any of the path canonicalization workarounds that > I was running into with a PEP 273 solution. PEP 302 appears to already be > implemented in IronPython? at least sys.meta_path is there, and the > IronPython.Runtime.Importer class attempts to make use of it. > > > > So I fully implemented a zip resource based meta_path importer by following > the example of zipimport but adapting it for how meta_path is intended to > work. It appears to work fine for simple imports. But there is a major > problem I have encountered. The meta_path functionality does not appear to > be re-entrant, and I have not yet been able to figure out why. > > > > Implementing a meta_path importer is fairly simple (easier than a path hook > importer like zipimport). I just have to implement find_module() and > load_module() and append my importer to sys.meta_path. These work as > expected. But the final step of the importer protocol dictates that ?If the > module is a Python module (as opposed to a built-in module or a dynamically > loaded extension), it should execute the module's code in the module's > global name space (module.__dict__).? This is easy enough, and works exactly > like in zipimport. PythonContext.CompileModule() produces an executable > ScriptCode object, and I simply Run() it using the module?s Scope. > > > > This then proceeds to execute the module initialization code, which > invariably does some imports of its own. As a test case, I use the following > script: ?from multiprocessing import process?. The multiprocessing module > attempts to ?import os? among other things. I would expect this to invoke > find_module(?os?) and subsequently load_module(?os?) on my meta_path > importer. But it does not. For whatever reason, when initializing a module, > any internal attempts to resolve further imports seem to be ignoring > meta_path importers. These imports fail because they should have been > serviced by my meta_path importer, which was not invoked. > > > > 1.?????? Has anyone implemented a meta_path importer in IronPython that > could maybe shed some light on this? > > 2.?????? Is this working as intended? (doesn?t seem to be) > > 3.?????? Is the PEP 302 support perhaps incomplete? > > 4.?????? Am I maybe missing a step somewhere? > > > > I have followed the advice in PEP 302. In addition to everything zipimport > does, I am also setting __file__ to ??, and setting __path__ to an > empty List. I also ensure that the module is added to sys.modules before > executing the initialization code, and I check sys.modules at the very start > of my load_module() method to prevent double-loading. Although it would seem > that none of those things would have any bearing on this particular issue. > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: Slide [mailto:slide.o.mix at gmail.com] > Sent: Monday, March 12, 2012 10:03 AM > To: Keith Rome > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] IronPython 2.7.2 Released > > > > This is a great idea, this functionality does not currently exist, could you > please file a new issue at http://ironpython.codeplex.com? > > > > Thanks, > > > > slide > > On Sun, Mar 11, 2012 at 11:23 PM, Keith Rome wrote: > > Thanks for the great work! > > Regarding the new zipimport functionality - is it possible to specify an > embedded resource name for the path to the zip? For example, if I wanted to > distribute a library by just packaging it up within an assembly? Or is it > necessary to write the resource out to a file on disk first? > > Example: > Instead of: sys.path.insert(0, '/path/lib.zip') > Something like: sys.path.insert(0, 'resource:path.lib.zip') > > The primary reason behind wanting to deliver via embedded resource is to > prevent tinkering/tampering by end users. But there are additional reasons > such as simpler deployment under Silverlight and not having to deal with > versioning of extra "satellite" external resources when using our scripting > runtime environment in multiple projects. All of those issues go away when > we can package everything directly within the assembly(s). > > I am currently using a custom PlatformAdaptationLayer to supply the file > contents at runtime and msbuild wildcard inclusion of the libraries and all > subfolders to embed them as resources (something that msbuild tolerates, but > Visual Studio does not). It would be much cleaner to just use zipimport, as > well as much easier to maintain (and the distributed assembly would also be > much smaller due to zip compression). > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website:?http://earl-of-code.com From slide.o.mix at gmail.com Mon Apr 2 23:15:36 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 2 Apr 2012 14:15:36 -0700 Subject: [Ironpython-users] Resource-based ZIP importer / meta_path importer In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0212A2@BY2PRD0710MB389.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0212A2@BY2PRD0710MB389.namprd07.prod.outlook.com> Message-ID: Also, even if its not python compatible, its a good feature idea and so filing an issue would be appreciated. IronPython is in between .NET and Python, you can import .NET namespaces and use them, so something like this is not out of character and provides a benefit. slide On Mon, Apr 2, 2012 at 1:20 PM, Keith Rome wrote: > Following up on this topic from a few weeks ago?. > > > > I did not file an issue on it, because it isn?t directly a part of the > python spec, so it?s more ?something I would like to see? and less > ?something isn?t working right?. > > > > Anyhow, I have been doing some tinkering. ?I feel like I am right at the > goal line, and just need a tiny bit of help to cross over it. > > > > The zipimport module is an implementation of ?PEP 273: Import Modules from > Zip Archives?. My first tinkerings were with modifying the zipimport class > and ZimImportModule class to facilitate using a URI path as in my suggestion > in the previous email. I ran into a brick wall with this however, because > PythonContext.InitializeModule() still makes calls to both System.IO.Path > directly as well as the GetFullPath() method of the current PAL. Both of > those things prevent me from being able to use anything but a path value > that is valid on the current file system (i.e., I can?t use a > ?://
/? scheme). > > > > In reading the details of PEP 273, I also learned about ?PEP 302: New Import > Hooks? (http://www.python.org/dev/peps/pep-0302/). This PEP looks to be > exactly what I want, because it is totally transparent to sys.path, and > therefore has no need for any of the path canonicalization workarounds that > I was running into with a PEP 273 solution. PEP 302 appears to already be > implemented in IronPython? at least sys.meta_path is there, and the > IronPython.Runtime.Importer class attempts to make use of it. > > > > So I fully implemented a zip resource based meta_path importer by following > the example of zipimport but adapting it for how meta_path is intended to > work. It appears to work fine for simple imports. But there is a major > problem I have encountered. The meta_path functionality does not appear to > be re-entrant, and I have not yet been able to figure out why. > > > > Implementing a meta_path importer is fairly simple (easier than a path hook > importer like zipimport). I just have to implement find_module() and > load_module() and append my importer to sys.meta_path. These work as > expected. But the final step of the importer protocol dictates that ?If the > module is a Python module (as opposed to a built-in module or a dynamically > loaded extension), it should execute the module's code in the module's > global name space (module.__dict__).? This is easy enough, and works exactly > like in zipimport. PythonContext.CompileModule() produces an executable > ScriptCode object, and I simply Run() it using the module?s Scope. > > > > This then proceeds to execute the module initialization code, which > invariably does some imports of its own. As a test case, I use the following > script: ?from multiprocessing import process?. The multiprocessing module > attempts to ?import os? among other things. I would expect this to invoke > find_module(?os?) and subsequently load_module(?os?) on my meta_path > importer. But it does not. For whatever reason, when initializing a module, > any internal attempts to resolve further imports seem to be ignoring > meta_path importers. These imports fail because they should have been > serviced by my meta_path importer, which was not invoked. > > > > 1.?????? Has anyone implemented a meta_path importer in IronPython that > could maybe shed some light on this? > > 2.?????? Is this working as intended? (doesn?t seem to be) > > 3.?????? Is the PEP 302 support perhaps incomplete? > > 4.?????? Am I maybe missing a step somewhere? > > > > I have followed the advice in PEP 302. In addition to everything zipimport > does, I am also setting __file__ to ??, and setting __path__ to an > empty List. I also ensure that the module is added to sys.modules before > executing the initialization code, and I check sys.modules at the very start > of my load_module() method to prevent double-loading. Although it would seem > that none of those things would have any bearing on this particular issue. > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: Slide [mailto:slide.o.mix at gmail.com] > Sent: Monday, March 12, 2012 10:03 AM > To: Keith Rome > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] IronPython 2.7.2 Released > > > > This is a great idea, this functionality does not currently exist, could you > please file a new issue at http://ironpython.codeplex.com? > > > > Thanks, > > > > slide > > On Sun, Mar 11, 2012 at 11:23 PM, Keith Rome wrote: > > Thanks for the great work! > > Regarding the new zipimport functionality - is it possible to specify an > embedded resource name for the path to the zip? For example, if I wanted to > distribute a library by just packaging it up within an assembly? Or is it > necessary to write the resource out to a file on disk first? > > Example: > Instead of: sys.path.insert(0, '/path/lib.zip') > Something like: sys.path.insert(0, 'resource:path.lib.zip') > > The primary reason behind wanting to deliver via embedded resource is to > prevent tinkering/tampering by end users. But there are additional reasons > such as simpler deployment under Silverlight and not having to deal with > versioning of extra "satellite" external resources when using our scripting > runtime environment in multiple projects. All of those issues go away when > we can package everything directly within the assembly(s). > > I am currently using a custom PlatformAdaptationLayer to supply the file > contents at runtime and msbuild wildcard inclusion of the libraries and all > subfolders to embed them as resources (something that msbuild tolerates, but > Visual Studio does not). It would be much cleaner to just use zipimport, as > well as much easier to maintain (and the distributed assembly would also be > much smaller due to zip compression). > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website:?http://earl-of-code.com From no_reply at codeplex.com Wed Apr 4 09:52:29 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 4 Apr 2012 00:52:29 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/3/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] compile does not accept AST object 2. [New comment] 2.7.2.1 "load language" problem 3. [New comment] 2.7.2.1 "load language" problem 4. [New issue] Duplicate key in dict 5. [New comment] Duplicate key in dict 6. [New comment] Duplicate key in dict 7. [New comment] Duplicate key in dict 8. [New comment] Duplicate key in dict 9. [New comment] Duplicate key in dict 10. [New issue] ctypes.wndll can not be found 11. [New comment] ctypes.wndll can not be found ---------------------------------------------- ISSUES 1. [New issue] compile does not accept AST object http://ironpython.codeplex.com/workitem/32526 User paweljasinski has proposed the issue: "Compile documentation states: source can either be a string or an AST object. When I try to feed it with AST object it throws. $ /c/Program\ Files/IronPython\ 2.7/ipy -i test-ast-compile.py Traceback (most recent call last): File "test-ast-compile.py", line 12, in TypeError: expected str, got Expression>>> >>>"----------------- 2. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User Snake38 has commented on the issue: ""I uninstalled IronRuby then installed again this package and all things went ok. " Wow! For me it's working too! Thanks! Thanks for help ;)"----------------- 3. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User slide_o_mix has commented on the issue: "What version of IronRuby did you have installed?"----------------- 4. [New issue] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User back_hat has proposed the issue: "It's possible to create duplicate keys in the builtin dict type. I'm not sure of the exact trigger, but this is a small example (running on Windows 7 on top of VMWare): IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.239 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> d = {'1': 1, '2': 1, '3': 1, 'a7': 1, 'a8': 1} >>> d.pop('a7') 1 >>> d['a8'] += 0 >>> print d.keys() ['3', '2', '1', 'a8', 'a8'] Note key 'a8' appears twice."----------------- 5. [New comment] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User slide_o_mix has commented on the issue: "I don't get the same result. IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.225 (64-bit) Type "help", "copyright", "credits" or "license" for more information. >>> d = {'1': 1, '2': 1, '3': 1, 'a7': 1, 'a8': 1} >>> d.pop('a7') 1 >>> d['a8'] += 0 >>> print d.keys() ['a8', '1', '3', '2'] >>>"----------------- 6. [New comment] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User slide_o_mix has commented on the issue: "If I run under ipy.exe instead of ipy64.exe I DO get the same result. Are you on a 64-bit OS?"----------------- 7. [New comment] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User back_hat has commented on the issue: "I'm not on a 64 bit OS, I'm running the 32-bit version of Windows-7. (That's running on top of VMware Fusion, which is running on Mac OS-X 10.7.3, which is 64-bit, but I don't think that matters.) On my system, both ipy.exe and ipy64.exe produce the same result."----------------- 8. [New comment] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User slide_o_mix has commented on the issue: "Yeah, ipy64 is actually built for "Any CPU" so it should give the same result on 32-bit OS. I'll see about installing a 32-bit version of Windows to figure out what is going on."----------------- 9. [New comment] Duplicate key in dict http://ironpython.codeplex.com/workitem/32527 User back_hat has commented on the issue: "Here's a revised example, which shows two things: first that augmented assignment is not required, regular assignment works as well. Second, two keys correspond to the old value and the new value. Somehow, when the new key is being inserted it's not removing the old key, but is instead keeping it around with it's old value. IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.239 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> d = {'1': 1, '2': 1, '3': 1, 'a7': 1, 'a8': 1} >>> d.pop('a7') 1 >>> d['a8'] = 5 >>> print d.items() [('3', 1), ('2', 1), ('1', 1), ('a8', 5), ('a8', 1)]"----------------- 10. [New issue] ctypes.wndll can not be found http://ironpython.codeplex.com/workitem/32528 User harejohn has proposed the issue: "I have had to rename ctypes to _ctypes to get the import _ctypes for IronPython 2.7 to find it. Once I do this, the ctypes function is there until I start using wndll and its functions. The wndll functions fail immediately claiming they can not find _ctypes. This works fine in Python 2.7.1 Please advise."----------------- 11. [New comment] ctypes.wndll can not be found http://ironpython.codeplex.com/workitem/32528 User slide_o_mix has commented on the issue: "Please attach a test case" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Apr 5 05:54:42 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 4 Apr 2012 20:54:42 -0700 Subject: [Ironpython-users] IronPython Samples Message-ID: I've put together a set of IronPython samples: https://github.com/jdhardy/IronPythonSamples. They're still a bit early, but there are console, WinForms, and WPF samples. The idea was to show how you could embed IronPython in various types of applications. There's also a pure-Python WPF app (and kudos to Dino & co. for the WPF integration in PTVS - it works better than I expected). Check out, and let me know what other project types I should add. I think the next will be Android, and then WP7 (which will also help them, ya know, work). - Jeff From jdhardy at gmail.com Thu Apr 5 05:57:18 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 4 Apr 2012 20:57:18 -0700 Subject: [Ironpython-users] IronPython GSoC 2012 Message-ID: The student application deadline for Google Summer of Code 2012 is *this Friday* (April 6). If you're a student, you're interested in IronPython, and you want to get paid to work on it, this is your chance. If you need ideas, check out https://github.com/IronLanguages/main/wiki/IronPython-GSoC-2012-Ideas. Last year we didn't get any applications at all; I'm hoping this year we get at least one! - Jeff From doug.blank at gmail.com Thu Apr 5 06:31:22 2012 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 5 Apr 2012 00:31:22 -0400 Subject: [Ironpython-users] IronPython Samples In-Reply-To: References: Message-ID: Jeff, I'd be glad to send you a Python Gtk example. That would be a graphical sample that runs on all platforms. -Doug On Wed, Apr 4, 2012 at 11:54 PM, Jeff Hardy wrote: > I've put together a set of IronPython samples: > https://github.com/jdhardy/IronPythonSamples. They're still a bit > early, but there are console, WinForms, and WPF samples. The idea was > to show how you could embed IronPython in various types of > applications. There's also a pure-Python WPF app (and kudos to Dino & > co. for the WPF integration in PTVS - it works better than I > expected). > > Check out, and let me know what other project types I should add. I > think the next will be Android, and then WP7 (which will also help > them, ya know, work). > > - Jeff > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From bg271828 at gmail.com Thu Apr 5 06:38:41 2012 From: bg271828 at gmail.com (Bill) Date: Thu, 5 Apr 2012 00:38:41 -0400 Subject: [Ironpython-users] scope get/set variable and invoking python function Message-ID: I am having a problem in ironpython 2.7.2.1 with executing a python function that changes variables set in the scope via SetVariable. The problem is these variables are never actually updated on the c# side after the python function executes. Here is a couple different examples, all of which don't work: The python code: def TestFunction(): Test1 = 4 The c# code: Example 1: ScriptEngine sEng = Python.CreateEngine(); ScriptScope scope; dynamic fHand; scope = sEng.Runtime.CreateScope(); scope.SetVariable("Test1", 0); fHand = sEng.ExecuteFile("c:\test.py"); // Contains python code listed above if (scope.ContainsVariable("TestFunction")) fHand.TestFunction(); int result = scope.GetVariable("Test1"); // This is still set to 0 when it should be set to 4 now. Example 2: ScriptScope scope = Python.CreateRuntime().UseFile("c:\test.py"); dynamic fHand = scope; scope.SetVariable("Test1", 0); if (scope.ContainsVariable("TestFunction")) fHand.TestFunction(); int result = scope.GetVariable("Test1"); // This is still set to 0 when it should be set to 4 now. What am I missing here? Is it really that python functions cannot update variables set in the scope? Python code outside of functions are able to update them without any issues. From slide.o.mix at gmail.com Thu Apr 5 06:40:34 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 4 Apr 2012 21:40:34 -0700 Subject: [Ironpython-users] scope get/set variable and invoking python function In-Reply-To: References: Message-ID: The Test1 inside the function is not the same as the Test1 outside the function, you need to make the Test1 in the function a reference to the global Test1 for the scope. Try this def TestFunction() global Test1 Test1 = 4 On Wed, Apr 4, 2012 at 9:38 PM, Bill wrote: > I am having a problem in ironpython 2.7.2.1 with executing a python > function that changes variables set in the scope via SetVariable. The > problem is these variables are never actually updated on the c# side > after the python function executes. Here is a couple different > examples, all of which don't work: > > The python code: > > def TestFunction(): > ? ?Test1 = 4 > > The c# code: > > Example 1: > > ScriptEngine sEng = Python.CreateEngine(); > ScriptScope scope; > dynamic fHand; > > scope = sEng.Runtime.CreateScope(); > > scope.SetVariable("Test1", 0); > > fHand = sEng.ExecuteFile("c:\test.py"); // Contains python code listed above > if (scope.ContainsVariable("TestFunction")) > ? ?fHand.TestFunction(); > > int result = scope.GetVariable("Test1"); // This is still set to > 0 when it should be set to 4 now. > > Example 2: > > ScriptScope scope = Python.CreateRuntime().UseFile("c:\test.py"); > dynamic fHand = scope; > scope.SetVariable("Test1", 0); > > if (scope.ContainsVariable("TestFunction")) > ? ?fHand.TestFunction(); > > int result = scope.GetVariable("Test1"); // This is still set to > 0 when it should be set to 4 now. > > > What am I missing here? Is it really that python functions cannot > update variables set in the scope? Python code outside of functions > are able to update them without any issues. > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -- Website:?http://earl-of-code.com From slide.o.mix at gmail.com Thu Apr 5 06:43:42 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 4 Apr 2012 21:43:42 -0700 Subject: [Ironpython-users] scope get/set variable and invoking python function In-Reply-To: References: Message-ID: FYI, if you only want to READ the global variable, you don't need to do what I said below, but to write to it, you have to "declare" it as a global before writing to it inside the function. On Wed, Apr 4, 2012 at 9:40 PM, Slide wrote: > The Test1 inside the function is not the same as the Test1 outside the > function, you need to make the Test1 in the function a reference to > the global Test1 for the scope. Try this > > def TestFunction() > ? ?global Test1 > ? ?Test1 = 4 > > On Wed, Apr 4, 2012 at 9:38 PM, Bill wrote: >> I am having a problem in ironpython 2.7.2.1 with executing a python >> function that changes variables set in the scope via SetVariable. The >> problem is these variables are never actually updated on the c# side >> after the python function executes. Here is a couple different >> examples, all of which don't work: >> >> The python code: >> >> def TestFunction(): >> ? ?Test1 = 4 >> >> The c# code: >> >> Example 1: >> >> ScriptEngine sEng = Python.CreateEngine(); >> ScriptScope scope; >> dynamic fHand; >> >> scope = sEng.Runtime.CreateScope(); >> >> scope.SetVariable("Test1", 0); >> >> fHand = sEng.ExecuteFile("c:\test.py"); // Contains python code listed above >> if (scope.ContainsVariable("TestFunction")) >> ? ?fHand.TestFunction(); >> >> int result = scope.GetVariable("Test1"); // This is still set to >> 0 when it should be set to 4 now. >> >> Example 2: >> >> ScriptScope scope = Python.CreateRuntime().UseFile("c:\test.py"); >> dynamic fHand = scope; >> scope.SetVariable("Test1", 0); >> >> if (scope.ContainsVariable("TestFunction")) >> ? ?fHand.TestFunction(); >> >> int result = scope.GetVariable("Test1"); // This is still set to >> 0 when it should be set to 4 now. >> >> >> What am I missing here? Is it really that python functions cannot >> update variables set in the scope? Python code outside of functions >> are able to update them without any issues. >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > > > -- > Website:?http://earl-of-code.com -- Website:?http://earl-of-code.com From jdhardy at gmail.com Thu Apr 5 07:44:24 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 4 Apr 2012 22:44:24 -0700 Subject: [Ironpython-users] IronPython Samples In-Reply-To: References: Message-ID: On Wed, Apr 4, 2012 at 9:31 PM, Doug Blank wrote: > Jeff, > > I'd be glad to send you a Python Gtk example. That would be a > graphical sample that runs on all platforms. That would be great. Ideally you could use the same core app as the rest of the samples, but if you've already got something that's fine as well. - Jeff > > -Doug > > On Wed, Apr 4, 2012 at 11:54 PM, Jeff Hardy wrote: >> I've put together a set of IronPython samples: >> https://github.com/jdhardy/IronPythonSamples. They're still a bit >> early, but there are console, WinForms, and WPF samples. The idea was >> to show how you could embed IronPython in various types of >> applications. There's also a pure-Python WPF app (and kudos to Dino & >> co. for the WPF integration in PTVS - it works better than I >> expected). >> >> Check out, and let me know what other project types I should add. I >> think the next will be Android, and then WP7 (which will also help >> them, ya know, work). >> >> - Jeff >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Thu Apr 5 09:54:25 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 5 Apr 2012 00:54:25 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/4/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] ScriptScope.ContainsVariable throws MissingMemberException internally 2. [New comment] 2.7.2.1 "load language" problem ---------------------------------------------- ISSUES 1. [New issue] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has proposed the issue: "ScriptScope.ContainsVariable throws MissingMemberException internally when the variable is not contained. The exception is catched and false is returned as expected, but the exception still gets logged to debug output in Visual Studio as "A first chance exception of type 'System.MissingMemberException' occurred in Anonymously Hosted DynamicMethods Assembly" which is farily confusing and annoying."----------------- 2. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User becio has commented on the issue: "I think it was 1.1.0.0 the same as the IronPython version that I still have registered, but I'm not sure." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Apr 6 09:53:09 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 6 Apr 2012 00:53:09 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/5/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 3. [New comment] 2.7.2.1 "load language" problem 4. [New comment] 2.7.2.1 "load language" problem 5. [New comment] 2.7.2.1 "load language" problem ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User MarkusSchaber has commented on the issue: "It is even more annoying if you configured visual studio to break on exceptions. :-("----------------- 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User slide_o_mix has commented on the issue: "What would you propose as a solution?"----------------- 3. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User Snake38 has commented on the issue: "IronRuby 1.1.3"----------------- 4. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User eblumenfeld has commented on the issue: "Today I uninstalled IronRuby 1.1.3, installed IronPython 2.7.1, and installed IronRuby 1.1.3 again Found out that both interpreters were working: ipy and ir However, when I tried to install gems in IronRuby (igem) I got the same error we are discussing in this thread: Microsoft.Scripting.Utils.ArrayUtils.ConvertAll ..... (in this case from the IronRuby Side...) Regards, Eduardo"----------------- 5. [New comment] 2.7.2.1 "load language" problem http://ironpython.codeplex.com/workitem/32452 User eblumenfeld has commented on the issue: "Forgot to mention that the box was XP Pro 32 bits" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Apr 7 13:04:08 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 7 Apr 2012 04:04:08 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/6/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "This happens because ContainsVariable() internally routes through IDMOP's BindGetMember and attempts to form a CallSite. Since your IDMOP container (the ScriptScope) has no member of that name, it throws an exception deep down in the DLR when it tries to resolve that unresolvable CallSite. You can avoid the whole problem if you just call GetVariableNames() instead, and use Contains() on that. The last two lines of the following code are functionally identical, except for the exception-throwing behavior: var engine = Python.CreateEngine(); var test = engine.CreateScope(); bool tmp; tmp = test.GetVariableNames().Contains("foo"); tmp = test.ContainsVariable("foo"); "----------------- 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "In fact, I see no reason why ContainsVariable() shouldn't just use the GetMemberNames().Contains() form. It would be far more lightweight, yes? The only "downside" I can think of is perhaps the current form exercises a lot more of the DLR binding and might catch dynamic dispatch problems more quickly? The current design is logically the same as doing this, but with a lot more ceremony: public bool ContainsVariable(ScriptScope test) { dynamic bar = test; try { var dummy = bar.foo; return true; } catch { return false; } } And of course, if we saw that in our own code we would probably shiver a little bit. " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Tue Apr 10 13:59:03 2012 From: slide.o.mix at gmail.com (Slide) Date: Tue, 10 Apr 2012 04:59:03 -0700 Subject: [Ironpython-users] Startup performance In-Reply-To: References: <1371338792.20120316115509@mail.com> Message-ID: Agreed, I think what I need to do is have a couple REQUIRED libraries similar to how csc does it (mscorlib, etc are referenced automatically unless told not to) and then other libraries will be embedded with a /ref param or something. I'll take a look. On Fri, Mar 16, 2012 at 9:31 AM, Jeff Hardy wrote: > On Fri, Mar 16, 2012 at 9:12 AM, Slide wrote: >> How long does it take if you run in script form? Just wondering for >> comparison. > > Yeah, that would be a good comparison - .NET will have to JIT all of > IronPython as it loads, which can take some time. The installer runs > NGEN to reduce this pretty significantly. Plus the compiled exes are > pretty big, which is a lot of code to load from disk. > > Alex, it might be worth having an option to exclude > IronPython.Modules/Sqlite/Wpf just to reduce the disk size a bit. > > - Jeff -- Website:?http://earl-of-code.com From no_reply at codeplex.com Wed Apr 11 16:18:43 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 11 Apr 2012 07:18:43 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/10/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has commented on the issue: "Thanks for the workaround with "GetVariableNames().Contains(name)"! Does anyone know if there's a performance penalty with this approach? The same problem also exists for ScriptScope.TryGetVariable(). I'm considering using "if(scope.GetVariableNames().Contains(name)) scope.GetVariable(name)" instead. It would of course still be great if this could be fixed in ScriptScope.Contains() and ScriptScope.TryGetVariable() itself."----------------- 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has commented on the issue: "I just quickly tested the performance of scope.ContainsVariable() (CV) vs. scope.GetVariableNames().Contains() (GVC) in my use case: Result | GVC Average | CV Average | GVC StdDev | CV StdDev true | 0.013863441 | 0.002355914 | 0.007359396 | 0.001139271 false | 0.120864103 | 33.03118077 | 0.882787111 | 1.135868631 So scope.ContainsVariable() was ~5.8 times faster if the result is true, but ~273 times slower if the result is false. (Disclaimer: Probably not a very accurate or representative test.)"----------------- 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "For your test, I presume you tried accessing the same variable repeatedly in a loop? CallSite caching might be coming into play. Depending on your actual situation, that might either support or invalidate the test. For CV, the runtime is setting up an exception frame, looking to see if a callsite is cached for the expected member / signature, and if so then it returns true (fast case). If not, then it attempts to create and cache the callsite and throws the exception if that fails (slow case). The first access of any member should be very slow, but subsequent accesses should be much quicker. I presumed GVC was simply returning the Keys of an internal dictionary, which I would have expected to perform better in all cases. In looking deeper at the implementation, GVC actually doesn't do that exactly. It too routes through a callsite (however, a callsite that is always going to succeed) to reach GetMemberNames on the internal ScopeStorage container. I don't really see a clean way to optimize it since _storage on Scope is dynamic and has several possible concrete implementations in Microsoft.Scripting. So your best bet is to use CV if you expect the variable to be there the vast majority of the time, but use GCV if the chances of it not being there are high, or if you just need to be conservative. If the object's name table is stable then you could hold on to the GVN results instead of requerying each time, which should yield the best performance." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Apr 12 12:58:17 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 12 Apr 2012 03:58:17 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/11/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has commented on the issue: "Thanks for all the insights. > For your test, I presume you tried accessing the same variable repeatedly in a loop? Well, I timed my actual use case where various different variables are accessed in multiple scopes. Usually 2-6 variables get tested (on average twice per variable) per scope. Just one variable was tested more than 10 times in the same scope. (The same variables names are used in the different scopes, though I doubt that this matters for caching.) > I don't really see a clean way to optimize it since _storage on Scope is dynamic and has several possible concrete implementations in Microsoft.Scripting. So this is unlikely to get changed?"----------------- 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User jdhardy has commented on the issue: "My only possible concern with replacing CV with GV+C has to do with dynamic member lists, as you would get with an object implementing __getattr__ or (especially) missing_member. A dynamic object might not be able to return it's complete member list (possibly because it's infinite) yet still respond to GetMember correctly. Attempting to access it and then catching an exception is the only way to be sure. A try-except block is also essentially how CPython's hasattr is implemented, so it's not completely crazy. :)"----------------- 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User jdhardy has commented on the issue: "Hmm, somehow I missed that this was about ScriptScope, not dynamic objects in general. As Keith said, Scopes can be backed by any dynamic object, but I don't think that's the common case. However, looking at the code (line 4027 in ./IronPython/Runtime/PythonContext.cs) it optimizes for the fast path already. Can you provide a self-contained example that reproduces the issue?" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Apr 13 13:00:28 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 13 Apr 2012 04:00:28 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/12/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Strange inconsistency between CPython and IronPython regarding zip file reading 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally 4. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New issue] Strange inconsistency between CPython and IronPython regarding zip file reading http://ironpython.codeplex.com/workitem/32570 User Markell has proposed the issue: "http://stackoverflow.com/questions/10123422/strange-inconsistency-between-cpython-and-ironpython-regarding-zip-file-reading In short: PS Z:\dev\poc\SDR> ipy64 IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.225 Type "help", "copyright", "credits" or "license" for more information. >>> from zipfile import ZipFile >>> z=ZipFile('d:/aaa.zip') >>> input=z.open(z.namelist()[0]) >>> next(input) b'aaa,bbb\n' >>> next(input) '123,456\n' >>> Notice the difference in output between the first (aaa,bbb) and the second (123,456) lines."----------------- 2. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has commented on the issue: "Attached file ScriptHostContainsVariableMissingMemberException.cs is a very simple console application that demonstrates the issue. (When run in Visual Studio Debug mode with debugger attached.) > so it's not completely crazy. :) It's not completely crazy, but I guess the CPython world has different accepted conventions than the .NET world. And the respective tools are suited more or less to code in these accepted conventions. So for IronPython it might be preferable to use conventions that work well with the .NET tools (like the Visual Studio debugger). Python Documentation Glossary http://docs.python.org/release/3.0/glossary.html#term-eafp "EAFP Easier to ask for forgiveness than permission. This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style is characterized by the presence of many try and except statements. The technique contrasts with the LBYL style common to many other languages such as C." vs. .NET Design Guidelines for Exceptions http://msdn.microsoft.com/en-us/library/ms229030.aspx "Do not use exceptions for normal flow of control, if possible. Except for system failures and operations with potential race conditions, framework designers should design APIs so that users can write code that does not throw exceptions. For example, you can provide a way to check preconditions before calling a member so that users can write code that does not throw exceptions.""----------------- 3. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "One more thought I had is that (I think) you could use one of the other overloads of CreateScope() that allows you to provide the storage medium and just bypass all of the IDMOP plumbing. For example, you could have your own instance of a IDictionary and pass that to the proper CreateScope() method. IronPython should be fine with this as far as I know, and your original reference to the IDictionary should still be valid too. So you can directly access Keys and Values as well as the indexer of the dictionary without going through any callsite or other dynamic dispatching. At least, I believe that statement to be correct. I haven't actually tried it. Wouldn't this be viable? var storage = new Dictionary(); var scope = engine.CreateScope(storage); // .... use the scope to execute a script... var hasMember = storage.ContainsKey("foo"); Or is this just how the scope storage mechanism works? "----------------- 4. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "Actually, I just tried that and it indeed seems to work as expected and allows you to interrogate the scope directly through the static-typed IDictionary interface. Of course, this might not be usable for all situations, but I am not sure what those cases might be. I attached an amended copy of your sample to demonstrate. Does this solve the issues at hand?" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Tue Apr 17 06:20:59 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 16 Apr 2012 21:20:59 -0700 Subject: [Ironpython-users] Module as member of another module Message-ID: I am getting back to my pyexpat implementation and one of the things in pyexpat is that the errors member is a module with the errors and a way to convert an error number to a message. So, print pyexpat.errors should print out that it is a module to be compatible with CPython, I am just not sure how to achieve that since PythonModule's are generally static classes in C#. Should I just generate the module on the fly and fill in the __dict__? Thanks, slide -- Website:?http://earl-of-code.com From no_reply at codeplex.com Tue Apr 17 09:53:50 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 17 Apr 2012 00:53:50 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/16/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Reading UTF-8 file with codecs in IronPython 2. [New comment] Reading UTF-8 file with codecs in IronPython 3. [New comment] Implement winsound module 4. [New comment] Implement _bisect module ---------------------------------------------- ISSUES 1. [New issue] Reading UTF-8 file with codecs in IronPython http://ironpython.codeplex.com/workitem/32585 User play_me_too has proposed the issue: "I have a .csv file encoded in UTF-8, which contains both latin and cyrillic symbols (in attachments). I'm trying to execute following script in IronPython 2.7.1: import codecs f = codecs.open(r"file.csv", "rb", "utf-8") f.next() During the execution of f.next() an exception occurs: Traceback (most recent call last): File "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\1.1\visualstudio_py_repl.py", line 492, in run_file_as_main code.Execute(self.exec_mod) File "", line 4, in File "C:\Program Files\IronPython 2.7.1\Lib\codecs.py", line 684, in next return self.reader.next() File "C:\Program Files\IronPython 2.7.1\Lib\codecs.py", line 615, in next line = self.readline() File "C:\Program Files\IronPython 2.7.1\Lib\codecs.py", line 530, in readline data = self.read(readsize, firstline=True) File "C:\Program Files\IronPython 2.7.1\Lib\codecs.py", line 477, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeEncodeError: ('unknown', '\x00', 0, 1, '') At the same time in CPython 2.7 the script works correctly. Also in the IronPython 2.7.1 following script works fine: import codecs f = codecs.open(r"file.csv", "rb", "utf-8") f.readlines() Does anybody know what may cause such strange behavior?"----------------- 2. [New comment] Reading UTF-8 file with codecs in IronPython http://ironpython.codeplex.com/workitem/32585 User play_me_too has commented on the issue: "This is a repost of my question http://stackoverflow.com/questions/10123296/reading-utf-8-file-with-codecs-in-ironpython which I made because that seems to be a bug in codecs module "----------------- 3. [New comment] Implement winsound module http://ironpython.codeplex.com/workitem/21405 User slide_o_mix has commented on the issue: "Fixed in 4c06d92"----------------- 4. [New comment] Implement _bisect module http://ironpython.codeplex.com/workitem/21392 User slide_o_mix has commented on the issue: "Fixed in 4c06d92" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Apr 18 16:20:03 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 18 Apr 2012 07:20:03 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/17/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User rumzeus has commented on the issue: "I tried your suggested Dictionary storage. That seems to work, yes. Are there any downsides?" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattias at goodsolutions.se Wed Apr 18 20:41:14 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Wed, 18 Apr 2012 20:41:14 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application Message-ID: Hi, I'm new to scripting and would like to add support for IronPython to our Silverlight application, I have tried to find an answer on the net but could not find anyone else facing the same problem. The app is an out of browser application. I've added the latest release (2.7.2) from nuget, checked that the binaries being used is from the SL5 libs-catalog: IronPython.2.7.2\lib\Sl5 The code I use to create the scripting engine is the following: .. _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); _python = _runtime.GetEngine("py"); .. When GetEngine is executed I'll the following secutiry exception: "{System.MethodAccessException: Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed. at IronPython.Modules.SysModule.GetPrefix() at IronPython.Modules.SysModule..cctor()}" When checking the code at GitHub for the method: GetPrefix() There are code checking a compiler-constant that seems to be if you running in "silverlight" (don't have diskaccess to the libs), but the code seems to be executed anyway, which makes me wonder if I still doesn't use the correct libs for Silverlight. Would really appreciate if someone could point me in the right direction. Have a nice day! -- Best regards, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Wed Apr 18 21:10:15 2012 From: rome at Wintellect.com (Keith Rome) Date: Wed, 18 Apr 2012 19:10:15 +0000 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Does this not work for you? using IronPython.Hosting; // ... _python = Python.CreateEngine(); I believe that should handle the simple/typical scenarios, unless you need to alter the environment (such as plugging in a custom Host/PAL). If you need to customize the environment, then this should work: var options = new Dictionary(); ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); _runtime = new ScriptRuntime(setup); _python = Python.GetEngine(_runtime); This code should work exactly the same on desktop CLR and Silverlight. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Mattias Ahlenius Sent: Wednesday, April 18, 2012 2:41 PM To: ironpython-users at python.org Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application Hi, I'm new to scripting and would like to add support for IronPython to our Silverlight application, I have tried to find an answer on the net but could not find anyone else facing the same problem. The app is an out of browser application. I've added the latest release (2.7.2) from nuget, checked that the binaries being used is from the SL5 libs-catalog: IronPython.2.7.2\lib\Sl5 The code I use to create the scripting engine is the following: .. _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); _python = _runtime.GetEngine("py"); .. When GetEngine is executed I'll the following secutiry exception: "{System.MethodAccessException: Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed. at IronPython.Modules.SysModule.GetPrefix() at IronPython.Modules.SysModule..cctor()}" When checking the code at GitHub for the method: GetPrefix() There are code checking a compiler-constant that seems to be if you running in "silverlight" (don't have diskaccess to the libs), but the code seems to be executed anyway, which makes me wonder if I still doesn't use the correct libs for Silverlight. Would really appreciate if someone could point me in the right direction. Have a nice day! -- Best regards, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattias at goodsolutions.se Wed Apr 18 21:16:24 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Wed, 18 Apr 2012 21:16:24 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Thanks for your quick reply Keith, Tried you code and I still get the same Exception: "Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed." /Mattias 2012/4/18 Keith Rome > Does this not work for you?**** > > ** ** > > using IronPython.Hosting;**** > > // ...**** > > _python = Python.CreateEngine();**** > > ** ** > > I believe that should handle the simple/typical scenarios, unless you need > to alter the environment (such as plugging in a custom Host/PAL).**** > > ** ** > > If you need to customize the environment, then this should work:**** > > ** ** > > var options = new Dictionary();**** > > ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options);**** > > _runtime = new ScriptRuntime(setup);**** > > _python = Python.GetEngine(_runtime);**** > > ** ** > > ** ** > > This code should work exactly the same on desktop CLR and Silverlight.**** > > ** ** > > ** ** > > ** ** > > *Keith Rome* > > *Senior Consultant and Architect* > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS**** > > Wintellect | 770.617.4016 | krome at wintellect.com **** > > www.wintellect.com**** > > ** ** > > *From:* ironpython-users-bounces+rome=wintellect.com at python.org [mailto: > ironpython-users-bounces+rome=wintellect.com at python.org] *On Behalf Of *Mattias > Ahlenius > *Sent:* Wednesday, April 18, 2012 2:41 PM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] Problem with embedding IronPython into > Silverlight Application**** > > ** ** > > Hi,**** > > ** ** > > I'm new to scripting and would like to add support for IronPython to our > Silverlight application, I have tried to find an answer on the net but > could not find anyone else facing the same problem. The app is an out of > browser application.**** > > ** ** > > I've added the latest release (2.7.2) from nuget, checked that the > binaries being used is from the SL5 libs-catalog: IronPython.2.7.2\lib\Sl5 > **** > > ** ** > > The code I use to create the scripting engine is the following:**** > > ** ** > > ..**** > > _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true));**** > > _python = _runtime.GetEngine("py");**** > > ..**** > > ** ** > > When GetEngine is executed I'll the following secutiry exception: > > "{System.MethodAccessException: Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > method 'System.Reflection.Assembly.get_Location()' failed.**** > > at IronPython.Modules.SysModule.GetPrefix()**** > > at IronPython.Modules.SysModule..cctor()}" > > When checking the code at GitHub for the method: GetPrefix()**** > > ** ** > > There are code checking a compiler-constant that seems to be if you > running in "silverlight" (don't have diskaccess to the libs), but the code > seems to be executed anyway, which makes me wonder if I still doesn't use > the correct libs for Silverlight.**** > > ** ** > > ** ** > > Would really appreciate if someone could point me in the right direction.* > *** > > ** ** > > ** ** > > Have a nice day!**** > > -- **** > > Best regards,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Wed Apr 18 21:32:23 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 18 Apr 2012 12:32:23 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Please make sure you have 2.5.2.1 and not just 2.5.2. On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius wrote: > Thanks for your quick reply Keith, > > Tried you code and I still get the same Exception: > > "Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > method 'System.Reflection.Assembly.get_Location()' failed." > > /Mattias > > > > 2012/4/18 Keith Rome >> >> Does this not work for you? >> >> >> >> using IronPython.Hosting; >> >> // ... >> >> _python = Python.CreateEngine(); >> >> >> >> I believe that should handle the simple/typical scenarios, unless you need >> to alter the environment (such as plugging in a custom Host/PAL). >> >> >> >> If you need to customize the environment, then this should work: >> >> >> >> var options = new Dictionary(); >> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >> >> _runtime = new ScriptRuntime(setup); >> >> _python = Python.GetEngine(_runtime); >> >> >> >> >> >> This code should work exactly the same on desktop CLR and Silverlight. >> >> >> >> >> >> >> >> Keith Rome >> >> Senior Consultant and Architect >> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> >> Wintellect | 770.617.4016 | krome at wintellect.com >> >> www.wintellect.com >> >> >> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf >> Of Mattias Ahlenius >> Sent: Wednesday, April 18, 2012 2:41 PM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] Problem with embedding IronPython into >> Silverlight Application >> >> >> >> Hi, >> >> >> >> I'm new to scripting and would like to add support for IronPython to our >> Silverlight application, I have tried to find an answer on the net but could >> not find anyone else facing the same problem. The app is an out of browser >> application. >> >> >> >> I've added the latest release (2.7.2) from nuget, checked that the >> binaries being used is from the SL5 libs-catalog:?IronPython.2.7.2\lib\Sl5 >> >> >> >> The code I use to create the scripting engine is the following: >> >> >> >> .. >> >> >> ????????????_runtime?=?new?ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >> >> ????????????_python?=?_runtime.GetEngine("py"); >> >> .. >> >> >> >> When GetEngine is executed I'll the following secutiry exception: >> >> "{System.MethodAccessException: Attempt by security transparent method >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >> method 'System.Reflection.Assembly.get_Location()' failed. >> >> ? ?at IronPython.Modules.SysModule.GetPrefix() >> >> ? ?at IronPython.Modules.SysModule..cctor()}" >> >> When checking the code at GitHub for the method: GetPrefix() >> >> >> >> There are code checking a compiler-constant that seems to be if you >> running in "silverlight" (don't have diskaccess to the libs), but the code >> seems to be executed anyway, which makes me wonder if I still doesn't use >> the correct libs for Silverlight. >> >> >> >> >> >> Would really appreciate if someone could point me in the right direction. >> >> >> >> >> >> Have a nice day! >> >> -- >> >> Best regards, >> >> >> >> Mattias Ahlenius >> >> 031 - 788 19 25 >> >> >> >> Good Solutions AB >> >> http://www.goodsolutions.se >> >> > > > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website:?http://earl-of-code.com From mattias at goodsolutions.se Wed Apr 18 22:44:41 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Wed, 18 Apr 2012 22:44:41 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. and not 2.5..) Message: Failed to load language 'IronPython 2.7.2.1': The type initializer for 'IronPython.Modules.SysModule' threw an exception. InnerException: "Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed." /Mattias 2012/4/18 Slide > Please make sure you have 2.5.2.1 and not just 2.5.2. > > On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius > wrote: > > Thanks for your quick reply Keith, > > > > Tried you code and I still get the same Exception: > > > > "Attempt by security transparent method > > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > > method 'System.Reflection.Assembly.get_Location()' failed." > > > > /Mattias > > > > > > > > 2012/4/18 Keith Rome > >> > >> Does this not work for you? > >> > >> > >> > >> using IronPython.Hosting; > >> > >> // ... > >> > >> _python = Python.CreateEngine(); > >> > >> > >> > >> I believe that should handle the simple/typical scenarios, unless you > need > >> to alter the environment (such as plugging in a custom Host/PAL). > >> > >> > >> > >> If you need to customize the environment, then this should work: > >> > >> > >> > >> var options = new Dictionary(); > >> > >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); > >> > >> _runtime = new ScriptRuntime(setup); > >> > >> _python = Python.GetEngine(_runtime); > >> > >> > >> > >> > >> > >> This code should work exactly the same on desktop CLR and Silverlight. > >> > >> > >> > >> > >> > >> > >> > >> Keith Rome > >> > >> Senior Consultant and Architect > >> > >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > >> > >> Wintellect | 770.617.4016 | krome at wintellect.com > >> > >> www.wintellect.com > >> > >> > >> > >> From: ironpython-users-bounces+rome=wintellect.com at python.org > >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > Behalf > >> Of Mattias Ahlenius > >> Sent: Wednesday, April 18, 2012 2:41 PM > >> To: ironpython-users at python.org > >> Subject: [Ironpython-users] Problem with embedding IronPython into > >> Silverlight Application > >> > >> > >> > >> Hi, > >> > >> > >> > >> I'm new to scripting and would like to add support for IronPython to our > >> Silverlight application, I have tried to find an answer on the net but > could > >> not find anyone else facing the same problem. The app is an out of > browser > >> application. > >> > >> > >> > >> I've added the latest release (2.7.2) from nuget, checked that the > >> binaries being used is from the SL5 > libs-catalog: IronPython.2.7.2\lib\Sl5 > >> > >> > >> > >> The code I use to create the scripting engine is the following: > >> > >> > >> > >> .. > >> > >> > >> > _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); > >> > >> _python = _runtime.GetEngine("py"); > >> > >> .. > >> > >> > >> > >> When GetEngine is executed I'll the following secutiry exception: > >> > >> "{System.MethodAccessException: Attempt by security transparent method > >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > >> method 'System.Reflection.Assembly.get_Location()' failed. > >> > >> at IronPython.Modules.SysModule.GetPrefix() > >> > >> at IronPython.Modules.SysModule..cctor()}" > >> > >> When checking the code at GitHub for the method: GetPrefix() > >> > >> > >> > >> There are code checking a compiler-constant that seems to be if you > >> running in "silverlight" (don't have diskaccess to the libs), but the > code > >> seems to be executed anyway, which makes me wonder if I still doesn't > use > >> the correct libs for Silverlight. > >> > >> > >> > >> > >> > >> Would really appreciate if someone could point me in the right > direction. > >> > >> > >> > >> > >> > >> Have a nice day! > >> > >> -- > >> > >> Best regards, > >> > >> > >> > >> Mattias Ahlenius > >> > >> 031 - 788 19 25 > >> > >> > >> > >> Good Solutions AB > >> > >> http://www.goodsolutions.se > >> > >> > > > > > > > > > > -- > > > > Med v?nlig h?lsning, > > > > Mattias Ahlenius > > 031 - 788 19 25 > > > > Good Solutions AB > > http://www.goodsolutions.se > > > > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > > > > > -- > Website: http://earl-of-code.com > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Wed Apr 18 22:48:17 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 18 Apr 2012 13:48:17 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: This really sounds like the assemblies you are referencing are not really the SL assemblies, can you open the assembly in ILSpy and decompile GetPrefix and see what you have? slide On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius wrote: > Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. > and not 2.5..) > > Message: Failed to load language 'IronPython 2.7.2.1': The type > initializer for 'IronPython.Modules.SysModule' threw an exception. > > InnerException: > > "Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > method 'System.Reflection.Assembly.get_Location()' failed." > > /Mattias > > 2012/4/18 Slide > >> Please make sure you have 2.5.2.1 and not just 2.5.2. >> >> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >> wrote: >> > Thanks for your quick reply Keith, >> > >> > Tried you code and I still get the same Exception: >> > >> > "Attempt by security transparent method >> > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >> > method 'System.Reflection.Assembly.get_Location()' failed." >> > >> > /Mattias >> > >> > >> > >> > 2012/4/18 Keith Rome >> >> >> >> Does this not work for you? >> >> >> >> >> >> >> >> using IronPython.Hosting; >> >> >> >> // ... >> >> >> >> _python = Python.CreateEngine(); >> >> >> >> >> >> >> >> I believe that should handle the simple/typical scenarios, unless you >> need >> >> to alter the environment (such as plugging in a custom Host/PAL). >> >> >> >> >> >> >> >> If you need to customize the environment, then this should work: >> >> >> >> >> >> >> >> var options = new Dictionary(); >> >> >> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >> >> >> >> _runtime = new ScriptRuntime(setup); >> >> >> >> _python = Python.GetEngine(_runtime); >> >> >> >> >> >> >> >> >> >> >> >> This code should work exactly the same on desktop CLR and Silverlight. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Keith Rome >> >> >> >> Senior Consultant and Architect >> >> >> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> >> >> >> Wintellect | 770.617.4016 | krome at wintellect.com >> >> >> >> www.wintellect.com >> >> >> >> >> >> >> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >> Behalf >> >> Of Mattias Ahlenius >> >> Sent: Wednesday, April 18, 2012 2:41 PM >> >> To: ironpython-users at python.org >> >> Subject: [Ironpython-users] Problem with embedding IronPython into >> >> Silverlight Application >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> I'm new to scripting and would like to add support for IronPython to >> our >> >> Silverlight application, I have tried to find an answer on the net but >> could >> >> not find anyone else facing the same problem. The app is an out of >> browser >> >> application. >> >> >> >> >> >> >> >> I've added the latest release (2.7.2) from nuget, checked that the >> >> binaries being used is from the SL5 >> libs-catalog: IronPython.2.7.2\lib\Sl5 >> >> >> >> >> >> >> >> The code I use to create the scripting engine is the following: >> >> >> >> >> >> >> >> .. >> >> >> >> >> >> >> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >> >> >> >> _python = _runtime.GetEngine("py"); >> >> >> >> .. >> >> >> >> >> >> >> >> When GetEngine is executed I'll the following secutiry exception: >> >> >> >> "{System.MethodAccessException: Attempt by security transparent method >> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >> >> method 'System.Reflection.Assembly.get_Location()' failed. >> >> >> >> at IronPython.Modules.SysModule.GetPrefix() >> >> >> >> at IronPython.Modules.SysModule..cctor()}" >> >> >> >> When checking the code at GitHub for the method: GetPrefix() >> >> >> >> >> >> >> >> There are code checking a compiler-constant that seems to be if you >> >> running in "silverlight" (don't have diskaccess to the libs), but the >> code >> >> seems to be executed anyway, which makes me wonder if I still doesn't >> use >> >> the correct libs for Silverlight. >> >> >> >> >> >> >> >> >> >> >> >> Would really appreciate if someone could point me in the right >> direction. >> >> >> >> >> >> >> >> >> >> >> >> Have a nice day! >> >> >> >> -- >> >> >> >> Best regards, >> >> >> >> >> >> >> >> Mattias Ahlenius >> >> >> >> 031 - 788 19 25 >> >> >> >> >> >> >> >> Good Solutions AB >> >> >> >> http://www.goodsolutions.se >> >> >> >> >> > >> > >> > >> > >> > -- >> > >> > Med v?nlig h?lsning, >> > >> > Mattias Ahlenius >> > 031 - 788 19 25 >> > >> > Good Solutions AB >> > http://www.goodsolutions.se >> > >> > >> > _______________________________________________ >> > Ironpython-users mailing list >> > Ironpython-users at python.org >> > http://mail.python.org/mailman/listinfo/ironpython-users >> > >> >> >> >> -- >> Website: http://earl-of-code.com >> > > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattias at goodsolutions.se Wed Apr 18 22:59:21 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Wed, 18 Apr 2012 22:59:21 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: I get the following when I make a disam in Reflector, the exception (System.MethodAccessException) that I'm getting is not subclassing neither SecurityException or ArgumentException which is catched and handled. *private static string GetPrefix () { try { return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location ); } catch (SecurityException ) { return string .Empty ; } catch (ArgumentException ) { return string .Empty ; } }* **/Mattias * * 2012/4/18 Slide > This really sounds like the assemblies you are referencing are not really > the SL assemblies, can you open the assembly in ILSpy and decompile > GetPrefix and see what you have? > > slide > > > On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < > mattias at goodsolutions.se> wrote: > >> Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. >> and not 2.5..) >> >> Message: Failed to load language 'IronPython 2.7.2.1': The type >> initializer for 'IronPython.Modules.SysModule' threw an exception. >> >> InnerException: >> >> "Attempt by security transparent method >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >> method 'System.Reflection.Assembly.get_Location()' failed." >> >> /Mattias >> >> 2012/4/18 Slide >> >>> Please make sure you have 2.5.2.1 and not just 2.5.2. >>> >>> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >>> wrote: >>> > Thanks for your quick reply Keith, >>> > >>> > Tried you code and I still get the same Exception: >>> > >>> > "Attempt by security transparent method >>> > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>> > method 'System.Reflection.Assembly.get_Location()' failed." >>> > >>> > /Mattias >>> > >>> > >>> > >>> > 2012/4/18 Keith Rome >>> >> >>> >> Does this not work for you? >>> >> >>> >> >>> >> >>> >> using IronPython.Hosting; >>> >> >>> >> // ... >>> >> >>> >> _python = Python.CreateEngine(); >>> >> >>> >> >>> >> >>> >> I believe that should handle the simple/typical scenarios, unless you >>> need >>> >> to alter the environment (such as plugging in a custom Host/PAL). >>> >> >>> >> >>> >> >>> >> If you need to customize the environment, then this should work: >>> >> >>> >> >>> >> >>> >> var options = new Dictionary(); >>> >> >>> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >>> >> >>> >> _runtime = new ScriptRuntime(setup); >>> >> >>> >> _python = Python.GetEngine(_runtime); >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> This code should work exactly the same on desktop CLR and Silverlight. >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> Keith Rome >>> >> >>> >> Senior Consultant and Architect >>> >> >>> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>> >> >>> >> Wintellect | 770.617.4016 | krome at wintellect.com >>> >> >>> >> www.wintellect.com >>> >> >>> >> >>> >> >>> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >>> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >>> Behalf >>> >> Of Mattias Ahlenius >>> >> Sent: Wednesday, April 18, 2012 2:41 PM >>> >> To: ironpython-users at python.org >>> >> Subject: [Ironpython-users] Problem with embedding IronPython into >>> >> Silverlight Application >>> >> >>> >> >>> >> >>> >> Hi, >>> >> >>> >> >>> >> >>> >> I'm new to scripting and would like to add support for IronPython to >>> our >>> >> Silverlight application, I have tried to find an answer on the net >>> but could >>> >> not find anyone else facing the same problem. The app is an out of >>> browser >>> >> application. >>> >> >>> >> >>> >> >>> >> I've added the latest release (2.7.2) from nuget, checked that the >>> >> binaries being used is from the SL5 >>> libs-catalog: IronPython.2.7.2\lib\Sl5 >>> >> >>> >> >>> >> >>> >> The code I use to create the scripting engine is the following: >>> >> >>> >> >>> >> >>> >> .. >>> >> >>> >> >>> >> >>> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >>> >> >>> >> _python = _runtime.GetEngine("py"); >>> >> >>> >> .. >>> >> >>> >> >>> >> >>> >> When GetEngine is executed I'll the following secutiry exception: >>> >> >>> >> "{System.MethodAccessException: Attempt by security transparent method >>> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>> >> method 'System.Reflection.Assembly.get_Location()' failed. >>> >> >>> >> at IronPython.Modules.SysModule.GetPrefix() >>> >> >>> >> at IronPython.Modules.SysModule..cctor()}" >>> >> >>> >> When checking the code at GitHub for the method: GetPrefix() >>> >> >>> >> >>> >> >>> >> There are code checking a compiler-constant that seems to be if you >>> >> running in "silverlight" (don't have diskaccess to the libs), but the >>> code >>> >> seems to be executed anyway, which makes me wonder if I still doesn't >>> use >>> >> the correct libs for Silverlight. >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> Would really appreciate if someone could point me in the right >>> direction. >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> Have a nice day! >>> >> >>> >> -- >>> >> >>> >> Best regards, >>> >> >>> >> >>> >> >>> >> Mattias Ahlenius >>> >> >>> >> 031 - 788 19 25 >>> >> >>> >> >>> >> >>> >> Good Solutions AB >>> >> >>> >> http://www.goodsolutions.se >>> >> >>> >> >>> > >>> > >>> > >>> > >>> > -- >>> > >>> > Med v?nlig h?lsning, >>> > >>> > Mattias Ahlenius >>> > 031 - 788 19 25 >>> > >>> > Good Solutions AB >>> > http://www.goodsolutions.se >>> > >>> > >>> > _______________________________________________ >>> > Ironpython-users mailing list >>> > Ironpython-users at python.org >>> > http://mail.python.org/mailman/listinfo/ironpython-users >>> > >>> >>> >>> >>> -- >>> Website: http://earl-of-code.com >>> >> >> >> >> -- >> >> Med v?nlig h?lsning, >> >> Mattias Ahlenius >> 031 - 788 19 25 >> >> Good Solutions AB >> http://www.goodsolutions.se >> >> > > > -- > Website: http://earl-of-code.com > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From epronk at muftor.com Thu Apr 19 01:16:12 2012 From: epronk at muftor.com (Eddy Pronk) Date: Thu, 19 Apr 2012 09:16:12 +1000 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln Message-ID: I'm trying to build IronPython on mono 2.10 (Debian) I followed these instructions: http://ironpython.codeplex.com/wikipage?title=IronPython%20on%20Mono There used to be a solution for building on mono. $ git log --diff-filter=D -- Solutions/IronPython.Mono.sln commit d8d9765d43b9cc265ed07c9115564253e11b348d Author: Tomas Matousek Date: Fri Dec 30 14:11:36 2011 +0100 Fix Debug and SL4 build, IronStudio and move Chiron to Debug/Release dir. I can build this one from source with mono 2.10 IronLanguages-main-ipy-2.7-0-g4fb2552.zip How do I build the latest release? IronLanguages-main-ipy-2.7.2-0-gce90110.zip Eddy From slide.o.mix at gmail.com Thu Apr 19 05:47:36 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 18 Apr 2012 20:47:36 -0700 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln In-Reply-To: References: Message-ID: You shouldn't need to use the IronPython.Mono.sln file anymore, you should be able to use the vanilla IronPython solution file. Does that not work for you? Thanks, slide On Wed, Apr 18, 2012 at 4:16 PM, Eddy Pronk wrote: > I'm trying to build IronPython on mono 2.10 (Debian) > > I followed these instructions: > http://ironpython.codeplex.com/wikipage?title=IronPython%20on%20Mono > > There used to be a solution for building on mono. > > $ git log --diff-filter=D -- Solutions/IronPython.Mono.sln > commit d8d9765d43b9cc265ed07c9115564253e11b348d > Author: Tomas Matousek > Date: ? Fri Dec 30 14:11:36 2011 +0100 > > ? ?Fix Debug and SL4 build, IronStudio and move Chiron to Debug/Release dir. > > > I can build this one from source with mono 2.10 > IronLanguages-main-ipy-2.7-0-g4fb2552.zip > > How do I build the latest release? > IronLanguages-main-ipy-2.7.2-0-gce90110.zip > > Eddy > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -- Website:?http://earl-of-code.com From epronk at muftor.com Thu Apr 19 06:02:11 2012 From: epronk at muftor.com (Eddy Pronk) Date: Thu, 19 Apr 2012 14:02:11 +1000 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln In-Reply-To: References: Message-ID: No luck with the vanilla IronPython solution file. There is a dependency on Silverlight? http://pastebin.com/11rZTC3F This documentation is also out of date: https://github.com/IronLanguages/main/wiki/Building#wiki-wiki_building-mono On Thu, Apr 19, 2012 at 1:47 PM, Slide wrote: > You shouldn't need to use the IronPython.Mono.sln file anymore, you > should be able to use the vanilla IronPython solution file. Does that > not work for you? > > Thanks, > > slide From slide.o.mix at gmail.com Thu Apr 19 06:09:26 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 18 Apr 2012 21:09:26 -0700 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln In-Reply-To: References: Message-ID: You probably want to set the configuration you want to build via /p:Configuration=Debug /p:Platform="Any CPU" or if you want a release version, try /p:Configuration=Release. The full solution builds a large number of configurations which may not work to build on mono. slide On Wed, Apr 18, 2012 at 9:02 PM, Eddy Pronk wrote: > No luck with the vanilla IronPython solution file. > > There is a dependency on Silverlight? > http://pastebin.com/11rZTC3F > > This documentation is also out of date: > https://github.com/IronLanguages/main/wiki/Building#wiki-wiki_building-mono > > On Thu, Apr 19, 2012 at 1:47 PM, Slide wrote: >> You shouldn't need to use the IronPython.Mono.sln file anymore, you >> should be able to use the vanilla IronPython solution file. Does that >> not work for you? >> >> Thanks, >> >> slide -- Website:?http://earl-of-code.com From epronk at muftor.com Thu Apr 19 06:29:57 2012 From: epronk at muftor.com (Eddy Pronk) Date: Thu, 19 Apr 2012 14:29:57 +1000 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln In-Reply-To: References: Message-ID: $ xbuild Solutions/IronPython.sln /p:Configuration=Release The first errors: array.cs(24): error CS0234: The type or namespace name `Operations' does not exist in the namespace `IronPython.Runtime'. Are you missing an assembly reference? array.cs(25): error CS0234: The type or namespace name `Types' does not exist in the namespace `IronPython.Runtime'. Are you missing an assembly reference? array.cs(46): error CS0246: The type or namespace name `IWeakReferenceable' could not be found. Are you missing a using directive or an assembly reference? array.cs(46): error CS0246: The type or namespace name `ICodeFormattable' could not be found. Are you missing a using directive or an assembly reference? mmap.cs(30): error CS0234: The type or namespace name `Exceptions' does not exist in the namespace `IronPython.Runtime'. Are you missing an assembly reference? mmap.cs(31): error CS0234: The type or namespace name `Operations' does not exist in the namespace `IronPython.Runtime'. Are you missing an assembly reference? mmap.cs(32): error CS0234: The type or namespace name `Types' does not exist in the namespace `IronPython.Runtime'. Are you missing an assembly reference? full log: http://pastebin.com/650P49BL Eddy On Thu, Apr 19, 2012 at 2:09 PM, Slide wrote: > You probably want to set the configuration you want to build via > /p:Configuration=Debug /p:Platform="Any CPU" or if you want a release > version, try /p:Configuration=Release. The full solution builds a > large number of configurations which may not work to build on mono. > > slide From jdhardy at gmail.com Thu Apr 19 08:17:53 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 18 Apr 2012 23:17:53 -0700 Subject: [Ironpython-users] Solutions/IronPython.Mono.sln In-Reply-To: References: Message-ID: It looks like Microsoft.dynamic and IronPython also fail to build, but xbuild tries to continue anyway. The root cause is that msc and csc have slightly different warnings by default, and we have warnings as errors turned on. I try to make sure mono always builds, and I was pretty sure I had fixed it, but maybe it never got pushed out (one downside of git). I probably won't get to take a look until the weekend. - Jeff On Wednesday, April 18, 2012, Eddy Pronk wrote: > $ xbuild Solutions/IronPython.sln /p:Configuration=Release > > The first errors: > array.cs(24): error CS0234: The type or namespace name `Operations' > does not exist in the namespace `IronPython.Runtime'. Are you missing > an assembly reference? > array.cs(25): error CS0234: The type or namespace name `Types' does > not exist in the namespace `IronPython.Runtime'. Are you missing an > assembly reference? > array.cs(46): error CS0246: The type or namespace name > `IWeakReferenceable' could not be found. Are you missing a using > directive or an assembly reference? > array.cs(46): error CS0246: The type or namespace name > `ICodeFormattable' could not be found. Are you missing a using > directive or an assembly reference? > mmap.cs(30): error CS0234: The type or namespace name `Exceptions' > does not exist in the namespace `IronPython.Runtime'. Are you missing > an assembly reference? > mmap.cs(31): error CS0234: The type or namespace name `Operations' > does not exist in the namespace `IronPython.Runtime'. Are you missing > an assembly reference? > mmap.cs(32): error CS0234: The type or namespace name `Types' does not > exist in the namespace `IronPython.Runtime'. Are you missing an > assembly reference? > > full log: > http://pastebin.com/650P49BL > > Eddy > > On Thu, Apr 19, 2012 at 2:09 PM, Slide > > wrote: > > You probably want to set the configuration you want to build via > > /p:Configuration=Debug /p:Platform="Any CPU" or if you want a release > > version, try /p:Configuration=Release. The full solution builds a > > large number of configurations which may not work to build on mono. > > > > slide > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Apr 19 14:01:43 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 19 Apr 2012 05:01:43 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/18/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.ContainsVariable throws MissingMemberException internally http://ironpython.codeplex.com/workitem/32530 User KeithJRome has commented on the issue: "No downsides that I know of offhand. There might be some non-obvious gotchas, but for the typical case of just executing code in the context of a ScriptScope I can't think of any issues that would arise. " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattias at goodsolutions.se Thu Apr 19 16:28:46 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Thu, 19 Apr 2012 16:28:46 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Do I do something fundamentally wrong here... The below is what I get do a disasm on the SL5 assembly in the latest distribution (2.7.2.1) Greatful for any help I could get in the right direction. Best regards, Mattias 2012/4/18 Mattias Ahlenius > > I get the following when I make a disam in Reflector, the exception > (System.MethodAccessException) that I'm getting is not subclassing neither > SecurityException or ArgumentException which is catched and handled. > > > *private static string GetPrefix () > { > try > { > return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location ); > } > catch (SecurityException ) > { > return string .Empty ; > } > catch (ArgumentException ) > { > return string .Empty ; > } > }* > > **/Mattias > * > * > > 2012/4/18 Slide > >> This really sounds like the assemblies you are referencing are not really >> the SL assemblies, can you open the assembly in ILSpy and decompile >> GetPrefix and see what you have? >> >> slide >> >> >> On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < >> mattias at goodsolutions.se> wrote: >> >>> Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. >>> and not 2.5..) >>> >>> Message: Failed to load language 'IronPython 2.7.2.1': The type >>> initializer for 'IronPython.Modules.SysModule' threw an exception. >>> >>> InnerException: >>> >>> "Attempt by security transparent method >>> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>> method 'System.Reflection.Assembly.get_Location()' failed." >>> >>> /Mattias >>> >>> 2012/4/18 Slide >>> >>>> Please make sure you have 2.5.2.1 and not just 2.5.2. >>>> >>>> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >>>> wrote: >>>> > Thanks for your quick reply Keith, >>>> > >>>> > Tried you code and I still get the same Exception: >>>> > >>>> > "Attempt by security transparent method >>>> > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>>> > method 'System.Reflection.Assembly.get_Location()' failed." >>>> > >>>> > /Mattias >>>> > >>>> > >>>> > >>>> > 2012/4/18 Keith Rome >>>> >> >>>> >> Does this not work for you? >>>> >> >>>> >> >>>> >> >>>> >> using IronPython.Hosting; >>>> >> >>>> >> // ... >>>> >> >>>> >> _python = Python.CreateEngine(); >>>> >> >>>> >> >>>> >> >>>> >> I believe that should handle the simple/typical scenarios, unless >>>> you need >>>> >> to alter the environment (such as plugging in a custom Host/PAL). >>>> >> >>>> >> >>>> >> >>>> >> If you need to customize the environment, then this should work: >>>> >> >>>> >> >>>> >> >>>> >> var options = new Dictionary(); >>>> >> >>>> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >>>> >> >>>> >> _runtime = new ScriptRuntime(setup); >>>> >> >>>> >> _python = Python.GetEngine(_runtime); >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> This code should work exactly the same on desktop CLR and >>>> Silverlight. >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> Keith Rome >>>> >> >>>> >> Senior Consultant and Architect >>>> >> >>>> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>> >> >>>> >> Wintellect | 770.617.4016 | krome at wintellect.com >>>> >> >>>> >> www.wintellect.com >>>> >> >>>> >> >>>> >> >>>> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >>>> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >>>> Behalf >>>> >> Of Mattias Ahlenius >>>> >> Sent: Wednesday, April 18, 2012 2:41 PM >>>> >> To: ironpython-users at python.org >>>> >> Subject: [Ironpython-users] Problem with embedding IronPython into >>>> >> Silverlight Application >>>> >> >>>> >> >>>> >> >>>> >> Hi, >>>> >> >>>> >> >>>> >> >>>> >> I'm new to scripting and would like to add support for IronPython to >>>> our >>>> >> Silverlight application, I have tried to find an answer on the net >>>> but could >>>> >> not find anyone else facing the same problem. The app is an out of >>>> browser >>>> >> application. >>>> >> >>>> >> >>>> >> >>>> >> I've added the latest release (2.7.2) from nuget, checked that the >>>> >> binaries being used is from the SL5 >>>> libs-catalog: IronPython.2.7.2\lib\Sl5 >>>> >> >>>> >> >>>> >> >>>> >> The code I use to create the scripting engine is the following: >>>> >> >>>> >> >>>> >> >>>> >> .. >>>> >> >>>> >> >>>> >> >>>> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >>>> >> >>>> >> _python = _runtime.GetEngine("py"); >>>> >> >>>> >> .. >>>> >> >>>> >> >>>> >> >>>> >> When GetEngine is executed I'll the following secutiry exception: >>>> >> >>>> >> "{System.MethodAccessException: Attempt by security transparent >>>> method >>>> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>> critical >>>> >> method 'System.Reflection.Assembly.get_Location()' failed. >>>> >> >>>> >> at IronPython.Modules.SysModule.GetPrefix() >>>> >> >>>> >> at IronPython.Modules.SysModule..cctor()}" >>>> >> >>>> >> When checking the code at GitHub for the method: GetPrefix() >>>> >> >>>> >> >>>> >> >>>> >> There are code checking a compiler-constant that seems to be if you >>>> >> running in "silverlight" (don't have diskaccess to the libs), but >>>> the code >>>> >> seems to be executed anyway, which makes me wonder if I still >>>> doesn't use >>>> >> the correct libs for Silverlight. >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> Would really appreciate if someone could point me in the right >>>> direction. >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> Have a nice day! >>>> >> >>>> >> -- >>>> >> >>>> >> Best regards, >>>> >> >>>> >> >>>> >> >>>> >> Mattias Ahlenius >>>> >> >>>> >> 031 - 788 19 25 >>>> >> >>>> >> >>>> >> >>>> >> Good Solutions AB >>>> >> >>>> >> http://www.goodsolutions.se >>>> >> >>>> >> >>>> > >>>> > >>>> > >>>> > >>>> > -- >>>> > >>>> > Med v?nlig h?lsning, >>>> > >>>> > Mattias Ahlenius >>>> > 031 - 788 19 25 >>>> > >>>> > Good Solutions AB >>>> > http://www.goodsolutions.se >>>> > >>>> > >>>> > _______________________________________________ >>>> > Ironpython-users mailing list >>>> > Ironpython-users at python.org >>>> > http://mail.python.org/mailman/listinfo/ironpython-users >>>> > >>>> >>>> >>>> >>>> -- >>>> Website: http://earl-of-code.com >>>> >>> >>> >>> >>> -- >>> >>> Med v?nlig h?lsning, >>> >>> Mattias Ahlenius >>> 031 - 788 19 25 >>> >>> Good Solutions AB >>> http://www.goodsolutions.se >>> >>> >> >> >> -- >> Website: http://earl-of-code.com >> > > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Apr 19 16:45:31 2012 From: slide.o.mix at gmail.com (Slide) Date: Thu, 19 Apr 2012 07:45:31 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION property in the build, so you should be getting that code when you disassemble. Can you check if there is anything in the InnerException when you catch it? On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius wrote: > Do I do something fundamentally wrong here... The below is what I get do a > disasm on the SL5 assembly in the latest distribution (2.7.2.1) > > Greatful for any help I could get in the right direction. > > Best regards, > > Mattias > > > 2012/4/18 Mattias Ahlenius > >> >> I get the following when I make a disam in Reflector, the exception >> (System.MethodAccessException) that I'm getting is not subclassing neither >> SecurityException or ArgumentException which is catched and handled. >> >> >> *private static string GetPrefix () >> { >> try >> { >> return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location ); >> } >> catch (SecurityException ) >> { >> return string .Empty ; >> } >> catch (ArgumentException ) >> { >> return string .Empty ; >> } >> }* >> >> **/Mattias >> * >> * >> >> 2012/4/18 Slide >> >>> This really sounds like the assemblies you are referencing are not >>> really the SL assemblies, can you open the assembly in ILSpy and decompile >>> GetPrefix and see what you have? >>> >>> slide >>> >>> >>> On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < >>> mattias at goodsolutions.se> wrote: >>> >>>> Same exception even if I use the 2.7.2.1 bins: (I support you mean >>>> 2.7.. and not 2.5..) >>>> >>>> Message: Failed to load language 'IronPython 2.7.2.1': The type >>>> initializer for 'IronPython.Modules.SysModule' threw an exception. >>>> >>>> InnerException: >>>> >>>> "Attempt by security transparent method >>>> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>>> method 'System.Reflection.Assembly.get_Location()' failed." >>>> >>>> /Mattias >>>> >>>> 2012/4/18 Slide >>>> >>>>> Please make sure you have 2.5.2.1 and not just 2.5.2. >>>>> >>>>> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >>>>> wrote: >>>>> > Thanks for your quick reply Keith, >>>>> > >>>>> > Tried you code and I still get the same Exception: >>>>> > >>>>> > "Attempt by security transparent method >>>>> > 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>> critical >>>>> > method 'System.Reflection.Assembly.get_Location()' failed." >>>>> > >>>>> > /Mattias >>>>> > >>>>> > >>>>> > >>>>> > 2012/4/18 Keith Rome >>>>> >> >>>>> >> Does this not work for you? >>>>> >> >>>>> >> >>>>> >> >>>>> >> using IronPython.Hosting; >>>>> >> >>>>> >> // ... >>>>> >> >>>>> >> _python = Python.CreateEngine(); >>>>> >> >>>>> >> >>>>> >> >>>>> >> I believe that should handle the simple/typical scenarios, unless >>>>> you need >>>>> >> to alter the environment (such as plugging in a custom Host/PAL). >>>>> >> >>>>> >> >>>>> >> >>>>> >> If you need to customize the environment, then this should work: >>>>> >> >>>>> >> >>>>> >> >>>>> >> var options = new Dictionary(); >>>>> >> >>>>> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >>>>> >> >>>>> >> _runtime = new ScriptRuntime(setup); >>>>> >> >>>>> >> _python = Python.GetEngine(_runtime); >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> This code should work exactly the same on desktop CLR and >>>>> Silverlight. >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> Keith Rome >>>>> >> >>>>> >> Senior Consultant and Architect >>>>> >> >>>>> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>>> >> >>>>> >> Wintellect | 770.617.4016 | krome at wintellect.com >>>>> >> >>>>> >> www.wintellect.com >>>>> >> >>>>> >> >>>>> >> >>>>> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >>>>> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] >>>>> On Behalf >>>>> >> Of Mattias Ahlenius >>>>> >> Sent: Wednesday, April 18, 2012 2:41 PM >>>>> >> To: ironpython-users at python.org >>>>> >> Subject: [Ironpython-users] Problem with embedding IronPython into >>>>> >> Silverlight Application >>>>> >> >>>>> >> >>>>> >> >>>>> >> Hi, >>>>> >> >>>>> >> >>>>> >> >>>>> >> I'm new to scripting and would like to add support for IronPython >>>>> to our >>>>> >> Silverlight application, I have tried to find an answer on the net >>>>> but could >>>>> >> not find anyone else facing the same problem. The app is an out of >>>>> browser >>>>> >> application. >>>>> >> >>>>> >> >>>>> >> >>>>> >> I've added the latest release (2.7.2) from nuget, checked that the >>>>> >> binaries being used is from the SL5 >>>>> libs-catalog: IronPython.2.7.2\lib\Sl5 >>>>> >> >>>>> >> >>>>> >> >>>>> >> The code I use to create the scripting engine is the following: >>>>> >> >>>>> >> >>>>> >> >>>>> >> .. >>>>> >> >>>>> >> >>>>> >> >>>>> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >>>>> >> >>>>> >> _python = _runtime.GetEngine("py"); >>>>> >> >>>>> >> .. >>>>> >> >>>>> >> >>>>> >> >>>>> >> When GetEngine is executed I'll the following secutiry exception: >>>>> >> >>>>> >> "{System.MethodAccessException: Attempt by security transparent >>>>> method >>>>> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>> critical >>>>> >> method 'System.Reflection.Assembly.get_Location()' failed. >>>>> >> >>>>> >> at IronPython.Modules.SysModule.GetPrefix() >>>>> >> >>>>> >> at IronPython.Modules.SysModule..cctor()}" >>>>> >> >>>>> >> When checking the code at GitHub for the method: GetPrefix() >>>>> >> >>>>> >> >>>>> >> >>>>> >> There are code checking a compiler-constant that seems to be if you >>>>> >> running in "silverlight" (don't have diskaccess to the libs), but >>>>> the code >>>>> >> seems to be executed anyway, which makes me wonder if I still >>>>> doesn't use >>>>> >> the correct libs for Silverlight. >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> Would really appreciate if someone could point me in the right >>>>> direction. >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> Have a nice day! >>>>> >> >>>>> >> -- >>>>> >> >>>>> >> Best regards, >>>>> >> >>>>> >> >>>>> >> >>>>> >> Mattias Ahlenius >>>>> >> >>>>> >> 031 - 788 19 25 >>>>> >> >>>>> >> >>>>> >> >>>>> >> Good Solutions AB >>>>> >> >>>>> >> http://www.goodsolutions.se >>>>> >> >>>>> >> >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > >>>>> > Med v?nlig h?lsning, >>>>> > >>>>> > Mattias Ahlenius >>>>> > 031 - 788 19 25 >>>>> > >>>>> > Good Solutions AB >>>>> > http://www.goodsolutions.se >>>>> > >>>>> > >>>>> > _______________________________________________ >>>>> > Ironpython-users mailing list >>>>> > Ironpython-users at python.org >>>>> > http://mail.python.org/mailman/listinfo/ironpython-users >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Website: http://earl-of-code.com >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Med v?nlig h?lsning, >>>> >>>> Mattias Ahlenius >>>> 031 - 788 19 25 >>>> >>>> Good Solutions AB >>>> http://www.goodsolutions.se >>>> >>>> >>> >>> >>> -- >>> Website: http://earl-of-code.com >>> >> >> >> >> -- >> >> Med v?nlig h?lsning, >> >> Mattias Ahlenius >> 031 - 788 19 25 >> >> Good Solutions AB >> http://www.goodsolutions.se >> >> > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Apr 19 19:05:26 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 19 Apr 2012 10:05:26 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: On Thu, Apr 19, 2012 at 7:45 AM, Slide wrote: > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION > property in the build, so you should be getting that code when you > disassemble. Can you check if there is anything in the InnerException when > you catch it? SL5 has Assembly.Location, but it looks like it's not allowed to be used in a browser context (desktop/trusted SL might be different). We could remove the FEATURE, but then trusted apps would be less functional (not sure this is an issue). Or, we catch the SecurityException and proceed without the prefix. Mattias, can you open an issue for this please? ( http://ironpython.codeplex.com/WorkItem/Create). Ideally include a small, self-contained reproduction (the whole VS project, if possible). - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Apr 19 19:12:29 2012 From: slide.o.mix at gmail.com (Slide) Date: Thu, 19 Apr 2012 10:12:29 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: It's not throwing a SecurityException, its throws a MemberAccessException (which does NOT inherit from SecurityException either). slide On Thu, Apr 19, 2012 at 10:05 AM, Jeff Hardy wrote: > > On Thu, Apr 19, 2012 at 7:45 AM, Slide wrote: >> >> No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION >> property in the build, so you should be getting that code when you >> disassemble. Can you check if there is anything in the InnerException when >> you catch it? > > > SL5 has Assembly.Location, but it looks like it's not allowed to be used in > a browser context (desktop/trusted SL might be different). > > We could remove the FEATURE, but then trusted apps would be less functional > (not sure this is an issue). Or, we catch the SecurityException and proceed > without the prefix. > > Mattias, can you open an issue for this please? > (http://ironpython.codeplex.com/WorkItem/Create). Ideally include a small, > self-contained reproduction (the whole VS project, if possible). > > - Jeff -- Website:?http://earl-of-code.com From mattias at goodsolutions.se Thu Apr 19 19:38:44 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Thu, 19 Apr 2012 19:38:44 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: I think the binaries under: lib\Sl5 is compiled with SL4 as target and not with SL5, not sure but that may be the issue. /Mattias 2012/4/19 Slide > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION > property in the build, so you should be getting that code when you > disassemble. Can you check if there is anything in the InnerException when > you catch it? > > > On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius < > mattias at goodsolutions.se> wrote: > >> Do I do something fundamentally wrong here... The below is what I get do >> a disasm on the SL5 assembly in the latest distribution (2.7.2.1) >> >> Greatful for any help I could get in the right direction. >> >> Best regards, >> >> Mattias >> >> >> 2012/4/18 Mattias Ahlenius >> >>> >>> I get the following when I make a disam in Reflector, the exception >>> (System.MethodAccessException) that I'm getting is not subclassing neither >>> SecurityException or ArgumentException which is catched and handled. >>> >>> >>> *private static string GetPrefix () >>> { >>> try >>> { >>> return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location ); >>> } >>> catch (SecurityException ) >>> { >>> return string .Empty ; >>> } >>> catch (ArgumentException ) >>> { >>> return string .Empty ; >>> } >>> }* >>> >>> **/Mattias >>> * >>> * >>> >>> 2012/4/18 Slide >>> >>>> This really sounds like the assemblies you are referencing are not >>>> really the SL assemblies, can you open the assembly in ILSpy and decompile >>>> GetPrefix and see what you have? >>>> >>>> slide >>>> >>>> >>>> On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < >>>> mattias at goodsolutions.se> wrote: >>>> >>>>> Same exception even if I use the 2.7.2.1 bins: (I support you mean >>>>> 2.7.. and not 2.5..) >>>>> >>>>> Message: Failed to load language 'IronPython 2.7.2.1': The type >>>>> initializer for 'IronPython.Modules.SysModule' threw an exception. >>>>> >>>>> InnerException: >>>>> >>>>> "Attempt by security transparent method >>>>> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>>>> method 'System.Reflection.Assembly.get_Location()' failed." >>>>> >>>>> /Mattias >>>>> >>>>> 2012/4/18 Slide >>>>> >>>>>> Please make sure you have 2.5.2.1 and not just 2.5.2. >>>>>> >>>>>> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >>>>>> wrote: >>>>>> > Thanks for your quick reply Keith, >>>>>> > >>>>>> > Tried you code and I still get the same Exception: >>>>>> > >>>>>> > "Attempt by security transparent method >>>>>> > 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>>> critical >>>>>> > method 'System.Reflection.Assembly.get_Location()' failed." >>>>>> > >>>>>> > /Mattias >>>>>> > >>>>>> > >>>>>> > >>>>>> > 2012/4/18 Keith Rome >>>>>> >> >>>>>> >> Does this not work for you? >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> using IronPython.Hosting; >>>>>> >> >>>>>> >> // ... >>>>>> >> >>>>>> >> _python = Python.CreateEngine(); >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> I believe that should handle the simple/typical scenarios, unless >>>>>> you need >>>>>> >> to alter the environment (such as plugging in a custom Host/PAL). >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> If you need to customize the environment, then this should work: >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> var options = new Dictionary(); >>>>>> >> >>>>>> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >>>>>> >> >>>>>> >> _runtime = new ScriptRuntime(setup); >>>>>> >> >>>>>> >> _python = Python.GetEngine(_runtime); >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> This code should work exactly the same on desktop CLR and >>>>>> Silverlight. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Keith Rome >>>>>> >> >>>>>> >> Senior Consultant and Architect >>>>>> >> >>>>>> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>>>> >> >>>>>> >> Wintellect | 770.617.4016 | krome at wintellect.com >>>>>> >> >>>>>> >> www.wintellect.com >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >>>>>> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] >>>>>> On Behalf >>>>>> >> Of Mattias Ahlenius >>>>>> >> Sent: Wednesday, April 18, 2012 2:41 PM >>>>>> >> To: ironpython-users at python.org >>>>>> >> Subject: [Ironpython-users] Problem with embedding IronPython into >>>>>> >> Silverlight Application >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Hi, >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> I'm new to scripting and would like to add support for IronPython >>>>>> to our >>>>>> >> Silverlight application, I have tried to find an answer on the net >>>>>> but could >>>>>> >> not find anyone else facing the same problem. The app is an out of >>>>>> browser >>>>>> >> application. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> I've added the latest release (2.7.2) from nuget, checked that the >>>>>> >> binaries being used is from the SL5 >>>>>> libs-catalog: IronPython.2.7.2\lib\Sl5 >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> The code I use to create the scripting engine is the following: >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> .. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >>>>>> >> >>>>>> >> _python = _runtime.GetEngine("py"); >>>>>> >> >>>>>> >> .. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> When GetEngine is executed I'll the following secutiry exception: >>>>>> >> >>>>>> >> "{System.MethodAccessException: Attempt by security transparent >>>>>> method >>>>>> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>>> critical >>>>>> >> method 'System.Reflection.Assembly.get_Location()' failed. >>>>>> >> >>>>>> >> at IronPython.Modules.SysModule.GetPrefix() >>>>>> >> >>>>>> >> at IronPython.Modules.SysModule..cctor()}" >>>>>> >> >>>>>> >> When checking the code at GitHub for the method: GetPrefix() >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> There are code checking a compiler-constant that seems to be if you >>>>>> >> running in "silverlight" (don't have diskaccess to the libs), but >>>>>> the code >>>>>> >> seems to be executed anyway, which makes me wonder if I still >>>>>> doesn't use >>>>>> >> the correct libs for Silverlight. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Would really appreciate if someone could point me in the right >>>>>> direction. >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Have a nice day! >>>>>> >> >>>>>> >> -- >>>>>> >> >>>>>> >> Best regards, >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Mattias Ahlenius >>>>>> >> >>>>>> >> 031 - 788 19 25 >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> Good Solutions AB >>>>>> >> >>>>>> >> http://www.goodsolutions.se >>>>>> >> >>>>>> >> >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > >>>>>> > Med v?nlig h?lsning, >>>>>> > >>>>>> > Mattias Ahlenius >>>>>> > 031 - 788 19 25 >>>>>> > >>>>>> > Good Solutions AB >>>>>> > http://www.goodsolutions.se >>>>>> > >>>>>> > >>>>>> > _______________________________________________ >>>>>> > Ironpython-users mailing list >>>>>> > Ironpython-users at python.org >>>>>> > http://mail.python.org/mailman/listinfo/ironpython-users >>>>>> > >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Website: http://earl-of-code.com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> Med v?nlig h?lsning, >>>>> >>>>> Mattias Ahlenius >>>>> 031 - 788 19 25 >>>>> >>>>> Good Solutions AB >>>>> http://www.goodsolutions.se >>>>> >>>>> >>>> >>>> >>>> -- >>>> Website: http://earl-of-code.com >>>> >>> >>> >>> >>> -- >>> >>> Med v?nlig h?lsning, >>> >>> Mattias Ahlenius >>> 031 - 788 19 25 >>> >>> Good Solutions AB >>> http://www.goodsolutions.se >>> >>> >> >> >> -- >> >> Med v?nlig h?lsning, >> >> Mattias Ahlenius >> 031 - 788 19 25 >> >> Good Solutions AB >> http://www.goodsolutions.se >> >> > > > -- > Website: http://earl-of-code.com > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattias at goodsolutions.se Thu Apr 19 20:16:28 2012 From: mattias at goodsolutions.se (Mattias Ahlenius) Date: Thu, 19 Apr 2012 20:16:28 +0200 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: I've put together a small testproject, when I build it with target SL4 I get the same error as with the IronPython bins, but it works fine when I compile it to target SL5, I've attached a testproject as a .zip (just rename it from sip) /Mattias 2012/4/19 Mattias Ahlenius > I think the binaries under: lib\Sl5 is compiled with SL4 as target and not > with SL5, not sure but that may be the issue. > > /Mattias > > > > 2012/4/19 Slide > >> No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION >> property in the build, so you should be getting that code when you >> disassemble. Can you check if there is anything in the InnerException when >> you catch it? >> >> >> On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius < >> mattias at goodsolutions.se> wrote: >> >>> Do I do something fundamentally wrong here... The below is what I get do >>> a disasm on the SL5 assembly in the latest distribution (2.7.2.1) >>> >>> Greatful for any help I could get in the right direction. >>> >>> Best regards, >>> >>> Mattias >>> >>> >>> 2012/4/18 Mattias Ahlenius >>> >>>> >>>> I get the following when I make a disam in Reflector, the exception >>>> (System.MethodAccessException) that I'm getting is not subclassing neither >>>> SecurityException or ArgumentException which is catched and handled. >>>> >>>> >>>> *private static string GetPrefix () >>>> { >>>> try >>>> { >>>> return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location ); >>>> } >>>> catch (SecurityException ) >>>> { >>>> return string .Empty ; >>>> } >>>> catch (ArgumentException ) >>>> { >>>> return string .Empty ; >>>> } >>>> }* >>>> >>>> **/Mattias >>>> * >>>> * >>>> >>>> 2012/4/18 Slide >>>> >>>>> This really sounds like the assemblies you are referencing are not >>>>> really the SL assemblies, can you open the assembly in ILSpy and decompile >>>>> GetPrefix and see what you have? >>>>> >>>>> slide >>>>> >>>>> >>>>> On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < >>>>> mattias at goodsolutions.se> wrote: >>>>> >>>>>> Same exception even if I use the 2.7.2.1 bins: (I support you mean >>>>>> 2.7.. and not 2.5..) >>>>>> >>>>>> Message: Failed to load language 'IronPython 2.7.2.1': The type >>>>>> initializer for 'IronPython.Modules.SysModule' threw an exception. >>>>>> >>>>>> InnerException: >>>>>> >>>>>> "Attempt by security transparent method >>>>>> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >>>>>> method 'System.Reflection.Assembly.get_Location()' failed." >>>>>> >>>>>> /Mattias >>>>>> >>>>>> 2012/4/18 Slide >>>>>> >>>>>>> Please make sure you have 2.5.2.1 and not just 2.5.2. >>>>>>> >>>>>>> On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius >>>>>>> wrote: >>>>>>> > Thanks for your quick reply Keith, >>>>>>> > >>>>>>> > Tried you code and I still get the same Exception: >>>>>>> > >>>>>>> > "Attempt by security transparent method >>>>>>> > 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>>>> critical >>>>>>> > method 'System.Reflection.Assembly.get_Location()' failed." >>>>>>> > >>>>>>> > /Mattias >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > 2012/4/18 Keith Rome >>>>>>> >> >>>>>>> >> Does this not work for you? >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> using IronPython.Hosting; >>>>>>> >> >>>>>>> >> // ... >>>>>>> >> >>>>>>> >> _python = Python.CreateEngine(); >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> I believe that should handle the simple/typical scenarios, unless >>>>>>> you need >>>>>>> >> to alter the environment (such as plugging in a custom Host/PAL). >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> If you need to customize the environment, then this should work: >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> var options = new Dictionary(); >>>>>>> >> >>>>>>> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >>>>>>> >> >>>>>>> >> _runtime = new ScriptRuntime(setup); >>>>>>> >> >>>>>>> >> _python = Python.GetEngine(_runtime); >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> This code should work exactly the same on desktop CLR and >>>>>>> Silverlight. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Keith Rome >>>>>>> >> >>>>>>> >> Senior Consultant and Architect >>>>>>> >> >>>>>>> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>>>>> >> >>>>>>> >> Wintellect | 770.617.4016 | krome at wintellect.com >>>>>>> >> >>>>>>> >> www.wintellect.com >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >>>>>>> >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] >>>>>>> On Behalf >>>>>>> >> Of Mattias Ahlenius >>>>>>> >> Sent: Wednesday, April 18, 2012 2:41 PM >>>>>>> >> To: ironpython-users at python.org >>>>>>> >> Subject: [Ironpython-users] Problem with embedding IronPython into >>>>>>> >> Silverlight Application >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Hi, >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> I'm new to scripting and would like to add support for IronPython >>>>>>> to our >>>>>>> >> Silverlight application, I have tried to find an answer on the >>>>>>> net but could >>>>>>> >> not find anyone else facing the same problem. The app is an out >>>>>>> of browser >>>>>>> >> application. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> I've added the latest release (2.7.2) from nuget, checked that the >>>>>>> >> binaries being used is from the SL5 >>>>>>> libs-catalog: IronPython.2.7.2\lib\Sl5 >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> The code I use to create the scripting engine is the following: >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> .. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >>>>>>> >> >>>>>>> >> _python = _runtime.GetEngine("py"); >>>>>>> >> >>>>>>> >> .. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> When GetEngine is executed I'll the following secutiry exception: >>>>>>> >> >>>>>>> >> "{System.MethodAccessException: Attempt by security transparent >>>>>>> method >>>>>>> >> 'IronPython.Modules.SysModule.GetPrefix()' to access security >>>>>>> critical >>>>>>> >> method 'System.Reflection.Assembly.get_Location()' failed. >>>>>>> >> >>>>>>> >> at IronPython.Modules.SysModule.GetPrefix() >>>>>>> >> >>>>>>> >> at IronPython.Modules.SysModule..cctor()}" >>>>>>> >> >>>>>>> >> When checking the code at GitHub for the method: GetPrefix() >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> There are code checking a compiler-constant that seems to be if >>>>>>> you >>>>>>> >> running in "silverlight" (don't have diskaccess to the libs), but >>>>>>> the code >>>>>>> >> seems to be executed anyway, which makes me wonder if I still >>>>>>> doesn't use >>>>>>> >> the correct libs for Silverlight. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Would really appreciate if someone could point me in the right >>>>>>> direction. >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Have a nice day! >>>>>>> >> >>>>>>> >> -- >>>>>>> >> >>>>>>> >> Best regards, >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Mattias Ahlenius >>>>>>> >> >>>>>>> >> 031 - 788 19 25 >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> Good Solutions AB >>>>>>> >> >>>>>>> >> http://www.goodsolutions.se >>>>>>> >> >>>>>>> >> >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > -- >>>>>>> > >>>>>>> > Med v?nlig h?lsning, >>>>>>> > >>>>>>> > Mattias Ahlenius >>>>>>> > 031 - 788 19 25 >>>>>>> > >>>>>>> > Good Solutions AB >>>>>>> > http://www.goodsolutions.se >>>>>>> > >>>>>>> > >>>>>>> > _______________________________________________ >>>>>>> > Ironpython-users mailing list >>>>>>> > Ironpython-users at python.org >>>>>>> > http://mail.python.org/mailman/listinfo/ironpython-users >>>>>>> > >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Website: http://earl-of-code.com >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Med v?nlig h?lsning, >>>>>> >>>>>> Mattias Ahlenius >>>>>> 031 - 788 19 25 >>>>>> >>>>>> Good Solutions AB >>>>>> http://www.goodsolutions.se >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Website: http://earl-of-code.com >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Med v?nlig h?lsning, >>>> >>>> Mattias Ahlenius >>>> 031 - 788 19 25 >>>> >>>> Good Solutions AB >>>> http://www.goodsolutions.se >>>> >>>> >>> >>> >>> -- >>> >>> Med v?nlig h?lsning, >>> >>> Mattias Ahlenius >>> 031 - 788 19 25 >>> >>> Good Solutions AB >>> http://www.goodsolutions.se >>> >>> >> >> >> -- >> Website: http://earl-of-code.com >> > > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IronSLTest.sip Type: application/octet-stream Size: 31954 bytes Desc: not available URL: From rome at Wintellect.com Fri Apr 20 00:34:02 2012 From: rome at Wintellect.com (Keith Rome) Date: Thu, 19 Apr 2012 22:34:02 +0000 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0D0EA52B@BY2PRD0710MB389.namprd07.prod.outlook.com> We were able to confirm that this problem affects our product as well. It shows up in both Silverlight 4 and 5 builds. I didn't see an issue ticket created on CodePlex yet, so I created one. Is the best "fix" going to be to catch MethodAccessException and return an empty string from GetPrefix()? I am not familiar with the importance of that call. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: Mattias Ahlenius [mailto:mattias at goodsolutions.se] Sent: Thursday, April 19, 2012 2:16 PM To: Slide Cc: Keith Rome; ironpython-users at python.org Subject: Re: [Ironpython-users] Problem with embedding IronPython into Silverlight Application I've put together a small testproject, when I build it with target SL4 I get the same error as with the IronPython bins, but it works fine when I compile it to target SL5, I've attached a testproject as a .zip (just rename it from sip) /Mattias 2012/4/19 Mattias Ahlenius > I think the binaries under: lib\Sl5 is compiled with SL4 as target and not with SL5, not sure but that may be the issue. /Mattias 2012/4/19 Slide > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION property in the build, so you should be getting that code when you disassemble. Can you check if there is anything in the InnerException when you catch it? On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius > wrote: Do I do something fundamentally wrong here... The below is what I get do a disasm on the SL5 assembly in the latest distribution (2.7.2.1) Greatful for any help I could get in the right direction. Best regards, Mattias 2012/4/18 Mattias Ahlenius > I get the following when I make a disam in Reflector, the exception (System.MethodAccessException) that I'm getting is not subclassing neither SecurityException or ArgumentException which is catched and handled. private static string GetPrefix() { try { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); } catch (SecurityException) { return string.Empty; } catch (ArgumentException) { return string.Empty; } } /Mattias 2012/4/18 Slide > This really sounds like the assemblies you are referencing are not really the SL assemblies, can you open the assembly in ILSpy and decompile GetPrefix and see what you have? slide On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius > wrote: Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. and not 2.5..) Message: Failed to load language 'IronPython 2.7.2.1': The type initializer for 'IronPython.Modules.SysModule' threw an exception. InnerException: "Attempt by security transparent method 'IronPython.Modules.SysModule.GetPrefix()' to access security critical method 'System.Reflection.Assembly.get_Location()' failed." /Mattias 2012/4/18 Slide > Please make sure you have 2.5.2.1 and not just 2.5.2. On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius > wrote: > Thanks for your quick reply Keith, > > Tried you code and I still get the same Exception: > > "Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > method 'System.Reflection.Assembly.get_Location()' failed." > > /Mattias > > > > 2012/4/18 Keith Rome > >> >> Does this not work for you? >> >> >> >> using IronPython.Hosting; >> >> // ... >> >> _python = Python.CreateEngine(); >> >> >> >> I believe that should handle the simple/typical scenarios, unless you need >> to alter the environment (such as plugging in a custom Host/PAL). >> >> >> >> If you need to customize the environment, then this should work: >> >> >> >> var options = new Dictionary(); >> >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); >> >> _runtime = new ScriptRuntime(setup); >> >> _python = Python.GetEngine(_runtime); >> >> >> >> >> >> This code should work exactly the same on desktop CLR and Silverlight. >> >> >> >> >> >> >> >> Keith Rome >> >> Senior Consultant and Architect >> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> >> Wintellect | 770.617.4016 | krome at wintellect.com >> >> www.wintellect.com >> >> >> >> From: ironpython-users-bounces+rome=wintellect.com at python.org >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf >> Of Mattias Ahlenius >> Sent: Wednesday, April 18, 2012 2:41 PM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] Problem with embedding IronPython into >> Silverlight Application >> >> >> >> Hi, >> >> >> >> I'm new to scripting and would like to add support for IronPython to our >> Silverlight application, I have tried to find an answer on the net but could >> not find anyone else facing the same problem. The app is an out of browser >> application. >> >> >> >> I've added the latest release (2.7.2) from nuget, checked that the >> binaries being used is from the SL5 libs-catalog: IronPython.2.7.2\lib\Sl5 >> >> >> >> The code I use to create the scripting engine is the following: >> >> >> >> .. >> >> >> _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); >> >> _python = _runtime.GetEngine("py"); >> >> .. >> >> >> >> When GetEngine is executed I'll the following secutiry exception: >> >> "{System.MethodAccessException: Attempt by security transparent method >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical >> method 'System.Reflection.Assembly.get_Location()' failed. >> >> at IronPython.Modules.SysModule.GetPrefix() >> >> at IronPython.Modules.SysModule..cctor()}" >> >> When checking the code at GitHub for the method: GetPrefix() >> >> >> >> There are code checking a compiler-constant that seems to be if you >> running in "silverlight" (don't have diskaccess to the libs), but the code >> seems to be executed anyway, which makes me wonder if I still doesn't use >> the correct libs for Silverlight. >> >> >> >> >> >> Would really appreciate if someone could point me in the right direction. >> >> >> >> >> >> Have a nice day! >> >> -- >> >> Best regards, >> >> >> >> Mattias Ahlenius >> >> 031 - 788 19 25 >> >> >> >> Good Solutions AB >> >> http://www.goodsolutions.se >> >> > > > > > -- > > Med v?nlig h?lsning, > > Mattias Ahlenius > 031 - 788 19 25 > > Good Solutions AB > http://www.goodsolutions.se > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -- Website: http://earl-of-code.com -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -- Website: http://earl-of-code.com -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -- Med v?nlig h?lsning, Mattias Ahlenius 031 - 788 19 25 Good Solutions AB http://www.goodsolutions.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Fri Apr 20 00:43:10 2012 From: slide.o.mix at gmail.com (Slide) Date: Thu, 19 Apr 2012 15:43:10 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0D0EA52B@BY2PRD0710MB389.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D0EA52B@BY2PRD0710MB389.namprd07.prod.outlook.com> Message-ID: Since modules aren't loaded from the file system the same way on SL, I think it shouldn't cause too much of an issue. You can rebuild IP with the change and see if it causes any other issues. On Thu, Apr 19, 2012 at 3:34 PM, Keith Rome wrote: > We were able to confirm that this problem affects our product as well. > It shows up in both Silverlight 4 and 5 builds. I didn?t see an issue > ticket created on CodePlex yet, so I created one.**** > > ** ** > > Is the best ?fix? going to be to catch MethodAccessException and return an > empty string from GetPrefix()? I am not familiar with the importance of > that call.**** > > ** ** > > ** ** > > *Keith Rome* > > *Senior Consultant and Architect* > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS**** > > Wintellect | 770.617.4016 | krome at wintellect.com **** > > www.wintellect.com**** > > ** ** > > *From:* Mattias Ahlenius [mailto:mattias at goodsolutions.se] > *Sent:* Thursday, April 19, 2012 2:16 PM > *To:* Slide > *Cc:* Keith Rome; ironpython-users at python.org > *Subject:* Re: [Ironpython-users] Problem with embedding IronPython into > Silverlight Application**** > > ** ** > > I've put together a small testproject, when I build it with target SL4 I > get the same error as with the IronPython bins, but it works fine when I > compile it to target SL5, I've attached a testproject as a .zip (just > rename it from sip)**** > > ** ** > > /Mattias**** > > 2012/4/19 Mattias Ahlenius **** > > I think the binaries under: lib\Sl5 is compiled with SL4 as target and not > with SL5, not sure but that may be the issue.**** > > ** ** > > /Mattias**** > > ** ** > > **** > > ** ** > > 2012/4/19 Slide **** > > No, that is correct, SL5 does include the FEATURE_ASSEMBLY_LOCATION > property in the build, so you should be getting that code when you > disassemble. Can you check if there is anything in the InnerException when > you catch it?**** > > ** ** > > On Thu, Apr 19, 2012 at 7:28 AM, Mattias Ahlenius < > mattias at goodsolutions.se> wrote:**** > > Do I do something fundamentally wrong here... The below is what I get do a > disasm on the SL5 assembly in the latest distribution (2.7.2.1)**** > > ** ** > > Greatful for any help I could get in the right direction.**** > > ** ** > > Best regards,**** > > ** ** > > Mattias**** > > ** ** > > 2012/4/18 Mattias Ahlenius **** > > ** ** > > I get the following when I make a disam in Reflector, the exception > (System.MethodAccessException) that I'm getting is not subclassing neither > SecurityException or ArgumentException which is catched and handled.**** > > ** ** > > ** ** > > *private static string GetPrefix ()* > > *{* > > * try* > > * {* > > * return Path .GetDirectoryName (Assembly .GetExecutingAssembly ().Location );* > > * }* > > * catch (SecurityException )* > > * {* > > * return string .Empty ;* > > * }* > > * catch (ArgumentException )* > > * {* > > * return string .Empty ;* > > * }* > > *}* > > * * > > ** ** > > /Mattias > > **** > > * * > > 2012/4/18 Slide **** > > This really sounds like the assemblies you are referencing are not really > the SL assemblies, can you open the assembly in ILSpy and decompile > GetPrefix and see what you have?**** > > ** ** > > slide**** > > ** ** > > On Wed, Apr 18, 2012 at 1:44 PM, Mattias Ahlenius < > mattias at goodsolutions.se> wrote:**** > > Same exception even if I use the 2.7.2.1 bins: (I support you mean 2.7.. > and not 2.5..)**** > > ** ** > > Message: Failed to load language 'IronPython 2.7.2.1': The type > initializer for 'IronPython.Modules.SysModule' threw an exception.**** > > ** ** > > InnerException:**** > > **** > > ** ** > > "Attempt by security transparent method > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > method 'System.Reflection.Assembly.get_Location()' failed." > > /Mattias**** > > ** ** > > 2012/4/18 Slide **** > > Please make sure you have 2.5.2.1 and not just 2.5.2.**** > > > On Wed, Apr 18, 2012 at 12:16 PM, Mattias Ahlenius > wrote: > > Thanks for your quick reply Keith, > > > > Tried you code and I still get the same Exception: > > > > "Attempt by security transparent method > > 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > > method 'System.Reflection.Assembly.get_Location()' failed." > > > > /Mattias > > > > > > > > 2012/4/18 Keith Rome > >> > >> Does this not work for you? > >> > >> > >> > >> using IronPython.Hosting; > >> > >> // ... > >> > >> _python = Python.CreateEngine(); > >> > >> > >> > >> I believe that should handle the simple/typical scenarios, unless you > need > >> to alter the environment (such as plugging in a custom Host/PAL). > >> > >> > >> > >> If you need to customize the environment, then this should work: > >> > >> > >> > >> var options = new Dictionary(); > >> > >> ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(options); > >> > >> _runtime = new ScriptRuntime(setup); > >> > >> _python = Python.GetEngine(_runtime); > >> > >> > >> > >> > >> > >> This code should work exactly the same on desktop CLR and Silverlight. > >> > >> > >> > >> > >> > >> > >> > >> Keith Rome > >> > >> Senior Consultant and Architect > >> > >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > >> > >> Wintellect | 770.617.4016 | krome at wintellect.com > >> > >> www.wintellect.com > >> > >> > >> > >> From: ironpython-users-bounces+rome=wintellect.com at python.org > >> [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > Behalf > >> Of Mattias Ahlenius > >> Sent: Wednesday, April 18, 2012 2:41 PM > >> To: ironpython-users at python.org > >> Subject: [Ironpython-users] Problem with embedding IronPython into > >> Silverlight Application > >> > >> > >> > >> Hi, > >> > >> > >> > >> I'm new to scripting and would like to add support for IronPython to our > >> Silverlight application, I have tried to find an answer on the net but > could > >> not find anyone else facing the same problem. The app is an out of > browser > >> application. > >> > >> > >> > >> I've added the latest release (2.7.2) from nuget, checked that the > >> binaries being used is from the SL5 > libs-catalog: IronPython.2.7.2\lib\Sl5 > >> > >> > >> > >> The code I use to create the scripting engine is the following: > >> > >> > >> > >> .. > >> > >> > >> > _runtime = new ScriptRuntime(DynamicEngine.CreateRuntimeSetup(true)); > >> > >> _python = _runtime.GetEngine("py"); > >> > >> .. > >> > >> > >> > >> When GetEngine is executed I'll the following secutiry exception: > >> > >> "{System.MethodAccessException: Attempt by security transparent method > >> 'IronPython.Modules.SysModule.GetPrefix()' to access security critical > >> method 'System.Reflection.Assembly.get_Location()' failed. > >> > >> at IronPython.Modules.SysModule.GetPrefix() > >> > >> at IronPython.Modules.SysModule..cctor()}" > >> > >> When checking the code at GitHub for the method: GetPrefix() > >> > >> > >> > >> There are code checking a compiler-constant that seems to be if you > >> running in "silverlight" (don't have diskaccess to the libs), but the > code > >> seems to be executed anyway, which makes me wonder if I still doesn't > use > >> the correct libs for Silverlight. > >> > >> > >> > >> > >> > >> Would really appreciate if someone could point me in the right > direction. > >> > >> > >> > >> > >> > >> Have a nice day! > >> > >> -- > >> > >> Best regards, > >> > >> > >> > >> Mattias Ahlenius > >> > >> 031 - 788 19 25 > >> > >> > >> > >> Good Solutions AB > >> > >> http://www.goodsolutions.se > >> > >> > > > > > > > > > > -- > > > > Med v?nlig h?lsning, > > > > Mattias Ahlenius > > 031 - 788 19 25 > > > > Good Solutions AB > > http://www.goodsolutions.se > > > >**** > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > > > > > -- > Website: http://earl-of-code.com**** > > > > **** > > ** ** > > -- **** > > Med v?nlig h?lsning,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > > > > **** > > ** ** > > -- > Website: http://earl-of-code.com**** > > > > **** > > ** ** > > -- **** > > Med v?nlig h?lsning,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > > > > **** > > ** ** > > -- **** > > Med v?nlig h?lsning,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > > > > **** > > ** ** > > -- > Website: http://earl-of-code.com**** > > > > **** > > ** ** > > -- **** > > Med v?nlig h?lsning,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > > > > **** > > ** ** > > -- **** > > Med v?nlig h?lsning,**** > > ** ** > > Mattias Ahlenius**** > > 031 - 788 19 25**** > > ** ** > > Good Solutions AB**** > > http://www.goodsolutions.se**** > > ** ** > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Apr 20 05:51:04 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 19 Apr 2012 20:51:04 -0700 Subject: [Ironpython-users] Problem with embedding IronPython into Silverlight Application In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D0E1889@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D0EA52B@BY2PRD0710MB389.namprd07.prod.outlook.com> Message-ID: On Thu, Apr 19, 2012 at 3:43 PM, Slide wrote: > Since modules aren't loaded from the file system the same way on SL, I > think it shouldn't cause too much of an issue. You can rebuild IP with the > change and see if it causes any other issues. Yeah, GetPrefix() isn't really critical. It just sets the value for sys.prefix, which is the filesystem path of the Python executable. That doesn't really have meaning on Silverlight (and probably Android and WP7 as well). - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Apr 20 12:12:07 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 20 Apr 2012 03:12:07 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/19/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] IronPython engine fails to load under Silverlight (MethodAccessException) 2. [New comment] IronPython engine fails to load under Silverlight (MethodAccessException) ---------------------------------------------- ISSUES 1. [New issue] IronPython engine fails to load under Silverlight (MethodAccessException) http://ironpython.codeplex.com/workitem/32596 User KeithJRome has proposed the issue: "Initializing the Silverlight 4 or 5 version of IronPython throws MethodAccessException while running in a browser context (might not for out-of-browser, but this is unconfirmed). Repro code: IronPython.Hosting.Python.CreateEngine(); Outer Exception TargetInvocationException: Failed to load language 'IronPython 2.7.2': The type initializer for 'IronPython.Modules.Builtin' threw an exception. at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded) at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config) at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language) at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName) at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName) at IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime) at IronPython.Hosting.Python.CreateEngine() at IronSLTest.MainPage..ctor() Inner Exception TypeInitializationException: The type initializer for 'IronPython.Modules.Builtin' threw an exception. at IronPython.Modules.Builtin.PerformModuleReload(PythonContext context, PythonDictionary dict) at IronPython.Runtime.PythonContext.InitializeBuiltins() at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)"----------------- 2. [New comment] IronPython engine fails to load under Silverlight (MethodAccessException) http://ironpython.codeplex.com/workitem/32596 User mahlenius has commented on the issue: "I'm having the same problem with an out of browser application in Silverlight 5. I think the code works in SL5, if the binaries are recompiled to target SL5. Attached a small test project, which mimic the code in GetPrefix() and it throws an exception when compiling => SL4 but works just fine when the target is set to SL5. " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mva at sysfault.org Fri Apr 20 15:45:34 2012 From: mva at sysfault.org (mva at sysfault.org) Date: Fri, 20 Apr 2012 15:45:34 +0200 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values Message-ID: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> Dear all, on a 64-bit Windows 7 machine (other platforms untested), I find myself unable to create a ctypes.Union-based class wrapper for a C type. Regardless of what kind of Union I create, it always ends up with a "object reference not set to an instance of an object" error from .NET. Find below a brief command line example including the necessary .NET and IronPython information. IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> class foo(Union): ... _fields_ = [("t", c_uint), ("b", c_float)] ... >>> bar = foo() >>> bar.t = 1 Traceback (most recent call last): File "", line 1, in SystemError: Object reference not set to an instance of an object. I'm not subscribed to this list, in case you require more information please keep me in CC. Regards Marcus From slide.o.mix at gmail.com Fri Apr 20 20:11:19 2012 From: slide.o.mix at gmail.com (Slide) Date: Fri, 20 Apr 2012 11:11:19 -0700 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values In-Reply-To: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> References: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> Message-ID: I am unable to reproduce this, I am also running Win7 x64 Running with ipy64.exe IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (64-bit) Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> class foo(Union): ... __fields__ = [("t", c_uint), ("b", c_float)] ... >>> bar = foo() >>> bar.t = 1 >>> Running with ipy.exe IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> class foo(Union): ... __fields__ = [("t", c_uint), ("b", c_float)] ... >>> bar = foo() >>> bar.t = 1 >>> On Fri, Apr 20, 2012 at 6:45 AM, wrote: > Dear all, > > on a 64-bit Windows 7 machine (other platforms untested), I find myself > unable to create a > ctypes.Union-based class wrapper for a C type. > Regardless of what kind of Union I create, it always ends up with a > "object reference not set to an instance of an object" error from .NET. Find > below a brief > command line example including the necessary .NET and IronPython > information. > > IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) > Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> from ctypes import * >>>> class foo(Union): > > ... ? ? _fields_ = [("t", c_uint), ("b", c_float)] > ... >>>> >>>> bar = foo() >>>> bar.t = 1 > > Traceback (most recent call last): > ?File "", line 1, in > SystemError: Object reference not set to an instance of an object. > > I'm not subscribed to this list, in case you require more information please > keep me in CC. > > Regards > Marcus > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -- Website:?http://earl-of-code.com From igor.brejc at gmail.com Fri Apr 20 22:34:42 2012 From: igor.brejc at gmail.com (Igor Brejc) Date: Fri, 20 Apr 2012 22:34:42 +0200 Subject: [Ironpython-users] Question on exposing collections Message-ID: Hi, I'm developing a C# API that will be exposed to users via IronPython. I'm a bit confused on what types of collections should the API provide through its public interface (both as input and output parameters of methods and as properties). For example, what type is most suitable for exposing lists? Should I use IronPython.Runtime.List or can I reuse standard .NET generic lists? I want the API to have the Python look and feel, but on the other hand in some cases exposing IronPython.Runtime.List means I have to construct&fill it before passing it out (and performance is important in the case of this API). In terms of Python usage is there any real difference between IronPython.Runtime collections and .NET ones? Do .NET collections provide the same set of access methods and properties as standard Python collections? Thanks, Igor -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.bromberek at gmail.com Fri Apr 20 22:46:53 2012 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Fri, 20 Apr 2012 15:46:53 -0500 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values In-Reply-To: References: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> Message-ID: Looks like you are running 32bit python on a 64 bit OS On 4/20/12, Slide wrote: > I am unable to reproduce this, I am also running Win7 x64 > > Running with ipy64.exe > > IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (64-bit) > Type "help", "copyright", "credits" or "license" for more information. >>>> from ctypes import * >>>> class foo(Union): > ... __fields__ = [("t", c_uint), ("b", c_float)] > ... >>>> bar = foo() >>>> bar.t = 1 >>>> > > Running with ipy.exe > > IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) > Type "help", "copyright", "credits" or "license" for more information. >>>> from ctypes import * >>>> class foo(Union): > ... __fields__ = [("t", c_uint), ("b", c_float)] > ... >>>> bar = foo() >>>> bar.t = 1 >>>> > > > On Fri, Apr 20, 2012 at 6:45 AM, wrote: >> Dear all, >> >> on a 64-bit Windows 7 machine (other platforms untested), I find myself >> unable to create a >> ctypes.Union-based class wrapper for a C type. >> Regardless of what kind of Union I create, it always ends up with a >> "object reference not set to an instance of an object" error from .NET. >> Find >> below a brief >> command line example including the necessary .NET and IronPython >> information. >> >> IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) >> Type "help", "copyright", "credits" or "license" for more information. >>>>> >>>>> from ctypes import * >>>>> class foo(Union): >> >> ... ? ? _fields_ = [("t", c_uint), ("b", c_float)] >> ... >>>>> >>>>> bar = foo() >>>>> bar.t = 1 >> >> Traceback (most recent call last): >> ?File "", line 1, in >> SystemError: Object reference not set to an instance of an object. >> >> I'm not subscribed to this list, in case you require more information >> please >> keep me in CC. >> >> Regards >> Marcus >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > > > -- > Website:?http://earl-of-code.com > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Sent from my mobile device From slide.o.mix at gmail.com Fri Apr 20 22:57:11 2012 From: slide.o.mix at gmail.com (Slide) Date: Fri, 20 Apr 2012 13:57:11 -0700 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values In-Reply-To: References: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> Message-ID: As I mentioned, I ran both ipy64.exe and ipy.exe (you can see from my output that is shows a 64-bit runtime for ipy64 and a 32-bit runtime for ipy.exe and it made no difference. They both worked for me. slide On Fri, Apr 20, 2012 at 1:46 PM, Bruce Bromberek wrote: > Looks like you are running 32bit python on a 64 bit OS > > On 4/20/12, Slide wrote: >> I am unable to reproduce this, I am also running Win7 x64 >> >> Running with ipy64.exe >> >> IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (64-bit) >> Type "help", "copyright", "credits" or "license" for more information. >>>>> from ctypes import * >>>>> class foo(Union): >> ... ? ? __fields__ = [("t", c_uint), ("b", c_float)] >> ... >>>>> bar = foo() >>>>> bar.t = 1 >>>>> >> >> Running with ipy.exe >> >> IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) >> Type "help", "copyright", "credits" or "license" for more information. >>>>> from ctypes import * >>>>> class foo(Union): >> ... ? ? __fields__ = [("t", c_uint), ("b", c_float)] >> ... >>>>> bar = foo() >>>>> bar.t = 1 >>>>> >> >> >> On Fri, Apr 20, 2012 at 6:45 AM, ? wrote: >>> Dear all, >>> >>> on a 64-bit Windows 7 machine (other platforms untested), I find myself >>> unable to create a >>> ctypes.Union-based class wrapper for a C type. >>> Regardless of what kind of Union I create, it always ends up with a >>> "object reference not set to an instance of an object" error from .NET. >>> Find >>> below a brief >>> command line example including the necessary .NET and IronPython >>> information. >>> >>> IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) >>> Type "help", "copyright", "credits" or "license" for more information. >>>>>> >>>>>> from ctypes import * >>>>>> class foo(Union): >>> >>> ... ? ? _fields_ = [("t", c_uint), ("b", c_float)] >>> ... >>>>>> >>>>>> bar = foo() >>>>>> bar.t = 1 >>> >>> Traceback (most recent call last): >>> ?File "", line 1, in >>> SystemError: Object reference not set to an instance of an object. >>> >>> I'm not subscribed to this list, in case you require more information >>> please >>> keep me in CC. >>> >>> Regards >>> Marcus >>> >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> http://mail.python.org/mailman/listinfo/ironpython-users >> >> >> >> -- >> Website:?http://earl-of-code.com >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > -- > Sent from my mobile device -- Website:?http://earl-of-code.com From dinov at microsoft.com Fri Apr 20 23:18:36 2012 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 20 Apr 2012 21:18:36 +0000 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values In-Reply-To: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> References: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> Message-ID: <6757ED2748BC0A43B9F3E4DA32D65AB013C532@CH1PRD0310MB357.namprd03.prod.outlook.com> I'd suggest running w/ -X:ExceptionDetail and sending back the stack trace that you get as that'll tell us where the exception is coming from. > -----Original Message----- > From: ironpython-users-bounces+dinov=microsoft.com at python.org > [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On > Behalf Of mva at sysfault.org > Sent: Friday, April 20, 2012 6:46 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union > values > > Dear all, > > on a 64-bit Windows 7 machine (other platforms untested), I find myself unable > to create a ctypes.Union-based class wrapper for a C type. > Regardless of what kind of Union I create, it always ends up with a "object > reference not set to an instance of an object" error from .NET. Find below a > brief command line example including the necessary .NET and IronPython > information. > > IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) Type "help", > "copyright", "credits" or "license" for more information. > >>> from ctypes import * > >>> class foo(Union): > ... _fields_ = [("t", c_uint), ("b", c_float)] > ... > >>> bar = foo() > >>> bar.t = 1 > Traceback (most recent call last): > File "", line 1, in > SystemError: Object reference not set to an instance of an object. > > I'm not subscribed to this list, in case you require more information please keep > me in CC. > > Regards > Marcus > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > From slide.o.mix at gmail.com Sat Apr 21 00:31:55 2012 From: slide.o.mix at gmail.com (Slide) Date: Fri, 20 Apr 2012 15:31:55 -0700 Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union values In-Reply-To: <6757ED2748BC0A43B9F3E4DA32D65AB013C532@CH1PRD0310MB357.namprd03.prod.outlook.com> References: <20120420154534.Horde.ht-ENNjz9kRPkWh_jTcTIUA@webmail.df.eu> <6757ED2748BC0A43B9F3E4DA32D65AB013C532@CH1PRD0310MB357.namprd03.prod.outlook.com> Message-ID: Just a question, is the CPython stdlib in your IRONPYTHONPATH or added to sys.path? slide On Fri, Apr 20, 2012 at 2:18 PM, Dino Viehland wrote: > I'd suggest running w/ -X:ExceptionDetail and sending back the stack trace that you > get as that'll tell us where the exception is coming from. > >> -----Original Message----- >> From: ironpython-users-bounces+dinov=microsoft.com at python.org >> [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On >> Behalf Of mva at sysfault.org >> Sent: Friday, April 20, 2012 6:46 AM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] ctypes module in version 2.7.2 can't create Union >> values >> >> Dear all, >> >> on a 64-bit Windows 7 machine (other platforms untested), I find myself unable >> to create a ctypes.Union-based class wrapper for a C type. >> Regardless of what kind of Union I create, it always ends up with a "object >> reference not set to an instance of an object" error from .NET. Find below a >> brief command line example including the necessary .NET and IronPython >> information. >> >> IronPython 2.7.2.1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) Type "help", >> "copyright", "credits" or "license" for more information. >> >>> from ctypes import * >> >>> class foo(Union): >> ... ? ? _fields_ = [("t", c_uint), ("b", c_float)] >> ... >> >>> bar = foo() >> >>> bar.t = 1 >> Traceback (most recent call last): >> ? ?File "", line 1, in >> SystemError: Object reference not set to an instance of an object. >> >> I'm not subscribed to this list, in case you require more information please keep >> me in CC. >> >> Regards >> Marcus >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -- Website:?http://earl-of-code.com From no_reply at codeplex.com Sat Apr 21 10:14:42 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 21 Apr 2012 01:14:42 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/20/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Can't make IronPython a prerequisite 2. [New comment] IronPython engine fails to load under Silverlight (MethodAccessException) 3. [New issue] Occasional build error for Silverlight targets ---------------------------------------------- ISSUES 1. [New issue] Can't make IronPython a prerequisite http://ironpython.codeplex.com/workitem/32598 User Snusmumriken71 has proposed the issue: "As we are delivering a product with integrated IronPython scripting support, I thought it would be great to have the installer included in our installation as a prerequisite. Much like other, Microsoft-internal required binaries, it would the automatically be installed prior to our product. I am using the Bootstrapper Manifest Generator (since we're, unfortunately, stuck with the old .vdproj installer project type for a while). Making a bootstrapper package out of the IronPython MSI is easy. The problem comes when we try our new installation with the ironpython package included, it then always aborts with the message that the msi "either has been changed since it was initially published, or is corrupt". I'm beginning to think it's the latter of the two, since doing a validation of the msi in e.g. ORCA reports a large amount of warnings, and when I try making a prerequisite out of another products' MSI using the same technique it goes fine as well."----------------- 2. [New comment] IronPython engine fails to load under Silverlight (MethodAccessException) http://ironpython.codeplex.com/workitem/32596 User jdhardy has commented on the issue: "Fixed in 6593423."----------------- 3. [New issue] Occasional build error for Silverlight targets http://ironpython.codeplex.com/workitem/32602 User KeithJRome has proposed the issue: "I'm not really sure why this issue doesn't show up more reliably. When building the latest IronPython.Modules for Silverlight targets, the compiler will intermittently return failure with the following error message (and provides no source line number): Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not defined or imported. One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sun Apr 22 16:29:29 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 22 Apr 2012 07:29:29 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/21/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Occasional build error for Silverlight targets ---------------------------------------------- ISSUES 1. [New comment] Occasional build error for Silverlight targets http://ironpython.codeplex.com/workitem/32602 User KeithJRome has commented on the issue: "Followup - It seems that using dynamic to reach sys.modules from within that assembly is the culprit - which is what I was doing in ResourceMetaPathImporter.load_module(), and which works fine on the desktop CLR. Under Silverlight though, it occasionally fails with the above error. Additionally, I noted an oversight in the same class that was missed in the original push - I had used an overload of String.EndsWith() that doesn't actually exist in the Silverlight CLR. I will prepare a minor patch to correct both issues and submit a pull req for it." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at codeplex.com Mon Apr 23 06:02:42 2012 From: notifications at codeplex.com (notifications at codeplex.com) Date: 22 Apr 2012 21:02:42 -0700 Subject: [Ironpython-users] User added as Contributor to your CodePlex project, ironpython Message-ID: An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Apr 23 15:43:22 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 23 Apr 2012 06:43:22 -0700 Subject: [Ironpython-users] Welcome Aboard Message-ID: Looks like we have a new contributor KeithJRome. Welcome aboard! slide -- Website:?http://earl-of-code.com From pratikparanjape at gmail.com Mon Apr 23 21:25:46 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Tue, 24 Apr 2012 00:55:46 +0530 Subject: [Ironpython-users] Mono and Ironpython Message-ID: I am trying to install IronPython over Mono, on CentOS in my Home folder. Trying to follow instruction here: https://github.com/IronLanguages/main/wiki/Building But...IronPython.Mono.sln does not exist. Building with IronPython.sln gives errors. Am I doing something wrong or there are updated instructions somewhere? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Apr 23 23:21:37 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 23 Apr 2012 14:21:37 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: Please post the build errors. IronPython.Mono.sln does not exist anymore, you should be able to use the normal sln file. You may need to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To determine the SOMETHING's check the Common.csproj for the different configurations and platforms. slide On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building > > > > > But...IronPython.Mono.sln does not exist. > > Building with IronPython.sln gives errors. > > Am I doing something wrong or there are updated instructions somewhere? > > Thanks. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website:?http://earl-of-code.com From slide.o.mix at gmail.com Tue Apr 24 00:50:54 2012 From: slide.o.mix at gmail.com (Slide) Date: Mon, 23 Apr 2012 15:50:54 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: Do you have the 4.0 BCL and what not installed? slide On Mon, Apr 23, 2012 at 2:58 PM, Pratik Paranjape wrote: > Thanks for reply. > > command I was using: > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > > I checked common.proj, but I am not sure what platform to choose. CentOS > Mono 2.10. > > Error stack: > > Errors: > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln > (default targets) -> > (Build target) -> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj > (default targets) -> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> > > ??? Generation/CompilerHelpers.cs(198,44): error CS1061: Type > `System.Reflection.MethodInfo' does not contain a definition for > `GetRuntimeBaseDefinition' and no extension method > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be > found (are you missing a using directive or an assembly reference?) > ??? Utils/ReflectionUtils.cs(389,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(445,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(495,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > > ??? ?2 Warning(s) > ??? ?10 Error(s) > > > > > > > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: >> >> Please post the build errors. IronPython.Mono.sln does not exist >> anymore, you should be able to use the normal sln file. You may need >> to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To >> determine the SOMETHING's check the Common.csproj for the different >> configurations and platforms. >> >> slide >> >> On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape >> wrote: >> > I am trying to install IronPython over Mono, on CentOS in my Home >> > folder. >> > >> > >> > Trying to follow instruction here: >> > https://github.com/IronLanguages/main/wiki/Building >> > >> > >> > >> > >> > But...IronPython.Mono.sln does not exist. >> > >> > Building with IronPython.sln gives errors. >> > >> > Am I doing something wrong or there are updated instructions somewhere? >> > >> > Thanks. >> > >> > >> > _______________________________________________ >> > Ironpython-users mailing list >> > Ironpython-users at python.org >> > http://mail.python.org/mailman/listinfo/ironpython-users >> > >> >> >> >> -- >> Website:?http://earl-of-code.com > > -- Website:?http://earl-of-code.com From epronk at muftor.com Tue Apr 24 07:52:08 2012 From: epronk at muftor.com (Eddy Pronk) Date: Tue, 24 Apr 2012 15:52:08 +1000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: Looks similar to the problem I posted about last week. See this thread: http://mail.python.org/pipermail/ironpython-users/2012-April/015910.html Eddy On Tue, Apr 24, 2012 at 5:25 AM, Pratik Paranjape wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building From pratikparanjape at gmail.com Mon Apr 23 23:58:33 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Tue, 24 Apr 2012 03:28:33 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: Thanks for reply. command I was using: $> xbuild /p:Configuration=Release Solutions/IronPython.sln I checked common.proj, but I am not sure what platform to choose. CentOS Mono 2.10. Error stack: Errors: /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln (default targets) -> (Build target) -> /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj (default targets) -> /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> Generation/CompilerHelpers.cs(198,44): error CS1061: Type `System.Reflection.MethodInfo' does not contain a definition for `GetRuntimeBaseDefinition' and no extension method `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) Utils/ReflectionUtils.cs(389,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(445,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(495,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' 2 Warning(s) 10 Error(s) On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: > Please post the build errors. IronPython.Mono.sln does not exist > anymore, you should be able to use the normal sln file. You may need > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > determine the SOMETHING's check the Common.csproj for the different > configurations and platforms. > > slide > > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: > > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > > > > Trying to follow instruction here: > > https://github.com/IronLanguages/main/wiki/Building > > > > > > > > > > But...IronPython.Mono.sln does not exist. > > > > Building with IronPython.sln gives errors. > > > > Am I doing something wrong or there are updated instructions somewhere? > > > > Thanks. > > > > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > > > > > -- > Website: http://earl-of-code.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pratikparanjape at gmail.com Tue Apr 24 01:06:11 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Tue, 24 Apr 2012 04:36:11 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: I installed mono from source...they laid out full 4.0 compiler support in 2.8. But they also say this in road map for 2.12: "Complete .NET 4.0 Core Support " current is 2.10 is that possibly what I am missing? I can go in detail with dependencies if they are listed somewhere.... Thanks again. On Tue, Apr 24, 2012 at 4:20 AM, Slide wrote: > Do you have the 4.0 BCL and what not installed? > > slide > > On Mon, Apr 23, 2012 at 2:58 PM, Pratik Paranjape > wrote: > > Thanks for reply. > > > > command I was using: > > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > > > > I checked common.proj, but I am not sure what platform to choose. CentOS > > Mono 2.10. > > > > Error stack: > > > > Errors: > > > > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln > > (default targets) -> > > (Build target) -> > > > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj > > (default targets) -> > > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> > > > > Generation/CompilerHelpers.cs(198,44): error CS1061: Type > > `System.Reflection.MethodInfo' does not contain a definition for > > `GetRuntimeBaseDefinition' and no extension method > > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could > be > > found (are you missing a using directive or an assembly reference?) > > Utils/ReflectionUtils.cs(389,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded > > method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot > > convert `object' expression to type `System.Reflection.MethodInfo' > > Utils/ReflectionUtils.cs(445,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded > > method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot > > convert `object' expression to type `System.Reflection.MethodInfo' > > Utils/ReflectionUtils.cs(495,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded > > method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot > > convert `object' expression to type `System.Reflection.MethodInfo' > > > > 2 Warning(s) > > 10 Error(s) > > > > > > > > > > > > > > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: > >> > >> Please post the build errors. IronPython.Mono.sln does not exist > >> anymore, you should be able to use the normal sln file. You may need > >> to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > >> determine the SOMETHING's check the Common.csproj for the different > >> configurations and platforms. > >> > >> slide > >> > >> On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > >> wrote: > >> > I am trying to install IronPython over Mono, on CentOS in my Home > >> > folder. > >> > > >> > > >> > Trying to follow instruction here: > >> > https://github.com/IronLanguages/main/wiki/Building > >> > > >> > > >> > > >> > > >> > But...IronPython.Mono.sln does not exist. > >> > > >> > Building with IronPython.sln gives errors. > >> > > >> > Am I doing something wrong or there are updated instructions > somewhere? > >> > > >> > Thanks. > >> > > >> > > >> > _______________________________________________ > >> > Ironpython-users mailing list > >> > Ironpython-users at python.org > >> > http://mail.python.org/mailman/listinfo/ironpython-users > >> > > >> > >> > >> > >> -- > >> Website: http://earl-of-code.com > > > > > > > > -- > Website: http://earl-of-code.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Tue Apr 24 17:00:29 2012 From: rome at Wintellect.com (Keith Rome) Date: Tue, 24 Apr 2012 15:00:29 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> I have also been having problems getting Microsoft.Dynamic to build for the Silverlight targets. If I revert commit 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from around 10 days ago, then it builds for me. Build output is similar, but not exactly the same: ------ Build started: Project: Microsoft.Dynamic, Configuration: Silverlight5Release Any CPU ------ C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): error CS1061: 'System.Reflection.MethodInfo' does not contain a definition for 'GetRuntimeBaseDefinition' and no extension method 'GetRuntimeBaseDefinition' accepting a first argument of type 'System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context Perhaps this might help shed light on the issue. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Pratik Paranjape Sent: Monday, April 23, 2012 5:59 PM To: Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Thanks for reply. command I was using: $> xbuild /p:Configuration=Release Solutions/IronPython.sln I checked common.proj, but I am not sure what platform to choose. CentOS Mono 2.10. Error stack: Errors: /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln (default targets) -> (Build target) -> /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj (default targets) -> /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> Generation/CompilerHelpers.cs(198,44): error CS1061: Type `System.Reflection.MethodInfo' does not contain a definition for `GetRuntimeBaseDefinition' and no extension method `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) Utils/ReflectionUtils.cs(389,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(445,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(495,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' 2 Warning(s) 10 Error(s) On Tue, Apr 24, 2012 at 2:51 AM, Slide > wrote: Please post the build errors. IronPython.Mono.sln does not exist anymore, you should be able to use the normal sln file. You may need to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To determine the SOMETHING's check the Common.csproj for the different configurations and platforms. slide On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building > > > > > But...IronPython.Mono.sln does not exist. > > Building with IronPython.sln gives errors. > > Am I doing something wrong or there are updated instructions somewhere? > > Thanks. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Apr 24 18:12:08 2012 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 24 Apr 2012 16:12:08 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> Looks like my fault. Sorry about that. Fixing. Tomas From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On Behalf Of Keith Rome Sent: Tuesday, April 24, 2012 8:00 AM To: trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython I have also been having problems getting Microsoft.Dynamic to build for the Silverlight targets. If I revert commit 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from around 10 days ago, then it builds for me. Build output is similar, but not exactly the same: ------ Build started: Project: Microsoft.Dynamic, Configuration: Silverlight5Release Any CPU ------ C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): error CS1061: 'System.Reflection.MethodInfo' does not contain a definition for 'GetRuntimeBaseDefinition' and no extension method 'GetRuntimeBaseDefinition' accepting a first argument of type 'System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context Perhaps this might help shed light on the issue. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Pratik Paranjape Sent: Monday, April 23, 2012 5:59 PM To: Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Thanks for reply. command I was using: $> xbuild /p:Configuration=Release Solutions/IronPython.sln I checked common.proj, but I am not sure what platform to choose. CentOS Mono 2.10. Error stack: Errors: /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln (default targets) -> (Build target) -> /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj (default targets) -> /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> Generation/CompilerHelpers.cs(198,44): error CS1061: Type `System.Reflection.MethodInfo' does not contain a definition for `GetRuntimeBaseDefinition' and no extension method `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) Utils/ReflectionUtils.cs(389,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(445,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(495,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' 2 Warning(s) 10 Error(s) On Tue, Apr 24, 2012 at 2:51 AM, Slide > wrote: Please post the build errors. IronPython.Mono.sln does not exist anymore, you should be able to use the normal sln file. You may need to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To determine the SOMETHING's check the Common.csproj for the different configurations and platforms. slide On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building > > > > > But...IronPython.Mono.sln does not exist. > > Building with IronPython.sln gives errors. > > Am I doing something wrong or there are updated instructions somewhere? > > Thanks. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Tue Apr 24 18:37:14 2012 From: rome at Wintellect.com (Keith Rome) Date: Tue, 24 Apr 2012 16:37:14 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> That one was my fault, as it wasn't obvious to me how to reach sys.modules otherwise. There is a pull request pending to drop the dynamic usage (it worked on desktop CLR but not others). I changed it to use this method instead (which seems to work on all platforms): (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("modules") Is there a better way to reach sys.modules when all I have is a CodeContext? Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] Sent: Tuesday, April 24, 2012 12:27 PM To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: RE: [Ironpython-users] Mono and Ironpython Fixed. There is one remaining error when building for Silverlight4 (that is not my fault): ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# runtime binder isn't referenced by Silverlight4 build. I'm wondering why dynamic is used there. Tomas From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On Behalf Of Tomas Matousek Sent: Tuesday, April 24, 2012 9:12 AM To: Keith Rome; trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Looks like my fault. Sorry about that. Fixing. Tomas From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On Behalf Of Keith Rome Sent: Tuesday, April 24, 2012 8:00 AM To: trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython I have also been having problems getting Microsoft.Dynamic to build for the Silverlight targets. If I revert commit 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from around 10 days ago, then it builds for me. Build output is similar, but not exactly the same: ------ Build started: Project: Microsoft.Dynamic, Configuration: Silverlight5Release Any CPU ------ C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): error CS1061: 'System.Reflection.MethodInfo' does not contain a definition for 'GetRuntimeBaseDefinition' and no extension method 'GetRuntimeBaseDefinition' accepting a first argument of type 'System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context Perhaps this might help shed light on the issue. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Pratik Paranjape Sent: Monday, April 23, 2012 5:59 PM To: Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Thanks for reply. command I was using: $> xbuild /p:Configuration=Release Solutions/IronPython.sln I checked common.proj, but I am not sure what platform to choose. CentOS Mono 2.10. Error stack: Errors: /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln (default targets) -> (Build target) -> /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj (default targets) -> /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> Generation/CompilerHelpers.cs(198,44): error CS1061: Type `System.Reflection.MethodInfo' does not contain a definition for `GetRuntimeBaseDefinition' and no extension method `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) Utils/ReflectionUtils.cs(389,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(445,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(495,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' 2 Warning(s) 10 Error(s) On Tue, Apr 24, 2012 at 2:51 AM, Slide > wrote: Please post the build errors. IronPython.Mono.sln does not exist anymore, you should be able to use the normal sln file. You may need to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To determine the SOMETHING's check the Common.csproj for the different configurations and platforms. slide On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building > > > > > But...IronPython.Mono.sln does not exist. > > Building with IronPython.sln gives errors. > > Am I doing something wrong or there are updated instructions somewhere? > > Thanks. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Tue Apr 24 18:43:22 2012 From: slide.o.mix at gmail.com (Slide) Date: Tue, 24 Apr 2012 09:43:22 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: What about context.LanguageContext.SystemStateModules? On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: > That one was my fault, as it wasn?t obvious to me how to reach sys.modules > otherwise. There is a pull request pending to drop the dynamic usage (it > worked on desktop CLR but not others). I changed it to use this method > instead (which seems to work on all platforms): > > > > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("modules") > > > > Is there a better way to reach sys.modules when all I have is a CodeContext? > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] > Sent: Tuesday, April 24, 2012 12:27 PM > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide > Cc: ironpython-users at python.org > Subject: RE: [Ironpython-users] Mono and Ironpython > > > > Fixed. > > > > There is one remaining error when building for Silverlight4 (that is not my > fault): > > > > ResourceMetaPathImporter.load_module uses ?dynamic? keyword. The C# runtime > binder isn?t referenced by Silverlight4 build. > > I?m wondering why dynamic is used there. > > > > Tomas > > > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On > Behalf Of Tomas Matousek > Sent: Tuesday, April 24, 2012 9:12 AM > To: Keith Rome; trapped.into.code at gmail.com; Slide > > > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > Looks like my fault. Sorry about that. Fixing. > > > > Tomas > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On > Behalf Of Keith Rome > Sent: Tuesday, April 24, 2012 8:00 AM > To: trapped.into.code at gmail.com; Slide > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > I have also been having problems getting Microsoft.Dynamic to build for the > Silverlight targets. If I revert commit > 4d99cbae91724fc9b982b581d5ad79193991439e ?Win8 build fixes? from around 10 > days ago, then it builds for me. Build output is similar, but not exactly > the same: > > > > ------ Build started: Project: Microsoft.Dynamic, Configuration: > Silverlight5Release Any CPU ------ > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): > error CS1061: 'System.Reflection.MethodInfo' does not contain a definition > for 'GetRuntimeBaseDefinition' and no extension method > 'GetRuntimeBaseDefinition' accepting a first argument of type > 'System.Reflection.MethodInfo' could be found (are you missing a using > directive or an assembly reference?) > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the > current context > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the > current context > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the > current context > > > > > > Perhaps this might help shed light on the issue. > > > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: ironpython-users-bounces+rome=wintellect.com at python.org > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf > Of Pratik Paranjape > Sent: Monday, April 23, 2012 5:59 PM > To: Slide > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > Thanks for reply. > > command I was using: > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > > I checked common.proj, but I am not sure what platform to choose. CentOS > Mono 2.10. > > Error stack: > > Errors: > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln > (default targets) -> > (Build target) -> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj > (default targets) -> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> > > ??? Generation/CompilerHelpers.cs(198,44): error CS1061: Type > `System.Reflection.MethodInfo' does not contain a definition for > `GetRuntimeBaseDefinition' and no extension method > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be > found (are you missing a using directive or an assembly reference?) > ??? Utils/ReflectionUtils.cs(389,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(445,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(495,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded > method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot > convert `object' expression to type `System.Reflection.MethodInfo' > > ??? ?2 Warning(s) > ??? ?10 Error(s) > > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: > > Please post the build errors. IronPython.Mono.sln does not exist > anymore, you should be able to use the normal sln file. You may need > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > determine the SOMETHING's check the Common.csproj for the different > configurations and platforms. > > slide > > > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: >> I am trying to install IronPython over Mono, on CentOS in my Home folder. >> >> >> Trying to follow instruction here: >> https://github.com/IronLanguages/main/wiki/Building >> >> >> >> >> But...IronPython.Mono.sln does not exist. >> >> Building with IronPython.sln gives errors. >> >> Am I doing something wrong or there are updated instructions somewhere? >> >> Thanks. >> >> > >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > > > -- > Website:?http://earl-of-code.com > > -- Website:?http://earl-of-code.com From Tomas.Matousek at microsoft.com Tue Apr 24 18:26:44 2012 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 24 Apr 2012 16:26:44 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> Message-ID: <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> Fixed. There is one remaining error when building for Silverlight4 (that is not my fault): ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# runtime binder isn't referenced by Silverlight4 build. I'm wondering why dynamic is used there. Tomas From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On Behalf Of Tomas Matousek Sent: Tuesday, April 24, 2012 9:12 AM To: Keith Rome; trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Looks like my fault. Sorry about that. Fixing. Tomas From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.org] On Behalf Of Keith Rome Sent: Tuesday, April 24, 2012 8:00 AM To: trapped.into.code at gmail.com; Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython I have also been having problems getting Microsoft.Dynamic to build for the Silverlight targets. If I revert commit 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from around 10 days ago, then it builds for me. Build output is similar, but not exactly the same: ------ Build started: Project: Microsoft.Dynamic, Configuration: Silverlight5Release Any CPU ------ C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): error CS1061: 'System.Reflection.MethodInfo' does not contain a definition for 'GetRuntimeBaseDefinition' and no extension method 'GetRuntimeBaseDefinition' accepting a first argument of type 'System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): error CS0103: The name 'RuntimeReflectionExtensions' does not exist in the current context Perhaps this might help shed light on the issue. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: ironpython-users-bounces+rome=wintellect.com at python.org [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Pratik Paranjape Sent: Monday, April 23, 2012 5:59 PM To: Slide Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Thanks for reply. command I was using: $> xbuild /p:Configuration=Release Solutions/IronPython.sln I checked common.proj, but I am not sure what platform to choose. CentOS Mono 2.10. Error stack: Errors: /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPython.sln (default targets) -> (Build target) -> /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj (default targets) -> /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) -> Generation/CompilerHelpers.cs(198,44): error CS1061: Type `System.Reflection.MethodInfo' does not contain a definition for `GetRuntimeBaseDefinition' and no extension method `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' could be found (are you missing a using directive or an assembly reference?) Utils/ReflectionUtils.cs(389,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(389,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(445,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(445,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' Utils/ReflectionUtils.cs(495,41): error CS0103: The name `RuntimeReflectionExtensions' does not exist in the current context Utils/ReflectionUtils.cs(495,37): error CS1502: The best overloaded method match for `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' has some invalid arguments Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Reflection.MethodInfo' 2 Warning(s) 10 Error(s) On Tue, Apr 24, 2012 at 2:51 AM, Slide > wrote: Please post the build errors. IronPython.Mono.sln does not exist anymore, you should be able to use the normal sln file. You may need to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To determine the SOMETHING's check the Common.csproj for the different configurations and platforms. slide On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: > I am trying to install IronPython over Mono, on CentOS in my Home folder. > > > Trying to follow instruction here: > https://github.com/IronLanguages/main/wiki/Building > > > > > But...IronPython.Mono.sln does not exist. > > Building with IronPython.sln gives errors. > > Am I doing something wrong or there are updated instructions somewhere? > > Thanks. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Wed Apr 25 02:18:01 2012 From: rome at Wintellect.com (Keith Rome) Date: Wed, 25 Apr 2012 00:18:01 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Yes, it seems that is a much better way to go, and appears to work for SL4/5 and v2 profiles where dynamic was causing issues. Even though I know my way around a little, there is still a lot to be learned. I didn't even notice the existence of that property before. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com -----Original Message----- From: Slide [mailto:slide.o.mix at gmail.com] Sent: Tuesday, April 24, 2012 12:43 PM To: Keith Rome Cc: Tomas Matousek; trapped.into.code at gmail.com; ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython What about context.LanguageContext.SystemStateModules? On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: > That one was my fault, as it wasn't obvious to me how to reach > sys.modules otherwise. There is a pull request pending to drop the > dynamic usage (it worked on desktop CLR but not others). I changed it > to use this method instead (which seems to work on all platforms): > > > > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo > dules") > > > > Is there a better way to reach sys.modules when all I have is a CodeContext? > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] > Sent: Tuesday, April 24, 2012 12:27 PM > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide > Cc: ironpython-users at python.org > Subject: RE: [Ironpython-users] Mono and Ironpython > > > > Fixed. > > > > There is one remaining error when building for Silverlight4 (that is > not my > fault): > > > > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# > runtime binder isn't referenced by Silverlight4 build. > > I'm wondering why dynamic is used there. > > > > Tomas > > > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o > rg] On Behalf Of Tomas Matousek > Sent: Tuesday, April 24, 2012 9:12 AM > To: Keith Rome; trapped.into.code at gmail.com; Slide > > > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > Looks like my fault. Sorry about that. Fixing. > > > > Tomas > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o > rg] On Behalf Of Keith Rome > Sent: Tuesday, April 24, 2012 8:00 AM > To: trapped.into.code at gmail.com; Slide > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > I have also been having problems getting Microsoft.Dynamic to build > for the Silverlight targets. If I revert commit > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from > around 10 days ago, then it builds for me. Build output is similar, > but not exactly the same: > > > > ------ Build started: Project: Microsoft.Dynamic, Configuration: > Silverlight5Release Any CPU ------ > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): > error CS1061: 'System.Reflection.MethodInfo' does not contain a > definition for 'GetRuntimeBaseDefinition' and no extension method > 'GetRuntimeBaseDefinition' accepting a first argument of type > 'System.Reflection.MethodInfo' could be found (are you missing a using > directive or an assembly reference?) > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > the current context > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > the current context > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > the current context > > > > > > Perhaps this might help shed light on the issue. > > > > > > > > Keith Rome > > Senior Consultant and Architect > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > Wintellect | 770.617.4016 | krome at wintellect.com > > www.wintellect.com > > > > From: ironpython-users-bounces+rome=wintellect.com at python.org > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > Behalf Of Pratik Paranjape > Sent: Monday, April 23, 2012 5:59 PM > To: Slide > Cc: ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > Thanks for reply. > > command I was using: > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > > I checked common.proj, but I am not sure what platform to choose. > CentOS Mono 2.10. > > Error stack: > > Errors: > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho > n.sln > (default targets) -> > (Build target) -> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D > ynamic/Microsoft.Dynamic.csproj > (default targets) -> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) > -> > > ??? Generation/CompilerHelpers.cs(198,44): error CS1061: Type > `System.Reflection.MethodInfo' does not contain a definition for > `GetRuntimeBaseDefinition' and no extension method > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' > could be found (are you missing a using directive or an assembly > reference?) > ??? Utils/ReflectionUtils.cs(389,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(389,37): error CS1502: The best > overloaded method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' > cannot convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(445,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(445,37): error CS1502: The best > overloaded method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' > cannot convert `object' expression to type `System.Reflection.MethodInfo' > ??? Utils/ReflectionUtils.cs(495,41): error CS0103: The name > `RuntimeReflectionExtensions' does not exist in the current context > ??? Utils/ReflectionUtils.cs(495,37): error CS1502: The best > overloaded method match for > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > has some invalid arguments > ??? Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' > cannot convert `object' expression to type `System.Reflection.MethodInfo' > > ??? ?2 Warning(s) > ??? ?10 Error(s) > > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: > > Please post the build errors. IronPython.Mono.sln does not exist > anymore, you should be able to use the normal sln file. You may need > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > determine the SOMETHING's check the Common.csproj for the different > configurations and platforms. > > slide > > > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > wrote: >> I am trying to install IronPython over Mono, on CentOS in my Home folder. >> >> >> Trying to follow instruction here: >> https://github.com/IronLanguages/main/wiki/Building >> >> >> >> >> But...IronPython.Mono.sln does not exist. >> >> Building with IronPython.sln gives errors. >> >> Am I doing something wrong or there are updated instructions somewhere? >> >> Thanks. >> >> > >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > > > -- > Website:?http://earl-of-code.com > > -- Website:?http://earl-of-code.com From pratikparanjape at gmail.com Wed Apr 25 13:56:30 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Wed, 25 Apr 2012 17:26:30 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Thank you all for taking it up. I am still getting errors (like close to 2000) building latest trunk and and tag 2.7.2.1, CentOS Mono. I think the platform combination is out of usual ipy use? I will try working with binaries or some workaround. My aim is to use a .NET library with Django as front end. The library works fine with mono, was hoping to use ipy to call it in Django views. Thanks again. On Wed, Apr 25, 2012 at 5:48 AM, Keith Rome wrote: > Yes, it seems that is a much better way to go, and appears to work for > SL4/5 and v2 profiles where dynamic was causing issues. > > Even though I know my way around a little, there is still a lot to be > learned. I didn't even notice the existence of that property before. > > > Keith Rome > Senior Consultant and Architect > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > Wintellect | 770.617.4016 | krome at wintellect.com > www.wintellect.com > > > -----Original Message----- > From: Slide [mailto:slide.o.mix at gmail.com] > Sent: Tuesday, April 24, 2012 12:43 PM > To: Keith Rome > Cc: Tomas Matousek; trapped.into.code at gmail.com; > ironpython-users at python.org > Subject: Re: [Ironpython-users] Mono and Ironpython > > What about context.LanguageContext.SystemStateModules? > > On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: > > That one was my fault, as it wasn't obvious to me how to reach > > sys.modules otherwise. There is a pull request pending to drop the > > dynamic usage (it worked on desktop CLR but not others). I changed it > > to use this method instead (which seems to work on all platforms): > > > > > > > > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo > > dules") > > > > > > > > Is there a better way to reach sys.modules when all I have is a > CodeContext? > > > > > > > > > > > > Keith Rome > > > > Senior Consultant and Architect > > > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > > > Wintellect | 770.617.4016 | krome at wintellect.com > > > > www.wintellect.com > > > > > > > > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] > > Sent: Tuesday, April 24, 2012 12:27 PM > > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide > > Cc: ironpython-users at python.org > > Subject: RE: [Ironpython-users] Mono and Ironpython > > > > > > > > Fixed. > > > > > > > > There is one remaining error when building for Silverlight4 (that is > > not my > > fault): > > > > > > > > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# > > runtime binder isn't referenced by Silverlight4 build. > > > > I'm wondering why dynamic is used there. > > > > > > > > Tomas > > > > > > > > > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o > > rg] On Behalf Of Tomas Matousek > > Sent: Tuesday, April 24, 2012 9:12 AM > > To: Keith Rome; trapped.into.code at gmail.com; Slide > > > > > > Cc: ironpython-users at python.org > > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > > > > > Looks like my fault. Sorry about that. Fixing. > > > > > > > > Tomas > > > > > > > > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org > > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o > > rg] On Behalf Of Keith Rome > > Sent: Tuesday, April 24, 2012 8:00 AM > > To: trapped.into.code at gmail.com; Slide > > Cc: ironpython-users at python.org > > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > > > > > I have also been having problems getting Microsoft.Dynamic to build > > for the Silverlight targets. If I revert commit > > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from > > around 10 days ago, then it builds for me. Build output is similar, > > but not exactly the same: > > > > > > > > ------ Build started: Project: Microsoft.Dynamic, Configuration: > > Silverlight5Release Any CPU ------ > > > > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): > > error CS1061: 'System.Reflection.MethodInfo' does not contain a > > definition for 'GetRuntimeBaseDefinition' and no extension method > > 'GetRuntimeBaseDefinition' accepting a first argument of type > > 'System.Reflection.MethodInfo' could be found (are you missing a using > > directive or an assembly reference?) > > > > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): > > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > > the current context > > > > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): > > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > > the current context > > > > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): > > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in > > the current context > > > > > > > > > > > > Perhaps this might help shed light on the issue. > > > > > > > > > > > > > > > > Keith Rome > > > > Senior Consultant and Architect > > > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > > > > Wintellect | 770.617.4016 | krome at wintellect.com > > > > www.wintellect.com > > > > > > > > From: ironpython-users-bounces+rome=wintellect.com at python.org > > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > > Behalf Of Pratik Paranjape > > Sent: Monday, April 23, 2012 5:59 PM > > To: Slide > > Cc: ironpython-users at python.org > > Subject: Re: [Ironpython-users] Mono and Ironpython > > > > > > > > Thanks for reply. > > > > command I was using: > > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > > > > I checked common.proj, but I am not sure what platform to choose. > > CentOS Mono 2.10. > > > > Error stack: > > > > Errors: > > > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho > > n.sln > > (default targets) -> > > (Build target) -> > > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D > > ynamic/Microsoft.Dynamic.csproj > > (default targets) -> > > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) > > -> > > > > Generation/CompilerHelpers.cs(198,44): error CS1061: Type > > `System.Reflection.MethodInfo' does not contain a definition for > > `GetRuntimeBaseDefinition' and no extension method > > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' > > could be found (are you missing a using directive or an assembly > > reference?) > > Utils/ReflectionUtils.cs(389,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(389,37): error CS1502: The best > > overloaded method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' > > cannot convert `object' expression to type `System.Reflection.MethodInfo' > > Utils/ReflectionUtils.cs(445,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(445,37): error CS1502: The best > > overloaded method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' > > cannot convert `object' expression to type `System.Reflection.MethodInfo' > > Utils/ReflectionUtils.cs(495,41): error CS0103: The name > > `RuntimeReflectionExtensions' does not exist in the current context > > Utils/ReflectionUtils.cs(495,37): error CS1502: The best > > overloaded method match for > > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > > has some invalid arguments > > Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' > > cannot convert `object' expression to type `System.Reflection.MethodInfo' > > > > 2 Warning(s) > > 10 Error(s) > > > > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: > > > > Please post the build errors. IronPython.Mono.sln does not exist > > anymore, you should be able to use the normal sln file. You may need > > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > > determine the SOMETHING's check the Common.csproj for the different > > configurations and platforms. > > > > slide > > > > > > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > > wrote: > >> I am trying to install IronPython over Mono, on CentOS in my Home > folder. > >> > >> > >> Trying to follow instruction here: > >> https://github.com/IronLanguages/main/wiki/Building > >> > >> > >> > >> > >> But...IronPython.Mono.sln does not exist. > >> > >> Building with IronPython.sln gives errors. > >> > >> Am I doing something wrong or there are updated instructions somewhere? > >> > >> Thanks. > >> > >> > > > >> _______________________________________________ > >> Ironpython-users mailing list > >> Ironpython-users at python.org > >> http://mail.python.org/mailman/listinfo/ironpython-users > >> > > > > > > > > -- > > Website: http://earl-of-code.com > > > > > > > > -- > Website: http://earl-of-code.com > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Wed Apr 25 14:28:22 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 25 Apr 2012 05:28:22 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: What version of CentOS and Mono? On Apr 25, 2012 4:56 AM, "Pratik Paranjape" wrote: > Thank you all for taking it up. > > I am still getting errors (like close to 2000) building latest trunk and > and tag 2.7.2.1, CentOS Mono. > > I think the platform combination is out of usual ipy use? > > I will try working with binaries or some workaround. My aim is to use a > .NET library with Django as > front end. The library works fine with mono, was hoping to use ipy to call > it in Django views. > > Thanks again. > > > > On Wed, Apr 25, 2012 at 5:48 AM, Keith Rome wrote: > >> Yes, it seems that is a much better way to go, and appears to work for >> SL4/5 and v2 profiles where dynamic was causing issues. >> >> Even though I know my way around a little, there is still a lot to be >> learned. I didn't even notice the existence of that property before. >> >> >> Keith Rome >> Senior Consultant and Architect >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> Wintellect | 770.617.4016 | krome at wintellect.com >> www.wintellect.com >> >> >> -----Original Message----- >> From: Slide [mailto:slide.o.mix at gmail.com] >> Sent: Tuesday, April 24, 2012 12:43 PM >> To: Keith Rome >> Cc: Tomas Matousek; trapped.into.code at gmail.com; >> ironpython-users at python.org >> Subject: Re: [Ironpython-users] Mono and Ironpython >> >> What about context.LanguageContext.SystemStateModules? >> >> On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: >> > That one was my fault, as it wasn't obvious to me how to reach >> > sys.modules otherwise. There is a pull request pending to drop the >> > dynamic usage (it worked on desktop CLR but not others). I changed it >> > to use this method instead (which seems to work on all platforms): >> > >> > >> > >> > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo >> > dules") >> > >> > >> > >> > Is there a better way to reach sys.modules when all I have is a >> CodeContext? >> > >> > >> > >> > >> > >> > Keith Rome >> > >> > Senior Consultant and Architect >> > >> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> > >> > Wintellect | 770.617.4016 | krome at wintellect.com >> > >> > www.wintellect.com >> > >> > >> > >> > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] >> > Sent: Tuesday, April 24, 2012 12:27 PM >> > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide >> > Cc: ironpython-users at python.org >> > Subject: RE: [Ironpython-users] Mono and Ironpython >> > >> > >> > >> > Fixed. >> > >> > >> > >> > There is one remaining error when building for Silverlight4 (that is >> > not my >> > fault): >> > >> > >> > >> > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# >> > runtime binder isn't referenced by Silverlight4 build. >> > >> > I'm wondering why dynamic is used there. >> > >> > >> > >> > Tomas >> > >> > >> > >> > >> > >> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >> > rg] On Behalf Of Tomas Matousek >> > Sent: Tuesday, April 24, 2012 9:12 AM >> > To: Keith Rome; trapped.into.code at gmail.com; Slide >> > >> > >> > Cc: ironpython-users at python.org >> > Subject: Re: [Ironpython-users] Mono and Ironpython >> > >> > >> > >> > Looks like my fault. Sorry about that. Fixing. >> > >> > >> > >> > Tomas >> > >> > >> > >> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >> > rg] On Behalf Of Keith Rome >> > Sent: Tuesday, April 24, 2012 8:00 AM >> > To: trapped.into.code at gmail.com; Slide >> > Cc: ironpython-users at python.org >> > Subject: Re: [Ironpython-users] Mono and Ironpython >> > >> > >> > >> > I have also been having problems getting Microsoft.Dynamic to build >> > for the Silverlight targets. If I revert commit >> > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from >> > around 10 days ago, then it builds for me. Build output is similar, >> > but not exactly the same: >> > >> > >> > >> > ------ Build started: Project: Microsoft.Dynamic, Configuration: >> > Silverlight5Release Any CPU ------ >> > >> > >> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): >> > error CS1061: 'System.Reflection.MethodInfo' does not contain a >> > definition for 'GetRuntimeBaseDefinition' and no extension method >> > 'GetRuntimeBaseDefinition' accepting a first argument of type >> > 'System.Reflection.MethodInfo' could be found (are you missing a using >> > directive or an assembly reference?) >> > >> > >> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): >> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >> > the current context >> > >> > >> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): >> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >> > the current context >> > >> > >> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): >> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >> > the current context >> > >> > >> > >> > >> > >> > Perhaps this might help shed light on the issue. >> > >> > >> > >> > >> > >> > >> > >> > Keith Rome >> > >> > Senior Consultant and Architect >> > >> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >> > >> > Wintellect | 770.617.4016 | krome at wintellect.com >> > >> > www.wintellect.com >> > >> > >> > >> > From: ironpython-users-bounces+rome=wintellect.com at python.org >> > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >> > Behalf Of Pratik Paranjape >> > Sent: Monday, April 23, 2012 5:59 PM >> > To: Slide >> > Cc: ironpython-users at python.org >> > Subject: Re: [Ironpython-users] Mono and Ironpython >> > >> > >> > >> > Thanks for reply. >> > >> > command I was using: >> > $> xbuild /p:Configuration=Release Solutions/IronPython.sln >> > >> > I checked common.proj, but I am not sure what platform to choose. >> > CentOS Mono 2.10. >> > >> > Error stack: >> > >> > Errors: >> > >> > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho >> > n.sln >> > (default targets) -> >> > (Build target) -> >> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D >> > ynamic/Microsoft.Dynamic.csproj >> > (default targets) -> >> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) >> > -> >> > >> > Generation/CompilerHelpers.cs(198,44): error CS1061: Type >> > `System.Reflection.MethodInfo' does not contain a definition for >> > `GetRuntimeBaseDefinition' and no extension method >> > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' >> > could be found (are you missing a using directive or an assembly >> > reference?) >> > Utils/ReflectionUtils.cs(389,41): error CS0103: The name >> > `RuntimeReflectionExtensions' does not exist in the current context >> > Utils/ReflectionUtils.cs(389,37): error CS1502: The best >> > overloaded method match for >> > >> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >> > has some invalid arguments >> > Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' >> > cannot convert `object' expression to type >> `System.Reflection.MethodInfo' >> > Utils/ReflectionUtils.cs(445,41): error CS0103: The name >> > `RuntimeReflectionExtensions' does not exist in the current context >> > Utils/ReflectionUtils.cs(445,37): error CS1502: The best >> > overloaded method match for >> > >> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >> > has some invalid arguments >> > Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' >> > cannot convert `object' expression to type >> `System.Reflection.MethodInfo' >> > Utils/ReflectionUtils.cs(495,41): error CS0103: The name >> > `RuntimeReflectionExtensions' does not exist in the current context >> > Utils/ReflectionUtils.cs(495,37): error CS1502: The best >> > overloaded method match for >> > >> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >> > has some invalid arguments >> > Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' >> > cannot convert `object' expression to type >> `System.Reflection.MethodInfo' >> > >> > 2 Warning(s) >> > 10 Error(s) >> > >> > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: >> > >> > Please post the build errors. IronPython.Mono.sln does not exist >> > anymore, you should be able to use the normal sln file. You may need >> > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To >> > determine the SOMETHING's check the Common.csproj for the different >> > configurations and platforms. >> > >> > slide >> > >> > >> > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape >> > wrote: >> >> I am trying to install IronPython over Mono, on CentOS in my Home >> folder. >> >> >> >> >> >> Trying to follow instruction here: >> >> https://github.com/IronLanguages/main/wiki/Building >> >> >> >> >> >> >> >> >> >> But...IronPython.Mono.sln does not exist. >> >> >> >> Building with IronPython.sln gives errors. >> >> >> >> Am I doing something wrong or there are updated instructions somewhere? >> >> >> >> Thanks. >> >> >> >> >> > >> >> _______________________________________________ >> >> Ironpython-users mailing list >> >> Ironpython-users at python.org >> >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> >> > >> > >> > >> > -- >> > Website: http://earl-of-code.com >> > >> > >> >> >> >> -- >> Website: http://earl-of-code.com >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Apr 25 14:45:41 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 25 Apr 2012 05:45:41 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/24/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Occasional build error for Silverlight targets ---------------------------------------------- ISSUES 1. [New comment] Occasional build error for Silverlight targets http://ironpython.codeplex.com/workitem/32602 User KeithJRome has commented on the issue: "I have a pending pull request to resolve this, but Microsoft.Dynamic is not building unless I revert another commit that was rolled in about a week and a half ago. If I build the solution with that commit reverted (it seems to be intended for win8 support) and my small patch included, then it seems to work fine under Silverlight 4 and 5 (as well as desktop Fx)." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pratikparanjape at gmail.com Wed Apr 25 15:19:14 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Wed, 25 Apr 2012 18:49:14 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: On Wed, Apr 25, 2012 at 5:58 PM, Slide wrote: > What version of CentOS and Mono? > CentOS : 5.8 (Final) Mono: 2.10.2 > On Apr 25, 2012 4:56 AM, "Pratik Paranjape" > wrote: > >> Thank you all for taking it up. >> >> I am still getting errors (like close to 2000) building latest trunk and >> and tag 2.7.2.1, CentOS Mono. >> >> I think the platform combination is out of usual ipy use? >> >> I will try working with binaries or some workaround. My aim is to use a >> .NET library with Django as >> front end. The library works fine with mono, was hoping to use ipy to >> call it in Django views. >> >> Thanks again. >> >> >> >> On Wed, Apr 25, 2012 at 5:48 AM, Keith Rome wrote: >> >>> Yes, it seems that is a much better way to go, and appears to work for >>> SL4/5 and v2 profiles where dynamic was causing issues. >>> >>> Even though I know my way around a little, there is still a lot to be >>> learned. I didn't even notice the existence of that property before. >>> >>> >>> Keith Rome >>> Senior Consultant and Architect >>> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>> Wintellect | 770.617.4016 | krome at wintellect.com >>> www.wintellect.com >>> >>> >>> -----Original Message----- >>> From: Slide [mailto:slide.o.mix at gmail.com] >>> Sent: Tuesday, April 24, 2012 12:43 PM >>> To: Keith Rome >>> Cc: Tomas Matousek; trapped.into.code at gmail.com; >>> ironpython-users at python.org >>> Subject: Re: [Ironpython-users] Mono and Ironpython >>> >>> What about context.LanguageContext.SystemStateModules? >>> >>> On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: >>> > That one was my fault, as it wasn't obvious to me how to reach >>> > sys.modules otherwise. There is a pull request pending to drop the >>> > dynamic usage (it worked on desktop CLR but not others). I changed it >>> > to use this method instead (which seems to work on all platforms): >>> > >>> > >>> > >>> > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo >>> > dules") >>> > >>> > >>> > >>> > Is there a better way to reach sys.modules when all I have is a >>> CodeContext? >>> > >>> > >>> > >>> > >>> > >>> > Keith Rome >>> > >>> > Senior Consultant and Architect >>> > >>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>> > >>> > Wintellect | 770.617.4016 | krome at wintellect.com >>> > >>> > www.wintellect.com >>> > >>> > >>> > >>> > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] >>> > Sent: Tuesday, April 24, 2012 12:27 PM >>> > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide >>> > Cc: ironpython-users at python.org >>> > Subject: RE: [Ironpython-users] Mono and Ironpython >>> > >>> > >>> > >>> > Fixed. >>> > >>> > >>> > >>> > There is one remaining error when building for Silverlight4 (that is >>> > not my >>> > fault): >>> > >>> > >>> > >>> > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# >>> > runtime binder isn't referenced by Silverlight4 build. >>> > >>> > I'm wondering why dynamic is used there. >>> > >>> > >>> > >>> > Tomas >>> > >>> > >>> > >>> > >>> > >>> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >>> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >>> > rg] On Behalf Of Tomas Matousek >>> > Sent: Tuesday, April 24, 2012 9:12 AM >>> > To: Keith Rome; trapped.into.code at gmail.com; Slide >>> > >>> > >>> > Cc: ironpython-users at python.org >>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>> > >>> > >>> > >>> > Looks like my fault. Sorry about that. Fixing. >>> > >>> > >>> > >>> > Tomas >>> > >>> > >>> > >>> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >>> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >>> > rg] On Behalf Of Keith Rome >>> > Sent: Tuesday, April 24, 2012 8:00 AM >>> > To: trapped.into.code at gmail.com; Slide >>> > Cc: ironpython-users at python.org >>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>> > >>> > >>> > >>> > I have also been having problems getting Microsoft.Dynamic to build >>> > for the Silverlight targets. If I revert commit >>> > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from >>> > around 10 days ago, then it builds for me. Build output is similar, >>> > but not exactly the same: >>> > >>> > >>> > >>> > ------ Build started: Project: Microsoft.Dynamic, Configuration: >>> > Silverlight5Release Any CPU ------ >>> > >>> > >>> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): >>> > error CS1061: 'System.Reflection.MethodInfo' does not contain a >>> > definition for 'GetRuntimeBaseDefinition' and no extension method >>> > 'GetRuntimeBaseDefinition' accepting a first argument of type >>> > 'System.Reflection.MethodInfo' could be found (are you missing a using >>> > directive or an assembly reference?) >>> > >>> > >>> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): >>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>> > the current context >>> > >>> > >>> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): >>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>> > the current context >>> > >>> > >>> C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): >>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>> > the current context >>> > >>> > >>> > >>> > >>> > >>> > Perhaps this might help shed light on the issue. >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > Keith Rome >>> > >>> > Senior Consultant and Architect >>> > >>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>> > >>> > Wintellect | 770.617.4016 | krome at wintellect.com >>> > >>> > www.wintellect.com >>> > >>> > >>> > >>> > From: ironpython-users-bounces+rome=wintellect.com at python.org >>> > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >>> > Behalf Of Pratik Paranjape >>> > Sent: Monday, April 23, 2012 5:59 PM >>> > To: Slide >>> > Cc: ironpython-users at python.org >>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>> > >>> > >>> > >>> > Thanks for reply. >>> > >>> > command I was using: >>> > $> xbuild /p:Configuration=Release Solutions/IronPython.sln >>> > >>> > I checked common.proj, but I am not sure what platform to choose. >>> > CentOS Mono 2.10. >>> > >>> > Error stack: >>> > >>> > Errors: >>> > >>> > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho >>> > n.sln >>> > (default targets) -> >>> > (Build target) -> >>> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D >>> > ynamic/Microsoft.Dynamic.csproj >>> > (default targets) -> >>> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) >>> > -> >>> > >>> > Generation/CompilerHelpers.cs(198,44): error CS1061: Type >>> > `System.Reflection.MethodInfo' does not contain a definition for >>> > `GetRuntimeBaseDefinition' and no extension method >>> > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' >>> > could be found (are you missing a using directive or an assembly >>> > reference?) >>> > Utils/ReflectionUtils.cs(389,41): error CS0103: The name >>> > `RuntimeReflectionExtensions' does not exist in the current context >>> > Utils/ReflectionUtils.cs(389,37): error CS1502: The best >>> > overloaded method match for >>> > >>> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>> > has some invalid arguments >>> > Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' >>> > cannot convert `object' expression to type >>> `System.Reflection.MethodInfo' >>> > Utils/ReflectionUtils.cs(445,41): error CS0103: The name >>> > `RuntimeReflectionExtensions' does not exist in the current context >>> > Utils/ReflectionUtils.cs(445,37): error CS1502: The best >>> > overloaded method match for >>> > >>> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>> > has some invalid arguments >>> > Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' >>> > cannot convert `object' expression to type >>> `System.Reflection.MethodInfo' >>> > Utils/ReflectionUtils.cs(495,41): error CS0103: The name >>> > `RuntimeReflectionExtensions' does not exist in the current context >>> > Utils/ReflectionUtils.cs(495,37): error CS1502: The best >>> > overloaded method match for >>> > >>> `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>> > has some invalid arguments >>> > Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' >>> > cannot convert `object' expression to type >>> `System.Reflection.MethodInfo' >>> > >>> > 2 Warning(s) >>> > 10 Error(s) >>> > >>> > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: >>> > >>> > Please post the build errors. IronPython.Mono.sln does not exist >>> > anymore, you should be able to use the normal sln file. You may need >>> > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To >>> > determine the SOMETHING's check the Common.csproj for the different >>> > configurations and platforms. >>> > >>> > slide >>> > >>> > >>> > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape >>> > wrote: >>> >> I am trying to install IronPython over Mono, on CentOS in my Home >>> folder. >>> >> >>> >> >>> >> Trying to follow instruction here: >>> >> https://github.com/IronLanguages/main/wiki/Building >>> >> >>> >> >>> >> >>> >> >>> >> But...IronPython.Mono.sln does not exist. >>> >> >>> >> Building with IronPython.sln gives errors. >>> >> >>> >> Am I doing something wrong or there are updated instructions >>> somewhere? >>> >> >>> >> Thanks. >>> >> >>> >> >>> > >>> >> _______________________________________________ >>> >> Ironpython-users mailing list >>> >> Ironpython-users at python.org >>> >> http://mail.python.org/mailman/listinfo/ironpython-users >>> >> >>> > >>> > >>> > >>> > -- >>> > Website: http://earl-of-code.com >>> > >>> > >>> >>> >>> >>> -- >>> Website: http://earl-of-code.com >>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Wed Apr 25 15:28:33 2012 From: slide.o.mix at gmail.com (Slide) Date: Wed, 25 Apr 2012 06:28:33 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: 64-bit or 32-bit? On Wed, Apr 25, 2012 at 6:19 AM, Pratik Paranjape wrote: > On Wed, Apr 25, 2012 at 5:58 PM, Slide wrote: >> >> What version of CentOS and Mono? > > > CentOS : 5.8 (Final) > Mono:???? 2.10.2 > > > >> >> On Apr 25, 2012 4:56 AM, "Pratik Paranjape" >> wrote: >>> >>> Thank you all for taking it up. >>> >>> I am still getting errors (like close to 2000) building latest trunk and >>> and tag 2.7.2.1, CentOS Mono. >>> >>> I think the platform combination is out of usual ipy use? >>> >>> I will try working with binaries or some workaround. My aim is to use a >>> .NET library with Django as >>> front end. The library works fine with mono, was hoping to use ipy to >>> call it in Django views. >>> >>> Thanks again. >>> >>> >>> >>> On Wed, Apr 25, 2012 at 5:48 AM, Keith Rome wrote: >>>> >>>> Yes, it seems that is a much better way to go, and appears to work for >>>> SL4/5 and v2 profiles where dynamic was causing issues. >>>> >>>> Even though I know my way around a little, there is still a lot to be >>>> learned. I didn't even notice the existence of that property before. >>>> >>>> >>>> Keith Rome >>>> Senior Consultant and Architect >>>> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>> Wintellect | 770.617.4016 | krome at wintellect.com >>>> www.wintellect.com >>>> >>>> >>>> -----Original Message----- >>>> From: Slide [mailto:slide.o.mix at gmail.com] >>>> Sent: Tuesday, April 24, 2012 12:43 PM >>>> To: Keith Rome >>>> Cc: Tomas Matousek; trapped.into.code at gmail.com; >>>> ironpython-users at python.org >>>> Subject: Re: [Ironpython-users] Mono and Ironpython >>>> >>>> What about context.LanguageContext.SystemStateModules? >>>> >>>> On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome wrote: >>>> > That one was my fault, as it wasn't obvious to me how to reach >>>> > sys.modules otherwise. There is a pull request pending to drop the >>>> > dynamic usage (it worked on desktop CLR but not others). I changed it >>>> > to use this method instead (which seems to work on all platforms): >>>> > >>>> > >>>> > >>>> > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo >>>> > dules") >>>> > >>>> > >>>> > >>>> > Is there a better way to reach sys.modules when all I have is a >>>> > CodeContext? >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > Keith Rome >>>> > >>>> > Senior Consultant and Architect >>>> > >>>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>> > >>>> > Wintellect | 770.617.4016 | krome at wintellect.com >>>> > >>>> > www.wintellect.com >>>> > >>>> > >>>> > >>>> > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] >>>> > Sent: Tuesday, April 24, 2012 12:27 PM >>>> > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide >>>> > Cc: ironpython-users at python.org >>>> > Subject: RE: [Ironpython-users] Mono and Ironpython >>>> > >>>> > >>>> > >>>> > Fixed. >>>> > >>>> > >>>> > >>>> > There is one remaining error when building for Silverlight4 (that is >>>> > not my >>>> > fault): >>>> > >>>> > >>>> > >>>> > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# >>>> > runtime binder isn't referenced by Silverlight4 build. >>>> > >>>> > I'm wondering why dynamic is used there. >>>> > >>>> > >>>> > >>>> > Tomas >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >>>> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >>>> > rg] On Behalf Of Tomas Matousek >>>> > Sent: Tuesday, April 24, 2012 9:12 AM >>>> > To: Keith Rome; trapped.into.code at gmail.com; Slide >>>> > >>>> > >>>> > Cc: ironpython-users at python.org >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>>> > >>>> > >>>> > >>>> > Looks like my fault. Sorry about that. Fixing. >>>> > >>>> > >>>> > >>>> > Tomas >>>> > >>>> > >>>> > >>>> > From: ironpython-users-bounces+tomas.matousek=microsoft.com at python.org >>>> > [mailto:ironpython-users-bounces+tomas.matousek=microsoft.com at python.o >>>> > rg] On Behalf Of Keith Rome >>>> > Sent: Tuesday, April 24, 2012 8:00 AM >>>> > To: trapped.into.code at gmail.com; Slide >>>> > Cc: ironpython-users at python.org >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>>> > >>>> > >>>> > >>>> > I have also been having problems getting Microsoft.Dynamic to build >>>> > for the Silverlight targets. If I revert commit >>>> > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from >>>> > around 10 days ago, then it builds for me. Build output is similar, >>>> > but not exactly the same: >>>> > >>>> > >>>> > >>>> > ------ Build started: Project: Microsoft.Dynamic, Configuration: >>>> > Silverlight5Release Any CPU ------ >>>> > >>>> > >>>> > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): >>>> > error CS1061: 'System.Reflection.MethodInfo' does not contain a >>>> > definition for 'GetRuntimeBaseDefinition' and no extension method >>>> > 'GetRuntimeBaseDefinition' accepting a first argument of type >>>> > 'System.Reflection.MethodInfo' could be found (are you missing a using >>>> > directive or an assembly reference?) >>>> > >>>> > >>>> > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>>> > the current context >>>> > >>>> > >>>> > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>>> > the current context >>>> > >>>> > >>>> > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist in >>>> > the current context >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > Perhaps this might help shed light on the issue. >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > Keith Rome >>>> > >>>> > Senior Consultant and Architect >>>> > >>>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS >>>> > >>>> > Wintellect | 770.617.4016 | krome at wintellect.com >>>> > >>>> > www.wintellect.com >>>> > >>>> > >>>> > >>>> > From: ironpython-users-bounces+rome=wintellect.com at python.org >>>> > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On >>>> > Behalf Of Pratik Paranjape >>>> > Sent: Monday, April 23, 2012 5:59 PM >>>> > To: Slide >>>> > Cc: ironpython-users at python.org >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython >>>> > >>>> > >>>> > >>>> > Thanks for reply. >>>> > >>>> > command I was using: >>>> > $> xbuild /p:Configuration=Release Solutions/IronPython.sln >>>> > >>>> > I checked common.proj, but I am not sure what platform to choose. >>>> > CentOS Mono 2.10. >>>> > >>>> > Error stack: >>>> > >>>> > Errors: >>>> > >>>> > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho >>>> > n.sln >>>> > (default targets) -> >>>> > (Build target) -> >>>> > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D >>>> > ynamic/Microsoft.Dynamic.csproj >>>> > (default targets) -> >>>> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) >>>> > -> >>>> > >>>> > ??? Generation/CompilerHelpers.cs(198,44): error CS1061: Type >>>> > `System.Reflection.MethodInfo' does not contain a definition for >>>> > `GetRuntimeBaseDefinition' and no extension method >>>> > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' >>>> > could be found (are you missing a using directive or an assembly >>>> > reference?) >>>> > ??? Utils/ReflectionUtils.cs(389,41): error CS0103: The name >>>> > `RuntimeReflectionExtensions' does not exist in the current context >>>> > ??? Utils/ReflectionUtils.cs(389,37): error CS1502: The best >>>> > overloaded method match for >>>> > >>>> > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>>> > has some invalid arguments >>>> > ??? Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' >>>> > cannot convert `object' expression to type >>>> > `System.Reflection.MethodInfo' >>>> > ??? Utils/ReflectionUtils.cs(445,41): error CS0103: The name >>>> > `RuntimeReflectionExtensions' does not exist in the current context >>>> > ??? Utils/ReflectionUtils.cs(445,37): error CS1502: The best >>>> > overloaded method match for >>>> > >>>> > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>>> > has some invalid arguments >>>> > ??? Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' >>>> > cannot convert `object' expression to type >>>> > `System.Reflection.MethodInfo' >>>> > ??? Utils/ReflectionUtils.cs(495,41): error CS0103: The name >>>> > `RuntimeReflectionExtensions' does not exist in the current context >>>> > ??? Utils/ReflectionUtils.cs(495,37): error CS1502: The best >>>> > overloaded method match for >>>> > >>>> > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' >>>> > has some invalid arguments >>>> > ??? Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' >>>> > cannot convert `object' expression to type >>>> > `System.Reflection.MethodInfo' >>>> > >>>> > ??? ?2 Warning(s) >>>> > ??? ?10 Error(s) >>>> > >>>> > On Tue, Apr 24, 2012 at 2:51 AM, Slide wrote: >>>> > >>>> > Please post the build errors. IronPython.Mono.sln does not exist >>>> > anymore, you should be able to use the normal sln file. You may need >>>> > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To >>>> > determine the SOMETHING's check the Common.csproj for the different >>>> > configurations and platforms. >>>> > >>>> > slide >>>> > >>>> > >>>> > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape >>>> > wrote: >>>> >> I am trying to install IronPython over Mono, on CentOS in my Home >>>> >> folder. >>>> >> >>>> >> >>>> >> Trying to follow instruction here: >>>> >> https://github.com/IronLanguages/main/wiki/Building >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> But...IronPython.Mono.sln does not exist. >>>> >> >>>> >> Building with IronPython.sln gives errors. >>>> >> >>>> >> Am I doing something wrong or there are updated instructions >>>> >> somewhere? >>>> >> >>>> >> Thanks. >>>> >> >>>> >> >>>> > >>>> >> _______________________________________________ >>>> >> Ironpython-users mailing list >>>> >> Ironpython-users at python.org >>>> >> http://mail.python.org/mailman/listinfo/ironpython-users >>>> >> >>>> > >>>> > >>>> > >>>> > -- >>>> > Website:?http://earl-of-code.com >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> Website:?http://earl-of-code.com >>>> >>>> >>> > -- Website:?http://earl-of-code.com From pratikparanjape at gmail.com Wed Apr 25 15:35:14 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Wed, 25 Apr 2012 19:05:14 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: On Wed, Apr 25, 2012 at 6:58 PM, Slide wrote: > 64-bit or 32-bit? > 32 bit. Its a shared hosting server. Mono is installed in $HOME. > On Wed, Apr 25, 2012 at 6:19 AM, Pratik Paranjape > wrote: > > On Wed, Apr 25, 2012 at 5:58 PM, Slide wrote: > >> > >> What version of CentOS and Mono? > > > > > > CentOS : 5.8 (Final) > > Mono: 2.10.2 > > > > > > > >> > >> On Apr 25, 2012 4:56 AM, "Pratik Paranjape" > >> wrote: > >>> > >>> Thank you all for taking it up. > >>> > >>> I am still getting errors (like close to 2000) building latest trunk > and > >>> and tag 2.7.2.1, CentOS Mono. > >>> > >>> I think the platform combination is out of usual ipy use? > >>> > >>> I will try working with binaries or some workaround. My aim is to use a > >>> .NET library with Django as > >>> front end. The library works fine with mono, was hoping to use ipy to > >>> call it in Django views. > >>> > >>> Thanks again. > >>> > >>> > >>> > >>> On Wed, Apr 25, 2012 at 5:48 AM, Keith Rome > wrote: > >>>> > >>>> Yes, it seems that is a much better way to go, and appears to work for > >>>> SL4/5 and v2 profiles where dynamic was causing issues. > >>>> > >>>> Even though I know my way around a little, there is still a lot to be > >>>> learned. I didn't even notice the existence of that property before. > >>>> > >>>> > >>>> Keith Rome > >>>> Senior Consultant and Architect > >>>> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > >>>> Wintellect | 770.617.4016 | krome at wintellect.com > >>>> www.wintellect.com > >>>> > >>>> > >>>> -----Original Message----- > >>>> From: Slide [mailto:slide.o.mix at gmail.com] > >>>> Sent: Tuesday, April 24, 2012 12:43 PM > >>>> To: Keith Rome > >>>> Cc: Tomas Matousek; trapped.into.code at gmail.com; > >>>> ironpython-users at python.org > >>>> Subject: Re: [Ironpython-users] Mono and Ironpython > >>>> > >>>> What about context.LanguageContext.SystemStateModules? > >>>> > >>>> On Tue, Apr 24, 2012 at 9:37 AM, Keith Rome > wrote: > >>>> > That one was my fault, as it wasn't obvious to me how to reach > >>>> > sys.modules otherwise. There is a pull request pending to drop the > >>>> > dynamic usage (it worked on desktop CLR but not others). I changed > it > >>>> > to use this method instead (which seems to work on all platforms): > >>>> > > >>>> > > >>>> > > >>>> > > (PythonDictionary)context.LanguageContext.SystemState.__dict__.get("mo > >>>> > dules") > >>>> > > >>>> > > >>>> > > >>>> > Is there a better way to reach sys.modules when all I have is a > >>>> > CodeContext? > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > Keith Rome > >>>> > > >>>> > Senior Consultant and Architect > >>>> > > >>>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > >>>> > > >>>> > Wintellect | 770.617.4016 | krome at wintellect.com > >>>> > > >>>> > www.wintellect.com > >>>> > > >>>> > > >>>> > > >>>> > From: Tomas Matousek [mailto:Tomas.Matousek at microsoft.com] > >>>> > Sent: Tuesday, April 24, 2012 12:27 PM > >>>> > To: Tomas Matousek; Keith Rome; trapped.into.code at gmail.com; Slide > >>>> > Cc: ironpython-users at python.org > >>>> > Subject: RE: [Ironpython-users] Mono and Ironpython > >>>> > > >>>> > > >>>> > > >>>> > Fixed. > >>>> > > >>>> > > >>>> > > >>>> > There is one remaining error when building for Silverlight4 (that is > >>>> > not my > >>>> > fault): > >>>> > > >>>> > > >>>> > > >>>> > ResourceMetaPathImporter.load_module uses "dynamic" keyword. The C# > >>>> > runtime binder isn't referenced by Silverlight4 build. > >>>> > > >>>> > I'm wondering why dynamic is used there. > >>>> > > >>>> > > >>>> > > >>>> > Tomas > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > From: ironpython-users-bounces+tomas.matousek= > microsoft.com at python.org > >>>> > [mailto:ironpython-users-bounces+tomas.matousek > =microsoft.com at python.o > >>>> > rg] On Behalf Of Tomas Matousek > >>>> > Sent: Tuesday, April 24, 2012 9:12 AM > >>>> > To: Keith Rome; trapped.into.code at gmail.com; Slide > >>>> > > >>>> > > >>>> > Cc: ironpython-users at python.org > >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython > >>>> > > >>>> > > >>>> > > >>>> > Looks like my fault. Sorry about that. Fixing. > >>>> > > >>>> > > >>>> > > >>>> > Tomas > >>>> > > >>>> > > >>>> > > >>>> > From: ironpython-users-bounces+tomas.matousek= > microsoft.com at python.org > >>>> > [mailto:ironpython-users-bounces+tomas.matousek > =microsoft.com at python.o > >>>> > rg] On Behalf Of Keith Rome > >>>> > Sent: Tuesday, April 24, 2012 8:00 AM > >>>> > To: trapped.into.code at gmail.com; Slide > >>>> > Cc: ironpython-users at python.org > >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython > >>>> > > >>>> > > >>>> > > >>>> > I have also been having problems getting Microsoft.Dynamic to build > >>>> > for the Silverlight targets. If I revert commit > >>>> > 4d99cbae91724fc9b982b581d5ad79193991439e "Win8 build fixes" from > >>>> > around 10 days ago, then it builds for me. Build output is similar, > >>>> > but not exactly the same: > >>>> > > >>>> > > >>>> > > >>>> > ------ Build started: Project: Microsoft.Dynamic, Configuration: > >>>> > Silverlight5Release Any CPU ------ > >>>> > > >>>> > > >>>> > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Generation\CompilerHelpers.cs(198,44): > >>>> > error CS1061: 'System.Reflection.MethodInfo' does not contain a > >>>> > definition for 'GetRuntimeBaseDefinition' and no extension method > >>>> > 'GetRuntimeBaseDefinition' accepting a first argument of type > >>>> > 'System.Reflection.MethodInfo' could be found (are you missing a > using > >>>> > directive or an assembly reference?) > >>>> > > >>>> > > >>>> > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(389,41): > >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist > in > >>>> > the current context > >>>> > > >>>> > > >>>> > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(445,41): > >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist > in > >>>> > the current context > >>>> > > >>>> > > >>>> > > C:\Users\krome\main\Runtime\Microsoft.Dynamic\Utils\ReflectionUtils.cs(495,41): > >>>> > error CS0103: The name 'RuntimeReflectionExtensions' does not exist > in > >>>> > the current context > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > Perhaps this might help shed light on the issue. > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > Keith Rome > >>>> > > >>>> > Senior Consultant and Architect > >>>> > > >>>> > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS > >>>> > > >>>> > Wintellect | 770.617.4016 | krome at wintellect.com > >>>> > > >>>> > www.wintellect.com > >>>> > > >>>> > > >>>> > > >>>> > From: ironpython-users-bounces+rome=wintellect.com at python.org > >>>> > [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On > >>>> > Behalf Of Pratik Paranjape > >>>> > Sent: Monday, April 23, 2012 5:59 PM > >>>> > To: Slide > >>>> > Cc: ironpython-users at python.org > >>>> > Subject: Re: [Ironpython-users] Mono and Ironpython > >>>> > > >>>> > > >>>> > > >>>> > Thanks for reply. > >>>> > > >>>> > command I was using: > >>>> > $> xbuild /p:Configuration=Release Solutions/IronPython.sln > >>>> > > >>>> > I checked common.proj, but I am not sure what platform to choose. > >>>> > CentOS Mono 2.10. > >>>> > > >>>> > Error stack: > >>>> > > >>>> > Errors: > >>>> > > >>>> > > /home/user/ironpysource/IronLanguages-main-77f5251/Solutions/IronPytho > >>>> > n.sln > >>>> > (default targets) -> > >>>> > (Build target) -> > >>>> > > /home/user/ironpysource/IronLanguages-main-77f5251/Runtime/Microsoft.D > >>>> > ynamic/Microsoft.Dynamic.csproj > >>>> > (default targets) -> > >>>> > /home/user/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile > target) > >>>> > -> > >>>> > > >>>> > Generation/CompilerHelpers.cs(198,44): error CS1061: Type > >>>> > `System.Reflection.MethodInfo' does not contain a definition for > >>>> > `GetRuntimeBaseDefinition' and no extension method > >>>> > `GetRuntimeBaseDefinition' of type `System.Reflection.MethodInfo' > >>>> > could be found (are you missing a using directive or an assembly > >>>> > reference?) > >>>> > Utils/ReflectionUtils.cs(389,41): error CS0103: The name > >>>> > `RuntimeReflectionExtensions' does not exist in the current context > >>>> > Utils/ReflectionUtils.cs(389,37): error CS1502: The best > >>>> > overloaded method match for > >>>> > > >>>> > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > >>>> > has some invalid arguments > >>>> > Utils/ReflectionUtils.cs(389,37): error CS1503: Argument `#1' > >>>> > cannot convert `object' expression to type > >>>> > `System.Reflection.MethodInfo' > >>>> > Utils/ReflectionUtils.cs(445,41): error CS0103: The name > >>>> > `RuntimeReflectionExtensions' does not exist in the current context > >>>> > Utils/ReflectionUtils.cs(445,37): error CS1502: The best > >>>> > overloaded method match for > >>>> > > >>>> > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > >>>> > has some invalid arguments > >>>> > Utils/ReflectionUtils.cs(445,37): error CS1503: Argument `#1' > >>>> > cannot convert `object' expression to type > >>>> > `System.Reflection.MethodInfo' > >>>> > Utils/ReflectionUtils.cs(495,41): error CS0103: The name > >>>> > `RuntimeReflectionExtensions' does not exist in the current context > >>>> > Utils/ReflectionUtils.cs(495,37): error CS1502: The best > >>>> > overloaded method match for > >>>> > > >>>> > > `System.Collections.Generic.HashSet.Add(System.Reflection.MethodInfo)' > >>>> > has some invalid arguments > >>>> > Utils/ReflectionUtils.cs(495,37): error CS1503: Argument `#1' > >>>> > cannot convert `object' expression to type > >>>> > `System.Reflection.MethodInfo' > >>>> > > >>>> > 2 Warning(s) > >>>> > 10 Error(s) > >>>> > > >>>> > On Tue, Apr 24, 2012 at 2:51 AM, Slide > wrote: > >>>> > > >>>> > Please post the build errors. IronPython.Mono.sln does not exist > >>>> > anymore, you should be able to use the normal sln file. You may need > >>>> > to set /p:Configuration="SOMETHING" /p:Platform="SOMETHING". To > >>>> > determine the SOMETHING's check the Common.csproj for the different > >>>> > configurations and platforms. > >>>> > > >>>> > slide > >>>> > > >>>> > > >>>> > On Mon, Apr 23, 2012 at 12:25 PM, Pratik Paranjape > >>>> > wrote: > >>>> >> I am trying to install IronPython over Mono, on CentOS in my Home > >>>> >> folder. > >>>> >> > >>>> >> > >>>> >> Trying to follow instruction here: > >>>> >> https://github.com/IronLanguages/main/wiki/Building > >>>> >> > >>>> >> > >>>> >> > >>>> >> > >>>> >> But...IronPython.Mono.sln does not exist. > >>>> >> > >>>> >> Building with IronPython.sln gives errors. > >>>> >> > >>>> >> Am I doing something wrong or there are updated instructions > >>>> >> somewhere? > >>>> >> > >>>> >> Thanks. > >>>> >> > >>>> >> > >>>> > > >>>> >> _______________________________________________ > >>>> >> Ironpython-users mailing list > >>>> >> Ironpython-users at python.org > >>>> >> http://mail.python.org/mailman/listinfo/ironpython-users > >>>> >> > >>>> > > >>>> > > >>>> > > >>>> > -- > >>>> > Website: http://earl-of-code.com > >>>> > > >>>> > > >>>> > >>>> > >>>> > >>>> -- > >>>> Website: http://earl-of-code.com > >>>> > >>>> > >>> > > > > > > -- > Website: http://earl-of-code.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Wed Apr 25 17:34:46 2012 From: vernondcole at gmail.com (Vernon Cole) Date: Wed, 25 Apr 2012 09:34:46 -0600 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Ummm... reality check... Patrik: I have been lurking on the django developers list (along with IronPython) for several years hoping for exactly the combination you are suggesting. I am unaware that anyone has tackled the project of making django run on IronPython yet, on either Windows or mono. As I see it, there may be two problems. 1) django has issues with strings being assumed to be 8-bit bytes. This has to be fixed to port django to Python 3, and I suggested that IronPython would be a useful stepping stone in that effort, but no one took the bait AFAIK. 2) django's built-in object relational mapper is targeted at four databases: MySQL, PostgreSQL, SQLite, and Oracle. (see https://docs.djangoproject.com/en/dev/ref/databases/) Of these four, I think that only SQLite is well supported by IronPython. Oracle, MySQL and PostgresSQL are accessible from IronPython using my adodbapi package, but it only works on Windows, since it relies on Microsoft COM to reach the ODBC database engine (via traditional ADO). My own efforts to use pure ADO.NET database calls had a rather dismal result, and I abandoned the branch. To my knowledge, the only other PEP 249 database APIs for IronPython are the group on fePy, which have not been maintained in several years. I am also unsure about the level of database support in mono. If someone is working on support for django on IronPython, I would love to be part of the project. -- Vernon >> >> >> On Apr 25, 2012 4:56 AM, "Pratik Paranjape" > > >> >> wrote: >> >>> >> [...snip...] >> > . My aim is to use a >> >>> .NET library with Django as >> >>> front end. The library works fine with mono, was hoping to use ipy to >> >>> call it in Django views. >> >>> >> >>> Thanks again. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From IFruchter at nds.com Wed Apr 25 14:48:03 2012 From: IFruchter at nds.com (Fruchter, Israel) Date: Wed, 25 Apr 2012 12:48:03 +0000 Subject: [Ironpython-users] [IronPython] unittest crash on mono In-Reply-To: References: <9C27FFAA42107C469705E17E8CB6CD131B32A509@ilmbx01.IL.NDS.com> Message-ID: <9C27FFAA42107C469705E17E8CB6CD131B32A520@ilmbx01.IL.NDS.com> Thanks Michael, Anyone can point me in the right direction ? I also tried this: /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe -c "import sys; print sys.builtin_module_names" ('__builtin__', 'sys', 'unicodedata', 'exceptions', 'clr', '_ast', 'imp', 'future_builtins', 'signal', 'zipimport', 'zlib', '_codecs', '_collections', 'copy_reg', 'cPickle', 'cStringIO', 'datetime', 'errno', 'gc', 'itertools', '_csv', '_io', '_locale', 'marshal', 'math', '_md5', '_sqlite3', 'operator', 're', 'select', '_sha', '_sha256', '_ctypes', '_ctypes_test', '_heapq', '_struct', 'thread', 'time', 'xxsubtype', '_functools', '_random', '_sre', '_ssl', '_subprocess', '_warnings', '_weakref', '_winreg', 'binascii', 'mmap', '_sha512', 'socket', 'msvcrt', 'array', 'cmath', 'posix', 'wpf') So, I guess signal module already there... I'm using IronPython binaries from the IronPython Site Do I need to compile it on the same place mono was compiled? Are there any instruction on how to compile IronPython on linux using mono ? Fruch -----Original Message----- From: Michael Foord [mailto:michael at voidspace.org.uk] Sent: Wednesday, April 25, 2012 3:42 PM To: Fruchter, Israel Subject: Re: [IronPython] unittest crash on mono Hey Fruch, I can provide help on the unittest side of things, but I'm not using IronPython or Mono at all now so I can't really help with that. The IronPython mailing list is probably the best place to get help. http://mail.python.org/mailman/listinfo/ironpython-users All the best, Michael Foord On 25 Apr 2012, at 13:38, Fruchter, Israel wrote: > Hi Michael, > > I've encounter an issue with IronPython when it being used ontop of mono > I know you not the right address for rasing issues, but I don't know if it's a mono or IronPython problem > > Look like the signal module isn't loading. > Can you help me look in the right direction? Finding the root cause of this? > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono --version > Mono JIT compiler version 2.10.2 (tarball Sun Oct 2 17:05:21 IST 2011) > Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com > TLS: __thread > SIGSEGV: altstack > Notifications: epoll > Architecture: amd64 > Disabled: none > Misc: softdebug > LLVM: supported, not enabled. > GC: Included Boehm (with typed GC and Parallel Mark) > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe -v > IronPython 2.7.2.1 (2.7.0.40) on Mono 4.0.30319.1 (64-bit) > Type "help", "copyright", "credits" or "license" for more information. > >>> > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe -c "import unittest" > Traceback (most recent call last): > File "", line 1, in > File "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/__init__.py", line 64, in > File "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/main.py", line 7, in > File "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/runner.py", line 7, in > File "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/signals.py", line 1, in > StandardError: Exception has been thrown by the target of an invocation. > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe -c "import signal" > Traceback (most recent call last): > File "", line 1, in > StandardError: Exception has been thrown by the target of an invocation. > > Thanks, > Fruch > > > > This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. > To protect the environment please do not print this e-mail unless necessary. > > An NDS Group Limited company. www.nds.com -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html From jdhardy at gmail.com Wed Apr 25 17:45:17 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 25 Apr 2012 08:45:17 -0700 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: On Wed, Apr 25, 2012 at 8:34 AM, Vernon Cole wrote: > Ummm... reality check... > > Patrik: > ? I have been lurking on the django developers list (along with IronPython) > for several years hoping for exactly the combination you are suggesting.? I > am unaware that anyone has tackled the project of making django run on > IronPython yet, on either Windows or mono.? As I see it, there may be two > problems. > 1)? django has issues with strings being assumed to be 8-bit bytes.? This > has to be fixed to port django to Python 3, and I suggested that IronPython > would be a useful stepping stone in that effort, but no one took the bait > AFAIK. > 2)? django's built-in object relational mapper is targeted at four > databases: MySQL, PostgreSQL, SQLite, and Oracle. > ?(see https://docs.djangoproject.com/en/dev/ref/databases/) > Of these four, I think that only SQLite is well supported by IronPython. > Oracle, MySQL and PostgresSQL are accessible from IronPython using my > adodbapi package, but it only works on Windows, since it relies on Microsoft > COM to reach the ODBC database engine (via traditional ADO).? My own efforts > to use pure ADO.NET database calls had a rather dismal result, and I > abandoned the branch.? To my knowledge, the only other PEP 249 database APIs > for IronPython are the group on fePy, which have not been maintained in > several years.? I am also unsure about the level of database support in > mono. > > If someone is working on support for django on IronPython, I would love to > be part of the project. I did work on it a bit a few years ago, and there's some out-of-date patches at https://bitbucket.org/jdhardy/django-ipy-patches. This was before IronPython was taking contributions, so getting fixes into IP was much harder. If anybody is interested in it, and is aware that there's a massive amount of work involved, you'd have my full support, and any fixes would be greatly appreciated. - Jeff From pratikparanjape at gmail.com Wed Apr 25 18:25:18 2012 From: pratikparanjape at gmail.com (Pratik Paranjape) Date: Wed, 25 Apr 2012 21:55:18 +0530 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: Thanks for the inputs Vernon, Jeff. Just checked Jeff's old posts and bitbucket page, it does not look pretty, at least with my current time constraints. The only thing that I absolutely can not avoid using is the .NET library , so I can get away with using cherrypy/ironpython as middle tier between clients and my existing Django application. Its a low load application. If nothing works, eventually I can try mono-fastcgi, and write this part in C#, but thats last resort, everything else is in python. Getting ironpython-django working will be cool though. I will try it out outside the scope of current project. On Wed, Apr 25, 2012 at 9:15 PM, Jeff Hardy wrote: > On Wed, Apr 25, 2012 at 8:34 AM, Vernon Cole > wrote: > > Ummm... reality check... > > > > Patrik: > > I have been lurking on the django developers list (along with > IronPython) > > for several years hoping for exactly the combination you are > suggesting. I > > am unaware that anyone has tackled the project of making django run on > > IronPython yet, on either Windows or mono. As I see it, there may be two > > problems. > > 1) django has issues with strings being assumed to be 8-bit bytes. This > > has to be fixed to port django to Python 3, and I suggested that > IronPython > > would be a useful stepping stone in that effort, but no one took the bait > > AFAIK. > > 2) django's built-in object relational mapper is targeted at four > > databases: MySQL, PostgreSQL, SQLite, and Oracle. > > (see https://docs.djangoproject.com/en/dev/ref/databases/) > > Of these four, I think that only SQLite is well supported by IronPython. > > Oracle, MySQL and PostgresSQL are accessible from IronPython using my > > adodbapi package, but it only works on Windows, since it relies on > Microsoft > > COM to reach the ODBC database engine (via traditional ADO). My own > efforts > > to use pure ADO.NET database calls had a rather dismal result, and I > > abandoned the branch. To my knowledge, the only other PEP 249 database > APIs > > for IronPython are the group on fePy, which have not been maintained in > > several years. I am also unsure about the level of database support in > > mono. > > > > If someone is working on support for django on IronPython, I would love > to > > be part of the project. > > I did work on it a bit a few years ago, and there's some out-of-date > patches at https://bitbucket.org/jdhardy/django-ipy-patches. > > This was before IronPython was taking contributions, so getting fixes > into IP was much harder. If anybody is interested in it, and is aware > that there's a massive amount of work involved, you'd have my full > support, and any fixes would be greatly appreciated. > > - Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Wed Apr 25 19:32:44 2012 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 25 Apr 2012 17:32:44 +0000 Subject: [Ironpython-users] Mono and Ironpython In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D0D10132E@SN2PRD0710MB396.namprd07.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B5289@SN2PRD0310MB360.namprd03.prod.outlook.com> <9597F4A19BFDB342B6E90963100C33083C9B52C3@SN2PRD0310MB360.namprd03.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D10159A@SN2PRD0710MB396.namprd07.prod.outlook.com> <4C554C3A47C5024ABDE00E94DA17BC4D0D1019B4@SN2PRD0710MB396.namprd07.prod.outlook.com> Message-ID: <6757ED2748BC0A43B9F3E4DA32D65AB0143BE4@CH1PRD0310MB357.namprd03.prod.outlook.com> One approach which might work, and could potentially be easier, would be starting with the Django 3.x branch and then update IronPython so it has the required 3.x features under the -X:Python30 command line option. I'm just thinking it might be easier in a world where Django was getting Unicode strings when it expected to. From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Pratik Paranjape Sent: Wednesday, April 25, 2012 9:25 AM To: Jeff Hardy Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Mono and Ironpython Thanks for the inputs Vernon, Jeff. Just checked Jeff's old posts and bitbucket page, it does not look pretty, at least with my current time constraints. The only thing that I absolutely can not avoid using is the .NET library , so I can get away with using cherrypy/ironpython as middle tier between clients and my existing Django application. Its a low load application. If nothing works, eventually I can try mono-fastcgi, and write this part in C#, but thats last resort, everything else is in python. Getting ironpython-django working will be cool though. I will try it out outside the scope of current project. On Wed, Apr 25, 2012 at 9:15 PM, Jeff Hardy > wrote: On Wed, Apr 25, 2012 at 8:34 AM, Vernon Cole > wrote: > Ummm... reality check... > > Patrik: > I have been lurking on the django developers list (along with IronPython) > for several years hoping for exactly the combination you are suggesting. I > am unaware that anyone has tackled the project of making django run on > IronPython yet, on either Windows or mono. As I see it, there may be two > problems. > 1) django has issues with strings being assumed to be 8-bit bytes. This > has to be fixed to port django to Python 3, and I suggested that IronPython > would be a useful stepping stone in that effort, but no one took the bait > AFAIK. > 2) django's built-in object relational mapper is targeted at four > databases: MySQL, PostgreSQL, SQLite, and Oracle. > (see https://docs.djangoproject.com/en/dev/ref/databases/) > Of these four, I think that only SQLite is well supported by IronPython. > Oracle, MySQL and PostgresSQL are accessible from IronPython using my > adodbapi package, but it only works on Windows, since it relies on Microsoft > COM to reach the ODBC database engine (via traditional ADO). My own efforts > to use pure ADO.NET database calls had a rather dismal result, and I > abandoned the branch. To my knowledge, the only other PEP 249 database APIs > for IronPython are the group on fePy, which have not been maintained in > several years. I am also unsure about the level of database support in > mono. > > If someone is working on support for django on IronPython, I would love to > be part of the project. I did work on it a bit a few years ago, and there's some out-of-date patches at https://bitbucket.org/jdhardy/django-ipy-patches. This was before IronPython was taking contributions, so getting fixes into IP was much harder. If anybody is interested in it, and is aware that there's a massive amount of work involved, you'd have my full support, and any fixes would be greatly appreciated. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Thu Apr 26 06:29:44 2012 From: dinov at microsoft.com (Dino Viehland) Date: Thu, 26 Apr 2012 04:29:44 +0000 Subject: [Ironpython-users] [IronPython] unittest crash on mono In-Reply-To: <9C27FFAA42107C469705E17E8CB6CD131B32A520@ilmbx01.IL.NDS.com> References: <9C27FFAA42107C469705E17E8CB6CD131B32A509@ilmbx01.IL.NDS.com> <9C27FFAA42107C469705E17E8CB6CD131B32A520@ilmbx01.IL.NDS.com> Message-ID: <6757ED2748BC0A43B9F3E4DA32D65AB01456D7@CH1PRD0310MB357.namprd03.prod.outlook.com> It looks like the current signal implementation won't work off of Windows. There's a call to SetConsoleControlHandler that happens when the signal module gets imported - which is very windows specific and is going to fail on all other platforms. This can all be handled at runtime in a graceful way, but the calls to platform specific APIs need to be moved into non-inlinable methods. In this case it seems like the 2 implementations are going to be pretty different given that everyone but windows has a reasonable signal function, so it might start to get to be a pain to keep both in the same module at the same time. If someone wanted to get really adventurous they could add a platform attribute to PlatformID parameter to PythonModuleAttribute and have different implementations of modules for different platforms - then implementing the Unix signal implementation is probably pretty easy. > -----Original Message----- > From: ironpython-users-bounces+dinov=exchange.microsoft.com at python.org > [mailto:ironpython-users- > bounces+dinov=exchange.microsoft.com at python.org] On Behalf Of Fruchter, > Israel > Sent: Wednesday, April 25, 2012 5:48 AM > To: ironpython-users at python.org > Subject: Re: [Ironpython-users] [IronPython] unittest crash on mono > > Thanks Michael, > > Anyone can point me in the right direction ? > > I also tried this: > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe -c > "import sys; print sys.builtin_module_names" > ('__builtin__', 'sys', 'unicodedata', 'exceptions', 'clr', '_ast', 'imp', > 'future_builtins', 'signal', 'zipimport', 'zlib', '_codecs', '_collections', 'copy_reg', > 'cPickle', 'cStringIO', 'datetime', 'errno', 'gc', 'itertools', '_csv', '_io', '_locale', > 'marshal', 'math', '_md5', '_sqlite3', 'operator', 're', 'select', '_sha', '_sha256', > '_ctypes', '_ctypes_test', '_heapq', '_struct', 'thread', 'time', 'xxsubtype', > '_functools', '_random', '_sre', '_ssl', '_subprocess', '_warnings', '_weakref', > '_winreg', 'binascii', 'mmap', '_sha512', 'socket', 'msvcrt', 'array', 'cmath', 'posix', > 'wpf') > > So, I guess signal module already there... > > I'm using IronPython binaries from the IronPython Site Do I need to compile it on > the same place mono was compiled? > > Are there any instruction on how to compile IronPython on linux using mono ? > > Fruch > > -----Original Message----- > From: Michael Foord [mailto:michael at voidspace.org.uk] > Sent: Wednesday, April 25, 2012 3:42 PM > To: Fruchter, Israel > Subject: Re: [IronPython] unittest crash on mono > > Hey Fruch, > > I can provide help on the unittest side of things, but I'm not using IronPython or > Mono at all now so I can't really help with that. The IronPython mailing list is > probably the best place to get help. > > http://mail.python.org/mailman/listinfo/ironpython-users > > All the best, > > Michael Foord > > On 25 Apr 2012, at 13:38, Fruchter, Israel wrote: > > > Hi Michael, > > > > I've encounter an issue with IronPython when it being used ontop of > > mono I know you not the right address for rasing issues, but I don't > > know if it's a mono or IronPython problem > > > > Look like the signal module isn't loading. > > Can you help me look in the right direction? Finding the root cause of this? > > > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono > > --version Mono JIT compiler version 2.10.2 (tarball Sun Oct 2 > > 17:05:21 IST 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. > www.mono-project.com > > TLS: __thread > > SIGSEGV: altstack > > Notifications: epoll > > Architecture: amd64 > > Disabled: none > > Misc: softdebug > > LLVM: supported, not enabled. > > GC: Included Boehm (with typed GC and Parallel Mark) > > > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono > > ipy.exe -v IronPython 2.7.2.1 (2.7.0.40) on Mono 4.0.30319.1 (64-bit) > > Type "help", "copyright", "credits" or "license" for more information. > > >>> > > > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe - > c "import unittest" > > Traceback (most recent call last): > > File "", line 1, in > > File "/extra/views/ifruchte/mono/IronPython- > 2.7.2.1/Lib/unittest/__init__.py", line 64, in > > File "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/main.py", > line 7, in > > File "/extra/views/ifruchte/mono/IronPython- > 2.7.2.1/Lib/unittest/runner.py", line 7, in > > File > > "/extra/views/ifruchte/mono/IronPython-2.7.2.1/Lib/unittest/signals.py > > ", line 1, in > > StandardError: Exception has been thrown by the target of an invocation. > > > > /extra/views/ifruchte/mono/IronPython-2.7.2.1> ../install/bin/mono ipy.exe - > c "import signal" > > Traceback (most recent call last): > > File "", line 1, in > > StandardError: Exception has been thrown by the target of an invocation. > > > > Thanks, > > Fruch > > > > > > > > This message is confidential and intended only for the addressee. If you have > received this message in error, please immediately notify the > postmaster at nds.com and delete it from your system as well as any copies. The > content of e-mails as well as traffic data may be monitored by NDS for > employment and security purposes. > > To protect the environment please do not print this e-mail unless necessary. > > > > An NDS Group Limited company. www.nds.com > > > -- > http://www.voidspace.org.uk/ > > > May you do good and not evil > May you find forgiveness for yourself and forgive others May you share freely, > never taking more than you give. > -- the sqlite blessing > http://www.sqlite.org/different.html > > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From no_reply at codeplex.com Fri Apr 27 10:53:41 2012 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 27 Apr 2012 01:53:41 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 4/26/2012 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] signal module does not work on non-Windows machines ---------------------------------------------- ISSUES 1. [New issue] signal module does not work on non-Windows machines http://ironpython.codeplex.com/workitem/32627 User jdhardy has proposed the issue: "The current implementation of 'signal' is Windows-specific. Getting it to work on Mono will take some trickery in the code, but it should be possible. Dino's take: "It looks like the current signal implementation won't work off of Windows. There's a call to SetConsoleControlHandler that happens when the signal module gets imported - which is very windows specific and is going to fail on all other platforms. This can all be handled at runtime in a graceful way, but the calls to platform specific APIs need to be moved into non-inlinable methods. In this case it seems like the 2 implementations are going to be pretty different given that everyone but windows has a reasonable signal function, so it might start to get to be a pain to keep both in the same module at the same time. If someone wanted to get really adventurous they could add a platform attribute to PlatformID parameter to PythonModuleAttribute and have different implementations of modules for different platforms - then implementing the Unix signal implementation is probably pretty easy."" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at CalypsoVentures.com Fri Apr 27 19:28:20 2012 From: dave at CalypsoVentures.com (David Bagby) Date: Fri, 27 Apr 2012 10:28:20 -0700 Subject: [Ironpython-users] How to ref XAML object from IPY for WPF app? In-Reply-To: References: Message-ID: <4F9AD734.8050406@CalypsoVentures.com> Hi, I'm a bit new to both IronPython and WPF - so of course I find myself trying to figure out how to make them work together... (I don't know where best to ask this question as I don't know if this is really a IPY or a WPF or combination question - so if there is a better group to consult, please tell me a good place to go ask.) FYI, Software context: VS 2010 IPY 2.7.2.1 PTVS 1.1.1 For a learning test case, I had VS create the XAML for a window with one button and one label. The simple goal is to click the button and have the value in the label increment. That was easy from a VB WPF app; but I can't get the same simple action from a IPY WPF app. Here is the IPY XAML: Both the IPY and VB WPF app Xaml files were created by the VS form editor -- so I'm guessing that the XAML is probably not the issue (but it's just a guess). Here is the IPY code: importwpf fromSystem.Windows import Application, Window fromSystem.Windows.Controls import Button, Label classMyWindow(Window): def __init__(self): wpf.LoadComponent(self, 'IPY_WPF_2.xaml') #label1.Content = 1 def Button_Click(self, sender, e): #label1.Content += 1 pass if__name__ == '__main__': Application().Run(MyWindow()) Any attempt I make to execute either of the commented out lines that reference label1 cause a fault. What is the proper way to reference a XAML object from IPY code in a WPF app? Obviously, I'm having trouble referencing a control defined in XAML from the IPY code. I suspect I'm missing something that should be obvious to me but isn't, and I'd appreciate a pointer as to what I need to do/learn. FYI -- here the equiv VB WFP app that worked first time: Here is the VB XAML: Here is the VB code: ClassMainWindow Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Label1.Content = 1 End Sub Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click Label1.Content += 1 End Sub EndClass The VB WPF app works as expected. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Apr 27 19:36:35 2012 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 27 Apr 2012 10:36:35 -0700 Subject: [Ironpython-users] How to ref XAML object from IPY for WPF app? In-Reply-To: <4F9AD734.8050406@CalypsoVentures.com> References: <4F9AD734.8050406@CalypsoVentures.com> Message-ID: Hi David, There's a working smaple at https://github.com/jdhardy/IronPythonSamples/blob/master/PyWpfSample/PyWpfSample.py that you can check out. >From looking at your code, I think the issue is that you need to use 'self.label1.Content = ...' to reference the controls on the form. - Jeff On Fri, Apr 27, 2012 at 10:28 AM, David Bagby wrote: > Hi, > I?m a bit new to both IronPython and WPF - so of course I find myself trying > to figure out how to make them work together? > (I don?t know where best to ask this question as I don?t know if this is > really a IPY or a WPF or combination question - so if there is a better > group to consult, please tell me a good place to go ask.) > > FYI, Software context: > ??? VS 2010 > ??? IPY 2.7.2.1 > ??? PTVS 1.1.1 > > For a learning test case, I had VS create the XAML for a window with one > button and one label. The simple goal is to click the button and have the > value in the label increment. > > That was easy from a VB WPF app; but I can?t get the same simple action from > a IPY WPF app. > > Here is the IPY XAML: > ????? ?xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > ????? ?xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > ????? ?Title="IPY-WPF-2" Height="300" Width="300"> > ?????? > ???????