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)
0

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

I tried, but it requires a commercial or trial licence on OS X.
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.
PyQt or PySide definitely tick all the boxes. The only major difference between them is the licensing - PyQt is GPL, PySide is LGPL.
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.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.