<div dir="ltr">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.<div><br></div><div>You should probably just try running previous IronPython attempts using pythonnet and report issues if any. Have a look at Sho from Microsoft.</div><div><br></div><div>There is someone trying to embed ipython REPL using pythonnet/Excel-DNA or COM in Excel with <span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Custom Task Pane (CTP)</span><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"> written in </span>WinForms:</div><div><br></div><div><a href="https://groups.google.com/forum/#!topic/jupyter/CVht4orvQtc">https://groups.google.com/forum/#!topic/jupyter/CVht4orvQtc</a><br></div><div><br></div><div><br></div><div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 4:44 PM, Saparya K <span dir="ltr"><<a href="mailto:spryify@gmail.com" target="_blank">spryify@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello PythonNet,<div><br><div>I am looking to embed <span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">a Python interactive (REPL) shell in a .NET WinForms application.</span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">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.</span></div></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">The idea is to be able to interact with the data from the Python shell via the API, and thereby updating the graphical view. </span><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">Ideally, the shell should support any valid Python syntax that is required to use the API. This would involve:</span><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><ol style="margin:0px 0px 1em 30px;padding:0px;border:0px;color:rgb(36,39,41);line-height:19.5px"><li style="margin:0px 0px 0.5em;padding:0px;border:0px;word-wrap:break-word"><font face="arial, helvetica, sans-serif">Querying a collection of data from the application via the Python API</font></li><li style="margin:0px 0px 0.5em;padding:0px;border:0px;word-wrap:break-word"><font face="arial, helvetica, sans-serif">Then manipulating this collection in the Python shell</font></li><li style="margin:0px;padding:0px;border:0px;word-wrap:break-word"><font face="arial, helvetica, sans-serif">Making API calls with the modified collection as an argument</font></li></ol><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">I came across a few examples where an interactive shell was developed using IronPython. A limitation with this approach is the absence of </span><strong style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px;margin:0px;padding:0px;border:0px">Python 3.x</strong><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"> support (and other C-compiled libraries) in IronPython. For this reason, I would prefer to use Python.NET if it is possible.</span></div></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">Has anyone here tried something like this with Python.NET before? Does it looks like what I am trying to achieve is feasible?</span><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,helvetica,sans-serif;line-height:19.5px">Any direction would be very helpful!</span></div></div>
<br>_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><br></blockquote></div><br></div>