From jdhardy at gmail.com Wed Sep 2 00:25:30 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 1 Sep 2015 15:25:30 -0700 Subject: [Ironpython-users] Licenses shipped with IronPython 2.7.5 In-Reply-To: <727D8E16AE957149B447FE368139F2B56CD1A94D@SERVER10> References: <727D8E16AE957149B447FE368139F2B56CD1A94D@SERVER10> Message-ID: Sorry for the late reply! On Fri, Aug 28, 2015 at 2:44 AM, Markus Schaber wrote: > Hi, > > > it seems that the Licenses shipped with IronPython 2.7.5 are not actually up > to date. > > > > The License.StdLib.txt file seems to be 1:1 copied from the cPython standard > library, which is not appropriate, as IronPython does not ship OpenSSL nor > Berkeley DB, as far as I can see. On the other hand, source files like the > Xmlrpclibpy or validate.py come with their own licenses which are not noted > within said file. Boo. Sorry about that. > > > > That means I?ll need to do a more thorough investigation as we?re > redistributing IronPython, and our lawyers want everything to be clean. > > > > Does any accurate license file for the standard library shipped with > IronPython 2.7.5 exist? Probably not. > > > > If not, would you be interested in a contribution of such a file? Very much so! - Jeff From andypu at zoho.com Sun Sep 6 19:36:00 2015 From: andypu at zoho.com (andy) Date: Sun, 06 Sep 2015 19:36:00 +0200 Subject: [Ironpython-users] Integrating python with unity Message-ID: <55EC7980.20204@zoho.com> Hello, i have a nearly full developed program written in python it uses the Kivy framework which however does not employ a webplayer. I want to migrate it to a webplayer and decided to try it on unity with ironpython. This however does not work since the webplayer has a limited subset not the full subset from .net. Sadly the unity community has little interest in python and cannot really help with this. I wonder if i can get it somehow running. Usually it shows some error about system.reflection when i switch from .net to the subset. If i cannot get it running, Could i compile the python code to .net librarys and access it from c# i have not worked with librarys yet, is there a good tutorial for this maybe? After silverlight is deprecated it seems there are few choices for python on webplayer and multiplatform like android. None of which i know except unity. best greetings Andreas From jdhardy at gmail.com Tue Sep 8 17:38:02 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 8 Sep 2015 08:38:02 -0700 Subject: [Ironpython-users] Integrating python with unity In-Reply-To: <55EC7980.20204@zoho.com> References: <55EC7980.20204@zoho.com> Message-ID: On Sun, Sep 6, 2015 at 10:36 AM, andy wrote: > Hello, > > i have a nearly full developed program written in python it uses the Kivy > framework which however does not employ a webplayer. I want to migrate it to > a webplayer and decided to try it on unity with ironpython. This however > does not work since the webplayer has a limited subset not the full subset > from .net. > > Sadly the unity community has little interest in python and cannot really > help with this. > > > I wonder if i can get it somehow running. Usually it shows some error about > system.reflection when i switch from .net to the subset. I've been meaning to look into Unity for a while but haven't had the time (like so many other things...) Supporting should be possible but it will probably require a custom build of IronPython with the appropriate FEATURE_* flags set in the build.xml file, and the library references pointing at the Unity assemblies instead of the .NET ones (similar to how Silverlight builds are supported). > > If i cannot get it running, > Could i compile the python code to .net librarys and access it from c# i > have not worked with librarys yet, is there a good tutorial for this maybe? No, it still requires the IronPython libraries. There's no static compiler (again, with infinite time...) - Jeff From andypu at zoho.com Fri Sep 11 21:14:46 2015 From: andypu at zoho.com (andy) Date: Fri, 11 Sep 2015 21:14:46 +0200 Subject: [Ironpython-users] Python engine replaced? Message-ID: <55F32826.6070604@zoho.com> Hello ironpython users, I was trying some examples to write a c# script to execute a python file from unity however i always stumbled over 3 problems: 1. Set the path correctly to Path.GetDirectoryName(UnityEngine.Application.dataPath+"/Assets") 2. make UnityEngine and other environment available within python 3. get an error response which does include the line of the error. Its hard to debug code when i dont know where the error is. 4. actually start a file. 1 and 4 i most time managed somehow but i think it is not good code. Can someone point me to an example code that can do all of it? Thanks very much Andy From andypu at zoho.com Sat Sep 12 14:07:04 2015 From: andypu at zoho.com (andy) Date: Sat, 12 Sep 2015 14:07:04 +0200 Subject: [Ironpython-users] execute a python file In-Reply-To: <55F32826.6070604@zoho.com> References: <55F32826.6070604@zoho.com> Message-ID: <55F41568.2000407@zoho.com> Hello, Thankyou very much i solved it myself. On 11.09.2015 21:14, andy wrote: > Hello ironpython users, > > I was trying some examples to write a c# script to execute a python > file from unity however i always stumbled over 3 problems: > 1. Set the path correctly to > Path.GetDirectoryName(UnityEngine.Application.dataPath+"/Assets") > 2. make UnityEngine and other environment available within python > 3. get an error response which does include the line of the error. Its > hard to debug code when i dont know where the error is. > 4. actually start a file. > > 1 and 4 i most time managed somehow but i think it is not good code. > > Can someone point me to an example code that can do all of it? > > Thanks very much > Andy > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users From andypu at zoho.com Sun Sep 13 18:00:51 2015 From: andypu at zoho.com (andy) Date: Sun, 13 Sep 2015 18:00:51 +0200 Subject: [Ironpython-users] Ironpython-users Digest, Vol 52, Issue 3 In-Reply-To: References: Message-ID: <55F59DB3.2060608@zoho.com> Thankyou! I appreciate you looking into this. Since silverlight is deprecated Unity + Ironpython seems to be the only possibility to make a multiplatform program that can run on a browser in python language. > I've been meaning to look into Unity for a while but haven't had the > time (like so many other things...) Supporting should be possible but > it will probably require a custom build of IronPython with the > appropriate FEATURE_* flags set in the build.xml file, and the library > references pointing at the Unity assemblies instead of the .NET ones > (similar to how Silverlight builds are supported). From chris at linestream.com Tue Sep 22 22:36:31 2015 From: chris at linestream.com (Chris Knaack) Date: Tue, 22 Sep 2015 16:36:31 -0400 Subject: [Ironpython-users] Having an issue with using pyc compiled scripts in my C# application. Message-ID: I am using python scripts to extend my C# application. Different configurations can implement concrete instances of interfaces differently. I implement the derived class in python and compile them using pyc. I have unique versions of the files for each configuration but they have the same name in each configuration. If I start fresh and load this modules using clr.AddReference() and import it works fine. If I change configurations, the previous implementations appear to be cached in the system. I will get the concrete implementation of the original configuration not the newer one. I have tried: Adding reload() after all the import statements. Tried making my PythonEngine in a new AppDomain Get an error that Microsoft.Scripting.SourceUnit is not serializable. Any ideas or help would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at codesys.com Wed Sep 23 08:57:08 2015 From: m.schaber at codesys.com (Markus Schaber) Date: Wed, 23 Sep 2015 06:57:08 +0000 Subject: [Ironpython-users] Licenses shipped with IronPython 2.7.5 In-Reply-To: References: <727D8E16AE957149B447FE368139F2B56CD1A94D@SERVER10> Message-ID: <727D8E16AE957149B447FE368139F2B57FA99FAF@SERVER10> Hi, Jeff, Von: Jeff Hardy [mailto:jdhardy at gmail.com] > Sorry for the late reply! No problem, I can also reply late :-) > On Fri, Aug 28, 2015 at 2:44 AM, Markus Schaber wrote: > > it seems that the Licenses shipped with IronPython 2.7.5 are not > > actually up to date. > > > > The License.StdLib.txt file seems to be 1:1 copied from the cPython > > standard library, which is not appropriate, as IronPython does not > > ship OpenSSL nor Berkeley DB, as far as I can see. On the other hand, > > source files like the Xmlrpclibpy or validate.py come with their own > > licenses which are not noted within said file. > > Boo. Sorry about that. > > That means I?ll need to do a more thorough investigation as we?re > > redistributing IronPython, and our lawyers want everything to be clean. > > > > Does any accurate license file for the standard library shipped with > > IronPython 2.7.5 exist? > > Probably not. > > > If not, would you be interested in a contribution of such a file? > > Very much so! See attached the two files we intend to ship with our redistribution of IronPython 2.7.5 embedded into CODESYS. I think they're not 1:1 appropriate to be shipped with pure IronPython due to the introduction sentences at the top of each file, but I still think they're an improvement over the current situation. Feel free to modify and include them into IronPython (or tell me which modifications are needed, so I can rework the file in the way you need it). Btw, what do you think of providing an SPDX file with IronPython? (I guess it will be much easier to do so unce upstream cPython provides such files. See http://spdx.org/SPDX-specifications/spdx-version-2.0) Best regards Markus Schaber CODESYS? a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions 3S-Smart Software Solutions GmbH Dipl.-Inf. Markus Schaber | Product Development Core Technology Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 | Fax +49-831-54031-50 E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com CODESYS forum: http://forum.codesys.com Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Sep 23 18:00:03 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 23 Sep 2015 09:00:03 -0700 Subject: [Ironpython-users] Licenses shipped with IronPython 2.7.5 In-Reply-To: <727D8E16AE957149B447FE368139F2B57FA99FAF@SERVER10> References: <727D8E16AE957149B447FE368139F2B56CD1A94D@SERVER10> <727D8E16AE957149B447FE368139F2B57FA99FAF@SERVER10> Message-ID: On Tue, Sep 22, 2015 at 11:57 PM, Markus Schaber > > See attached the two files we intend to ship with our redistribution > of IronPython 2.7.5 embedded into CODESYS. > > I think they're not 1:1 appropriate to be shipped with pure IronPython > due to the introduction sentences at the top of each file, but I still > think they're an improvement over the current situation. > > Feel free to modify and include them into IronPython (or tell me which > modifications are needed, so I can rework the file in the way you need it). > I'll taake a look at them and plan to include them in the next release. > > Btw, what do you think of providing an SPDX file with IronPython? > (I guess it will be much easier to do so unce upstream cPython provides > such files. See http://spdx.org/SPDX-specifications/spdx-version-2.0) > > Hm, never heard of it until now. I think I might wait-and-see on that one, until some of IronPython's upstream projects start supporting it. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Thu Sep 24 17:11:44 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 24 Sep 2015 08:11:44 -0700 Subject: [Ironpython-users] Having an issue with using pyc compiled scripts in my C# application. In-Reply-To: References: Message-ID: On Tue, Sep 22, 2015 at 1:36 PM, Chris Knaack wrote: > I am using python scripts to extend my C# application. Different > configurations can implement concrete instances of interfaces differently. > I implement the derived class in python and compile them using pyc. > > I have unique versions of the files for each configuration but they have > the same name in each configuration. > Are they strong-named? I don't recall pyc having that option, but the .NET loader ignores everything except the name (the AssemblyName, not the file name, for added confusion) if the assemblies are not strong-named. > > If I start fresh and load this modules using clr.AddReference() and import > it works fine. > > If I change configurations, the previous implementations appear to be > cached in the system. I will get the concrete implementation of the > original configuration not the newer one. > This makes sense. pyc-compiled assemblies are not unloadable, and since they're not strong-named either the .NET loader assumes they're the same and doesn't load the new one. To verify if that's the case, setup fuslogvw and see what messages it gives when the assemblies are loaded. > I have tried: > > Adding reload() after all the import statements. > This only affects Python modules. Once they're compiled with pyc, the .NET loader gets involved and things get trickier. > Tried making my PythonEngine in a new AppDomain > > Get an error that Microsoft.Scripting.SourceUnit is not serializable. > > An AppDomain should solve the problem, although if there's a bug in AppDomain support in IronPython it obviously doesn't help you (if there's a minimal way to reproduce it can you open an issue on https://github.com/IronLanguages/main/issues?). Strong-naming should also help, since the loader will now consider the version. You should be able to just call sn.exe on the assembly produced by pyc to add this. Finally, if nothing else, you could change the names to to include the version. Hacky, but effective. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Pilger at steinbichler.de Fri Sep 25 16:08:54 2015 From: J.Pilger at steinbichler.de (Pilger Jan) Date: Fri, 25 Sep 2015 14:08:54 +0000 Subject: [Ironpython-users] issubclass throws TypeErrorException Message-ID: <870dead1dfa744a184325ef8fd68183f@EX-02.steinbichler.int> Hi IronPython user message board, I have defined three classes in a C# project: public class BaseClass { } public class SubClass : BaseClass { } public class SubClass : BaseClass { } The following IronPython code throws a TypeErrorException (IronPython 2.7): issubclass(SubClass, BaseClass) Exception-Message: issubclass() arg 1 must be a class Everything works fine when I just remove the generic class or move it to another namespace. Why? What can I do to make this work? Regards -- Jan _____________________________________________________ i.A. Jan Pilger - Development Software - _____________________________________________________ extension: +49 8035 8704-543 phone: +49 8035 8704-0 fax: +49 8035 1010 e-mail: j.pilger at steinbichler.de web: www.steinbichler.de [logo] Steinbichler Optotechnik GmbH Georg-Wiesb?ck-Ring 12, 83115 Neubeuern - Germany CEO: Dr. Marcus Steinbichler HRB 4836 Traunstein _____________________________________________________ [Facebook][LinkedIn][Google+][Twitter][Xing][YouTube] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.gif Type: image/gif Size: 1156 bytes Desc: image003.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.gif Type: image/gif Size: 1099 bytes Desc: image004.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.gif Type: image/gif Size: 1139 bytes Desc: image005.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.gif Type: image/gif Size: 617 bytes Desc: image006.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.gif Type: image/gif Size: 1028 bytes Desc: image007.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.gif Type: image/gif Size: 1172 bytes Desc: image008.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 4008 bytes Desc: image002.jpg URL: From jdhardy at gmail.com Sun Sep 27 19:56:11 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 27 Sep 2015 10:56:11 -0700 Subject: [Ironpython-users] issubclass throws TypeErrorException In-Reply-To: <870dead1dfa744a184325ef8fd68183f@EX-02.steinbichler.int> References: <870dead1dfa744a184325ef8fd68183f@EX-02.steinbichler.int> Message-ID: I'm thinking this might be a bug, where IronPython is getting confused by the generic and non-generic versions of the class. Can you open an issue on https://github.com/IronLanguages/main/issues? - Jeff On Fri, Sep 25, 2015 at 7:08 AM, Pilger Jan wrote: > Hi IronPython user message board, > > > > I have defined three classes in a C# project: > > > > public class BaseClass > > { > > } > > > > public class SubClass : BaseClass > > { > > } > > > > public class SubClass : BaseClass > > { > > } > > > > The following IronPython code throws a TypeErrorException (IronPython 2.7): > > > > issubclass(SubClass, BaseClass) > > > > Exception-Message: issubclass() arg 1 must be a class > > > > Everything works fine when I just remove the generic class or move it to > another namespace. > > > > Why? What can I do to make this work? > > > > Regards > > -- Jan > > > > _____________________________________________________ > > > > i.A. Jan Pilger > > - Development Software - > > _____________________________________________________ > > > > extension: > > +49 8035 8704-543 > > phone: > > +49 8035 8704-0 > > fax: > > +49 8035 1010 > > e-mail: > > j.pilger at steinbichler.de > > web: > > www.steinbichler.de > > > > [image: logo] > > Steinbichler Optotechnik GmbH > Georg-Wiesb?ck-Ring 12, 83115 Neubeuern - Germany > > CEO: Dr. Marcus Steinbichler > HRB 4836 Traunstein > _____________________________________________________ > > [image: Facebook] [image: > LinkedIn] [image: > Google+] [image: > Twitter] [image: Xing] > [image: > YouTube] > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.gif Type: image/gif Size: 1028 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.gif Type: image/gif Size: 1139 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.gif Type: image/gif Size: 1156 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.gif Type: image/gif Size: 617 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image008.gif Type: image/gif Size: 1172 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.gif Type: image/gif Size: 1099 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 4008 bytes Desc: not available URL: