From denis.akhiyarov at gmail.com Thu Jun 8 07:50:58 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Thu, 8 Jun 2017 06:50:58 -0500 Subject: [Python.NET] Python for .NET - At Microsoft Houston Message-ID: Python for .NET location: At Microsoft Houston - Town & Country Thursday, June 08, 2017 6:30 PM - 8:30 PM http://hdnug.org/events_view.aspx?eventid=137 -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Fri Jun 9 08:02:53 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 09 Jun 2017 12:02:53 +0000 Subject: [Python.NET] =?utf-8?q?PyData_Seattle=2C_Microsoft_-_Python_for_?= =?utf-8?q?=2ENET_or_=2ENET_for_Python_Denis_Akhiyarov=2C_Xavier_Du?= =?utf-8?q?pr=C3=A9?= Message-ID: https://pydata.org/seattle2017/schedule/presentation/61/ Python for .NET or .NET for Python Denis Akhiyarov, Xavier Dupr? Audience level: Intermediate Description For long time .NET developers wanted to tap into the rich libraries from SciPy and PyData communities. Bridging .NET and CPython runtimes is the easiest approach to solving this problem! Python for .NET (pythonnet, Python.NET) makes this possible by wrapping CPython C-API from C# in .NET and Mono runtimes. This also allows two-way inter-operability between both runtimes on Windows, Linux, and OSX. Abstract For long time .NET developers wanted to tap into the rich libraries from SciPy and PyData communities. Bridging .NET and CPython runtimes is the easiest approach to solving this problem. Python for .NET (pythonnet, Python.NET) makes this possible by wrapping CPython C-API from C# in .NET and Mono runtimes. This also allows two-way interoperability between both runtimes on Windows, Linux, and OSX (MacOS), and even Linux subsystem on Windows! This presentation is going to show how to use Python code from .NET and .NET assemblies from Python. Particular importance in Python.NET is given to installation options: Python wheels, conda and nuget binaries, docker images, and even distribution with WinPython. The deployment is also simplified with tools such as PyInstaller and cx_freeze. This presentation will show how to install and deploy Python.NET apps using these tools. In this talk we are going to show how to call numpy, scipy, pandas, matplotlib, sympy, and pyomo from .NET without much boilerplate code. The second part will show how to use .NET from Python, particularly C# magic cells (clrmagic) in ipython kernel with Jupyter Notebooks. The Python.NET tutorial was converted to Jupyter Notebook and C# code cells that are embedded within the same notebook. This presentation will show few demos with REPL experience both from C# and Python using IPython, scriptcs, and Visual Studio. All libraries used in this presentation are open-source and available on all major platforms. Python for .NET is a library developed since 2003, which "graduated" from Zope, moved to SourceForge and eventually to GitHub, where it became widely used and adopted. This talk will also demonstrate clrmagic - Jupyter extension, built on top of pythonnet and developed by authors of this presentation. Python.NET is built with a number of open-source technologies. It uses pycparser, ply, and clang (gcc and MSVC also work) for parsing internal CPython structures. .NET types are exposed to Python with Unmanaged Exports (DllExport) open-source "compiler" on Windows. On other platforms, C-API of Mono and CPython are used to "bootstrap" both runtimes. Python.NET is used by financial algorithmic trading platforms, engineering companies, and few open-source projects: QuantConnect Lean, pywebview, Pybee Beeware Toga cross-platform UI toolkit. Python.NET enables large .NET applications to embed numerical Python libraries without boilerplate code and without sacrificing for performance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Sat Jun 17 19:35:21 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Sat, 17 Jun 2017 18:35:21 -0500 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: Hi Steve, PyScope feature has been merged into master. Please note that more changes were made to the implementation. I would like to thank Wenguang Yang (@yagweb) for his patience with few months of review cycle. We are planning a release soon, but would appreciate any feedback for using this new API. Thanks, Denis On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov wrote: > Hi Steve, > > I updated installation instructions for latest master or for branches from > pending pull requests: > > https://github.com/pythonnet/pythonnet/wiki/Installation > > `pip install git+https://github.com/yagweb/pythonnet at add_scope` > > > > > Collecting git+https://github.com/yagweb/pythonnet at add_scope > Cloning https://github.com/yagweb/pythonnet (to add_scope) to > c:\users\denis~1 > .akh\appdata\local\temp\pip-ifcgye-build > Installing collected packages: pythonnet > Found existing installation: pythonnet 2.2.2 > Uninstalling pythonnet-2.2.2: > Successfully uninstalled pythonnet-2.2.2 > Running setup.py install for pythonnet ... done > Successfully installed pythonnet-2.4.0.dev0 > > > > Thanks, > Denis > > On Fri, Apr 28, 2017, 5:58 AM WARD Steve wrote: > >> Hi Denis, >> >> >> >> Ok, well I?d be happy to build from source and try out the proposed new >> feature here, if that?s possible? >> >> >> >> Thanks >> >> Steve >> >> >> >> *From:* PythonDotNet [mailto:pythondotnet-bounces+steve.ward= >> oxinst.com at python.org] *On Behalf Of *Denis Akhiyarov >> *Sent:* 26 April 2017 15:58 >> *To:* A list for users and developers of Python for .NET >> *Subject:* -|EXT|- Re: [Python.NET] PyScope >> >> >> >> Hi Steve Ward, >> >> We are waiting for at least one more core developer to review and approve >> this pull request. >> >> Since it is very large code addition and exposes a lot of API, this is >> taking some time. >> >> If you have any feedback or input, then feel free to comment on the issue >> or pull request. >> >> For now (before PyScope is merged) you can use this very simple API using >> dynamic (DLR): >> >> https://github.com/pythonnet/pythonnet/blob/master/README.md >> >> There is underlying API without DLR, but only available in tests. >> >> Regards, >> Denis >> >> >> >> On Wed, Apr 26, 2017, 9:28 AM WARD Steve wrote: >> >> Hi, >> >> >> >> I?m keen to use the PyScope class as I?m working to replace an IronPython >> interactive scripting environment in a .NET application. I read about this >> feature here: https://github.com/pythonnet/pythonnet/pull/381 >> >> >> >> Is this due for release soon, and is there an alternative way to create >> something similar to a scope with the current release 2.3.0? >> >> >> >> Thanks >> >> Steve Ward >> >> >> >> *Steve Ward* >> Senior Software Engineer >> >> *Oxford Instruments* >> >> >> >> >> >> ____________________________________________________________ >> _______________ >> This e-mail is confidential and is for the addressee only. Please refer >> to >> www.oxinst.com/email-statement for regulatory information. >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> Click here >> >> to report this email as spam. >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From argantonio65 at gmail.com Wed Jun 21 03:26:56 2017 From: argantonio65 at gmail.com (A M) Date: Wed, 21 Jun 2017 09:26:56 +0200 Subject: [Python.NET] Issue not finding Assembly Message-ID: Hello, I'm using ironpython for a while to operate a .dll library. This works, but I need to use some CPython libraries so I would like to try to integrate de .dll in python 2.7 I installed pythonnet through > pip install pythonnet (Windows 7) installing pythonnet-2.3.0-cp27-cp27m-win_amd64.whl I proceeded like in ironpython: import clr import sys sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") clr.AddReference('DHI.Tornado.NET') import TornadoNET and meanwhile in ironpython it works, in using python with pythonnet I get: File "Automated.py", line 32, in clr.AddReference('DHI.Tornado.NET') System.IO.FileNotFoundException: Unable to find assembly 'DHI.Tornado.NET'. at Python.Runtime.CLRModule.AddReference(String Name) DHI.Tornado.NET is a .net 4.0 I read everything I could on previous similar issues, but I haven't been able to solve it. Someone has an idea? Best regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Wed Jun 21 04:12:35 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Wed, 21 Jun 2017 03:12:35 -0500 Subject: [Python.NET] Issue not finding Assembly In-Reply-To: References: Message-ID: Hi, Are you able to load any other .NET dlls with pythonnet? Can you try inspecting the assembly binding log viewer according to this troubleshooting wiki: https://github.com/pythonnet/pythonnet/wiki/Troubleshooting-on-Windows-and-Linux#assembly-binding-errors Also in Process Explorer (Sysinternals tool) you can see if there are any implicit assembly (.DLL) references, e.g. from GAC for CLR2/4 (C:/Windows/assembly, C:/Windows/Microsoft.NET/assembly). ILSPY can generate similar information. Finally try loading this assembly using .NET Reflection API: https://stackoverflow.com/a/6365969/2230844 Thanks for trying pythonnet, Denis On Wed, Jun 21, 2017 at 2:26 AM, A M wrote: > Hello, > > I'm using ironpython for a while to operate a .dll library. This works, > but I need to use some CPython libraries so I would like to try to > integrate de .dll in python 2.7 > > I installed pythonnet through > pip install pythonnet > (Windows 7) installing pythonnet-2.3.0-cp27-cp27m-win_amd64.whl > > I proceeded like in ironpython: > > import clr > import sys > sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") > clr.AddReference('DHI.Tornado.NET') > import TornadoNET > > and meanwhile in ironpython it works, in using python with pythonnet I get: > > File "Automated.py", line 32, in > clr.AddReference('DHI.Tornado.NET') > System.IO.FileNotFoundException: Unable to find assembly 'DHI.Tornado.NET > '. > at Python.Runtime.CLRModule.AddReference(String Name) > > DHI.Tornado.NET is a .net 4.0 > > I read everything I could on previous similar issues, but I haven't been > able to solve it. Someone has an idea? > > Best regards > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nikhilgarg.gju at gmail.com Wed Jun 21 03:53:43 2017 From: nikhilgarg.gju at gmail.com (Nikhil Garg) Date: Wed, 21 Jun 2017 15:53:43 +0800 Subject: [Python.NET] Issue not finding Assembly In-Reply-To: References: Message-ID: have you tried changing sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") to sys.path.append("C:\\Program Files (x86)\\DHI\\2016\\bin") also, just to add, as I also use python with DHI toolbox, and I am assuming it is the case here, you can do it without explicitly setting the path, as when you install DHI tools or MIKE, it creates an environment variable, so you can use something like this sys.path.append(os.path.split(os.path.dirname(os.environ['DHI_MIKE']))[0]) However, to be certain, you can test the output of os.path.split(os.path.dirname(os.environ['DHI_MIKE']))[0] in your python console before using it. On 21 June 2017 at 15:26, A M wrote: > Hello, > > I'm using ironpython for a while to operate a .dll library. This works, > but I need to use some CPython libraries so I would like to try to > integrate de .dll in python 2.7 > > I installed pythonnet through > pip install pythonnet > (Windows 7) installing pythonnet-2.3.0-cp27-cp27m-win_amd64.whl > > I proceeded like in ironpython: > > import clr > import sys > sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") > clr.AddReference('DHI.Tornado.NET') > import TornadoNET > > and meanwhile in ironpython it works, in using python with pythonnet I get: > > File "Automated.py", line 32, in > clr.AddReference('DHI.Tornado.NET') > System.IO.FileNotFoundException: Unable to find assembly 'DHI.Tornado.NET > '. > at Python.Runtime.CLRModule.AddReference(String Name) > > DHI.Tornado.NET is a .net 4.0 > > I read everything I could on previous similar issues, but I haven't been > able to solve it. Someone has an idea? > > Best regards > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > -- Regards Nikhil ***************************************** When the present determines the future, but the approximate present does not approximately determine the future - Edward Lorenz ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Wed Jun 21 04:34:48 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Wed, 21 Jun 2017 03:34:48 -0500 Subject: [Python.NET] PythonNet on Cygwin In-Reply-To: References: Message-ID: pythonnet with Mono now works in Linux Subsystem for Windows 10 and docker containers. More details in this issue: https://mail.python.org/pipermail/pythondotnet/2014-December/001623.html I was not able to get it going in msys or cygwin environment. On Wed, Dec 10, 2014 at 9:23 AM, Denis Akhiyarov wrote: > maybe you can try PythonNET with Mono: > > http://www.mono-project.com/docs/compiling-mono/windows/ > > On Tue, Dec 9, 2014 at 11:28 PM, Nikhil Garg > wrote: > >> Hi Guys, >> >> I was wondering if anyone knows how to make Python for .Net work on >> cygwin installation of python. I have been looking around and find a mixed >> bag of information. If anyone knows of the working version of Python for >> .Net and its dependency, I would appreciate if you could share it with me. >> >> Currently, I am using a generic windows version and it works just fine, >> but I need it to work on Cygwin version of python. I appreciate any helpful >> replies. >> >> Thanks, >> >> Nikhil >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Wed Jun 21 07:06:19 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Wed, 21 Jun 2017 11:06:19 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: Hi Denis, Initial feedback is that it works. Had to change to UCS2 (PYTHON27 already), I am going with 64 bit by the way. Had to figure-out using PyScope.Set() by checking the source. Now that I have a working platform, I have a lot to do to move the project forward. So, thanks very much and I?ll keep you posted. Cheers Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 18 June 2017 00:35 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope Hi Steve, PyScope feature has been merged into master. Please note that more changes were made to the implementation. I would like to thank Wenguang Yang (@yagweb) for his patience with few months of review cycle. We are planning a release soon, but would appreciate any feedback for using this new API. Thanks, Denis On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov > wrote: Hi Steve, I updated installation instructions for latest master or for branches from pending pull requests: https://github.com/pythonnet/pythonnet/wiki/Installation `pip install git+https://github.com/yagweb/pythonnet at add_scope` Collecting git+https://github.com/yagweb/pythonnet at add_scope Cloning https://github.com/yagweb/pythonnet (to add_scope) to c:\users\denis~1 .akh\appdata\local\temp\pip-ifcgye-build Installing collected packages: pythonnet Found existing installation: pythonnet 2.2.2 Uninstalling pythonnet-2.2.2: Successfully uninstalled pythonnet-2.2.2 Running setup.py install for pythonnet ... done Successfully installed pythonnet-2.4.0.dev0 Thanks, Denis On Fri, Apr 28, 2017, 5:58 AM WARD Steve > wrote: Hi Denis, Ok, well I?d be happy to build from source and try out the proposed new feature here, if that?s possible? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 26 April 2017 15:58 To: A list for users and developers of Python for .NET Subject: -|EXT|- Re: [Python.NET] PyScope Hi Steve Ward, We are waiting for at least one more core developer to review and approve this pull request. Since it is very large code addition and exposes a lot of API, this is taking some time. If you have any feedback or input, then feel free to comment on the issue or pull request. For now (before PyScope is merged) you can use this very simple API using dynamic (DLR): https://github.com/pythonnet/pythonnet/blob/master/README.md There is underlying API without DLR, but only available in tests. Regards, Denis On Wed, Apr 26, 2017, 9:28 AM WARD Steve > wrote: Hi, I?m keen to use the PyScope class as I?m working to replace an IronPython interactive scripting environment in a .NET application. I read about this feature here: https://github.com/pythonnet/pythonnet/pull/381 Is this due for release soon, and is there an alternative way to create something similar to a scope with the current release 2.3.0? Thanks Steve Ward Steve Ward Senior Software Engineer Oxford Instruments ___________________________________________________________________________ This e-mail is confidential and is for the addressee only. Please refer to www.oxinst.com/email-statement for regulatory information. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet Click here to report this email as spam. _________________________________________________ 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 Wed Jun 21 12:27:29 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Wed, 21 Jun 2017 16:27:29 +0000 Subject: [Python.NET] Issue not finding Assembly In-Reply-To: References: Message-ID: I just looked again at your problem and noticed that you have 32-bit .NET API, but using 64-bit CPython. Have you tried loading this .NET DLL from 32-bit and 64-bit IronPython or from 32-bit CPython? On Wed, Jun 21, 2017, 2:36 AM A M wrote: > Hello, > > I'm using ironpython for a while to operate a .dll library. This works, > but I need to use some CPython libraries so I would like to try to > integrate de .dll in python 2.7 > > I installed pythonnet through > pip install pythonnet > (Windows 7) installing pythonnet-2.3.0-cp27-cp27m-win_amd64.whl > > I proceeded like in ironpython: > > import clr > import sys > sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") > clr.AddReference('DHI.Tornado.NET') > import TornadoNET > > and meanwhile in ironpython it works, in using python with pythonnet I get: > > File "Automated.py", line 32, in > clr.AddReference('DHI.Tornado.NET') > System.IO.FileNotFoundException: Unable to find assembly 'DHI.Tornado.NET > '. > at Python.Runtime.CLRModule.AddReference(String Name) > > DHI.Tornado.NET is a .net 4.0 > > I read everything I could on previous similar issues, but I haven't been > able to solve it. Someone has an idea? > > Best regards > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From argantonio65 at gmail.com Wed Jun 21 13:59:55 2017 From: argantonio65 at gmail.com (A M) Date: Wed, 21 Jun 2017 19:59:55 +0200 Subject: [Python.NET] Issue not finding Assembly In-Reply-To: References: Message-ID: Indeed, that WAS the issue. My system runs Windows 64-bit but for software issues, I had to run a DHI software on the 32-bit version. Checking I see that the working ironpython version is also 32-bit. Meanwhile my current python version is 64-bit. I installed python 32 bits and installed pythonnet through pip and it works perfectly. Thanks Nikhil and Denis On 21 June 2017 at 18:27, Denis Akhiyarov wrote: > I just looked again at your problem and noticed that you have 32-bit .NET > API, but using 64-bit CPython. Have you tried loading this .NET DLL from > 32-bit and 64-bit IronPython or from 32-bit CPython? > > > > On Wed, Jun 21, 2017, 2:36 AM A M wrote: > >> Hello, >> >> I'm using ironpython for a while to operate a .dll library. This works, >> but I need to use some CPython libraries so I would like to try to >> integrate de .dll in python 2.7 >> >> I installed pythonnet through > pip install pythonnet >> (Windows 7) installing pythonnet-2.3.0-cp27-cp27m-win_amd64.whl >> >> I proceeded like in ironpython: >> >> import clr >> import sys >> sys.path.append("C:/Program Files (x86)/DHI/2016/bin/") >> clr.AddReference('DHI.Tornado.NET') >> import TornadoNET >> >> and meanwhile in ironpython it works, in using python with pythonnet I >> get: >> >> File "Automated.py", line 32, in >> clr.AddReference('DHI.Tornado.NET') >> System.IO.FileNotFoundException: Unable to find assembly 'DHI.Tornado.NET >> '. >> at Python.Runtime.CLRModule.AddReference(String Name) >> >> DHI.Tornado.NET is a .net 4.0 >> >> I read everything I could on previous similar issues, but I haven't been >> able to solve it. Someone has an idea? >> >> Best regards >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Fri Jun 23 07:09:45 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Fri, 23 Jun 2017 11:09:45 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope References: Message-ID: Unable to debug into embedded Python using this test: https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from UCS4 as that throws Unicode errors. Any ideas? Thanks, Steve From: WARD Steve Sent: 21 June 2017 12:06 To: 'A list for users and developers of Python for .NET' Subject: RE: [Python.NET] -|EXT|- Re: PyScope Hi Denis, Initial feedback is that it works. Had to change to UCS2 (PYTHON27 already), I am going with 64 bit by the way. Had to figure-out using PyScope.Set() by checking the source. Now that I have a working platform, I have a lot to do to move the project forward. So, thanks very much and I?ll keep you posted. Cheers Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 18 June 2017 00:35 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope Hi Steve, PyScope feature has been merged into master. Please note that more changes were made to the implementation. I would like to thank Wenguang Yang (@yagweb) for his patience with few months of review cycle. We are planning a release soon, but would appreciate any feedback for using this new API. Thanks, Denis On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov > wrote: Hi Steve, I updated installation instructions for latest master or for branches from pending pull requests: https://github.com/pythonnet/pythonnet/wiki/Installation `pip install git+https://github.com/yagweb/pythonnet at add_scope` Collecting git+https://github.com/yagweb/pythonnet at add_scope Cloning https://github.com/yagweb/pythonnet (to add_scope) to c:\users\denis~1 .akh\appdata\local\temp\pip-ifcgye-build Installing collected packages: pythonnet Found existing installation: pythonnet 2.2.2 Uninstalling pythonnet-2.2.2: Successfully uninstalled pythonnet-2.2.2 Running setup.py install for pythonnet ... done Successfully installed pythonnet-2.4.0.dev0 Thanks, Denis On Fri, Apr 28, 2017, 5:58 AM WARD Steve > wrote: Hi Denis, Ok, well I?d be happy to build from source and try out the proposed new feature here, if that?s possible? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 26 April 2017 15:58 To: A list for users and developers of Python for .NET Subject: -|EXT|- Re: [Python.NET] PyScope Hi Steve Ward, We are waiting for at least one more core developer to review and approve this pull request. Since it is very large code addition and exposes a lot of API, this is taking some time. If you have any feedback or input, then feel free to comment on the issue or pull request. For now (before PyScope is merged) you can use this very simple API using dynamic (DLR): https://github.com/pythonnet/pythonnet/blob/master/README.md There is underlying API without DLR, but only available in tests. Regards, Denis On Wed, Apr 26, 2017, 9:28 AM WARD Steve > wrote: Hi, I?m keen to use the PyScope class as I?m working to replace an IronPython interactive scripting environment in a .NET application. I read about this feature here: https://github.com/pythonnet/pythonnet/pull/381 Is this due for release soon, and is there an alternative way to create something similar to a scope with the current release 2.3.0? Thanks Steve Ward Steve Ward Senior Software Engineer Oxford Instruments ___________________________________________________________________________ This e-mail is confidential and is for the addressee only. Please refer to www.oxinst.com/email-statement for regulatory information. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet Click here to report this email as spam. _________________________________________________ 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 Fri Jun 23 07:31:42 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 23 Jun 2017 11:31:42 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: Hi Steve, Please try reporting to PTVS issue tracker on GitHub with your PTVS log from failed attaching of the Python debugger. Python.NET has no control over these Visual Studio settings. I'm going to meet with developer(s) of PTVS during PyData in Seattle. Feel free to send any feedback that you have so that we can look closer at key issues between pythonnet and PTVS. Particularly we are planning to resolve issues with remote and mixed-mode debugging. UCS and other compilation symbols are resolved by setup.py during build from the Python side. From VS side you have to resolve all these symbols manually. And the latter is really intended only for developers of pythonnet. Thanks, Denis On Fri, Jun 23, 2017, 6:10 AM WARD Steve wrote: > Unable to debug into embedded Python using this test: > https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 > > > > I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet > compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from > UCS4 as that throws Unicode errors. > > > > Any ideas? Thanks, Steve > > > > *From:* WARD Steve > *Sent:* 21 June 2017 12:06 > > > *To:* 'A list for users and developers of Python for .NET' > > *Subject:* RE: [Python.NET] -|EXT|- Re: PyScope > > > > Hi Denis, > > > > Initial feedback is that it works. Had to change to UCS2 (PYTHON27 > already), I am going with 64 bit by the way. Had to figure-out using > PyScope.Set() by checking the source. > > > > Now that I have a working platform, I have a lot to do to move the project > forward. So, thanks very much and I?ll keep you posted. > > > > Cheers > > Steve > > > > *From:* PythonDotNet [ > mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org > ] *On Behalf Of *Denis > Akhiyarov > > > *Sent:* 18 June 2017 00:35 > *To:* A list for users and developers of Python for .NET > *Subject:* Re: [Python.NET] -|EXT|- Re: PyScope > > > > Hi Steve, > > > > PyScope feature has been merged into master. > > Please note that more changes were made to the implementation. > > > > I would like to thank Wenguang Yang (@yagweb) for his patience with few > months of review cycle. > > > > We are planning a release soon, but would appreciate any feedback for > using this new API. > > > > Thanks, > > Denis > > > > On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov < > denis.akhiyarov at gmail.com> wrote: > > Hi Steve, > > > > I updated installation instructions for latest master or for branches from > pending pull requests: > > > > https://github.com/pythonnet/pythonnet/wiki/Installation > > > > `pip install git+https://github.com/yagweb/pythonnet at add_scope` > > > > > > > > > Collecting git+https://github.com/yagweb/pythonnet at add_scope > > Cloning https://github.com/yagweb/pythonnet (to add_scope) to > c:\users\denis~1 > > .akh\appdata\local\temp\pip-ifcgye-build > > Installing collected packages: pythonnet > > Found existing installation: pythonnet 2.2.2 > > Uninstalling pythonnet-2.2.2: > > Successfully uninstalled pythonnet-2.2.2 > > Running setup.py install for pythonnet ... done > > Successfully installed pythonnet-2.4.0.dev0 > > > > > > > > Thanks, > > Denis > > On Fri, Apr 28, 2017, 5:58 AM WARD Steve wrote: > > Hi Denis, > > > > Ok, well I?d be happy to build from source and try out the proposed new > feature here, if that?s possible? > > > > Thanks > > Steve > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+steve.ward= > oxinst.com at python.org] *On Behalf Of *Denis Akhiyarov > *Sent:* 26 April 2017 15:58 > *To:* A list for users and developers of Python for .NET > *Subject:* -|EXT|- Re: [Python.NET] PyScope > > > > Hi Steve Ward, > > We are waiting for at least one more core developer to review and approve > this pull request. > > Since it is very large code addition and exposes a lot of API, this is > taking some time. > > If you have any feedback or input, then feel free to comment on the issue > or pull request. > > For now (before PyScope is merged) you can use this very simple API using > dynamic (DLR): > > https://github.com/pythonnet/pythonnet/blob/master/README.md > > There is underlying API without DLR, but only available in tests. > > Regards, > Denis > > > > On Wed, Apr 26, 2017, 9:28 AM WARD Steve wrote: > > Hi, > > > > I?m keen to use the PyScope class as I?m working to replace an IronPython > interactive scripting environment in a .NET application. I read about this > feature here: https://github.com/pythonnet/pythonnet/pull/381 > > > > Is this due for release soon, and is there an alternative way to create > something similar to a scope with the current release 2.3.0? > > > > Thanks > > Steve Ward > > > > *Steve Ward* > Senior Software Engineer > > *Oxford Instruments* > > > > > > ___________________________________________________________________________ > This e-mail is confidential and is for the addressee only. Please refer > to > www.oxinst.com/email-statement for regulatory information. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > Click here to > report this email as spam. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > _________________________________________________ > 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 Sun Jun 25 00:50:48 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Sat, 24 Jun 2017 23:50:48 -0500 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: All pythonnet debugging scenarios are now working and explained in this detailed tutorial: https://github.com/pythonnet/pythonnet/wiki/Various-debugging-scenarios-of-embedded-CPython On Fri, Jun 23, 2017 at 6:31 AM, Denis Akhiyarov wrote: > Hi Steve, > > Please try reporting to PTVS issue tracker on GitHub with your PTVS log > from failed attaching of the Python debugger. Python.NET has no control > over these Visual Studio settings. > > I'm going to meet with developer(s) of PTVS during PyData in Seattle. Feel > free to send any feedback that you have so that we can look closer at key > issues between pythonnet and PTVS. Particularly we are planning to resolve > issues with remote and mixed-mode debugging. > > UCS and other compilation symbols are resolved by setup.py during build > from the Python side. From VS side you have to resolve all these symbols > manually. And the latter is really intended only for developers of > pythonnet. > > Thanks, > Denis > > On Fri, Jun 23, 2017, 6:10 AM WARD Steve wrote: > >> Unable to debug into embedded Python using this test: >> https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 >> >> >> >> I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet >> compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from >> UCS4 as that throws Unicode errors. >> >> >> >> Any ideas? Thanks, Steve >> >> >> >> *From:* WARD Steve >> *Sent:* 21 June 2017 12:06 >> >> >> *To:* 'A list for users and developers of Python for .NET' >> >> *Subject:* RE: [Python.NET] -|EXT|- Re: PyScope >> >> >> >> Hi Denis, >> >> >> >> Initial feedback is that it works. Had to change to UCS2 (PYTHON27 >> already), I am going with 64 bit by the way. Had to figure-out using >> PyScope.Set() by checking the source. >> >> >> >> Now that I have a working platform, I have a lot to do to move the >> project forward. So, thanks very much and I?ll keep you posted. >> >> >> >> Cheers >> >> Steve >> >> >> >> *From:* PythonDotNet [mailto:pythondotnet-bounces+ >> steve.ward=oxinst.com at python.org >> ] *On Behalf Of *Denis >> Akhiyarov >> >> >> *Sent:* 18 June 2017 00:35 >> *To:* A list for users and developers of Python for .NET >> *Subject:* Re: [Python.NET] -|EXT|- Re: PyScope >> >> >> >> Hi Steve, >> >> >> >> PyScope feature has been merged into master. >> >> Please note that more changes were made to the implementation. >> >> >> >> I would like to thank Wenguang Yang (@yagweb) for his patience with few >> months of review cycle. >> >> >> >> We are planning a release soon, but would appreciate any feedback for >> using this new API. >> >> >> >> Thanks, >> >> Denis >> >> >> >> On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov < >> denis.akhiyarov at gmail.com> wrote: >> >> Hi Steve, >> >> >> >> I updated installation instructions for latest master or for branches >> from pending pull requests: >> >> >> >> https://github.com/pythonnet/pythonnet/wiki/Installation >> >> >> >> `pip install git+https://github.com/yagweb/pythonnet at add_scope` >> >> >> >> >> >> >> >> >> Collecting git+https://github.com/yagweb/pythonnet at add_scope >> >> Cloning https://github.com/yagweb/pythonnet (to add_scope) to >> c:\users\denis~1 >> >> .akh\appdata\local\temp\pip-ifcgye-build >> >> Installing collected packages: pythonnet >> >> Found existing installation: pythonnet 2.2.2 >> >> Uninstalling pythonnet-2.2.2: >> >> Successfully uninstalled pythonnet-2.2.2 >> >> Running setup.py install for pythonnet ... done >> >> Successfully installed pythonnet-2.4.0.dev0 >> >> >> >> >> >> >> >> Thanks, >> >> Denis >> >> On Fri, Apr 28, 2017, 5:58 AM WARD Steve wrote: >> >> Hi Denis, >> >> >> >> Ok, well I?d be happy to build from source and try out the proposed new >> feature here, if that?s possible? >> >> >> >> Thanks >> >> Steve >> >> >> >> *From:* PythonDotNet [mailto:pythondotnet-bounces+steve.ward= >> oxinst.com at python.org] *On Behalf Of *Denis Akhiyarov >> *Sent:* 26 April 2017 15:58 >> *To:* A list for users and developers of Python for .NET >> *Subject:* -|EXT|- Re: [Python.NET] PyScope >> >> >> >> Hi Steve Ward, >> >> We are waiting for at least one more core developer to review and approve >> this pull request. >> >> Since it is very large code addition and exposes a lot of API, this is >> taking some time. >> >> If you have any feedback or input, then feel free to comment on the issue >> or pull request. >> >> For now (before PyScope is merged) you can use this very simple API using >> dynamic (DLR): >> >> https://github.com/pythonnet/pythonnet/blob/master/README.md >> >> There is underlying API without DLR, but only available in tests. >> >> Regards, >> Denis >> >> >> >> On Wed, Apr 26, 2017, 9:28 AM WARD Steve wrote: >> >> Hi, >> >> >> >> I?m keen to use the PyScope class as I?m working to replace an IronPython >> interactive scripting environment in a .NET application. I read about this >> feature here: https://github.com/pythonnet/pythonnet/pull/381 >> >> >> >> Is this due for release soon, and is there an alternative way to create >> something similar to a scope with the current release 2.3.0? >> >> >> >> Thanks >> >> Steve Ward >> >> >> >> *Steve Ward* >> Senior Software Engineer >> >> *Oxford Instruments* >> >> >> >> >> >> ____________________________________________________________ >> _______________ >> This e-mail is confidential and is for the addressee only. Please refer >> to >> www.oxinst.com/email-statement for regulatory information. >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> Click here to >> report this email as spam. >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Mon Jun 26 11:05:12 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Mon, 26 Jun 2017 15:05:12 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: Hi Denis, With your debugging scenarios I?ve now tried VS2015 and VS2017. Symbols are loaded for Python27.dll etc. In mixed mode no error messages but no breakpoint so clearly only the .NET debugger attached ? close the app and debugger exits. In VS2017 Python only or ptvsd mode I get ?Unable to attach to the process. General Exception?. I don?t know where the PTVS log might be but I?d like to review that and maybe report it to them, can you point me? In VS2015 attaching just quietly fails ? I wonder if this is something to do using my own build of Pythonnet in order to try-out PyScope ? is there something else I should do to properly incorporate this with the Python environment ? unless you have a release that is? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 25 June 2017 05:51 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope All pythonnet debugging scenarios are now working and explained in this detailed tutorial: https://github.com/pythonnet/pythonnet/wiki/Various-debugging-scenarios-of-embedded-CPython On Fri, Jun 23, 2017 at 6:31 AM, Denis Akhiyarov > wrote: Hi Steve, Please try reporting to PTVS issue tracker on GitHub with your PTVS log from failed attaching of the Python debugger. Python.NET has no control over these Visual Studio settings. I'm going to meet with developer(s) of PTVS during PyData in Seattle. Feel free to send any feedback that you have so that we can look closer at key issues between pythonnet and PTVS. Particularly we are planning to resolve issues with remote and mixed-mode debugging. UCS and other compilation symbols are resolved by setup.py during build from the Python side. From VS side you have to resolve all these symbols manually. And the latter is really intended only for developers of pythonnet. Thanks, Denis On Fri, Jun 23, 2017, 6:10 AM WARD Steve > wrote: Unable to debug into embedded Python using this test: https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from UCS4 as that throws Unicode errors. Any ideas? Thanks, Steve From: WARD Steve Sent: 21 June 2017 12:06 To: 'A list for users and developers of Python for .NET' Subject: RE: [Python.NET] -|EXT|- Re: PyScope Hi Denis, Initial feedback is that it works. Had to change to UCS2 (PYTHON27 already), I am going with 64 bit by the way. Had to figure-out using PyScope.Set() by checking the source. Now that I have a working platform, I have a lot to do to move the project forward. So, thanks very much and I?ll keep you posted. Cheers Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 18 June 2017 00:35 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope Hi Steve, PyScope feature has been merged into master. Please note that more changes were made to the implementation. I would like to thank Wenguang Yang (@yagweb) for his patience with few months of review cycle. We are planning a release soon, but would appreciate any feedback for using this new API. Thanks, Denis On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov > wrote: Hi Steve, I updated installation instructions for latest master or for branches from pending pull requests: https://github.com/pythonnet/pythonnet/wiki/Installation `pip install git+https://github.com/yagweb/pythonnet at add_scope` Collecting git+https://github.com/yagweb/pythonnet at add_scope Cloning https://github.com/yagweb/pythonnet (to add_scope) to c:\users\denis~1 .akh\appdata\local\temp\pip-ifcgye-build Installing collected packages: pythonnet Found existing installation: pythonnet 2.2.2 Uninstalling pythonnet-2.2.2: Successfully uninstalled pythonnet-2.2.2 Running setup.py install for pythonnet ... done Successfully installed pythonnet-2.4.0.dev0 Thanks, Denis On Fri, Apr 28, 2017, 5:58 AM WARD Steve > wrote: Hi Denis, Ok, well I?d be happy to build from source and try out the proposed new feature here, if that?s possible? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 26 April 2017 15:58 To: A list for users and developers of Python for .NET Subject: -|EXT|- Re: [Python.NET] PyScope Hi Steve Ward, We are waiting for at least one more core developer to review and approve this pull request. Since it is very large code addition and exposes a lot of API, this is taking some time. If you have any feedback or input, then feel free to comment on the issue or pull request. For now (before PyScope is merged) you can use this very simple API using dynamic (DLR): https://github.com/pythonnet/pythonnet/blob/master/README.md There is underlying API without DLR, but only available in tests. Regards, Denis On Wed, Apr 26, 2017, 9:28 AM WARD Steve > wrote: Hi, I?m keen to use the PyScope class as I?m working to replace an IronPython interactive scripting environment in a .NET application. I read about this feature here: https://github.com/pythonnet/pythonnet/pull/381 Is this due for release soon, and is there an alternative way to create something similar to a scope with the current release 2.3.0? Thanks Steve Ward Steve Ward Senior Software Engineer Oxford Instruments ___________________________________________________________________________ This e-mail is confidential and is for the addressee only. Please refer to www.oxinst.com/email-statement for regulatory information. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet Click here to report this email as spam. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Mon Jun 26 14:45:54 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Mon, 26 Jun 2017 18:45:54 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: Update: Mixed mode is working ? clearly I hadn?t worked through all the combinations ?. I would like to get Python-only working, but hey. Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of WARD Steve Sent: 26 June 2017 16:05 To: A list for users and developers of Python for .NET Subject: -|SPOOF|- Re: [Python.NET] -|EXT|- Re: PyScope Hi Denis, With your debugging scenarios I?ve now tried VS2015 and VS2017. Symbols are loaded for Python27.dll etc. In mixed mode no error messages but no breakpoint so clearly only the .NET debugger attached ? close the app and debugger exits. In VS2017 Python only or ptvsd mode I get ?Unable to attach to the process. General Exception?. I don?t know where the PTVS log might be but I?d like to review that and maybe report it to them, can you point me? In VS2015 attaching just quietly fails ? I wonder if this is something to do using my own build of Pythonnet in order to try-out PyScope ? is there something else I should do to properly incorporate this with the Python environment ? unless you have a release that is? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 25 June 2017 05:51 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope All pythonnet debugging scenarios are now working and explained in this detailed tutorial: https://github.com/pythonnet/pythonnet/wiki/Various-debugging-scenarios-of-embedded-CPython On Fri, Jun 23, 2017 at 6:31 AM, Denis Akhiyarov > wrote: Hi Steve, Please try reporting to PTVS issue tracker on GitHub with your PTVS log from failed attaching of the Python debugger. Python.NET has no control over these Visual Studio settings. I'm going to meet with developer(s) of PTVS during PyData in Seattle. Feel free to send any feedback that you have so that we can look closer at key issues between pythonnet and PTVS. Particularly we are planning to resolve issues with remote and mixed-mode debugging. UCS and other compilation symbols are resolved by setup.py during build from the Python side. From VS side you have to resolve all these symbols manually. And the latter is really intended only for developers of pythonnet. Thanks, Denis On Fri, Jun 23, 2017, 6:10 AM WARD Steve > wrote: Unable to debug into embedded Python using this test: https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from UCS4 as that throws Unicode errors. Any ideas? Thanks, Steve From: WARD Steve Sent: 21 June 2017 12:06 To: 'A list for users and developers of Python for .NET' Subject: RE: [Python.NET] -|EXT|- Re: PyScope Hi Denis, Initial feedback is that it works. Had to change to UCS2 (PYTHON27 already), I am going with 64 bit by the way. Had to figure-out using PyScope.Set() by checking the source. Now that I have a working platform, I have a lot to do to move the project forward. So, thanks very much and I?ll keep you posted. Cheers Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 18 June 2017 00:35 To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] -|EXT|- Re: PyScope Hi Steve, PyScope feature has been merged into master. Please note that more changes were made to the implementation. I would like to thank Wenguang Yang (@yagweb) for his patience with few months of review cycle. We are planning a release soon, but would appreciate any feedback for using this new API. Thanks, Denis On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov > wrote: Hi Steve, I updated installation instructions for latest master or for branches from pending pull requests: https://github.com/pythonnet/pythonnet/wiki/Installation `pip install git+https://github.com/yagweb/pythonnet at add_scope` Collecting git+https://github.com/yagweb/pythonnet at add_scope Cloning https://github.com/yagweb/pythonnet (to add_scope) to c:\users\denis~1 .akh\appdata\local\temp\pip-ifcgye-build Installing collected packages: pythonnet Found existing installation: pythonnet 2.2.2 Uninstalling pythonnet-2.2.2: Successfully uninstalled pythonnet-2.2.2 Running setup.py install for pythonnet ... done Successfully installed pythonnet-2.4.0.dev0 Thanks, Denis On Fri, Apr 28, 2017, 5:58 AM WARD Steve > wrote: Hi Denis, Ok, well I?d be happy to build from source and try out the proposed new feature here, if that?s possible? Thanks Steve From: PythonDotNet [mailto:pythondotnet-bounces+steve.ward=oxinst.com at python.org] On Behalf Of Denis Akhiyarov Sent: 26 April 2017 15:58 To: A list for users and developers of Python for .NET Subject: -|EXT|- Re: [Python.NET] PyScope Hi Steve Ward, We are waiting for at least one more core developer to review and approve this pull request. Since it is very large code addition and exposes a lot of API, this is taking some time. If you have any feedback or input, then feel free to comment on the issue or pull request. For now (before PyScope is merged) you can use this very simple API using dynamic (DLR): https://github.com/pythonnet/pythonnet/blob/master/README.md There is underlying API without DLR, but only available in tests. Regards, Denis On Wed, Apr 26, 2017, 9:28 AM WARD Steve > wrote: Hi, I?m keen to use the PyScope class as I?m working to replace an IronPython interactive scripting environment in a .NET application. I read about this feature here: https://github.com/pythonnet/pythonnet/pull/381 Is this due for release soon, and is there an alternative way to create something similar to a scope with the current release 2.3.0? Thanks Steve Ward Steve Ward Senior Software Engineer Oxford Instruments ___________________________________________________________________________ This e-mail is confidential and is for the addressee only. Please refer to www.oxinst.com/email-statement for regulatory information. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet Click here to report this email as spam. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ 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 Tue Jun 27 09:27:05 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Tue, 27 Jun 2017 08:27:05 -0500 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: I updated wiki with more details, the log output for PTVS is under VS -> Tools -> Python Tools -> Diagnostic Info https://github.com/pythonnet/pythonnet/wiki/Various-debugging-scenarios-of-embedded-CPython On Mon, Jun 26, 2017 at 1:45 PM, WARD Steve wrote: > Update: Mixed mode is working ? clearly I hadn?t worked through all the > combinations J. > > > > I would like to get Python-only working, but hey. Thanks > > > > Steve > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+steve.ward= > oxinst.com at python.org] *On Behalf Of *WARD Steve > *Sent:* 26 June 2017 16:05 > *To:* A list for users and developers of Python for .NET > *Subject:* -|SPOOF|- Re: [Python.NET] -|EXT|- Re: PyScope > > > > Hi Denis, > > > > With your debugging scenarios I?ve now tried VS2015 and VS2017. Symbols > are loaded for Python27.dll etc. In mixed mode no error messages but no > breakpoint so clearly only the .NET debugger attached ? close the app and > debugger exits. In VS2017 Python only or ptvsd mode I get ?Unable to attach > to the process. General Exception?. I don?t know where the PTVS log might > be but I?d like to review that and maybe report it to them, can you point > me? In VS2015 attaching just quietly fails J > > > > I wonder if this is something to do using my own build of Pythonnet in > order to try-out PyScope ? is there something else I should do to properly > incorporate this with the Python environment ? unless you have a release > that is? > > > > Thanks > > Steve > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+ > steve.ward=oxinst.com at python.org > ] *On Behalf Of *Denis > Akhiyarov > *Sent:* 25 June 2017 05:51 > *To:* A list for users and developers of Python for .NET > *Subject:* Re: [Python.NET] -|EXT|- Re: PyScope > > > > All pythonnet debugging scenarios are now working and explained in this > detailed tutorial: > > > > https://github.com/pythonnet/pythonnet/wiki/Various- > debugging-scenarios-of-embedded-CPython > > > > On Fri, Jun 23, 2017 at 6:31 AM, Denis Akhiyarov < > denis.akhiyarov at gmail.com> wrote: > > Hi Steve, > > > > Please try reporting to PTVS issue tracker on GitHub with your PTVS log > from failed attaching of the Python debugger. Python.NET has no control > over these Visual Studio settings. > > > > I'm going to meet with developer(s) of PTVS during PyData in Seattle. Feel > free to send any feedback that you have so that we can look closer at key > issues between pythonnet and PTVS. Particularly we are planning to resolve > issues with remote and mixed-mode debugging. > > > > UCS and other compilation symbols are resolved by setup.py during build > from the Python side. From VS side you have to resolve all these symbols > manually. And the latter is really intended only for developers of > pythonnet. > > > > Thanks, > > Denis > > On Fri, Jun 23, 2017, 6:10 AM WARD Steve wrote: > > Unable to debug into embedded Python using this test: > https://github.com/pythonnet/pythonnet/issues/332#issuecomment-282608123 > > > > I?m using Python 2.7.13 64 bit, Visual Studio 2015 with PVTS. Pythonnet > compiled from source with PYTHON2, PYTHON27, UCS2 ? I had to change from > UCS4 as that throws Unicode errors. > > > > Any ideas? Thanks, Steve > > > > *From:* WARD Steve > *Sent:* 21 June 2017 12:06 > > > *To:* 'A list for users and developers of Python for .NET' > > *Subject:* RE: [Python.NET] -|EXT|- Re: PyScope > > > > Hi Denis, > > > > Initial feedback is that it works. Had to change to UCS2 (PYTHON27 > already), I am going with 64 bit by the way. Had to figure-out using > PyScope.Set() by checking the source. > > > > Now that I have a working platform, I have a lot to do to move the project > forward. So, thanks very much and I?ll keep you posted. > > > > Cheers > > Steve > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+ > steve.ward=oxinst.com at python.org > ] *On Behalf Of *Denis > Akhiyarov > > > *Sent:* 18 June 2017 00:35 > *To:* A list for users and developers of Python for .NET > *Subject:* Re: [Python.NET] -|EXT|- Re: PyScope > > > > Hi Steve, > > > > PyScope feature has been merged into master. > > Please note that more changes were made to the implementation. > > > > I would like to thank Wenguang Yang (@yagweb) for his patience with few > months of review cycle. > > > > We are planning a release soon, but would appreciate any feedback for > using this new API. > > > > Thanks, > > Denis > > > > On Fri, Apr 28, 2017 at 6:44 PM, Denis Akhiyarov < > denis.akhiyarov at gmail.com> wrote: > > Hi Steve, > > > > I updated installation instructions for latest master or for branches from > pending pull requests: > > > > https://github.com/pythonnet/pythonnet/wiki/Installation > > > > `pip install git+https://github.com/yagweb/pythonnet at add_scope` > > > > > > > > > Collecting git+https://github.com/yagweb/pythonnet at add_scope > > Cloning https://github.com/yagweb/pythonnet (to add_scope) to > c:\users\denis~1 > > .akh\appdata\local\temp\pip-ifcgye-build > > Installing collected packages: pythonnet > > Found existing installation: pythonnet 2.2.2 > > Uninstalling pythonnet-2.2.2: > > Successfully uninstalled pythonnet-2.2.2 > > Running setup.py install for pythonnet ... done > > Successfully installed pythonnet-2.4.0.dev0 > > > > > > > > Thanks, > > Denis > > On Fri, Apr 28, 2017, 5:58 AM WARD Steve wrote: > > Hi Denis, > > > > Ok, well I?d be happy to build from source and try out the proposed new > feature here, if that?s possible? > > > > Thanks > > Steve > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+steve.ward= > oxinst.com at python.org] *On Behalf Of *Denis Akhiyarov > *Sent:* 26 April 2017 15:58 > *To:* A list for users and developers of Python for .NET > *Subject:* -|EXT|- Re: [Python.NET] PyScope > > > > Hi Steve Ward, > > We are waiting for at least one more core developer to review and approve > this pull request. > > Since it is very large code addition and exposes a lot of API, this is > taking some time. > > If you have any feedback or input, then feel free to comment on the issue > or pull request. > > For now (before PyScope is merged) you can use this very simple API using > dynamic (DLR): > > https://github.com/pythonnet/pythonnet/blob/master/README.md > > There is underlying API without DLR, but only available in tests. > > Regards, > Denis > > > > On Wed, Apr 26, 2017, 9:28 AM WARD Steve wrote: > > Hi, > > > > I?m keen to use the PyScope class as I?m working to replace an IronPython > interactive scripting environment in a .NET application. I read about this > feature here: https://github.com/pythonnet/pythonnet/pull/381 > > > > Is this due for release soon, and is there an alternative way to create > something similar to a scope with the current release 2.3.0? > > > > Thanks > > Steve Ward > > > > *Steve Ward* > Senior Software Engineer > > *Oxford Instruments* > > > > > > ____________________________________________________________ > _______________ > This e-mail is confidential and is for the addressee only. Please refer > to > www.oxinst.com/email-statement for regulatory information. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > Click here to > report this email as spam. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Tue Jun 27 09:28:36 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Tue, 27 Jun 2017 13:28:36 +0000 Subject: [Python.NET] PyScope in Python.NET Message-ID: Hi Denis, I've had to stop development for now because PyScope global variables don't seem to be working in similar fashion to IronPython. I want a global variable assigned at start-up with PyScope.Set(name,value), where value is most likely a .NET object, to be available later on in any module I might import. I could try things out with the NUnit testing framework in the pythonnet solution but the tests are not listed in Visual Studio for some reason. Steve ___________________________________________________________________________This e-mail is confidential and is for the addressee only. Please refer to www.oxinst.com/email-statement for regulatory information. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Tue Jun 27 12:39:59 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Tue, 27 Jun 2017 16:39:59 +0000 Subject: [Python.NET] PyScope in Python.NET In-Reply-To: References: Message-ID: Please file an issue on github with reproducible code sample and also what you expect for PyScope. From a quick glance I do not see any issue with using the globals across scopes, see examples from @yagweb in his pull request and in the tests. You can define globals outside of scope. The NUnit tests are discoverable in VS, but if you set 64-bit architecture, then some tweaking is required: https://stackoverflow.com/questions/5571699/how-do-i-get-unit-tests-to-run-on-a-x64-platform On Tue, Jun 27, 2017 at 8:28 AM, WARD Steve wrote: > Hi Denis, > > > > I?ve had to stop development for now because PyScope global variables > don?t seem to be working in similar fashion to IronPython. I want a global > variable assigned at start-up with PyScope.Set(name,value), where value is > most likely a .NET object, to be available later on in any module I might > import. > > > > I could try things out with the NUnit testing framework in the pythonnet > solution but the tests are not listed in Visual Studio for some reason. > > > > Steve > > > ___________________________________________________________________________ > This e-mail is confidential and is for the addressee only. Please refer > to > www.oxinst.com/email-statement for regulatory information. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > -------------- next part -------------- An HTML attachment was scrubbed... URL: