11

I'm new to Linux but not to app development. I come from a RealBasic on a Mac background.

I've accepted that I need to learn a new language to develop for Linux (since RB won't run on 64 bit distros and is a cloed proprietary language) but I want to make sure I pick the right one.

I've been looking at Python and was all set to go until I read that PyGTK is becoming obsolete with the introduction of GTK 3. Is this true? The Ubuntu developer website stills seems to recommend it with Glade for the UI but I want to make sure that I don't learn something that's on the way out!

David Planella
  • 15,420
  • 11
  • 77
  • 141
Nootrino
  • 657
  • 1
  • 5
  • 7
  • since you want to learn something new, you can have a look at wxPython and Pyside. I suggest wxPython as it will have advantage if you switch to C++ one day porting to wxWidgets is a breeze. Pyside is Python-for-QT thing but I have no experience at all with it! Just an advice – Stefano Mtangoo Jun 17 '13 at 10:31

2 Answers2

9

The short answer is no.

PyGTK is being phased out and replaced with PyGObject as the widget set upgrades from GTK+2 to GTK+3. As of Oneiric all 'native' ubuntu applications run using the GTK+3 set.

On a personal note, fairly recently I started developing an application in Python, and having looked into it I decided to use Python3 with PySide (which is Qt4 instead of GTK+3) because I found that Python 3 would be the standard in the year or so it took me to write the program, and because Qt4 has a some very good documentation, and some first class development software (just have a trail of Qt 4 Designer...)

thomasmichaelwallace
  • 2,649
  • 22
  • 17
  • 5
    Tip: Qt designer's GTK+ variety exists and is called `glade`. – aquaherd Dec 04 '11 at 17:56
  • I find this very difficult to understand having come from a `REALbasic` sheltered development environment. All I want to be able to do is create an app whose GUI looks 'native' or theme-compliant on a modern version of Ubuntu or Mint. I also really want to be able to design the GUI in an editor (WYSIWYG) and link it with Python code. Given this extra information - what direction do you think I should head in? Is there a QT equivalent of `Glade`?? (also @aquaherd) – Nootrino Dec 04 '11 at 18:48
  • 1
    The Qt equivalent of Glade is Qt4 Designer. In Python you typically construct the interface, and then load it as class. For simple applications you can actually draw it all up in your own code, but for more complex GUI's it's easier to use a program like Qt Designer which will generate the code for you. Then all you need write is the code connecting the GUI events to your functions. – thomasmichaelwallace Dec 04 '11 at 22:19
  • 1
    On a note specifically about Qt: PySide and PyQt are both very similar libraries to link python to a Qt interface. The main difference between them is licensing (i.e. Pyqt does not allow you to release your code under the LGPL license) and the namespace (e.g. import PySide or import PyQt). I'm making this point as PyQt has a lot more tutorials and screencasts which are likely to help you on your way, but PySide is more preferable as it has a PPA, a less restrictive license, and is officially supported. – thomasmichaelwallace Dec 04 '11 at 22:25
  • @thomasmichaelwallace: Nitpick: PyQt *does* actually let you release your code under certain other open-source licenses. They specifically grant that as an exception to the GPL: http://www.riverbankcomputing.co.uk/software/pyqt/license – Thomas K Dec 05 '11 at 14:28
  • 2
    I can't tell you if you should branch into the GTK+ or QT route, since both toolkits fit the bill, but since you asked about pygtk being relevant, I assumed you were already set on GTK+. If this is still the case and considering the REALbasic background, have a look at `gambas` which is a GTK+-ready Basic IDE. Mostly, having cross platform in mind, it pays to learn C/C++ and separate the user interface from the application logic and compile the front-end with a native toolkit. E.g. transmission, a bittorrent client that came from the Mac platform, uses quartz on Mac and GTK+ on the rest. – aquaherd Dec 05 '11 at 14:50
  • Gambas also looks interesting... Thanks for that link! – Nootrino Dec 07 '11 at 07:28
  • No body mentioned wxPython as alternative (If OP opted for one)? Well its a nice wrapper around wxWidgets and gives native widgets. Check it out at http://wxpython.org – Stefano Mtangoo Jun 17 '13 at 10:34
0

PyGTK and pyGOBJECT are no longer the recommended method for developing apps for Ubuntu . Ubuntu developer website now recommends QML for the Ubuntu apps.

saji89
  • 11,927
  • 6
  • 45
  • 64
Tachyons
  • 17,221
  • 18
  • 74
  • 116