From jdhardy at gmail.com Fri Feb 1 21:00:28 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 1 Feb 2013 12:00:28 -0800 Subject: [Ironpython-users] Windows Service Applications? In-Reply-To: References: Message-ID: On Tue, Jan 29, 2013 at 4:19 PM, Don Spaulding wrote: > Hi all, > > I'm new to IronPython. I'm using IPy to wrap a .NET assembly. I've got my > wrapper written and functional from the command line. Now I want to run the > python wrapper as a windows service application. Anyone know how I can do > that? > > I found a project on codeplex that seems to be solving this problem > (http://dlrhostservice.codeplex.com/). It's rather light on documentation > and I haven't been able to make heads or tails out of how to use the project > based on reading the source. Any help in this area would be appreciated. If there's a way to create a service that launches an exe, it would be easiest to use that, point it at ipy.exe, and pass in your script as the argument. It looks like http://serviceex.com/ might fir the bill, but I've never used it. - Jeff From jdhardy at gmail.com Fri Feb 1 21:04:42 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 1 Feb 2013 12:04:42 -0800 Subject: [Ironpython-users] struct.pack(format, *args) not thread safe In-Reply-To: References: Message-ID: On Fri, Feb 1, 2013 at 12:02 PM, Jeff Hardy wrote: > Care to open a ticket? Ah, you did already - thanks! (http://ironpython.codeplex.com/workitem/33720) - Jeff From jdhardy at gmail.com Fri Feb 1 21:02:12 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 1 Feb 2013 12:02:12 -0800 Subject: [Ironpython-users] struct.pack(format, *args) not thread safe In-Reply-To: References: Message-ID: On Tue, Jan 29, 2013 at 11:49 PM, Michael van der Kolff wrote: > When using paramiko with more than one process spawning, I > occasionally get the following: > > System.InvalidOperationException: The LinkedList node already belongs > to a LinkedList. > at System.Collections.Generic.LinkedList`1.ValidateNewNode(LinkedListNode`1 > node) at System.Collections.Generic.LinkedList`1.AddFirst(LinkedListNode`1 > node) > at IronPython.Modules.PythonStruct.pack(CodeContext context, String > fmt, Object[] values) > at CallSite.Target(Closure , CallSite , CodeContext , Object , > String , Object ) > at paramiko.message$37.add_int$491(PythonFunction $function, Object > self, Object n) in > C:\repo\trunk\external\python\paramiko\message.py:line 227 > at paramiko.message$37.add_string$494(PythonFunction $function, > Object self, Object s) in > C:\repo\trunk\external\python\paramiko\message.py:line 259 > at paramiko.transport$13.open_channel$273(PythonFunction $function, > Object self, Object kind, Object dest_addr, Object src_addr) in > C:\repo\trunk\external\python\paramiko\transport.py:line 773 > ... Lots more in the stack trace. > > I think that this is due to PythonStruct.pack's usage of CacheDict, > which is explicitly marked as not thread safe. A quick and dirty hack > would be to force all users of _cache to lock it first, though I'm > sure there's a better answer. One of the various Dictionary implementations in IronPython should be thread safe, but just locking the _chache should be a good-enough first approximation (I would love to be able to use the Concurrent* structures in 4.0, but they're not supported everywhere I want them to be just yet). Care to open a ticket? - Jeff From donspauldingii at gmail.com Fri Feb 1 21:47:49 2013 From: donspauldingii at gmail.com (Don Spaulding) Date: Fri, 1 Feb 2013 14:47:49 -0600 Subject: [Ironpython-users] Windows Service Applications? In-Reply-To: References: Message-ID: On Fri, Feb 1, 2013 at 2:00 PM, Jeff Hardy wrote: > > If there's a way to create a service that launches an exe, it would be > easiest to use that, point it at ipy.exe, and pass in your script as > the argument. It looks like http://serviceex.com/ might fir the bill, > but I've never used it. > > - Jeff > That approach looks like it would work rather well. I've actually been able to get the DLRHostService project to build an exe that wraps my ipy script. It's currently not pulling in the python standard library, but I'm sure I'll be able to figure that out before too long. If I can't make it work though, I'll definitely take a look at ServiceEx. Thanks, Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Feb 2 16:35:49 2013 From: no_reply at codeplex.com (CodePlex) Date: 2 Feb 2013 07:35:49 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/1/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON 2. [New comment] struct.pack not threadsafe 3. [New issue] ast: elif is missing lineno and col_offset attributes ---------------------------------------------- ISSUES 1. [New comment] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON http://ironpython.codeplex.com/workitem/33648 User mvdk has commented on the issue: "CreateChan is a unicode string. Are you sure that DAQmxCreateDOChan takes one of those as a parameter?"----------------- 2. [New comment] struct.pack not threadsafe http://ironpython.codeplex.com/workitem/33720 User jdhardy has commented on the issue: "I'd be OK with a patch to just lock _cache, for now."----------------- 3. [New issue] ast: elif is missing lineno and col_offset attributes http://ironpython.codeplex.com/workitem/33725 User paweljasinski has proposed the issue: "the following throws exception: import ast m=ast.parse(""" if False: pass elif False: pass """) ast.dump(m,include_attributes=True)" ---------------------------------------------- ---------------------------------------------- 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 Feb 6 13:23:22 2013 From: no_reply at codeplex.com (CodePlex) Date: 6 Feb 2013 04:23:22 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/5/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Issues with IRONPYTHONPATH ---------------------------------------------- ISSUES 1. [New issue] Issues with IRONPYTHONPATH http://ironpython.codeplex.com/workitem/33739 User jpbologna has proposed the issue: "I'm using ironpython with visual studio 2010 with a purpose to build a GUI. In this interface I'm using a pre-programmed code that uses a library called ipkiss. I saw that i need to set a environment variable (IRONPYTHONPATH) in order to use this "library" in ironpython. I really tried everything that I could do, and to complement, I'm really new in this programming world." ---------------------------------------------- ---------------------------------------------- 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 Feb 7 11:17:14 2013 From: no_reply at codeplex.com (CodePlex) Date: 7 Feb 2013 02:17:14 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/6/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Issues with IRONPYTHONPATH ---------------------------------------------- ISSUES 1. [New comment] Issues with IRONPYTHONPATH http://ironpython.codeplex.com/workitem/33739 User Zooba has commented on the issue: "This sounds like a question to be asked at the [Python Tools for Visual Studio](http://pytools.codeplex.com/discussions) discussions page (and we'll need to know some more information, like where the library's files are installed). Also, if you installed the Python support as part of IronPython, you should uninstall it (through Add/Remove features) and get [PTVS](http://pytools.codeplex.com). It's based on the same code, but has been significantly updated since it was called "IronPython Tools for Visual Studio"." ---------------------------------------------- ---------------------------------------------- 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 mvanderkolff at gmail.com Sat Feb 9 08:28:43 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Sat, 9 Feb 2013 18:28:43 +1100 Subject: [Ironpython-users] Pull requests 2.7 maint vs trunk Message-ID: Just a minor matter - I submitted some pull requests, and I just noticed that there's an ipy 2.7 maint branch. Should I issue a pull request for these fixes on the maint branch too, or does the maintainer backport them? Cheers, Michael From jdhardy at gmail.com Sat Feb 9 09:55:09 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 9 Feb 2013 00:55:09 -0800 Subject: [Ironpython-users] Pull requests 2.7 maint vs trunk In-Reply-To: References: Message-ID: On Fri, Feb 8, 2013 at 11:28 PM, Michael van der Kolff wrote: > Just a minor matter - I submitted some pull requests, and I just > noticed that there's an ipy 2.7 maint branch. Should I issue a pull > request for these fixes on the maint branch too, or does the > maintainer backport them? I prefer them to be off of ipy-2.7-maint, but if they're off of master I'll take care of them. I pulled your two into master and then (unrelatedly) broke my git install, so I haven't ported them over yet. - Jeff From jwdavidson at gmail.com Wed Feb 13 15:37:59 2013 From: jwdavidson at gmail.com (John Davidson) Date: Wed, 13 Feb 2013 09:37:59 -0500 Subject: [Ironpython-users] Debugging with CLR in Web App Message-ID: I am in the process of creating an MVC 4 based wiki with scripting support for dynamic creation of content. I have chosen IronPython as the embedded scripting host and am developing a DSL for the scripting portion. This DSL is created in C# and exposed to the CLR for scripting using IronPython. The code I have works correctly when run without debugging. The process for normal execution is w3wp.exe run from VS2012. It also works correctly, with or without debugging, when run as a unit test. The code for script engine creation and execution is shown below: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using IronPython.Hosting; using IronPython.Runtime; using Microsoft.Scripting.Hosting; namespace LynxWikiScripting { public class WikiScriptEngine { private static readonly Lazy scriptEngine = new Lazy(() => { return new WikiScriptEngine(); }, true); private WikiScriptEngine() {} public static ScriptEngine Engine = Python.CreateEngine(new Dictionary() {{ "Debug", true }} ); public static ScriptRuntime Runtime = Engine.Runtime; public static ScriptScope scope = Engine.CreateScope(); public static void Initialize() { string fullPath = Assembly.GetExecutingAssembly().Location; string rootDir = Directory.GetParent(fullPath).FullName; } public static string ExecuteBehavior(string scriptInput) { StringBuilder scriptSource = new StringBuilder(); scriptSource.AppendLine("import clr"); scriptSource.AppendLine(@"clr.AddReferenceToFileAndPath(r'C:\Users\John\Documents\Visual Studio 2012\Projects\LynxWiki\LynxWiki\App_Code\IronWiki.dll')"); scriptSource.AppendLine("import IronWiki"); scriptSource.AppendLine("from IronWiki import UtilityProperties"); scriptSource.AppendLine("from IronWiki import IronWikiSyntax"); scriptSource.Append(scriptInput); try { ScriptSource source = Engine.CreateScriptSourceFromString(scriptSource.ToString(), Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var varPyNow = String.Empty; scope.TryGetVariable("ScriptOutput", out varPyNow); return varPyNow; } catch (Exception ex) { Debug.Print(ex.Message); return ex.Message; } } } } The unit test code is: using System; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using LynxWikiScripting; namespace LynxWikiScripting.Tests { [TestClass] public class UnitTest1 { [TestMethod] public void TestIronWikiSyntax() { WikiScriptEngine.Initialize(); StringBuilder scriptSource = new StringBuilder(); scriptSource.AppendLine(); scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()"); scriptSource.AppendLine("so = ''"); scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :"); scriptSource.AppendLine(" so = so + '||' + iwc.Name + '||' + iwc.Description + '''||\\r\\n'''"); scriptSource.AppendLine("ScriptOutput = so"); //scriptSource.AppendLine(""); //scriptSource.AppendLine(""); string result = WikiScriptEngine.ExecuteBehavior(scriptSource.ToString()); Assert.IsNotNull(result); } } } The string returned by the processing of the IronPython script is: ||IronWikiSyntax||A class containing information about the IronWiki syntax|| ||IronWikiClass||The class describing an IronWiki class|| ||IronWikiMember||The class describing an IronWiki member|| ||UtilityProperties||A class that provides a number of utility properties|| This is a wiki table text showing the result of reflecting the contents of the DSL at its inception. The application code has identical inputs to ExecuteBehavior as the unit test has. I have tried Python.CreateEngine with or without the "debug" option and also with and without the "trace" option. There is no difference in execution behavior based on having or not having the options included. Is there something else I am missing, or can I give more information to help resolve my problem. Thanks John Davidson From rome at Wintellect.com Wed Feb 13 17:05:19 2013 From: rome at Wintellect.com (Keith Rome) Date: Wed, 13 Feb 2013 16:05:19 +0000 Subject: [Ironpython-users] Debugging with CLR in Web App In-Reply-To: References: Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D3D02EAE8@BN1PRD0712MB633.namprd07.prod.outlook.com> First thing I would check is to make sure it is trying to load the right version of IronPython. If you are deploying the assemblies to your application's bin folder then you will also want to verify that no versions are also loaded in the GAC. Likewise, if your application is using references to GAC'd assemblies then you want to make sure that they are also on the target server (or at least copied to local bin). Other than that, you didn't actually mention what the problem is, or the error message you are seeing. So it will be difficult to offer any help without some information about the problem. 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: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of John Davidson Sent: Wednesday, February 13, 2013 9:38 AM To: ironpython-users at python.org Subject: [Ironpython-users] Debugging with CLR in Web App I am in the process of creating an MVC 4 based wiki with scripting support for dynamic creation of content. I have chosen IronPython as the embedded scripting host and am developing a DSL for the scripting portion. This DSL is created in C# and exposed to the CLR for scripting using IronPython. The code I have works correctly when run without debugging. The process for normal execution is w3wp.exe run from VS2012. It also works correctly, with or without debugging, when run as a unit test. The code for script engine creation and execution is shown below: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using IronPython.Hosting; using IronPython.Runtime; using Microsoft.Scripting.Hosting; namespace LynxWikiScripting { public class WikiScriptEngine { private static readonly Lazy scriptEngine = new Lazy(() => { return new WikiScriptEngine(); }, true); private WikiScriptEngine() {} public static ScriptEngine Engine = Python.CreateEngine(new Dictionary() {{ "Debug", true }} ); public static ScriptRuntime Runtime = Engine.Runtime; public static ScriptScope scope = Engine.CreateScope(); public static void Initialize() { string fullPath = Assembly.GetExecutingAssembly().Location; string rootDir = Directory.GetParent(fullPath).FullName; } public static string ExecuteBehavior(string scriptInput) { StringBuilder scriptSource = new StringBuilder(); scriptSource.AppendLine("import clr"); scriptSource.AppendLine(@"clr.AddReferenceToFileAndPath(r'C:\Users\John\Documents\Visual Studio 2012\Projects\LynxWiki\LynxWiki\App_Code\IronWiki.dll')"); scriptSource.AppendLine("import IronWiki"); scriptSource.AppendLine("from IronWiki import UtilityProperties"); scriptSource.AppendLine("from IronWiki import IronWikiSyntax"); scriptSource.Append(scriptInput); try { ScriptSource source = Engine.CreateScriptSourceFromString(scriptSource.ToString(), Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var varPyNow = String.Empty; scope.TryGetVariable("ScriptOutput", out varPyNow); return varPyNow; } catch (Exception ex) { Debug.Print(ex.Message); return ex.Message; } } } } The unit test code is: using System; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using LynxWikiScripting; namespace LynxWikiScripting.Tests { [TestClass] public class UnitTest1 { [TestMethod] public void TestIronWikiSyntax() { WikiScriptEngine.Initialize(); StringBuilder scriptSource = new StringBuilder(); scriptSource.AppendLine(); scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()"); scriptSource.AppendLine("so = ''"); scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :"); scriptSource.AppendLine(" so = so + '||' + iwc.Name + '||' + iwc.Description + '''||\\r\\n'''"); scriptSource.AppendLine("ScriptOutput = so"); //scriptSource.AppendLine(""); //scriptSource.AppendLine(""); string result = WikiScriptEngine.ExecuteBehavior(scriptSource.ToString()); Assert.IsNotNull(result); } } } The string returned by the processing of the IronPython script is: ||IronWikiSyntax||A class containing information about the IronWiki ||IronWikiSyntax||syntax|| ||IronWikiClass||The class describing an IronWiki class|| ||IronWikiMember||The class describing an IronWiki member|| ||UtilityProperties||A class that provides a number of utility ||UtilityProperties||properties|| This is a wiki table text showing the result of reflecting the contents of the DSL at its inception. The application code has identical inputs to ExecuteBehavior as the unit test has. I have tried Python.CreateEngine with or without the "debug" option and also with and without the "trace" option. There is no difference in execution behavior based on having or not having the options included. Is there something else I am missing, or can I give more information to help resolve my problem. Thanks John Davidson _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users From williamj at tenbase2.com Wed Feb 13 21:43:24 2013 From: williamj at tenbase2.com (William Johnston) Date: Wed, 13 Feb 2013 15:43:24 -0500 Subject: [Ironpython-users] need assistance with IronClad project Message-ID: <3DF54C3CE5BC4EC4965FFD19EFD8E087@leviathan> Hello, I created a project that is exactly the same as the IronClad (from Resolver) demo project. Yet, I am getting different results. Can anyone assist me on this? The project files are at: http://tenbase2.com/ironclad%20projects.zip This is my only forum for support. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Wed Feb 13 21:47:08 2013 From: slide.o.mix at gmail.com (Slide) Date: Wed, 13 Feb 2013 13:47:08 -0700 Subject: [Ironpython-users] need assistance with IronClad project In-Reply-To: <3DF54C3CE5BC4EC4965FFD19EFD8E087@leviathan> References: <3DF54C3CE5BC4EC4965FFD19EFD8E087@leviathan> Message-ID: Can you be more descriptive as to issues you are seeing, what is going wrong, what results you are getting vs. what you are expecting? Just throwing a project out there and expecting people to look at it will probably not get you a great amount of help. slide On Wed, Feb 13, 2013 at 1:43 PM, William Johnston wrote: > > Hello, > > I created a project that is exactly the same as the IronClad (from > Resolver) demo project. > > Yet, I am getting different results. > > Can anyone assist me on this? > > The project files are at: > > http://tenbase2.com/ironclad%20projects.zip > > This is my only forum for support. > > Thank you. > > > > _______________________________________________ > 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 jwdavidson at gmail.com Wed Feb 13 23:01:42 2013 From: jwdavidson at gmail.com (John Davidson) Date: Wed, 13 Feb 2013 17:01:42 -0500 Subject: [Ironpython-users] Debugging with CLR in Web App In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D3D02EAE8@BN1PRD0712MB633.namprd07.prod.outlook.com> References: <4C554C3A47C5024ABDE00E94DA17BC4D3D02EAE8@BN1PRD0712MB633.namprd07.prod.outlook.com> Message-ID: Thank you for the response. There is no error when running in the debugger. The process just hangs at the line "source.Execute(scope)". When I do a manual break in the debugger the error I get is "Cannot evaluate expression because a native frame is on top of the call stack". The information returned by the call stack is incomplete in that the reference to "source.Execute" is not included. IronPython is being loaded only from the GAC and it is the correct version 2.7.0.40, reported by the ScriptEngine as being "IronPython 2.7.3" when the code is running. This is not yet running on a target server but is ongoing development on VS2012 in Windows 8. John Davidson On Wed, Feb 13, 2013 at 11:05 AM, Keith Rome wrote: > First thing I would check is to make sure it is trying to load the right version of IronPython. If you are deploying the assemblies to your application's bin folder then you will also want to verify that no versions are also loaded in the GAC. Likewise, if your application is using references to GAC'd assemblies then you want to make sure that they are also on the target server (or at least copied to local bin). > > > Other than that, you didn't actually mention what the problem is, or the error message you are seeing. So it will be difficult to offer any help without some information about the problem. > > > > 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: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of John Davidson > Sent: Wednesday, February 13, 2013 9:38 AM > To: ironpython-users at python.org > Subject: [Ironpython-users] Debugging with CLR in Web App > > I am in the process of creating an MVC 4 based wiki with scripting support for dynamic creation of content. I have chosen IronPython as the embedded scripting host and am developing a DSL for the scripting portion. This DSL is created in C# and exposed to the CLR for scripting using IronPython. > > The code I have works correctly when run without debugging. The process for normal execution is w3wp.exe run from VS2012. It also works correctly, with or without debugging, when run as a unit test. > > The code for script engine creation and execution is shown below: > > using System; > using System.Collections.Generic; > using System.Diagnostics; > using System.IO; > using System.Linq; > using System.Reflection; > using System.Text; > using System.Threading.Tasks; > using IronPython.Hosting; > using IronPython.Runtime; > using Microsoft.Scripting.Hosting; > > namespace LynxWikiScripting > { > public class WikiScriptEngine > { > private static readonly Lazy scriptEngine = new Lazy(() => { return new WikiScriptEngine(); }, true); > > private WikiScriptEngine() {} > > public static ScriptEngine Engine = Python.CreateEngine(new Dictionary() {{ "Debug", true }} ); > public static ScriptRuntime Runtime = Engine.Runtime; > public static ScriptScope scope = Engine.CreateScope(); > > > public static void Initialize() > { > string fullPath = Assembly.GetExecutingAssembly().Location; > string rootDir = Directory.GetParent(fullPath).FullName; > > } > > public static string ExecuteBehavior(string scriptInput) > { > StringBuilder scriptSource = new StringBuilder(); > scriptSource.AppendLine("import clr"); > scriptSource.AppendLine(@"clr.AddReferenceToFileAndPath(r'C:\Users\John\Documents\Visual > Studio 2012\Projects\LynxWiki\LynxWiki\App_Code\IronWiki.dll')"); > scriptSource.AppendLine("import IronWiki"); > scriptSource.AppendLine("from IronWiki import UtilityProperties"); > scriptSource.AppendLine("from IronWiki import IronWikiSyntax"); > scriptSource.Append(scriptInput); > try { > ScriptSource source = > Engine.CreateScriptSourceFromString(scriptSource.ToString(), > Microsoft.Scripting.SourceCodeKind.Statements); > source.Execute(scope); > var varPyNow = String.Empty; > scope.TryGetVariable("ScriptOutput", out varPyNow); > return varPyNow; > } > catch (Exception ex) { > Debug.Print(ex.Message); > return ex.Message; > } > } > } > } > > The unit test code is: > > using System; > using System.Text; > using Microsoft.VisualStudio.TestTools.UnitTesting; > using LynxWikiScripting; > > namespace LynxWikiScripting.Tests > { > [TestClass] > public class UnitTest1 > { > [TestMethod] > public void TestIronWikiSyntax() > { > WikiScriptEngine.Initialize(); > StringBuilder scriptSource = new StringBuilder(); > scriptSource.AppendLine(); > scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()"); > scriptSource.AppendLine("so = ''"); > scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :"); > scriptSource.AppendLine(" so = so + '||' + iwc.Name + > '||' + iwc.Description + '''||\\r\\n'''"); > scriptSource.AppendLine("ScriptOutput = so"); > //scriptSource.AppendLine(""); > //scriptSource.AppendLine(""); > > string result = > WikiScriptEngine.ExecuteBehavior(scriptSource.ToString()); > > Assert.IsNotNull(result); > } > } > } > > The string returned by the processing of the IronPython script is: > > ||IronWikiSyntax||A class containing information about the IronWiki > ||IronWikiSyntax||syntax|| > ||IronWikiClass||The class describing an IronWiki class|| > ||IronWikiMember||The class describing an IronWiki member|| > ||UtilityProperties||A class that provides a number of utility > ||UtilityProperties||properties|| > > This is a wiki table text showing the result of reflecting the contents of the DSL at its inception. > > The application code has identical inputs to ExecuteBehavior as the unit test has. I have tried Python.CreateEngine with or without the "debug" option and also with and without the "trace" option. There is no difference in execution behavior based on having or not having the options included. > > Is there something else I am missing, or can I give more information to help resolve my problem. > > Thanks > > John Davidson > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > From jwdavidson at gmail.com Thu Feb 14 00:47:53 2013 From: jwdavidson at gmail.com (John Davidson) Date: Wed, 13 Feb 2013 18:47:53 -0500 Subject: [Ironpython-users] Debugging with CLR in Web App In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D3D02EAE8@BN1PRD0712MB633.namprd07.prod.outlook.com> Message-ID: Some more followup detail. I added the Frames and FullFrames option to the engine creation. This allows me to now get the full stack trace into the IronPython.dll The process is hanging in IronPython.dll!IronPython.Runtime.Operations.PythonTypeOps.GetBuiltinFunction(System.Type type = {Name = Cannot evaluate expression because a native frame is on top of the call stack. FullName = Cannot evaluate expression because a native frame is on top of the call stack.}, string cacheName = "__new__", string pythonName = "__new__", IronPython.Runtime.Types.FunctionType? funcType = Function | AlwaysVisible, System.Reflection.MemberInfo[] mems = {System.Reflection.MemberInfo[3]}) + 0x5e8 bytes I had also tried enabling the ExceptionDetail, ShowClrExceptions and MTA options, but they do not change behavior or give any additional details John Davidson On Wed, Feb 13, 2013 at 5:01 PM, John Davidson wrote: > Thank you for the response. > > There is no error when running in the debugger. The process just hangs > at the line "source.Execute(scope)". When I do a manual break in the > debugger the error I get is "Cannot evaluate expression because a > native frame is on top of the call stack". The information returned by > the call stack is incomplete in that the reference to "source.Execute" > is not included. > > IronPython is being loaded only from the GAC and it is the correct > version 2.7.0.40, reported by the ScriptEngine as being "IronPython > 2.7.3" when the code is running. > > This is not yet running on a target server but is ongoing development > on VS2012 in Windows 8. > > John Davidson > > On Wed, Feb 13, 2013 at 11:05 AM, Keith Rome wrote: >> First thing I would check is to make sure it is trying to load the right version of IronPython. If you are deploying the assemblies to your application's bin folder then you will also want to verify that no versions are also loaded in the GAC. Likewise, if your application is using references to GAC'd assemblies then you want to make sure that they are also on the target server (or at least copied to local bin). >> >> >> Other than that, you didn't actually mention what the problem is, or the error message you are seeing. So it will be difficult to offer any help without some information about the problem. >> >> >> >> 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: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of John Davidson >> Sent: Wednesday, February 13, 2013 9:38 AM >> To: ironpython-users at python.org >> Subject: [Ironpython-users] Debugging with CLR in Web App >> >> I am in the process of creating an MVC 4 based wiki with scripting support for dynamic creation of content. I have chosen IronPython as the embedded scripting host and am developing a DSL for the scripting portion. This DSL is created in C# and exposed to the CLR for scripting using IronPython. >> >> The code I have works correctly when run without debugging. The process for normal execution is w3wp.exe run from VS2012. It also works correctly, with or without debugging, when run as a unit test. >> >> The code for script engine creation and execution is shown below: >> >> using System; >> using System.Collections.Generic; >> using System.Diagnostics; >> using System.IO; >> using System.Linq; >> using System.Reflection; >> using System.Text; >> using System.Threading.Tasks; >> using IronPython.Hosting; >> using IronPython.Runtime; >> using Microsoft.Scripting.Hosting; >> >> namespace LynxWikiScripting >> { >> public class WikiScriptEngine >> { >> private static readonly Lazy scriptEngine = new Lazy(() => { return new WikiScriptEngine(); }, true); >> >> private WikiScriptEngine() {} >> >> public static ScriptEngine Engine = Python.CreateEngine(new Dictionary() {{ "Debug", true }} ); >> public static ScriptRuntime Runtime = Engine.Runtime; >> public static ScriptScope scope = Engine.CreateScope(); >> >> >> public static void Initialize() >> { >> string fullPath = Assembly.GetExecutingAssembly().Location; >> string rootDir = Directory.GetParent(fullPath).FullName; >> >> } >> >> public static string ExecuteBehavior(string scriptInput) >> { >> StringBuilder scriptSource = new StringBuilder(); >> scriptSource.AppendLine("import clr"); >> scriptSource.AppendLine(@"clr.AddReferenceToFileAndPath(r'C:\Users\John\Documents\Visual >> Studio 2012\Projects\LynxWiki\LynxWiki\App_Code\IronWiki.dll')"); >> scriptSource.AppendLine("import IronWiki"); >> scriptSource.AppendLine("from IronWiki import UtilityProperties"); >> scriptSource.AppendLine("from IronWiki import IronWikiSyntax"); >> scriptSource.Append(scriptInput); >> try { >> ScriptSource source = >> Engine.CreateScriptSourceFromString(scriptSource.ToString(), >> Microsoft.Scripting.SourceCodeKind.Statements); >> source.Execute(scope); >> var varPyNow = String.Empty; >> scope.TryGetVariable("ScriptOutput", out varPyNow); >> return varPyNow; >> } >> catch (Exception ex) { >> Debug.Print(ex.Message); >> return ex.Message; >> } >> } >> } >> } >> >> The unit test code is: >> >> using System; >> using System.Text; >> using Microsoft.VisualStudio.TestTools.UnitTesting; >> using LynxWikiScripting; >> >> namespace LynxWikiScripting.Tests >> { >> [TestClass] >> public class UnitTest1 >> { >> [TestMethod] >> public void TestIronWikiSyntax() >> { >> WikiScriptEngine.Initialize(); >> StringBuilder scriptSource = new StringBuilder(); >> scriptSource.AppendLine(); >> scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()"); >> scriptSource.AppendLine("so = ''"); >> scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :"); >> scriptSource.AppendLine(" so = so + '||' + iwc.Name + >> '||' + iwc.Description + '''||\\r\\n'''"); >> scriptSource.AppendLine("ScriptOutput = so"); >> //scriptSource.AppendLine(""); >> //scriptSource.AppendLine(""); >> >> string result = >> WikiScriptEngine.ExecuteBehavior(scriptSource.ToString()); >> >> Assert.IsNotNull(result); >> } >> } >> } >> >> The string returned by the processing of the IronPython script is: >> >> ||IronWikiSyntax||A class containing information about the IronWiki >> ||IronWikiSyntax||syntax|| >> ||IronWikiClass||The class describing an IronWiki class|| >> ||IronWikiMember||The class describing an IronWiki member|| >> ||UtilityProperties||A class that provides a number of utility >> ||UtilityProperties||properties|| >> >> This is a wiki table text showing the result of reflecting the contents of the DSL at its inception. >> >> The application code has identical inputs to ExecuteBehavior as the unit test has. I have tried Python.CreateEngine with or without the "debug" option and also with and without the "trace" option. There is no difference in execution behavior based on having or not having the options included. >> >> Is there something else I am missing, or can I give more information to help resolve my problem. >> >> Thanks >> >> John Davidson >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> From jwdavidson at gmail.com Thu Feb 14 15:09:39 2013 From: jwdavidson at gmail.com (John Davidson) Date: Thu, 14 Feb 2013 09:09:39 -0500 Subject: [Ironpython-users] Debugging with CLR in Web App In-Reply-To: References: <4C554C3A47C5024ABDE00E94DA17BC4D3D02EAE8@BN1PRD0712MB633.namprd07.prod.outlook.com> Message-ID: Everything works correctly when I use the Remote Debugger rather than debugging inside VS2012. I haven't had to use the remote debugger since VS2005, but glad it does the job Thanks for your patience John Davidson On Wed, Feb 13, 2013 at 6:47 PM, John Davidson wrote: > Some more followup detail. I added the Frames and FullFrames option to > the engine creation. This allows me to now get the full stack trace > into the IronPython.dll > The process is hanging in > > IronPython.dll!IronPython.Runtime.Operations.PythonTypeOps.GetBuiltinFunction(System.Type > type = {Name = Cannot evaluate expression because a native frame is on > top of the call stack. FullName = Cannot evaluate expression because a > native frame is on top of the call stack.}, string cacheName = > "__new__", string pythonName = "__new__", > IronPython.Runtime.Types.FunctionType? funcType = Function | > AlwaysVisible, System.Reflection.MemberInfo[] mems = > {System.Reflection.MemberInfo[3]}) + 0x5e8 bytes > > I had also tried enabling the ExceptionDetail, ShowClrExceptions and > MTA options, but they do not change behavior or give any additional > details > > John Davidson > > On Wed, Feb 13, 2013 at 5:01 PM, John Davidson wrote: >> Thank you for the response. >> >> There is no error when running in the debugger. The process just hangs >> at the line "source.Execute(scope)". When I do a manual break in the >> debugger the error I get is "Cannot evaluate expression because a >> native frame is on top of the call stack". The information returned by >> the call stack is incomplete in that the reference to "source.Execute" >> is not included. >> >> IronPython is being loaded only from the GAC and it is the correct >> version 2.7.0.40, reported by the ScriptEngine as being "IronPython >> 2.7.3" when the code is running. >> >> This is not yet running on a target server but is ongoing development >> on VS2012 in Windows 8. >> >> John Davidson >> >> On Wed, Feb 13, 2013 at 11:05 AM, Keith Rome wrote: >>> First thing I would check is to make sure it is trying to load the right version of IronPython. If you are deploying the assemblies to your application's bin folder then you will also want to verify that no versions are also loaded in the GAC. Likewise, if your application is using references to GAC'd assemblies then you want to make sure that they are also on the target server (or at least copied to local bin). >>> >>> >>> Other than that, you didn't actually mention what the problem is, or the error message you are seeing. So it will be difficult to offer any help without some information about the problem. >>> >>> >>> >>> 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: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of John Davidson >>> Sent: Wednesday, February 13, 2013 9:38 AM >>> To: ironpython-users at python.org >>> Subject: [Ironpython-users] Debugging with CLR in Web App >>> >>> I am in the process of creating an MVC 4 based wiki with scripting support for dynamic creation of content. I have chosen IronPython as the embedded scripting host and am developing a DSL for the scripting portion. This DSL is created in C# and exposed to the CLR for scripting using IronPython. >>> >>> The code I have works correctly when run without debugging. The process for normal execution is w3wp.exe run from VS2012. It also works correctly, with or without debugging, when run as a unit test. >>> >>> The code for script engine creation and execution is shown below: >>> >>> using System; >>> using System.Collections.Generic; >>> using System.Diagnostics; >>> using System.IO; >>> using System.Linq; >>> using System.Reflection; >>> using System.Text; >>> using System.Threading.Tasks; >>> using IronPython.Hosting; >>> using IronPython.Runtime; >>> using Microsoft.Scripting.Hosting; >>> >>> namespace LynxWikiScripting >>> { >>> public class WikiScriptEngine >>> { >>> private static readonly Lazy scriptEngine = new Lazy(() => { return new WikiScriptEngine(); }, true); >>> >>> private WikiScriptEngine() {} >>> >>> public static ScriptEngine Engine = Python.CreateEngine(new Dictionary() {{ "Debug", true }} ); >>> public static ScriptRuntime Runtime = Engine.Runtime; >>> public static ScriptScope scope = Engine.CreateScope(); >>> >>> >>> public static void Initialize() >>> { >>> string fullPath = Assembly.GetExecutingAssembly().Location; >>> string rootDir = Directory.GetParent(fullPath).FullName; >>> >>> } >>> >>> public static string ExecuteBehavior(string scriptInput) >>> { >>> StringBuilder scriptSource = new StringBuilder(); >>> scriptSource.AppendLine("import clr"); >>> scriptSource.AppendLine(@"clr.AddReferenceToFileAndPath(r'C:\Users\John\Documents\Visual >>> Studio 2012\Projects\LynxWiki\LynxWiki\App_Code\IronWiki.dll')"); >>> scriptSource.AppendLine("import IronWiki"); >>> scriptSource.AppendLine("from IronWiki import UtilityProperties"); >>> scriptSource.AppendLine("from IronWiki import IronWikiSyntax"); >>> scriptSource.Append(scriptInput); >>> try { >>> ScriptSource source = >>> Engine.CreateScriptSourceFromString(scriptSource.ToString(), >>> Microsoft.Scripting.SourceCodeKind.Statements); >>> source.Execute(scope); >>> var varPyNow = String.Empty; >>> scope.TryGetVariable("ScriptOutput", out varPyNow); >>> return varPyNow; >>> } >>> catch (Exception ex) { >>> Debug.Print(ex.Message); >>> return ex.Message; >>> } >>> } >>> } >>> } >>> >>> The unit test code is: >>> >>> using System; >>> using System.Text; >>> using Microsoft.VisualStudio.TestTools.UnitTesting; >>> using LynxWikiScripting; >>> >>> namespace LynxWikiScripting.Tests >>> { >>> [TestClass] >>> public class UnitTest1 >>> { >>> [TestMethod] >>> public void TestIronWikiSyntax() >>> { >>> WikiScriptEngine.Initialize(); >>> StringBuilder scriptSource = new StringBuilder(); >>> scriptSource.AppendLine(); >>> scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()"); >>> scriptSource.AppendLine("so = ''"); >>> scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :"); >>> scriptSource.AppendLine(" so = so + '||' + iwc.Name + >>> '||' + iwc.Description + '''||\\r\\n'''"); >>> scriptSource.AppendLine("ScriptOutput = so"); >>> //scriptSource.AppendLine(""); >>> //scriptSource.AppendLine(""); >>> >>> string result = >>> WikiScriptEngine.ExecuteBehavior(scriptSource.ToString()); >>> >>> Assert.IsNotNull(result); >>> } >>> } >>> } >>> >>> The string returned by the processing of the IronPython script is: >>> >>> ||IronWikiSyntax||A class containing information about the IronWiki >>> ||IronWikiSyntax||syntax|| >>> ||IronWikiClass||The class describing an IronWiki class|| >>> ||IronWikiMember||The class describing an IronWiki member|| >>> ||UtilityProperties||A class that provides a number of utility >>> ||UtilityProperties||properties|| >>> >>> This is a wiki table text showing the result of reflecting the contents of the DSL at its inception. >>> >>> The application code has identical inputs to ExecuteBehavior as the unit test has. I have tried Python.CreateEngine with or without the "debug" option and also with and without the "trace" option. There is no difference in execution behavior based on having or not having the options included. >>> >>> Is there something else I am missing, or can I give more information to help resolve my problem. >>> >>> Thanks >>> >>> John Davidson >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> http://mail.python.org/mailman/listinfo/ironpython-users >>> >>> From bernd.viehmann at googlemail.com Fri Feb 15 10:11:33 2013 From: bernd.viehmann at googlemail.com (Bernd Viehmann) Date: Fri, 15 Feb 2013 10:11:33 +0100 Subject: [Ironpython-users] Need to create a DOT.NET Object[] Message-ID: Hi, I want to use a DataView with a ADO.NET DataTable which has 2 values for indexing. FindRow() need something like this as parameter for every key that is defined: [ in C# ] public DataRowView[] FindRows ( Object[] key ) My Problem is that I have not found how to do this with IPY. Any suggestions?? Mit freundlichen Gr??en Bernd Viehmann Mahrweg 46 41836 H?ckelhoven Tel.: 02433 9640 100 Fax: 02433 9640 109 -------------- next part -------------- An HTML attachment was scrubbed... URL: From williamj at tenbase2.com Fri Feb 15 17:12:05 2013 From: williamj at tenbase2.com (William Johnston) Date: Fri, 15 Feb 2013 11:12:05 -0500 Subject: [Ironpython-users] need assistance with IronClad project Message-ID: From: William Johnston Sent: Friday, February 15, 2013 10:57 AM To: Slide Subject: Re: [Ironpython-users] need assistance with IronClad project Alex: I have made some progress. My python scripts runs fine when run from the IronPython command-line using the following: ipy.exe -X:Frames mytest.py But the attached error occurs when run from C#. I added the correct search paths from the working command-line output. (By printing sys.path.) But I still get the error with the C# app. Here is the sample code to call the Python source file (from Resolver): var lang = Python.CreateLanguageSetup(null); lang.Options["Frames"] = ScriptingRuntimeHelpers.True; var setup = new ScriptRuntimeSetup(); setup.LanguageSetups.Add(lang); var runtime = new ScriptRuntime(setup); var engine = runtime.GetEngine("py"); engine.SetSearchPaths(searchPaths); engine.ExecuteFile(@"E:\Users\William Johnston\Documents\Visual Studio 2010\Projects\Visual Studio Projects\test2\test\test4\mytest.py"); Any suggestions? Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 7:00 PM To: William Johnston Subject: Re: [Ironpython-users] need assistance with IronClad project William, Can't you just explain what the issue is? I for one can't download anything while at work, but can answer questions if they are direct and informed. Thanks, Alex On Wed, Feb 13, 2013 at 4:58 PM, William Johnston wrote: Slide: The project has to be x86 Release. Which is not what I zipped. But still doesn?t run. Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 3:47 PM To: William Johnston Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] need assistance with IronClad project Can you be more descriptive as to issues you are seeing, what is going wrong, what results you are getting vs. what you are expecting? Just throwing a project out there and expecting people to look at it will probably not get you a great amount of help. slide On Wed, Feb 13, 2013 at 1:43 PM, William Johnston wrote: Hello, I created a project that is exactly the same as the IronClad (from Resolver) demo project. Yet, I am getting different results. Can anyone assist me on this? The project files are at: http://tenbase2.com/ironclad%20projects.zip This is my only forum for support. Thank you. _______________________________________________ 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: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not_working_output.txt URL: From rome at Wintellect.com Fri Feb 15 18:08:32 2013 From: rome at Wintellect.com (Keith Rome) Date: Fri, 15 Feb 2013 17:08:32 +0000 Subject: [Ironpython-users] need assistance with IronClad project In-Reply-To: References: Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D3D02FC36@BN1PRD0712MB633.namprd07.prod.outlook.com> "I added the correct search paths from the working command-line output" Can you elaborate on this? The error message seems to point toward a bad search path or a faulty importer as it tries to import a module. 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 [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of William Johnston Sent: Friday, February 15, 2013 11:12 AM To: ironpython-users at python.org Subject: [Ironpython-users] need assistance with IronClad project From: William Johnston Sent: Friday, February 15, 2013 10:57 AM To: Slide Subject: Re: [Ironpython-users] need assistance with IronClad project Alex: I have made some progress. My python scripts runs fine when run from the IronPython command-line using the following: ipy.exe -X:Frames mytest.py But the attached error occurs when run from C#. I added the correct search paths from the working command-line output. (By printing sys.path.) But I still get the error with the C# app. Here is the sample code to call the Python source file (from Resolver): var lang = Python.CreateLanguageSetup(null); lang.Options["Frames"] = ScriptingRuntimeHelpers.True; var setup = new ScriptRuntimeSetup(); setup.LanguageSetups.Add(lang); var runtime = new ScriptRuntime(setup); var engine = runtime.GetEngine("py"); engine.SetSearchPaths(searchPaths); engine.ExecuteFile(@"E:\Users\William Johnston\Documents\Visual Studio 2010\Projects\Visual Studio Projects\test2\test\test4\mytest.py"); Any suggestions? Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 7:00 PM To: William Johnston Subject: Re: [Ironpython-users] need assistance with IronClad project William, Can't you just explain what the issue is? I for one can't download anything while at work, but can answer questions if they are direct and informed. Thanks, Alex On Wed, Feb 13, 2013 at 4:58 PM, William Johnston > wrote: Slide: The project has to be x86 Release. Which is not what I zipped. But still doesn't run. Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 3:47 PM To: William Johnston Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] need assistance with IronClad project Can you be more descriptive as to issues you are seeing, what is going wrong, what results you are getting vs. what you are expecting? Just throwing a project out there and expecting people to look at it will probably not get you a great amount of help. slide On Wed, Feb 13, 2013 at 1:43 PM, William Johnston > wrote: Hello, I created a project that is exactly the same as the IronClad (from Resolver) demo project. Yet, I am getting different results. Can anyone assist me on this? The project files are at: http://tenbase2.com/ironclad%20projects.zip This is my only forum for support. Thank you. _______________________________________________ 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 williamj at tenbase2.com Fri Feb 15 20:26:15 2013 From: williamj at tenbase2.com (William Johnston) Date: Fri, 15 Feb 2013 14:26:15 -0500 Subject: [Ironpython-users] need assistance with IronClad project Message-ID: From: William Johnston Sent: Friday, February 15, 2013 1:00 PM To: Keith Rome Subject: RE: [Ironpython-users] need assistance with IronClad project Mr. Rome: Here is my C# code to include search paths from the attached file. (Which shows the paths for the command-line execution.) ICollection searchPaths = new List(); searchPaths.Add(@"E:\Users\William Johnston\Documents\Visual Studio 2010\Projects\Visual Studio Projects\test2\test\test4"); searchPaths.Add(@"."); searchPaths.Add(@"E:\Program Files (x86)\IronPython 2.6 for .NET 4.0"); searchPaths.Add(@"E:\Python26\lib"); searchPaths.Add(@"E:\Python26\lib\site-packages"); searchPaths.Add(@"E:\Python26\dlls"); searchPaths.Add(@"E:\ironclad-v2.6net40-EXPERIMENTAL-bin"); searchPaths.Add(@"E:\Users\William Johnston\Documents\Visual Studio 2010\Projects\Visual Studio Projects\test2\test\test4"); searchPaths.Add(@"E:\Program Files (x86)\IronPython 2.6 for .NET 4.0\Lib"); searchPaths.Add(@"E:\Program Files (x86)\IronPython 2.6 for .NET 4.0\DLLs"); searchPaths.Add(@"E:\Program Files (x86)\IronPython 2.6 for .NET 4.0\lib\site-packages"); searchPaths.Add(@"E:\Program Files (x86)\IronPython 2.6 for .NET 4.0\lib\site-packages\subprocess"); engine.SetSearchPaths(searchPaths); All paths are included from the attached file. The complete project can be downloaded at: http://tenbase2.com/dlr%20project.zip Thank you. Sincerely, William Johnston From: Keith Rome Sent: Friday, February 15, 2013 12:08 PM To: William Johnston ; ironpython-users at python.org Subject: ****SPAM**** RE: [Ironpython-users] need assistance with IronClad project ?I added the correct search paths from the working command-line output? Can you elaborate on this? The error message seems to point toward a bad search path or a faulty importer as it tries to import a module. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | mailto:rome at wintellect.com www.wintellect.com From: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of William Johnston Sent: Friday, February 15, 2013 11:12 AM To: ironpython-users at python.org Subject: [Ironpython-users] need assistance with IronClad project From: William Johnston Sent: Friday, February 15, 2013 10:57 AM To: Slide Subject: Re: [Ironpython-users] need assistance with IronClad project Alex: I have made some progress. My python scripts runs fine when run from the IronPython command-line using the following: ipy.exe -X:Frames mytest.py But the attached error occurs when run from C#. I added the correct search paths from the working command-line output. (By printing sys.path.) But I still get the error with the C# app. Here is the sample code to call the Python source file (from Resolver): var lang = Python.CreateLanguageSetup(null); lang.Options["Frames"] = ScriptingRuntimeHelpers.True; var setup = new ScriptRuntimeSetup(); setup.LanguageSetups.Add(lang); var runtime = new ScriptRuntime(setup); var engine = runtime.GetEngine("py"); engine.SetSearchPaths(searchPaths); engine.ExecuteFile(@"E:\Users\William Johnston\Documents\Visual Studio 2010\Projects\Visual Studio Projects\test2\test\test4\mytest.py"); Any suggestions? Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 7:00 PM To: William Johnston Subject: Re: [Ironpython-users] need assistance with IronClad project William, Can't you just explain what the issue is? I for one can't download anything while at work, but can answer questions if they are direct and informed. Thanks, Alex On Wed, Feb 13, 2013 at 4:58 PM, William Johnston wrote: Slide: The project has to be x86 Release. Which is not what I zipped. But still doesn?t run. Regards, William Johnston From: Slide Sent: Wednesday, February 13, 2013 3:47 PM To: William Johnston Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] need assistance with IronClad project Can you be more descriptive as to issues you are seeing, what is going wrong, what results you are getting vs. what you are expecting? Just throwing a project out there and expecting people to look at it will probably not get you a great amount of help. slide On Wed, Feb 13, 2013 at 1:43 PM, William Johnston wrote: Hello, I created a project that is exactly the same as the IronClad (from Resolver) demo project. Yet, I am getting different results. Can anyone assist me on this? The project files are at: http://tenbase2.com/ironclad%20projects.zip This is my only forum for support. Thank you. _______________________________________________ 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: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: output-command-line.txt URL: From no_reply at codeplex.com Sat Feb 16 12:14:18 2013 From: no_reply at codeplex.com (CodePlex) Date: 16 Feb 2013 03:14:18 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/15/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain ---------------------------------------------- ISSUES 1. [New issue] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain http://ironpython.codeplex.com/workitem/33779 User creinke has proposed the issue: "Perhaps it's just my C# ignorance, but I haven't found a way to sandbox this away so that a sandboxed script can't bring down the host. Example: ``` using System; using System.Security; using System.Security.Permissions; using IronPython.Hosting; using Microsoft.Scripting.Hosting; namespace BugReport { class Program { static void Main(string[] args) { AppDomain root = AppDomain.CurrentDomain; AppDomainSetup sandboxSetup = new AppDomainSetup(); sandboxSetup.ApplicationBase = root.SetupInformation.ApplicationBase; PermissionSet sandboxPermissionSet = new PermissionSet(PermissionState.None); AppDomain sandbox = AppDomain.CreateDomain("sandbox", null, sandboxSetup, sandboxPermissionSet); ScriptEngine engine = Python.CreateEngine(sandbox); try { engine.Execute("from socket import *; s = socket(AF_INET, SOCK_STREAM)"); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } // we don't want to wait GC.Collect(); GC.WaitForPendingFinalizers(); Console.WriteLine("Press a key..."); Console.ReadKey(); } } } ``` Exception: ``` System.Security.SecurityException was unhandled Message=Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source=mscorlib StackTrace: at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.Net.Sockets.Socket.get_Handle() at IronPython.Modules.PythonSocket.socket._close() at IronPython.Modules.PythonSocket.socket.Finalize() InnerException: ```" ---------------------------------------------- ---------------------------------------------- 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 pawel.jasinski at gmail.com Sat Feb 16 20:25:09 2013 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Sat, 16 Feb 2013 20:25:09 +0100 Subject: [Ironpython-users] Fwd: Need to create a DOT.NET Object[] In-Reply-To: References: Message-ID: Here is something what may help: >>> import System >>> a=System.Array[System.Object]([42,"foo"]) >>> a[0] 42 >>> a[1] 'foo' It is not answer for your question, but there is another way to use ADO http://pypi.python.org/pypi/adodbapi/2.4.2.2 --pawel On Feb 15, 2013 10:12 AM, "Bernd Viehmann" wrote: > Hi, > > I want to use a DataView with a ADO.NET DataTable which has 2 values for > indexing. > FindRow() need something like this as parameter for every key that is > defined: > > [ in C# ] > > public DataRowView[] FindRows ( > Object[] key > ) > > > > My Problem is that I have not found how to do this with IPY. Any suggestions?? > Mit freundlichen Gr??en > > > Bernd Viehmann > > Mahrweg 46 > > 41836 H?ckelhoven > > > Tel.: 02433 9640 100 > > Fax: 02433 9640 109 > > > _______________________________________________ > 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 bernd.viehmann at googlemail.com Mon Feb 18 12:00:51 2013 From: bernd.viehmann at googlemail.com (Bernd Viehmann) Date: Mon, 18 Feb 2013 12:00:51 +0100 Subject: [Ironpython-users] ASP.NET with ironpython Message-ID: Hallo, I have created a job-exchange online plattform using ASP.NET and IronPython. The startup of webforms sometimes take longer and sometimes they start quit fast. I want to make them start fast every time they are called. Does anybody have some tips for me how to speed-up the start-behavior. Any help or idea is welcome :-) Following things are in my mind: - Is it possible to cache the py-code-behind files in IIS to avoid a interpreter-run to convert them. - Does the pyc-compiler can also be used with asp.net projects? Someone tried that ?? - What is the best IIS-configuration for ipy-web-apps The webside is allready online and we will start a "naerly" public beta-test in the next days. It is using: - IronPython/ASP.net - mongoDB - www.geonames.org data take a look : www.nejoba.net currently it is only german. but this will change in the next weeks. it is a lot fun to work with ipy. thanks to the guys who made it :-) Mit freundlichen Gr??en Bernd Viehmann Mahrweg 46 41836 H?ckelhoven Tel.: 02433 9640 100 Fax: 02433 9640 109 -------------- next part -------------- An HTML attachment was scrubbed... URL: From williamj at tenbase2.com Mon Feb 18 18:07:59 2013 From: williamj at tenbase2.com (William Johnston) Date: Mon, 18 Feb 2013 12:07:59 -0500 Subject: [Ironpython-users] need assistance with IronClad project Message-ID: Hello, Was anyone able to address the IronClad issue? I was able to get a third-party app similar to mine to function (as a WCF Web service with embedded python scripts.) Thank you. Regards, William Johnston -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Feb 18 18:45:08 2013 From: slide.o.mix at gmail.com (Alex Earl) Date: Mon, 18 Feb 2013 09:45:08 -0800 Subject: [Ironpython-users] need assistance with IronClad project Message-ID: <1295758331310754634@unknownmsgid> I don't think anyone currently on this list has done anything with IronClad. It has been "dead" for some time from what I remember. You are basically in uncharted territory at this point. Sent from my Windows Phone ------------------------------ From: William Johnston Sent: 2/18/2013 10:09 To: ironpython-users at python.org Subject: [Ironpython-users] need assistance with IronClad project Hello, Was anyone able to address the IronClad issue? I was able to get a third-party app similar to mine to function (as a WCF Web service with embedded python scripts.) Thank you. Regards, William Johnston -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Mon Feb 18 19:33:29 2013 From: rome at Wintellect.com (Keith Rome) Date: Mon, 18 Feb 2013 18:33:29 +0000 Subject: [Ironpython-users] need assistance with IronClad project In-Reply-To: <1295758331310754634@unknownmsgid> References: <1295758331310754634@unknownmsgid> Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D3D038F32@BN1PRD0712MB633.namprd07.prod.outlook.com> Sorry William this is not an official support channel, so it shouldn't be expected to get any resolution to your issue over the weekend. IronClad appears to be using a rather old version of IronPython (2.6). I am betting that most (if not all) readers on this mailing list are using either 2.7 or 3.0 at this point (2.7 has been out for quite a while). So that is probably a big part of the reason you haven't seen much response. But yeah, it looks like that last activity on IronClad was at least 3.5 years ago. I didn't even know what it was and had to look it up. 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 [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Alex Earl Sent: Monday, February 18, 2013 12:45 PM To: William Johnston; ironpython-users at python.org Subject: Re: [Ironpython-users] need assistance with IronClad project I don't think anyone currently on this list has done anything with IronClad. It has been "dead" for some time from what I remember. You are basically in uncharted territory at this point. Sent from my Windows Phone ________________________________ From: William Johnston Sent: 2/18/2013 10:09 To: ironpython-users at python.org Subject: [Ironpython-users] need assistance with IronClad project Hello, Was anyone able to address the IronClad issue? I was able to get a third-party app similar to mine to function (as a WCF Web service with embedded python scripts.) Thank you. Regards, William Johnston -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Tue Feb 19 05:32:54 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 18 Feb 2013 20:32:54 -0800 Subject: [Ironpython-users] ASP.NET with ironpython In-Reply-To: References: Message-ID: First off, that is awesome. Especially since I had no idea IronPython's webforms support even still worked. :) On Mon, Feb 18, 2013 at 3:00 AM, Bernd Viehmann wrote: > - Is it possible to cache the py-code-behind files in IIS to avoid a > interpreter-run to convert them. I don't think so. However, some versions of IIS have the ability to warm up an application when IIS starts - see http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx for details. > - Does the pyc-compiler can also be used with asp.net projects? Someone > tried that ?? pyc, on the other hand, should work. > - What is the best IIS-configuration for ipy-web-apps I honestly have no idea. It's quite possible you're the first person to deploy a production website using IronPython and ASP.NET. Please share anything that you find. :) - Jeff From no_reply at codeplex.com Tue Feb 19 17:22:04 2013 From: no_reply at codeplex.com (CodePlex) Date: 19 Feb 2013 08:22:04 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/18/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain 2. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain 3. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain 4. [New issue] ipy repl gives IOERROR under cygwin MinTTY ---------------------------------------------- ISSUES 1. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain http://ironpython.codeplex.com/workitem/33779 User MarkusSchaber has commented on the issue: "You should be able to catch the exception by attaching to the UnhandledException event of your appdomain: [http://msdn.microsoft.com/de-de/library/system.appdomain.unhandledexception.aspx](http://msdn.microsoft.com/de-de/library/system.appdomain.unhandledexception.aspx) "----------------- 2. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain http://ironpython.codeplex.com/workitem/33779 User creinke has commented on the issue: "As I understand it, "the UnhandledException event simply notifies you that an exception has gone unhandled, in case you want to try to save state before your thread or application dies." [1] So, yes, I can catch it, but it still brings down the host. [1] http://www.codinghorror.com/blog/2005/02/console-apps-and-appdomain-currentdomain-unhandledexception.html"----------------- 3. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain http://ironpython.codeplex.com/workitem/33779 User jdhardy has commented on the issue: "What I can't quite figure out is why it throws on finalization but not creation, since `socket.Handle` is called from `socket.Initialize()` as well. I also don't know enough about CAS to know if there's a way to make it fail sooner, when it might be possible to handle the error."----------------- 4. [New issue] ipy repl gives IOERROR under cygwin MinTTY http://ironpython.codeplex.com/workitem/33787 User crowell has proposed the issue: "__Overview__ running ipy.exe or ipy64.exe within cygwin's MinTTY console gives an IOERROR __Expected Behavior__ a python console for interacting __Actual Behavior__ console prints (in a loop) ``` >>> Traceback (most recent call last): IOError: [Errno 6] The handle is invalid. ``` if pass the flag -X:ExceptionDetail prints ``` IOError: [Errno 6] The handle is invalid. >>> The handle is invalid. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded) at Microsoft.Scripting.Hosting.Shell.SuperConsole.Initialize() at Microsoft.Scripting.Hosting.Shell.SuperConsole.ReadLine(Int32 autoIndentSize) at Microsoft.Scripting.Hosting.Shell.CommandLine.ReadStatement(Boolean& continueInteraction) at IronPython.Hosting.PythonCommandLine.RunOneInteraction() at IronPython.Hosting.PythonCommandLine.TryInteractiveActionWorker() at IronPython.Hosting.PythonCommandLine.TryInteractiveAction() at Microsoft.Scripting.Hosting.Shell.CommandLine.RunInteractiveLoop() ``` __Workarounds__ pass -X:BasicConsole to get a functioning python REPL. __Related Issues__ perhaps related to this cygwin mintty bug https://code.google.com/p/mintty/issues/detail?id=56" ---------------------------------------------- ---------------------------------------------- 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 Feb 20 10:15:39 2013 From: no_reply at codeplex.com (CodePlex) Date: 20 Feb 2013 01:15:39 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/19/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain ---------------------------------------------- ISSUES 1. [New comment] PythonSocket -- unhandled exception in Finalize() in restricted AppDomain http://ironpython.codeplex.com/workitem/33779 User KeithJRome has commented on the issue: "Most likely has something to do with the fact that the finalization queue is run on the finalizer thread. The finalizer calls _close(), which in turn tries to delist the socket from the static dictionary _handleToSocket. But to get the key used in that dictionary, it uses the Handle property, which makes a CAS demand on SecurityPermissionFlag.UnmanagedCode. And I guess the finalizer thread is not endowed with that permission. Seems like the least nasty fix might be to change how _close() searches for the socket in that dictionary... doing a brute-force lookup by value instead of by key and removing it that way? This would avoid any attempts to dereference the Handle property of the Socket during finalization." ---------------------------------------------- ---------------------------------------------- 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 Feb 21 09:22:25 2013 From: no_reply at codeplex.com (CodePlex) Date: 21 Feb 2013 00:22:25 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/20/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] KeyError on import * from module with __all__ ---------------------------------------------- ISSUES 1. [New issue] KeyError on import * from module with __all__ http://ironpython.codeplex.com/workitem/33793 User creinke has proposed the issue: "Behavior differs from Python. ``` >python test.py Yay! ``` ``` >ipy test.py Traceback (most recent call last): File "test.py", line 1, in KeyError: bar ``` The code to reproduce the issue is attached, and it is trivial: # test.py ``` from foo import * ``` # foo/__init__.py ``` __all__ = [ "bar" ] ``` # foo/bar.py ``` print "Yay!" ```" ---------------------------------------------- ---------------------------------------------- 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 Feb 22 10:29:57 2013 From: no_reply at codeplex.com (CodePlex) Date: 22 Feb 2013 01:29:57 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/21/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] TypeError on joining strings with byte array ---------------------------------------------- ISSUES 1. [New issue] TypeError on joining strings with byte array http://ironpython.codeplex.com/workitem/33807 User creinke has proposed 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 Wed Feb 27 09:26:06 2013 From: no_reply at codeplex.com (CodePlex) Date: 27 Feb 2013 00:26:06 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 2/26/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Unable to compile dictionary that contains tuples ---------------------------------------------- ISSUES 1. [New issue] Unable to compile dictionary that contains tuples http://ironpython.codeplex.com/workitem/33824 User tolaw has proposed the issue: "When trying to compile a py file that contains ``` x = {3: (4, 5)} ``` using ```clr.CompileModules``` results in ``` SystemError: CompileToMethod cannot compile constant '('4', 5)' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value. ``` This issue was supposed to be fixed in [issue 29390](http://ironpython.codeplex.com/workitem/29390) but it wasn't" ---------------------------------------------- ---------------------------------------------- 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 doug.blank at gmail.com Wed Feb 27 14:13:22 2013 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 27 Feb 2013 08:13:22 -0500 Subject: [Ironpython-users] IronPython localization? Message-ID: What support does IronPython have for localization for itself? In other words, what support does it have for showing, say, Python error messages in another human language? Could it use CPython's locale, gettext files? -Doug From jdhardy at gmail.com Wed Feb 27 22:21:33 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 27 Feb 2013 13:21:33 -0800 Subject: [Ironpython-users] IronPython localization? In-Reply-To: References: Message-ID: On Wed, Feb 27, 2013 at 5:13 AM, Doug Blank wrote: > What support does IronPython have for localization for itself? In > other words, what support does it have for showing, say, Python error > messages in another human language? Could it use CPython's locale, > gettext files? There's nothing, as far as I know. .NET has pretty good localization support, but it would have to be plumbed all through IronPython. - Jeff