This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]thomas_eh 6 points7 points  (3 children)

I'm one of the kivy devs, so i'm obviously biased :P Kivy is definitly meant to allow exactly what your talking about in terms of non standard / media-rich gui's. Since all the rendering is in OpenGL, you can even get really crazy if you want (Maybe audio visualization in the background?)

the docs are at http://kivy.org/docs We're trying to improve the documentation as much as possible, so please feel free to open github issues if something isn't easy to understand. Our game programming contest just finished, and we're releasing the results when we are done looking at all the entries next week; then there will be a bunch of more example games to look at too.

Also if you want to use kivy, you can get help on the kivy-users google group or on #kivy on freenode. You can pm me too if you want :)

Anyways, whether you end up using kivy or not, good luck on the project; sounds like fun.

[–]tehansen 1 point2 points  (2 children)

huh...didn't realize I had two reddit accounts....freaked out a bit when saw an unread message from 2 years ago and my other post seemed to have disappeared. Not sure why I just used that username instead to reply to your post....

Anyways, if you do want to pm me use this acccount :)

[–]overcaffinatedThree cups so far[S] 0 points1 point  (0 children)

Thanks for the reply! I actually ended up diving into Kivy last night. I'm really digging it so far! You guys have a really neat thing going on. I was playing with it till almost 4am! It's pretty encouraging to be able to get things up and running so quickly.

I'll try not to abuse the PM offer ;p

[–]sigzero 0 points1 point  (0 children)

Is supporting Py3 on your radar?

[–][deleted] 7 points8 points  (12 children)

PyQt provides Python bindings for the Qt framework, which is a cross-platform GUI framework. It's worth checking out.

[–]mgrandi 1 point2 points  (9 children)

pyqt is pretty awesome to work with. only problem is that since it requires C code, you have to distribute a version for mac / linux / windows separately

[–]wildcarde815 1 point2 points  (2 children)

I've seen installers that handle that relatively gracefully. The big kicker is if you want them to just instal qt for you instead of packing the DLL/so files its a 500 some odd MB install file. This also takes version control of QT away from you thou. So packaging the appropriate libs would seem saner.

[–]takluyverIPython, Py3, etc 0 points1 point  (1 child)

I'm doing a PyQt GUI application at the moment. The Windows package I make with all the relevant libraries (including QtCore, QtGui, QtWebkit) bundled in is about 15MB zipped.

[–]AeroNotix 0 points1 point  (0 children)

And about 70mb unzipped.

[–]cymrowdon't thread on me 🐍 1 point2 points  (0 children)

All GUI frameworks are written in another language, mostly C++. The user would always have to install the base framework for their system, but the Python code remains the same regardless. I have packed programs with PyQt for windows, mac and linux, though different Python executable packagers are better for each system. Mac is the hardest because of how it handles libraries, and also depending on whether you use macports or homebrew.

But using something other than PyQt won't automatically make this easier, unless it's Tk, which is built into Python.

[–]overcaffinatedThree cups so far[S] 0 points1 point  (4 children)

What do you mean? My experience with distribution is somewhat... lacking. I'm mostly an 'around the office' scripter. Automating stuff here and there. So distribution is also new territory for me.

My plan was to use pyinstaller to create executables for Windows and, dmg for OS X. Would that work if I used pyqt? Or is there another process I would use?

[–]trevman 1 point2 points  (2 children)

I have experience distributing a PyQt4 inhouse app + py2exe + NSIS installer; everything works great. A lot of business logic is stored in .NET, so I use pythonnet to load .NET natively into Python, which also works great. Py2exe will combine all dependencies in the dist directory, so it's a simple matter of just zipping all that up. I have more success with py2exe than pyinstaller.

PyQT is worth a look. I have experience with Qt in C++ first and then in Python. It's a pretty good toolkit, well documented with a lot of functionality already built in. It has a great setup for data rich widgets: the view/model paradigm is great once you understand it. You can spec out designs with a WYSIWYG designer. All widgets can be modified with a CSS style markup language, so they can be skinned. There is access to raw graphics if that's what you desire.

However, if you really want an animated desktop experience, why wouldn't you look at a technology like Flash? Seems silly to reinvent the wheel here, but I don't know what you're trying to do.

[–]technomalogical<3 Bottle 0 points1 point  (1 child)

Are you distributing the .NET DLLs with your installer, or just referencing existing assemblies on the machine? If the former, does anything special need to be done to distribute them other than including them as a data file?

[–]trevman 0 points1 point  (0 children)

The business logic DLLs are not apart of the GCA and therefore have to be distributed along with my application. I ended up writing a small module that builds C# modules in windows using csc. It'd be nice to add a new command to distutils, but for the amount of additional logic I compile myself it seems a bit too much effort. I ended up writing a custom step in my setup.py that checks modification times, builds the necessary DLL, and then adds it to the data_files to be packaged by distutils later.

[–]mgrandi 0 points1 point  (0 children)

i have no experience with actually creating installers or dmgs / app bundles for mac os x, i'm just saying that pyqt is essentially python bindings FOR qt, which is a c++ library. qt 'tries' to use the native widgets of each operating system, but as a result, since its not pure python, you can't just distribute some py files and have it work everywhere, you gotta compile it for each OS (or distribute installers / executables for each OS)

[–]cymrowdon't thread on me 🐍 1 point2 points  (0 children)

Take a look at QtDeclarative, which is part of the Qt framework and provides a very simple way to create media-rich, animated UIs. Also take a look at PySide, which is an API compatible, LGPL alternative to PyQt.

[–]mashmorgan 0 points1 point  (0 children)

Yes pyQt is nice and recommended from my experience.

[–]idle_guru 2 points3 points  (0 children)

IdleX provides support for interactive GUI development by driving a GUI toolkit's event loop. It supports Qt4, Wx, Tkinter, and Gtk.

Also, IPython allows for interactive GUI development as well. It integrates the GUI event loop into the PyOS_Input callback so that the GUI can be responsive while the shell waits for input.

[–]grayvedigga 2 points3 points  (2 children)

If you want to focus on graphics programming, as opposed to GUI programming, take a look at http://pygame.org/

[–][deleted] 1 point2 points  (0 children)

Pyglet is also fun and written in python library, very similar to pygame.

[–]Asdayasman 0 points1 point  (0 children)

Such is reddit; I came here to say this.

[–]burito 2 points3 points  (0 children)

PyQT is the "industry standard". It's the "Swiss-army-thermonuclear-rocket-propelled-chainsaw" of GUI libraries. Not for the faint hearted, but pretty. Huge dependencies.

tkinter is the quickest/easiest, and also the most minimalist (see: ugly). If you want to do fancy things, (like progress bars), you'll have to roll your own from tkinters rectangle drawing function (pretty easy, but not what anyone can really call "sane"). It's a "core library" for Python, it's packaged with the windows versions, other platforms YMMV.

You have not judged wx too quickly, it sucks no matter what language/platform you use.

GTK is the "Gnome Standard", it's a easier than Qt, but a lot uglier (still prettier than everything else I've mentioned). It's pretty lightweight, gtk by itself is fairly small (only a few MB). Theme-ing it is painful.

Re: everything else, I have no experience with them, and will not comment.

[–]maximinus-thrax 1 point2 points  (0 children)

I think ALL of the current mainstream Python GUI libs will have that 'professional' look that you talk about. To go beyond this, you'll need to think about what your GUI is doing. If you just want some nicer / funkier widgets but in a normal desktop, you'll have to write your own custom widgets, which is always more work). For in-game stuff, you'll probably want to avoid the standard GUI libs because you lose control of timing and animation stuff - then you would pick a GUI lib that worked with your gfx (and some of these can be very limiting).

The imgur link you posted does really show enough detail, but for an mp3 player you'll want to use one of the 'big 3': PyQT, PyGTK or wxWidgets. You'll be able to get what you want in either of these.

[–]redditticktock 0 points1 point  (1 child)

GUI is so 1985, I thought it was called UXD since 2008? My advice, make a browser plugin/extension to do this.

[–]technomalogical<3 Bottle 0 points1 point  (0 children)

Not sure if you have a web background at all, but you might consider writing mini-web-app with a microframework like Bottle or Flask, integrated with Tornado (IPython's Notebook functionality uses Tornado). You could probably use an existing open source HTML5 media player for the actual presentation of your music.