From prathima548 at gmail.com Fri Dec 1 04:45:23 2017 From: prathima548 at gmail.com (prathima shettigar) Date: Fri, 1 Dec 2017 15:15:23 +0530 Subject: [Python.NET] Getting the name of the user-defined functions of python script through c# In-Reply-To: References: Message-ID: Hi, I wanted to get all the functions name in my c# code from python script using Python.Net. I have tried the following method: 1)PyList.Dir():This return the built-in functions along with the user defined...but we want only the user defined. 2)PythonEngine.Eval():-It takes only the expressions as string and throws errors for statements. 3)Also tried the way provided in the link https://mail.python.org/pipermail/pythondotnet/2006-May/000492.html But facing problem in importing Cheetah template.. Can you please confirm regarding the approaches taken? And also suggest me if any other approach available to achieve the same. Regards, Prathima -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Fri Dec 1 09:28:56 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 01 Dec 2017 14:28:56 +0000 Subject: [Python.NET] Getting the name of the user-defined functions of python script through c# In-Reply-To: References: Message-ID: Can you filter user defined methods by excluding the dunder methods? On Fri, Dec 1, 2017, 3:45 AM prathima shettigar wrote: > Hi, > > I wanted to get all the functions name in my c# code from python script > using Python.Net. > > I have tried the following method: > 1)PyList.Dir():This return the built-in functions along with the user > defined...but we want only the user defined. > 2)PythonEngine.Eval():-It takes only the expressions as string and throws > errors for statements. > 3)Also tried the way provided in the link > > https://mail.python.org/pipermail/pythondotnet/2006-May/000492.html > > But facing problem in importing Cheetah template.. > Can you please confirm regarding the approaches taken? > And also suggest me if any other approach available to achieve the same. > > Regards, > Prathima > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prathima548 at gmail.com Mon Dec 4 01:40:45 2017 From: prathima548 at gmail.com (prathima shettigar) Date: Mon, 4 Dec 2017 12:10:45 +0530 Subject: [Python.NET] Filtering of user defined methods In-Reply-To: References: Message-ID: By excluding the Dunder methods I'll be able to filter out just the built-in function...but if my script contains import statements,Then how can I filter out such things.. Do we have anything similar to "inspect.isfunction(x)" in Python.NET just as in python....? -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Mon Dec 4 12:24:38 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Mon, 04 Dec 2017 17:24:38 +0000 Subject: [Python.NET] Filtering of user defined methods In-Reply-To: References: Message-ID: You need to provide more code samples, it is not clear what you are discussing precisely On Mon, Dec 4, 2017, 12:41 AM prathima shettigar wrote: > By excluding the Dunder methods I'll be able to filter out just the > built-in function...but if my script contains import statements,Then how > can I filter out such things.. > Do we have anything similar to "inspect.isfunction(x)" in Python.NET just > as in python....? > _________________________________________________ > 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 Dec 14 01:15:35 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 14 Dec 2017 00:15:35 -0600 Subject: [Python.NET] dropping support for Python 3.3 in pythonnet Message-ID: We are dropping support for Python 3.3 for upcoming release, more details in this issue: https://github.com/pythonnet/pythonnet/issues/270 Thanks, Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From ranyafafi93 at gmail.com Wed Dec 20 15:45:13 2017 From: ranyafafi93 at gmail.com (Ranya Fafi) Date: Wed, 20 Dec 2017 21:45:13 +0100 Subject: [Python.NET] Urgent Bug Report: clr.AddReference Message-ID: Hi, Am trying to use clr.AddReference and clr.AddReferenceToFile, but python(2.7) keeps making this error: Traceback (most recent call last): File "", line 1, in clr.AddReference("UnityEngine")AttributeError: 'module' object has no attribute 'AddReference' How can I fix this? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Wed Dec 20 16:17:47 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Wed, 20 Dec 2017 21:17:47 +0000 Subject: [Python.NET] Urgent Bug Report: clr.AddReference In-Reply-To: References: Message-ID: Did you import clr? Have a look at wiki and tutorial here: https://github.com/pythonnet/pythonnet On Wed, Dec 20, 2017, 2:58 PM Ranya Fafi wrote: > Hi, > Am trying to use clr.AddReference and clr.AddReferenceToFile, but > python(2.7) keeps making this error: > > Traceback (most recent call last): > File "", line 1, in > clr.AddReference("UnityEngine")AttributeError: 'module' object has no attribute 'AddReference' > > How can I fix this? > Thanks in advance. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: