Python: Attractive, clean, packagable windows GUI library [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need to create a simple windows based GUI for a desktop application that will be downloaded by end users. The application is written in python and will be packaged as an installer or executable.
The functionality I need is simple - selecting from various lists, showing progress bars, etc. No animations, sprites, or other taxing/exotic things.
Seems there are quite a few options for Python GUI libraries (Tk, QT, wxPython, Gtk, etc). What do you recommend that:
Is easy to learn and maintain
Can be cleanly packaged using py2exe or something similar
Looks nice
[Update] For what it's worth I ended up going with tkinter. It's fairly well documented, can be made to look nice (mainly, use native fonts), and most importantly ships with Python so there's nothing extra to worry about. wxpython also looked good, but the download was 10M or so, and I didn't want to add that extra weight to the packages I distribute.

tkinter's major advantage (IMHO!) is that it comes with Python (at least on Windows). It looks ugly, and there's no progress bar or something like that (at least not builtin). Being a thin wrapper around Tk, its API doesn't feel very elegant or intuitive. However, there are quite a few good Tkinter resources on the web so learning it is not necessarily a pain.
For any serious GUI attempts, I'd go for wxPython as well. I don't know about packaging, though. But I wouldn't expect any problems.

I've recommended wxPython in the past and it's still an excellent tool. The others always seemed somewhat cumbersome to me.
There's instructions out there on the web which show exactly how to package a wxPython GUI.
The wxAui section in particular can give some really clean / usable results:

The most beautiful one that I can suggest is PyQt (almost native), otherwise a good idea would be using directly IronPython that is native .net code.
Anyway nothing beats tkinter for multi-platformness and packaging-friendliness.

I've used wxPython in the past (For Mac/Windows deployments). It has worked good. And it looks nicer than Tk :)

From using both wxPython and TKinter, I'd say wxPython looks nicer and is easy to learn.
Although you said you are planning on using the program for Windows, it's worth mentioning that I've had problems with TKinter on Mac not working correctly.

Related

developer tools used in programming [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am a pretty recent developer..
but I have a single monitor (big enough) but it is so annoying that every now and then I first use the text editor to write the code and then go to terminal to execute and debug
I was wondering if there is any developer tools where I can like use half screen for that note pad and the other half for terminal.. so that I dont have to shuffle back and forth between the terminal and the text-editor...
Something like, when this software is running... then notepad and terminal just freezes in that half screen and when i close this software I can minimize and turn to normal mode.
If not it would be cool thing to have. :D
THanks
Use ViM in split window mode, edit your script on the left side and start ConqueTerm (use :ConqueTerm bash) on the right side. Now you can code and execute Python code in the same terminal window at the same time using a superior text editor ;-)
Disclaimer: Of course this only helps if you are familiar with ViM already.
If you're developing in Python - have a look at PyCharm. It's a clone of IntelliJ IDEA, tailored for python development, written in Java, so work on any platform. If you like it, it also doesn't cost a whole truckload.
That's for the easy and money-based way. More complex ways - you can use a text editor that allows running your scripts, upload to webservers, whatnot. It pretty much depends on the stuff you're developing.
You might want to check out Sublime Text.
When you say "terminal" do you mean a python console or a real system terminal?
If it is the first case, then most if not all python IDE I have ever used do have that functionality built in: gedit, eclipse, geany, SPE, just to mention a few.
If it is the second case, some IDE like gedit do have a plugin for that, but in general what you should probably use is another window manager (namely a tiling window manager). No idea on how the situation looks like on Microsoft / Apple OS's, but under GNU/Linux you have a plethora of different tiled window managers. Two that I tried and liked are Xmonad and Awesome.
HTH!
There are many editors... and IDE's that will allow you to run your code from directly within the editor / IDE enviroment
Perhaps I'm misunderstanding the question, but it seems like the easiest way is to simply manually resize the windows and place them where you want them. Also, a handy tool in general is the Python IDLE, where you can code in the Python window and simply have it run in the shell by pressing F5.

Is there a good IDE for building GUI apps with Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am a beginner programmer and have learned most of what I know thus far from using delphi for the past couple of months. A month or so back I decided to give python a try as I was told it may be easier to learn and I really like the language. I guess I just seem to pick things up easier using it.
The only problem is that I can't seem to find a good IDE for it that works in the way that Delphi does. I want to create desktop apps with nice GUIs so it would be nice to have something similar to Delphi/Visual studio to work with.
I have searched around and could find anything. Was wondering if anyone could lend a hand.
Also, from what I have gathered Ironpython seems to be the same as python coding wise. I don't mind my apps only being able to work on windows. Is Python Tools a good option. I mean is it basically like using visual studio but with python code instead?
Any help is much appreciated.
Thanks.
Boa Constructor is a classic RAD IDE for GUI applications (wxpython, both linux and windows). People is still using it but seems that development stopped some years ago. PythonCard is another RAD IDE I used in the past but also unmaintained right now
Although they are not IDEs, some tools are very helpful for GUI design like:
- wxglade (wxpython, included as a pluging in Stani Python Editor, only python2.x)
- qtdesigner (qt-pyqt or pyside, included in pyqt. Spyder IDE, build on pyqt, has a dedicated link to it. Works also for python 3.x)
I use PyGTK to interact with GTK.
http://www.pygtk.org/docs/pygtk/gtk-class-reference.html
http://www.pygtk.org/pygtk2tutorial/
But there is also QT, and WXpython, that are worthy.
http://thekompany.com/products/blackadder/
I always liked BoaConstructor which is a wxPython GUI Builder.
Doesn't seems to be actively maintained any longer though...
wxpython is very active though...
Python Tools is basically just like using VS but with Python. It's got intellisense, debugging, profiling, etc... When working w/ IronPython the .NET debugger is a little rough (you'll see internal implementation details) but you can still use the pure Python debugger which gives you a Pythonic view.
The intellisense engine is aware of the GUI designer so you'll get completions against the controls defined in XAML. And you'll get auto-definition of handler methods when you do things like double click on buttons in the GUI designer or select to define an event handler in the properties pane. Probably the biggest missing thing is that there's no support for user controls and there's also no designer support for WinForms.

CPython vs. Jython vs. IronPython for cross-platform GUI development [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose.
I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows.
My goals:
1. to make GUI using as less custom components as possible.
2. to make it as cross-platform as possible
(I know already that CPython and Jython are cross-platform-friendly, but what about IronPython+Mono?)
So - the question is about GUI - what should I choose?
IronPython with Mono is cross platform - to whatever platforms supported by Mono, and for the feature set supported by Mono (which pretty much means Windows Forms is supported fairly well). Other options for GUI toolkits are available, however, which may provide better "cross platform" capabilities, or at least a better feel on non-Windows platforms.
CPython will depend on the GUI suite you choose. Personally, I've found CPython with PyQt to be the most usable, cross platform GUI option from Python. It's very powerful, feature-rich, and works quite well.
Jython will work, but I personally don't like the GUI options as much (this is a 100% personal preference, however).
I'd say that if cross-platform is a goal, forget IronPython. A lot of people hate the dependency hell it causes so it'll be too much work to get it up in running in some OSes/distributions. Jython will suffer this also, albeit to a lesser degree.
Well, Mono does not come with the base of most Linux distributions. It's not a terribly lightweight dependency either, and I think Java is considerably more likely for people to already have. Would you plan on using "Winforms" with Mono? If so, and you don't have experience with Winforms, read about what others have to say :-) The other .NET GUI toolkit is WPF, which unfortunately Mono has no plans to implement.
Jython would be better too, because you can use SWT, which renders native widgets and provides lots of layout possibilities easily. Or you can use Jython with Swing, or whatever else -- even AWT if you love ugliness.
I really like wxPython (which you can use with CPython, which is on most distros by default), because it renders good-looking native widgets in OSX, Windows and Linux (I've only seen the Gnome widgets in person). wxPython is by far the easiest to use GUI toolkit I've used -- even programatically (i.e. layout without Glade or similar). I've also used SWT, which I found quite nice, and Swing, which I personally don't really like the looks of, and Winforms, which was a nightmare to try to do even simple layouts with.
Here's a quick comparison of the existence of the interpreter/language runtime by OS
CPython
Windows - Probably not installed, and you'd have to make a non-python installer install it with your software :-P
Linux - Probably installed (Ubuntu, Gentoo and RedHat all have system tools that are written in Python and run on CPython)
Mac - Preinstalled on OSX
Jython
Windows - Probably installed at some point in my experience, though it doesn't come with
Linux - Probably installed, but more importantly nobody would hate you for depending on it like Mono
Mac - Preinstalled on OSX ("Mac OS X Leopard comes with J2SE 5.0 preinstalled, based on JDK 1.5.0_13_b05" -- Apple's site)
IronPython
Windows - Will probably run fine because I bet most people have at the very least .NET 2.0 if they have a recent version of Windows
Linux - Probably not installed -- the only application with which I've used Mono on Linux was Rasterbator, which worked well but I felt weird putting .NET on Linux
Mac - See above
I would choose a GUI toolkit first, since that will very much impact the user experience and overall difficulty (I would choose wxPython but SWT would be a close second) then consider the above as well maybe as a tiebreaker.
I faced this same question roughly a year ago. After looking at all the alternatives, I ended up with CPython and PyQt. IMO, Qt/PyQt is by far the best choice amongst all of the Python GUI toolkits. After hitting many bugs in wxPython I switched to PyQt and never looked back. Qt/PyQt are much more solid than the wx toolkits in my experience.
I use the exact same code base and build stand alone executables with PyInstaller for Windows and Py2App for the Mac (PyInstaller can be used for Linux as well). Because these builders embed the Python interpreter and all of the dependencies, it takes a lot of the hassle away. The only rub is that you'll need both a Windows and Mac to do the builds. Getting all of the configurations correct can be a pain too, but it's possible and time worth investing.
Take a look at comparable GUI's written in python/jython/ironpython. Look for programs that you like and find out what they use. I guess most if not all will be written in cpython + gtk or cpython + qt. I think all gui toolkits in python are cross platform.
Java is the most portable platform. Jython is written in 100% pure Java. 'Nuff said.
BTW I just switched a CPython/GTK project to Jython (trying to remove as much unmanaged code as possible), the only problem is that Jython is at 2.5 still, which kind of sucks when you're used to 2.6/2.7/3 :)
There are plenty of answers already, but I'd like to add one important thing - regardless of which library you learn, most of the principles will be the same when you move to another library.
I don't know about Qt, but for most graphics programs (in PyGTK or Tkinter) the best thing to do, as far as editing goes, is to use a PIL image (or something similar) to draw on and then draw that image on your canvas widget, otherwise you can lose pixel data if your window gets covered.
You may use Python 2.7 or 3.1 (CPython) with ttk (in Standart Library in 2.7, 3.1), ttk support themes (looks nice and very simple coding)
(1-st screen is text-editor with tabs and syntax highlighting) ttk screenshots

Is PyGTK or PyQT preferred for making GTK-native Python apps? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.
What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier to use than the other? Any opinions would be nice.
Sorry for the subjective question.
I've written reasonably large apps in both PyGTK and PyQt. On balance, my personal opinion is that PyQt is superior, but not by so much that it's worth worrying about. If you're only worried about supporting Ubuntu, then use PyGTK; it'll give a better look and feel. If you think you may want to port this app to other platforms, then use PyQt; PyQt is far and away the superior crossplatform solution.
PyGTK application will look more native on a Gnome system. PyQt application will look more native on a KDE system.
As I found PyGTK have better documentation then PyQt.
It will take the same time to write a program on PyQt and PyGTK.
In my experience, having made both PyGTK and PyQT apps, there is little difference on the underlying programming side of things. PyQT seems more consistent across different flavors of Linux, where GTK is constantly changing and breaking on older distributions.
PyQT has QTCreator, which is a great GUI designer. PyGTK has Glade3, which is getting better, but not as good. Until recently Glade was a bad joke. If you need to draw GUIs in an editor, PyQT is probably the better choice. Otherwise, I'd go with PyGTK for coding because the online PyGTK documentation is excellent.
One bizarre thing I've found is PyQT has poor support for dynamic menu item callbacks. Maybe I just didnt use it right, but PyGTK is a bit more flexible in comparison.
It's a tough choice, really. But if you design your application right, the interface should be irrelevant; you could design your app with multiple interfaces...
In my opinion use PYQT as its definately superior for a few reasons. There is no worries with pixmaps ever, there is only one library coded in the same style and conventions. In pygtk you need to learn up to 4 libraries coded in a different style. You have to learn GLIB constants at least if not GLIB variable names as well even though they are a complete 1 to 1 swap with the stdlib C type itself, but why use standard types everyone else uses when as the master of your toolkit you can use pretty useless special purpose types which then can be forced onto everyone else. Gnome developers need a serious wake up.
Go with PYQT its sane easy to use and wont make you constantly look up documentation to find out why you cant use standard code.

Nice IDE with GUI designer for wxPython or Tkinter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a little experience developing small command-line applications with Python. I want to move on to developing GUIs with Python. From the available GUI toolkits for Python, the ones I feel the most inclined to are wxPython and Tkinter; but I don't want to code all of the GUI by myself all of the time.
Are there any good GUI IDEs for any of these toolkits? It doesn't need to be free or open source.
I will talk only about WxPython because it's the only toolkit I have experience with. TkInter is nice to write small programs (then it doesn't require a GUI Designer), but is not really appropriate for large application development.
wxFormBuilder is really good: it generates .XRC files you need to load in your program, and it can generate .py files by subclassing them when you use.
DialogBlocks and wxDesigner are two commercial software which can generate Python code directly. I didn't tested these much because of their price.
wxGlade is (I think) not yet mature enough for large programs, but it's worth a try.
After trying all these, I realized they had all flaws and that nothing is better than just writing the GUI in an editor. The problem is the extended learning curve. But then you will be much more faster and your code will be much more flexible than when using a GUI designer.
Have a look at this list of major applications written with wxPython. You will probably see that none of these use a GUI Designer, there must be a reason for this.
You then understand gs is right when saying that either you switch to PyQt or you write your application by hand. I had a look at Qt Designer in the past and thought this was what I needed. Unfortunately PyQt has some license restrictions.
This may not answer your question directly, but I chose PyQt because there were no good UI designers for wxPython.
Apparently you either write your GUIs by hand or switch to PyQt.
Because Nokia and Riverbankcomputing couldn't agree on a LGPL solution, Nokia decided to build its own bindings: PySide.
Boa Constructor has a WxPython GUI builder.
I use xrced (comes with wxPython). The GUI is defined in xml files, you have an autogenerated python file that automates some initialization then you subclass those autogenerated classes and do the rest of the initialization by hand. I find that this is a good way to blend the elegance of hand-written GUI code with ease of GUI code generation.
For the code I use WingIDE, it's helpfull to have a good debuger and good source code completion when dealing with large libraries (or frameworks if you will) like wxPython.
If you want more automation (and so, uglier code) try the latest version of Boa, there are some nice introductory screencasts for it at ShowMeDo.com
I use Eclipse with PyDev as my Python IDE (Which is probably not the best solution out there, but it is quite decent)
For GUI developement, I have used wxGlade for a mid-sized project and found it to be quite easy to use one you've grasped the concepts of WxPython. The XML generation is very useful for separating actual GUI design from program logic.
All of the these are free.
Try VisualWx. I think the GUI designer is very good; however the IDE is fairly rudimentary (no code completion, debugging, etc.). My work pattern is to have VisualWx and a good editor like Komodo Edit/Netbeans/etc. open at the same time and switch between them as needed.
I've used wxGlade for a few mission-critical apps. If you're a little weak in wx, it can be rough, but once you get used to it, its a great tool.
Not really a GUI IDE but it leds you define Tkinter GUIs in a JSON file: https://github.com/tmetsch/pytkgen

Categories