From denis.akhiyarov at gmail.com Fri Apr 7 22:50:53 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Sat, 08 Apr 2017 02:50:53 +0000 Subject: [Python.NET] Webinar about Python for .NET Message-ID: Michael Kennedy is going to give a webinar about Python for .NET developers: https://www.wintellect.com/software-development-training/register/webinar/41 -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Sat Apr 15 00:50:23 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 14 Apr 2017 23:50:23 -0500 Subject: [Python.NET] first pythonnet related job Message-ID: Hi all, First pythonnet + Qt contract job posted in London yesterday. Feel free to forward to interested people. https://www.reqiva.com/jobs/6006715/contract-software-engineer.asp I honestly have no idea why they need pythonnet from C++/CLI. My client specialise in high resolution image processing and require a Software Engineer to provide expertise around Python/C API and C++. The client has a Qt/C++ desktop application. To allow users (both internal and customers) maximum flexibility with the instrument, they are looking to expose an API for hardware control and data access/analysis. The language of choice for most of their users is Python and they have chosen to expose their internal API to C++/CLI (.NET) which can be called from Python using pythonnet. Python scripts can be called from a simple console widget in our C++/Qt application or can be run externally through a python console of choice. Key skills needed: - C++ - Python /C API Nice to have skills: - QT - OpenGL - C# Contact Details:Reqiva Ltd Tel: 01189 595552 Contact: Craig Turner Email: c.turner at reqiva.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From evan.davey at ekidna-engineering.com Sun Apr 16 21:27:21 2017 From: evan.davey at ekidna-engineering.com (Evan Davey) Date: Mon, 17 Apr 2017 11:27:21 +1000 Subject: [Python.NET] Reloading modules Message-ID: <2CB56D8F-C6BE-4BCB-A968-880F1A7A531A@ekidna-engineering.com> Hi, I am using Python.Net embedded inside an application. The application allows me to select and run a python file (which then allows me to use Python to access that application's C# SDK). string code; using (var streamReader = new StreamReader(scriptFile, Encoding.UTF8)) { code = streamReader.ReadToEnd(); } using (Py.GIL()) { PythonEngine.Exec(code); } This works, except when the code imports a python module I have to quit and restart the application in order for the import to reflect any code changes (which is very slow for debugging). How can I reload or reset the PythonEngine before running the code? Cheers, Ebam -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Sun Apr 16 22:16:44 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Mon, 17 Apr 2017 02:16:44 +0000 Subject: [Python.NET] Reloading modules In-Reply-To: <2CB56D8F-C6BE-4BCB-A968-880F1A7A531A@ekidna-engineering.com> References: <2CB56D8F-C6BE-4BCB-A968-880F1A7A531A@ekidna-engineering.com> Message-ID: Hi Evan (Ebam?), This was not possible until recently due to some issues with PythonEngine.Shutdown(). But it should be fixed in latest pythonnet 2.3.0 according to this bug report: https://github.com/pythonnet/pythonnet/issues/245 If it still doesn't work for you, then please report back your environment, such as Python, .NET/Mono, and OS versions and architectures. Cheers, Denis On Sun, Apr 16, 2017, 9:08 PM Evan Davey wrote: > Hi, > > I am using Python.Net embedded inside an application. The application > allows me to select and run a python file (which then allows me to use > Python to access that application's C# SDK). > > string code; > using (var streamReader = new StreamReader(scriptFile, Encoding.UTF8)) > { > code = streamReader.ReadToEnd(); > } > > using (Py.GIL()) > { > PythonEngine.Exec(code); > } > > This works, except when the code imports a python module I have to quit > and restart the application in order for the import to reflect any code > changes (which is very slow for debugging). > > How can I reload or reset the PythonEngine before running the code? > > Cheers, > Ebam > > > > _________________________________________________ > 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 Apr 26 07:59:03 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Wed, 26 Apr 2017 11:59:03 +0000 Subject: [Python.NET] PyScope Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Wed Apr 26 10:57:54 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Wed, 26 Apr 2017 14:57:54 +0000 Subject: [Python.NET] PyScope In-Reply-To: References: Message-ID: 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Ward at oxinst.com Fri Apr 28 06:58:03 2017 From: Steve.Ward at oxinst.com (WARD Steve) Date: Fri, 28 Apr 2017 10:58:03 +0000 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.akhiyarov at gmail.com Fri Apr 28 19:44:45 2017 From: denis.akhiyarov at gmail.com (Denis Akhiyarov) Date: Fri, 28 Apr 2017 18:44:45 -0500 Subject: [Python.NET] -|EXT|- Re: PyScope In-Reply-To: References: Message-ID: 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: