Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-27 Thread Cameron Hayne
I’m using a similar method for redirecting Python output to a .NET textBox: #-- public static void redirectPythonOutput(TextWriter writer) { Output output = new Output(writer); using (Py.GIL())

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-27 Thread Ron Harding via PythonDotNet
sounds great; one additional suggestion,  don't just use a plane jane .net text box, but instead use  a 'rich text box'.  why?  i have used it again and again in smart terminal emulator windows where properties like 'append' are built in, plus it is easy to build in self scrolling, and colored p

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-27 Thread Saparya K
Just in case someone stumbles on this post looking for an answer: A solution that worked for me was redirecting the Python stdout/stderr to a stream in Python. I was then able to route this stream into the .NET text box. private void button1_Click(object sender, EventArgs e){ using (Py.GIL())

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-18 Thread Saparya K
Hi Denis, Thanks for pointing me to the new API. I am now able to embed Python in my C# code and access Python classes and methods from C#! Hi Nils, Your application looks very interesting and some of the features (e.g. matplotlib integration) are on the lines of what I have been thinking about. I

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-17 Thread Nils Becker
Hey, a while ago I wrote something like a light wrapper around Python.NET to embed CPython with numpy/scipy in a .NET GUI. It manages local/global dictionaries, automatically converts simple data types and numpy arrrays<->C# arrays and provides a plotting widget in C# that shows matplotlib plots.

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-13 Thread Denis Akhiyarov
for embedding look at c# embedding unit tests and also here: 1. Old API: http://pythonnet.github.io/readme.html 2. New simplified API using dynamic: https://github.com/pythonnet/pythonnet/blob/master/README.md On Thu, May 12, 2016 at 4:16 PM, Saparya K wrote: > Thanks for your response, De

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-13 Thread Saparya K
Thanks for your response, Denis. I had not come across Sho earlier. It looks very interesting. (If only Python 3.x support was available, though it does look like they have added support for their own math and visualization libraries). I am going over the demos and the unit tests and I was able t

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-11 Thread Denis Akhiyarov
This is definitely possible with WinForms or WPF. See the demo folder in pythonnet repo. One of the demo's is still in pull request. You should probably just try running previous IronPython attempts using pythonnet and report issues if any. Have a look at Sho from Microsoft. There is someone tryi

[Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-11 Thread Saparya K
Hello PythonNet, I am looking to embed a Python interactive (REPL) shell in a .NET WinForms application. This C# application displays a graphical visualization of some data. Methods to manipulate the data in the C# application would be exposed via a Python API. The idea is to be able to interact w