[Python.NET] Re: WPF or other GUI with PythonNet & Clingo
Emmanuel Rutovic <[email protected]> Tue, 3 May 2022 13:32:52 -0400
| Newsgroups | gmane.comp.python.dotnet |
|---|---|
| Message-ID | <CAJE6Wx2SYJhA5yQ0ve2YDE32297m-Sdpvz0D4kyk9YOLjCO-jw@mail.gmail.com> |
--===============5688867356385539587== Content-Type: multipart/alternative; boundary="000000000000a874c305de1ee6f2" --000000000000a874c305de1ee6f2 Content-Type: text/plain; charset="UTF-8" Hi David, That's definitely possible. I am doing something similar with the tool that I am developing (see www.simba.io). However, please note that if you base your UI on WPF: - Your app will be only compatible with Windows - The size of the Python module might be quite large Microsoft did not put a lot of effort on WPF recently, If you are familiar with XAML/C#, you can also look at .Net MAUI, the Windows APP Sdk (Project Reunion) or AvaloniaUI. I hope this helps. Regards, Emmanuel. On Tue, May 3, 2022 at 11:39 AM David Epstein <[email protected]> wrote: > Hi folks! > > This is my first post. In short, I'd like to know whether it is a good > idea to use PythonNet within a MVVM framework to glue the models (that rely > on a Python package) to the user interface's view models and views (that > rely on C# and WPF controls). If it is a good idea, I'd welcome advice > (e.g. working with PythonNet within a Visual Studio C# project). If it is > *not* a good idea, I'd welcome alternatives (e.g. Python GUIs with > desktop functionality like docking). > > Here are the details. I'm creating a graphical, desktop, turn-based > game/simulation based on the logic programming system, Clingo > <https://potassco.org/>, which is accessible from Python (via import > clingo <https://pypi.org/project/clingo/>). While other language bindings > exist for Clingo (including a nascent C# one > <https://github.com/NEKERAFA/clingo-cs>), the Python binding appears to > be the most complete and most popular. > > However, I've only created GUI's using C# frameworks (WPF & > Xamarin.Forms). Since I'd like this application to include docking, data > grid, rich-text editor, tooltips, and other Windows desktop staples, I'm > inclined to use WPF. I may have access to DevExpress' WPF controls > <https://www.devexpress.com/products/net/controls/wpf/> and technical > support, the latter of which might require me to use C# (not sure). > > What do you think? > > Thank you, > -david > _______________________________________________ > PythonNet mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/pythonnet.python.org/ > Member address: [email protected] > --000000000000a874c305de1ee6f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi David,<div><br></div><div>That's definitely=C2=A0po= ssible. I am doing something similar with the tool that I am developing=C2= =A0(see <a href=3D"http://www.simba.io">www.simba.io</a>). However, please = note that if you base your UI on WPF:</div><div>- Your app will be only com= patible with Windows</div><div>- The size of the Python module might be qui= te large</div><div><br></div><div>Microsoft did not put=C2=A0a lot of effor= t=C2=A0on WPF recently, If you are familiar with=C2=A0XAML/C#, you can also= look at .Net MAUI, the Windows APP Sdk=C2=A0(Project Reunion) or AvaloniaU= I.</div><div><br></div><div>I hope this=C2=A0helps.</div><div><br></div><di= v>Regards,</div><div>Emmanuel.=C2=A0</div></div><br><div class=3D"gmail_quo= te"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, May 3, 2022 at 11:39 AM D= avid Epstein <<a href=3D"mailto:[email protected]">davidlepstein= @outlook.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl= e=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid= ;border-left-color:rgb(204,204,204);padding-left:1ex"> <div dir=3D"ltr"> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> Hi folks! <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> This is my first post. In short, I'd like to know whether it is a good = idea to use PythonNet within a MVVM framework to glue the models (that rely= on a Python package) to the user interface's view models and views (th= at rely on C# and WPF controls). If it is a good idea, I'd welcome advice (e.g. working with PythonNet within a = Visual Studio C# project). If it is <i>not</i> a good idea, I'd welcome alternatives (e.g. Python GUIs with= desktop functionality like docking).<br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> Here are the details. I'm creating a graphical, desktop, turn-based gam= e/simulation based on the logic programming system, <a href=3D"https://potassco.org/" title=3D"https://potassco.org/" target=3D= "_blank"> Clingo</a>, which is accessible from Python (via <a href=3D"https://pypi.or= g/project/clingo/" title=3D"https://pypi.org/project/clingo/" target=3D"_bl= ank"> import clingo</a>). While other language bindings exist for Clingo (includi= ng a <a href=3D"https://github.com/NEKERAFA/clingo-cs" title=3D"https://git= hub.com/NEKERAFA/clingo-cs" target=3D"_blank"> nascent C# one</a>), the Python binding appears to be the most complete and= most popular.<br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> However, I've only created GUI's using C# frameworks (WPF & Xam= arin.Forms). Since I'd like this application to include docking, data g= rid, rich-text editor, tooltips, and other Windows desktop staples, I'm= inclined to use WPF. I may have access to <a href=3D"https://www.devexpress.com/products/net/controls/wpf/" title=3D"= https://www.devexpress.com/products/net/controls/wpf/" target=3D"_blank"> DevExpress' WPF controls</a> and technical support, the latter of which= might require me to use C# (not sure).</div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> What do you think?<br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> Thank you,</div> <div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color= :rgb(0,0,0)"> -david<br> </div> </div> _______________________________________________<br> PythonNet mailing list -- <a href=3D"mailto:[email protected]" target=3D= "_blank">[email protected]</a><br> To unsubscribe send an email to <a href=3D"mailto:[email protected]= g" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mail.python.org/mailman3/lists/pythonnet.python.org/" re= l=3D"noreferrer" target=3D"_blank">https://mail.python.org/mailman3/lists/p= ythonnet.python.org/</a><br> Member address: [email protected]<br> </blockquote></div> --000000000000a874c305de1ee6f2-- --===============5688867356385539587== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ PythonNet mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/pythonnet.python.org/ Member address: [email protected] --===============5688867356385539587==--