From denis.akhiyarov at gmail.com Mon Feb 8 00:15:15 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Sun, 7 Feb 2016 23:15:15 -0600 Subject: [Python.NET] pythonnet 2.1 release Message-ID: Can we find out what is blocking to release pythonnet 2.1 without ".dev0" tag on it? WinPython distribution is considering pythonnet for inclusion once this stable version is released. What are the issues blocking merging develop into master branch and then release this on pypi? The only issue I see is python 3.5 support: https://github.com/pythonnet/pythonnet/issues/103 Finally should the tests be included with the wheels so that people can run the tests on their specific set of CPython and .NET/Mono platform? Thanks, Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Fri Feb 12 23:12:54 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 12 Feb 2016 22:12:54 -0600 Subject: [Python.NET] Is PythonNET or IronPython still supported? Message-ID: discussion about ironpython and pythonnet on reddit: https://www.reddit.com/r/Python/comments/45gfy1/is_pythonnet_or_ironpython_still_supported/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Thu Feb 18 10:19:13 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Thu, 18 Feb 2016 15:19:13 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> Hi all, I have a following problem - I installed Python and am calling PythonEngine.Initialize() from C#. I get following exception: The value should not be NULL. Parameter name: key. The software is running on Windows Server 2012 R2. Does anybody know what could be the problem ? Thanks ! Best, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Thu Feb 18 11:28:04 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 18 Feb 2016 10:28:04 -0600 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> Message-ID: Hi Kresimir, Which python version, x86 or x64, .NET, which pythonnet version and how you installed it? Is python registered in your path environment variable? If not, then you need to specify PYTHONPATH Cheers, Denis On Thursday, February 18, 2016, Simunic,Kresimir < Kresimir.Simunic at reicofil.com> wrote: > Hi all, > > > > I have a following problem ? I installed Python and am calling > PythonEngine.Initialize() from C#. > > > > I get following exception: > > > > The value should not be NULL. > > Parameter name: key. > > > > The software is running on Windows Server 2012 R2. > > > > Does anybody know what could be the problem ? > > > > Thanks ! > > > > Best, > > > > Kresimir. > > > > > *Reifenh?user Reicofil GmbH & Co. KG* > Spicher Stra?e 46, 53844 Troisdorf, Germany > Registergericht Siegburg, Reg.Nr. HR A 4534 > USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 > Reifenh?user Reicofil Verwaltungs-GmbH > Registergericht Siegburg, Reg.Nr. HR B 788 > Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze > > Please note: This message may contain information which is privileged, > confidential and proprietary. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Thu Feb 18 12:32:53 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Thu, 18 Feb 2016 17:32:53 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> Hi Denis, I have actually 3 different computers, one has Windows 7, one has Windows Server 2008, and one Windows Server 2012 R2. Only Windows Server 2012 R2 is trouble maker. I installed pythonnet the same way on all machines: - i downloaded it, and copied python.runtime dll in local directory where my program is - i downloaded winpython and copied its python27.dll into system32 directory It is x64 Version, .NET is 4.0 on all three machines. Thanks, Kresimir. Von: PythonDotNet [mailto:pythondotnet-bounces+kresimir.simunic=reicofil.com at python.org] Im Auftrag von Denis Akhiyarov Gesendet: Donnerstag, 18. Februar 2016 17:28 An: A list for users and developers of Python for .NET Betreff: Re: [Python.NET] PythonEngine.Initialize() exception Hi Kresimir, Which python version, x86 or x64, .NET, which pythonnet version and how you installed it? Is python registered in your path environment variable? If not, then you need to specify PYTHONPATH Cheers, Denis On Thursday, February 18, 2016, Simunic,Kresimir > wrote: Hi all, I have a following problem ? I installed Python and am calling PythonEngine.Initialize() from C#. I get following exception: The value should not be NULL. Parameter name: key. The software is running on Windows Server 2012 R2. Does anybody know what could be the problem ? Thanks ! Best, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Thu Feb 18 13:40:03 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Thu, 18 Feb 2016 18:40:03 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE675EB7@VM-Server78.local.reifenhauser.com> Hi Denis, Here is the exception stack. Maybe it helps you to know the problem ? 18.02.2016 19:38:02: Initialisation Error : System.ArgumentNullException: Der Wert darf nicht NULL sein. Parametername: key bei System.Collections.Generic.Dictionary`2.FindEntry(TKey key) bei System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) bei Python.Runtime.GenericUtil.Register(Type t) bei Python.Runtime.AssemblyManager.ScanAssembly(Assembly assembly) bei Python.Runtime.AssemblyManager.Initialize() bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei LM_Console.Program.ModelType2_Init() bei LM_Console.Program.Main(String[] args) Best, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r_foskett at hotmail.com Thu Feb 18 14:10:21 2016 From: r_foskett at hotmail.com (Rog F) Date: Thu, 18 Feb 2016 19:10:21 +0000 Subject: [Python.NET] TypeError: unindexable object Message-ID: Hello, I'm trying to set an object property based on an indexer as described in the C# example here: https://msdn.microsoft.com/en-us/library/hh964567.aspx, but both examples fail with "TypeError: unindexable object" Python code looks like this: criteria = ManagementPackClassCriteria("Name = 'Microsoft.Windows.Computer'") classes = mg.EntityTypes.GetClasses(criteria) CIClass = classes[0] instance = CreatableEnterpriseManagementObject(mg, CIClass) print "instance: "+str(instance) # this isnt None mprop = CIClass["PrincipalName"] instance[mprop].Value = "foo" C# .NET equivalent would be something like this: ManagementPackClass CIClass = mp.GetClass("Microsoft.Windows.Computer"); ManagementPackProperty mprop = CIClass["PrincipalName"]; instance[mprop].Value = "foo"; Error appears to be thrown in pythonnet classobject.cs (https://github.com/pythonnet/pythonnet/blob/master/src/runtime/classobject.cs#L174) Are there any back doors through pythonnet/System.Runtime.something that i can use to get around this? Works fine with IronPython, however i cant package up & use AWS boto3 library with IronPython which i also need (but can with py2exe + pythonnet) - so ideally want to use pythonnet. Thanks! Roger -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Thu Feb 18 15:06:50 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 18 Feb 2016 14:06:50 -0600 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> Message-ID: Where did you download pythonnet from? Which version/branch? On Thursday, February 18, 2016, Simunic,Kresimir < Kresimir.Simunic at reicofil.com> wrote: > > > Hi Denis, > > > > I have actually 3 different computers, one has Windows 7, one has Windows > Server 2008, and one Windows Server 2012 R2. > > > > Only Windows Server 2012 R2 is trouble maker. > > > > I installed pythonnet the same way on all machines: > > > > - i downloaded it, and copied python.runtime dll in local directory > where my program is > > - i downloaded winpython and copied its python27.dll into system32 > directory > > > > It is x64 Version, .NET is 4.0 on all three machines. > > > > Thanks, > > > > Kresimir. > > > > *Von:* PythonDotNet [mailto:pythondotnet-bounces+kresimir.simunic > = > reicofil.com at python.org > ] *Im Auftrag > von *Denis Akhiyarov > *Gesendet:* Donnerstag, 18. Februar 2016 17:28 > *An:* A list for users and developers of Python for .NET > *Betreff:* Re: [Python.NET] PythonEngine.Initialize() exception > > > > Hi Kresimir, > > > > Which python version, x86 or x64, .NET, which pythonnet version and how > you installed it? > > > > Is python registered in your path environment variable? > > > > If not, then you need to specify PYTHONPATH > > > > Cheers, > > Denis > > On Thursday, February 18, 2016, Simunic,Kresimir < > Kresimir.Simunic at reicofil.com > > wrote: > > Hi all, > > > > I have a following problem ? I installed Python and am calling > PythonEngine.Initialize() from C#. > > > > I get following exception: > > > > The value should not be NULL. > > Parameter name: key. > > > > The software is running on Windows Server 2012 R2. > > > > Does anybody know what could be the problem ? > > > > Thanks ! > > > > Best, > > > > Kresimir. > > > > > *Reifenh?user Reicofil GmbH & Co. KG* > Spicher Stra?e 46, 53844 Troisdorf, Germany > Registergericht Siegburg, Reg.Nr. HR A 4534 > USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 > Reifenh?user Reicofil Verwaltungs-GmbH > Registergericht Siegburg, Reg.Nr. HR B 788 > Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze > > Please note: This message may contain information which is privileged, > confidential and proprietary. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Thu Feb 18 15:40:10 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Thu, 18 Feb 2016 20:40:10 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com>, Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> ______ i downloaded from https://sourceforge.net/projects/pythonnet/files/ i took the first file CLR 4.0 about .Net framework, i guess on Windows Server 2012 R2 is 4.5 actually. is this ok ? _________________________________ Von: PythonDotNet [pythondotnet-bounces+kresimir.simunic=reicofil.com at python.org]" im Auftrag von "Denis Akhiyarov [denis.akhiyarov at gmail.com] Gesendet: Donnerstag, 18. Februar 2016 21:06 An: A list for users and developers of Python for .NET Betreff: Re: [Python.NET] PythonEngine.Initialize() exception Where did you download pythonnet from? Which version/branch? On Thursday, February 18, 2016, Simunic,Kresimir > wrote: Hi Denis, I have actually 3 different computers, one has Windows 7, one has Windows Server 2008, and one Windows Server 2012 R2. Only Windows Server 2012 R2 is trouble maker. I installed pythonnet the same way on all machines: - i downloaded it, and copied python.runtime dll in local directory where my program is - i downloaded winpython and copied its python27.dll into system32 directory It is x64 Version, .NET is 4.0 on all three machines. Thanks, Kresimir. Von: PythonDotNet [mailto:pythondotnet-bounces+kresimir.simunic=reicofil.com at python.org] Im Auftrag von Denis Akhiyarov Gesendet: Donnerstag, 18. Februar 2016 17:28 An: A list for users and developers of Python for .NET Betreff: Re: [Python.NET] PythonEngine.Initialize() exception Hi Kresimir, Which python version, x86 or x64, .NET, which pythonnet version and how you installed it? Is python registered in your path environment variable? If not, then you need to specify PYTHONPATH Cheers, Denis On Thursday, February 18, 2016, Simunic,Kresimir wrote: Hi all, I have a following problem ? I installed Python and am calling PythonEngine.Initialize() from C#. I get following exception: The value should not be NULL. Parameter name: key. The software is running on Windows Server 2012 R2. Does anybody know what could be the problem ? Thanks ! Best, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. From denis.akhiyarov at gmail.com Thu Feb 18 17:33:30 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 18 Feb 2016 16:33:30 -0600 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> Message-ID: Pythonnet is hosted on GitHub since 2014. GitHub.com/pythonnet Can anyone update sourceforge to point to this new repo? On Thursday, February 18, 2016, Simunic,Kresimir < Kresimir.Simunic at reicofil.com> wrote: > > ______ > i downloaded from > > > https://sourceforge.net/projects/pythonnet/files/ > > i took the first file CLR 4.0 > > about .Net framework, i guess on Windows Server 2012 R2 is 4.5 actually. > > is this ok ? > > _________________________________ > Von: PythonDotNet [pythondotnet-bounces+kresimir.simunic= > reicofil.com at python.org ]" im Auftrag von "Denis > Akhiyarov [denis.akhiyarov at gmail.com ] > Gesendet: Donnerstag, 18. Februar 2016 21:06 > An: A list for users and developers of Python for .NET > Betreff: Re: [Python.NET] PythonEngine.Initialize() exception > > Where did you download pythonnet from? Which version/branch? > > On Thursday, February 18, 2016, Simunic,Kresimir < > Kresimir.Simunic at reicofil.com Kresimir.Simunic at reicofil.com >> wrote: > > Hi Denis, > > I have actually 3 different computers, one has Windows 7, one has Windows > Server 2008, and one Windows Server 2012 R2. > > Only Windows Server 2012 R2 is trouble maker. > > I installed pythonnet the same way on all machines: > > > - i downloaded it, and copied python.runtime dll in local directory > where my program is > > - i downloaded winpython and copied its python27.dll into system32 > directory > > It is x64 Version, .NET is 4.0 on all three machines. > > Thanks, > > Kresimir. > > > Von: PythonDotNet [mailto:pythondotnet-bounces+kresimir.simunic > =reicofil.com at python.org ] Im Auftrag von > Denis Akhiyarov > Gesendet: Donnerstag, 18. Februar 2016 17:28 > An: A list for users and developers of Python for .NET > Betreff: Re: [Python.NET] PythonEngine.Initialize() exception > > Hi Kresimir, > > Which python version, x86 or x64, .NET, which pythonnet version and how > you installed it? > > Is python registered in your path environment variable? > > If not, then you need to specify PYTHONPATH > > Cheers, > Denis > > On Thursday, February 18, 2016, Simunic,Kresimir < > Kresimir.Simunic at reicofil.com > wrote: > Hi all, > > I have a following problem ? I installed Python and am calling > PythonEngine.Initialize() from C#. > > I get following exception: > > The value should not be NULL. > Parameter name: key. > > The software is running on Windows Server 2012 R2. > > Does anybody know what could be the problem ? > > Thanks ! > > Best, > > Kresimir. > > > > Reifenh?user Reicofil GmbH & Co. KG > Spicher Stra?e 46, 53844 Troisdorf, Germany > Registergericht Siegburg, Reg.Nr. HR A 4534 > USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 > Reifenh?user Reicofil Verwaltungs-GmbH > Registergericht Siegburg, Reg.Nr. HR B 788 > Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze > > Please note: This message may contain information which is privileged, > confidential and proprietary. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Thu Feb 18 17:46:00 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 18 Feb 2016 16:46:00 -0600 Subject: [Python.NET] TypeError: unindexable object In-Reply-To: References: Message-ID: Can you include full traceback with debug build of pythonnet from develop branch on GitHub? Also please log this issue to github. On Thursday, February 18, 2016, Rog F wrote: > > Hello, > > > I'm trying to set an object property based on an indexer as described in > the C# example here: > https://msdn.microsoft.com/en-us/library/hh964567.aspx, but both examples > fail with "TypeError: unindexable object" > > > Python code looks like this: > > > criteria = ManagementPackClassCriteria("Name = > 'Microsoft.Windows.Computer'") > classes = mg.EntityTypes.GetClasses(criteria) > CIClass = classes[0] > instance = CreatableEnterpriseManagementObject(mg, CIClass) > print "instance: "+str(instance) # this isnt None > mprop = CIClass["PrincipalName"] > instance[mprop].Value = "foo" > > C# .NET equivalent would be something like this: > > > ManagementPackClass CIClass = mp.GetClass("Microsoft.Windows.Computer"); > ManagementPackProperty mprop = CIClass["PrincipalName"]; > instance[mprop].Value = "foo"; > > Error appears to be thrown in pythonnet classobject.cs ( > https://github.com/pythonnet/pythonnet/blob/master/src/runtime/classobject.cs#L174) > > > > Are there any back doors through pythonnet/System.Runtime.something that i > can use to get around this? Works fine with IronPython, however i cant > package up & use AWS boto3 library with IronPython which i also need (but > can with py2exe + pythonnet) - so ideally want to use pythonnet. > > > Thanks! > > > Roger > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Fri Feb 19 04:38:47 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Fri, 19 Feb 2016 09:38:47 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> Is this the problem with Windows Server 2012 R2 (or .NET 4.5.1) ? Can I download somewhere Python.Runtime DLL where this problem is fixed ? Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Sun Feb 21 00:18:12 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Sat, 20 Feb 2016 23:18:12 -0600 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> Message-ID: You can install from PYPI: pip install pythonnet --pre Which will download and install latest development version of pythonnet (including Python.Runtime.DLL and clr.pyd) corresponding to your python version. Otherwise you can download the latest source on GitHub and recompile in Visual Studio with DebugWin and x86 or x64 configuration, or build the wheel with this command: python.exe ./pythonnet/setup.py bdist_wheel And install this wheel using this command: pip install ./pythonnet/dist/*.whl Where ./ is location of extracted source code and *.whl is name of wheel in dist directory, that depends on python version. Here is the wiki article for troubleshooting: Github.com/denfromufa/pythonnet/wiki/Troubleshooting-FAQ On Friday, February 19, 2016, Simunic,Kresimir < Kresimir.Simunic at reicofil.com> wrote: > > > Is this the problem with Windows Server 2012 R2 (or .NET 4.5.1) ? > > > > Can I download somewhere Python.Runtime DLL where this problem is fixed ? > > > > > > *Reifenh?user Reicofil GmbH & Co. KG* > Spicher Stra?e 46, 53844 Troisdorf, Germany > Registergericht Siegburg, Reg.Nr. HR A 4534 > USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 > Reifenh?user Reicofil Verwaltungs-GmbH > Registergericht Siegburg, Reg.Nr. HR B 788 > Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze > > Please note: This message may contain information which is privileged, > confidential and proprietary. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From SSchukat at dspace.de Mon Feb 22 09:08:57 2016 From: SSchukat at dspace.de (Stefan Schukat) Date: Mon, 22 Feb 2016 14:08:57 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> Message-ID: <19A216758DA7374193F26E107EDA37EA01AB9CB38A@Exchange2010.dspace.de> Hello, use the version from GitHub https://github.com/pythonnet/pythonnet Starting with the 4.5.X runtime there are types which do not have a namespace. Hence the original code which uses the namespace of a type internal static void Register(Type t) { Dictionary> nsmap = null; mapping.TryGetValue(t.Namespace, out nsmap); will throw an ArgumentNullException. This code is corrected in the github version: internal static void Register(Type t) { if (null == t.Namespace || null == t.Name) return; Regards Stefan From: PythonDotNet [mailto:pythondotnet-bounces+sschukat=dspace.de at python.org] On Behalf Of Simunic,Kresimir Sent: Friday, February 19, 2016 10:39 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] PythonEngine.Initialize() exception Is this the problem with Windows Server 2012 R2 (or .NET 4.5.1) ? Can I download somewhere Python.Runtime DLL where this problem is fixed ? Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Mon Feb 22 05:51:09 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Mon, 22 Feb 2016 10:51:09 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE67E1ED@VM-Server78.local.reifenhauser.com> Hi Denis, Thank you for you answer. Do you think new recompiled version will work on Windows Server 2012 R2 ? Would it be possible you send me Python.Runtime.DLL ? Thanks, Regards, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Mon Feb 22 08:53:32 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Mon, 22 Feb 2016 13:53:32 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE68023A@VM-Server78.local.reifenhauser.com> Hi Denis, I followed your instruction with the pip and it seems that it is working ! Thanks a lot ! Regards, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kresimir.Simunic at Reicofil.com Mon Feb 22 09:46:03 2016 From: Kresimir.Simunic at Reicofil.com (Simunic,Kresimir) Date: Mon, 22 Feb 2016 14:46:03 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <19A216758DA7374193F26E107EDA37EA01AB9CB38A@Exchange2010.dspace.de> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> <19A216758DA7374193F26E107EDA37EA01AB9CB38A@Exchange2010.dspace.de> Message-ID: <140586760BB9EB4B915EB258E3CFB7C0FE68024E@VM-Server78.local.reifenhauser.com> Hi Stefan, Thank you for your suggestion. But I tried as Denis suggested me, to download latest Python.Runtime DLL with pip and installed it together with my application on Windows Server 2012 R2 and it worked. Is there any advantage of your approach ? Regards, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From SSchukat at dspace.de Tue Feb 23 02:00:25 2016 From: SSchukat at dspace.de (Stefan Schukat) Date: Tue, 23 Feb 2016 07:00:25 +0000 Subject: [Python.NET] PythonEngine.Initialize() exception In-Reply-To: <140586760BB9EB4B915EB258E3CFB7C0FE68024E@VM-Server78.local.reifenhauser.com> References: <140586760BB9EB4B915EB258E3CFB7C0FE675E72@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE675EA0@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE676F08@VM-Server78.local.reifenhauser.com> <140586760BB9EB4B915EB258E3CFB7C0FE677F72@VM-Server78.local.reifenhauser.com> <19A216758DA7374193F26E107EDA37EA01AB9CB38A@Exchange2010.dspace.de> <140586760BB9EB4B915EB258E3CFB7C0FE68024E@VM-Server78.local.reifenhauser.com> Message-ID: <19A216758DA7374193F26E107EDA37EA01AB9CB7F8@Exchange2010.dspace.de> Hi Kresimir, the pip version is based on the source in GIT. Hence you are using the solution I suggested. Regards Stefan From: PythonDotNet [mailto:pythondotnet-bounces+sschukat=dspace.de at python.org] On Behalf Of Simunic,Kresimir Sent: Monday, February 22, 2016 3:46 PM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] PythonEngine.Initialize() exception Hi Stefan, Thank you for your suggestion. But I tried as Denis suggested me, to download latest Python.Runtime DLL with pip and installed it together with my application on Windows Server 2012 R2 and it worked. Is there any advantage of your approach ? Regards, Kresimir. Reifenh?user Reicofil GmbH & Co. KG Spicher Stra?e 46, 53844 Troisdorf, Germany Registergericht Siegburg, Reg.Nr. HR A 4534 USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426 Reifenh?user Reicofil Verwaltungs-GmbH Registergericht Siegburg, Reg.Nr. HR B 788 Gesch?ftsf?hrer: Dr.-Ing. Bernd Kunze Please note: This message may contain information which is privileged, confidential and proprietary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahibra at gmail.com Tue Feb 23 13:34:13 2016 From: mahibra at gmail.com (Matthias Hillenbrand) Date: Tue, 23 Feb 2016 19:34:13 +0100 Subject: [Python.NET] Casting an object to a different interface Message-ID: <002001d16e68$cb6568d0$62303a70$@gmail.com> Hi, The Python win32com module for accessing COM objects provides a method CastTo for casting an object to a different interface. Similarly, in my application, I have to cast an object to another .Net interface. Does Python.Net provide such a method or can you describe a way of doing the casting using C# libraries? Here is a small example: I have an object of type ILDERow and want to cast it to ISurfaceCoordinateBreak. Using win32com this can be done in the following way: from win32com.client import CastTo cbSurface = CastTo(surface, "ISurfaceCoordinateBreak") Thank you very much! Best regards, Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Thu Feb 25 23:42:42 2016 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 25 Feb 2016 22:42:42 -0600 Subject: [Python.NET] Casting an object to a different interface In-Reply-To: <002001d16e68$cb6568d0$62303a70$@gmail.com> References: <002001d16e68$cb6568d0$62303a70$@gmail.com> Message-ID: simple google search revealed this example from Bryan Lloyd for casting to interface: https://mail.python.org/pipermail/pythondotnet/2007-December/000753.html Let us know if it works: >* from mynamespace import Foo, Iface *> >* inst = Foo() # create an instance *> >* wrapped = Iface(inst) # 'cast' to the interface *> >* wrapped.Func() # should now work* On Tue, Feb 23, 2016 at 12:34 PM, Matthias Hillenbrand wrote: > Hi, > > > > The Python win32com module for accessing COM objects provides a method > CastTo for casting an object to a different interface. > > Similarly, in my application, I have to cast an object to another .Net > interface. Does Python.Net provide such a method or can you describe a > way of doing the casting using C# libraries? > > > > Here is a small example: > > I have an object of type ILDERow and want to cast it to > ISurfaceCoordinateBreak. Using win32com this can be done in the following > way: > > *from *win32com.client *import CastTo* > > cbSurface = CastTo(surface, *"ISurfaceCoordinateBreak"*) > > > > Thank you very much! > > > > Best regards, > > Matthias > > > > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahibra at gmail.com Mon Feb 29 16:53:25 2016 From: mahibra at gmail.com (Matthias Hillenbrand) Date: Mon, 29 Feb 2016 22:53:25 +0100 Subject: [Python.NET] Casting an object to a different interface Message-ID: <002201d1733b$9decc6a0$d9c653e0$@gmail.com> Thanks! Bryan Loyd's method of casting to an interface seems to be what I am looking for. However, I get an error in combination with the commercial API: > surfaceCB = ZOSAPI.Editors.LDE.ISurfaceCoordinateBreak(surface) E TypeError: object does not implement ISurfaceCoordinateBreak I will try to get a further hint from the support of the commercial software I am struggling with. -------------- next part -------------- An HTML attachment was scrubbed... URL: