Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
    
There's a nice series of videos covering Python with GTK over on OMGUbuntu: omgubuntu.co.uk/tag/screencasts –  Mendhak Oct 9 '11 at 17:16
5  
Since you say you can program in C why not use C itself –  sagarchalise Oct 11 '11 at 10:47

4 Answers 4

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

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 (http://www.pygtk.org/). 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 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 at 13: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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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