1

I need a OSX and GNU/Linux compatible GUI toolkit which works with python3.

I tried GTK3 with GObject introspection, but it was hard to be deployed on OSX. Is there something like gtk builder compatible which will run on OSX ?

What my requirements are:

  • XML based layout with an IDE builder
  • Runs on OSX (and be compatible or works out of the box on GNU/Linux)
  • Works on Python3
  • Not ugly as TK :) (kidding)
Damjan Dimitrioski
  • 679
  • 2
  • 9
  • 20

3 Answers3

2

You can use Qt in Python with PyQt. The advantage over Gtk is that it looks native on OS X (Qt uses Cocoa for rendering.)

More info: http://www.riverbankcomputing.co.uk/software/pyqt/intro/

If you're using Homebrew, you can install it quite easily:

brew install pyqt

Or you might find binaries on the PyQtX project page.

Nikos C.
  • 50,738
  • 9
  • 71
  • 96
  • I tried, but it requires a commercial or trial licence on OS X. – Damjan Dimitrioski Oct 30 '12 at 15:15
  • 1
    Do you mean Qt? It's available under the LGPL. You don't need a commercial license. You can use it even if your application is not open source. – Nikos C. Oct 30 '12 at 15:17
  • PyQt or PySide definitely tick all the boxes. The only major difference between them is the licensing - PyQt is GPL, PySide is LGPL. – ekhumoro Oct 30 '12 at 17:30
0

There aren't any that I know of. Is the Python 3 requirement necessary? If not, you might consider Qt and the PySide bindings, or Enthought's TraitsUI framework which builds on either Wx or Qt.

Barry Wark
  • 107,306
  • 24
  • 181
  • 206
0

Final solution:

python3 using pyqt

  1. download the following MacOS pkg:

    http://sourceforge.net/projects/pyqtx/files/Complete/

  2. After installation

    we run the following sample python3 program:

Code to use:

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

from PyQt4 import QtCore, QtGui, uic

if we don't have any import error, then pyqt is working properly.

Tested on MacOS Lion 10.7.2

on GNU/Linux Python3 should have pyqt already working out of the box. Tested on Archlinux.

Damjan Dimitrioski
  • 679
  • 2
  • 9
  • 20