ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Oh my, you don't program for a living? That means you can pick the language that's the most fun!
Many folks say, that language is Python. But it really depends on what you want to do.
Like you say, if you'd like to get into GUI stuff, you're probably best off with Python (maybe along with the PyGTK module). Writing GUI code in C is more work than it's worth. Besides, if you need to, you can always create a small C module, and then make use of it from within your Python code.
Now, if you're more the sysadmin type, Perl is probably what you want. You can always do small gui apps with Perl/Tk.
Oh, and you asked about a good gui toolkit for C? Well, GTK+ is probably the most "standard" one these days. You might also look at FLTK. If you want to do graphics stuff in C using OpenGL, glut is nice (though it hardly has any widget support). If you've got the patience, you can learn Lesstif. There's gotta be a bunch others, but I don't recall them at the moment.
Oh I love this argument...you want to do GUI so use python because it has PyGTK but if you only want small GUI apps you could do these with Perl/Tk. You don't use Perl much, do you? If you did you'd know that Perl is every bit as good for GUIs as Python is. IN fact GTK has bindings for pretty much every language available...and that INCLUDES Perl. If you want to write programs in a powerful, multi-purpose scripting language with GUI support then use Perl. Anything you can do in Python you can do in perl and more. If you want to do a GUI use PerlGTK or Perl/Tk or wxPerl...the list goes on.
Komakino wrote: Oh I love this argument...you want to do GUI so use python because it has PyGTK but if you only want small GUI apps you could do these with Perl/Tk.
Whoa. Hey there. Hey now. How are ya. Slow down. :) Sorry, maybe I wasn't clear enough.
Read that line I posted one more time:
Now, if you're more the sysadmin type, Perl is probably what you want. You can always do small gui apps with Perl/Tk.
To elaborate, what I was getting at was:
If you're the sysadmin type, you might have more use for Perl than Python -- and further, as a sysadmin, you probably won't be writing large pieces of software, but rather many smaller Perl scripts here and there, so go ahead and use Perl (maybe Perl/Tk) for any GUI programs you might happen to need. I wrote "small programs" because sysadmins generally spend more time on other things besides writing large pieces of software.
If you're just interested in application programming, my guess is that Python will serve you better than Perl, though obviously opinions differ -- and I've been known to be wrong before. :)
What no mention of Scheme ??? *gasp. Grabs for bottle of Nitro tabs*
For util & admin type scripts I'd suggest Perl.
For Applications go with Python & wxPython ( Fun and has a nice Lispy feel).Better yet do what I do and code your core modules in C or Assembly & use wxPython for a GUI wrapper.
Where does this idea come from that if you want a GUI app in a scripting language use python? There is nothing python can do that Perl cannot whereas the opposite cannot be said to be true. Plus python's loops are HIDEOUS.
I can see your point in the argument about "if you're a sysadmin, learn Perl" but why not learn it anyway? There's little point in learning python to write GUI apps only oneday to discover you need something more powerful for when you could kill both birds with one stone by learning perl which can accomplish all goals.
Originally posted by Komakino It's limited to webpages.
PHP scripts can be run from the commandline.
I wrote a port scanner, and brute force cracker
using php on my machine and apache isnt even
installed. So no, its not just limited to web pages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.