Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I only know C and Java. And I really don't want to learn another language when I can work with what I already know. I haven't ever written a GTK+ application, but I am planning to start with an experimental project. So, are there any advantages of writing in Python over Java (with respect to GTK+)?

share|improve this question

closed as primarily opinion-based by dobey, Eric Carvalho, Pilot6, David Foerster, Fabby Dec 9 '15 at 0:02

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

There's a nice series of videos covering Python with GTK over on OMGUbuntu: – Mendhak Oct 9 '11 at 17:16
Since you say you can program in C why not use C itself – sagarchalise Oct 11 '11 at 10:47

Python is a much more expressive language than Java. I used to be a very enthusiastic Java developer, but after I started using Python, I'll never go back. Python is quite simply a wonderful language for all kinds of different tasks.

I haven't actually programmed much GTK with Java, but there is at least some support for GObject Introspection, which will make many libraries available even if you use Java. Also, interfaces made in Glade will be usable from Java. Using Python is mostly a matter of comfort and not necessity.

share|improve this answer

I'm not 100% sure about this (only 99% :P) but I think it's because Python is preinstalled on Ubuntu while Java is not. Also Python integrates GTK+ really well ( At least that's the reason why I prefer Python over Java although I can't say something about Java integration. And I like Python's syntax, documentation and community more.

But as sagarchalise already said, why don't you use C if you know it? You can create your GUIs with Glade and use it in C and Python and maybe other languages.

Besides: "I really don't want to learn another language when I can work with what I already know." is a rather ... suboptimal ... attitude. You should always try to expand your horizons and look how others do things. Python is a object-oriented imperative language too and as I always say: if you know one you know them all. Sure there are some things that differ but "learning" Python is easy peasy if you know Java. I'd say give it a try.

share|improve this answer
Java (for OpenOffice) is standard in Ubuntu, however there have been more bugs in it than other frameworks (Swing applications with goofy fonts/graphical glitches, for example.) – NoBugs Apr 15 '14 at 1:34
@NoBugs correct me if I'm wrong but it is only the JRE that comes preinstalled, not the JDK. So you can't really start developing. – dAnjou Apr 27 '14 at 13:47

I'm learning Python, as my first programming language (other than pascal in high school) I have tried learning C++ about 10 years ago and failed, never did anything with it, and I have a bunch of books on Java that I did'nt buy. And I am glad that Python is popular because it sure is a lot simpler to use than what I remember from my earlier programming days.

I don't know much about Python but if you know other languages you'll pick up Python quickly I guarantee it

share|improve this answer

But Canonical accepts in their repos apps made with Java, look at this:

Clic at: Programming Languajes

share|improve this answer

People choose different languages for different reasons, an important one being their familiarity with the particular language.

As for creating Gtk applications, if you know Java, you might consider Vala. It is a lot like Java but very well integrated into the Gnome/Gtk environment.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.