Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"IronPython + .NET" vs "Python + PyQt". Which one is better for Windows App development?

I'm new in using Python. I would like to develop Windows GUI Application using Python. After some research, I found that I have 2 options:-

  1. IronPython + .NET Framework
  2. Python + PyQt

May I know which one is better for Windows Application development? Which option has more features (e.g. database support, etc)?

Other than the .NET support, is there any big difference between IronPython and Python? Which one is a better choice for me?

Thank you.

Patrick.L

like image 562
Patrick.L Avatar asked Apr 17 '10 02:04

Patrick.L


People also ask

Which is better Tkinter or PyQt?

Anyhow, in most situations, the best solution is using PyQt, considering the advantages and disadvantages of both PyQt and Tkinter. GUI programming with Qt is created around signals and slots for communication amongst objects. Thus, it allows flexibility, while it gets to the programmer access to a wide array of tools.

Should I learn pyqt5 or Tkinter?

Tkinter is smaller, simpler and gets the job done. PySide (pyqt) is huge and complex and has everything and the kitchen sink. So if you do it to learn, take the most difficult one.

Which is easier pyqt5 or Tkinter?

PyQt can be hard to learn,especially for beginners, whereas if you get a brief on GUI development, by practicing primitive GUIs using Tkinter, you can then start with PyQt. The more you learn, the better you become. As Tony Flurry said, tkinter is quite primitive but is the most user friendly.


2 Answers

Per my play with both PyQt (as interface to Qt) and IronPython (as an interface to WinForms) the bag is mixed.

Both are basically "bindings" for underlying platforms. PyQt is practically "autogenerated" from Qt's API and slightly more "mature" as a wrapper because of significant use on Linux.

IronPython goes a little deeper and seems to "rebox" system objects with small unfilled gaps between cPython and .Net libs (gzip, zip, subprocess etc).

In both cases, you need to look through Python into the toolkit and say to yourself if you like the toolkit. All python is doing is repackaging the toolkit's API to the objects. Again, forget about Python aspect. Look at the underlying toolkit API and think to yourself if you can live with that.

I personally find the C++ nature of Qt's API too un-pythonic to be happy with it. C# and Python are so alike that if you remove curlies and type declaration from C# you would not know if it's C# or Python. As a result, for a Python programmer, C#-based .Net API, code and examples as provided in MSDN and elsewhere are instantly applicable with very minor tweaks.

In the end, a more correct comparison would be between PyQt (Qt bindings for cPython) and Win32py (Windows ABI bindings for cPython). IronPython is almost a reinvention of same language on a different platform, with all the problems (lacking functionality) that comes with that.

like image 39
ddotsenko Avatar answered Oct 06 '22 10:10

ddotsenko


I faced the same issue and have, with misgivings, decided to go with IronPython/C#/.Net. I liked Qt but got cold feet when it was sold to Nokia because I just wasn't sure Nokia's goals in owning Qt were consistent with my needs for a windows UI. That said, Nokia has made some positive moves by combining separate platform licenses into a single license and dropping GPL licensing in favor or LGPL.

Technically, Qt is well designed but relies heavily on hard to debug C# macros. I'm not sure why. The best thing about Qt is that it is open source. If you need to, you can fix it. I don't have direct experience with PyQt but it has been around for quite a while.

.Net is .Net and as usual with Microsoft, a moving target. You will sacrifice speed for ease of coding. The IronPython group seems good but I'm not sure if Microsoft's commitment is there. Visual Studio support isn't there yet although the plans sound good. After all, MS only really cares if they own everything, which is not the case for Python. What I really expect is MS will create a dynamic version of C#, interpreter and all, and tell all the Python programmers that it is better and supported and well integrated with .Net. They will then through their considerable weight behind crushing Python like they've done to Java.

Good luck. It's a big decision.

like image 149
Max Yaffe Avatar answered Oct 06 '22 10:10

Max Yaffe