LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Help, I don't know where to start! (http://www.linuxquestions.org/questions/programming-9/help-i-dont-know-where-to-start-818514/)

KonfuseKitty 07-07-2010 10:56 AM

Help, I don't know where to start!
 
I'm a total newbie in Linux and only have limited experience of programming - in Hypercard, Javascript and some Python on the Mac platform. Now I want to get started with high-level programming and scripting on Ubuntu 10.04. I've tried some searches on the internet and in forums to no avail, so I hope I can get some useful pointers in the right direction.

The project I have in mind is fairly simple: I want to create an image viewer window that I can bring up on a RAW image file in Nautilus - with the help of dcraw, to inspect the image at 100% without going into a separate application. The viewer should have a button that if clicked, would then convert the file to a TIFF, again using dcraw. That's it, that's all there is to it.

My initial impression is that I should be able to achieve this using Python and GTK widgets. Am I right? How can I find the commands and structures I will need to work with? If someone could give me basic info to get me started I would greatly appreciate it.

Sergei Steshenko 07-07-2010 11:10 AM

Quote:

Originally Posted by KonfuseKitty (Post 4026368)
I'm a total newbie in Linux and only have limited experience of programming - in Hypercard, Javascript and some Python on the Mac platform. Now I want to get started with high-level programming and scripting on Ubuntu 10.04. I've tried some searches on the internet and in forums to no avail, so I hope I can get some useful pointers in the right direction.

The project I have in mind is fairly simple: I want to create an image viewer window that I can bring up on a RAW image file in Nautilus - with the help of dcraw, to inspect the image at 100% without going into a separate application. The viewer should have a button that if clicked, would then convert the file to a TIFF, again using dcraw. That's it, that's all there is to it.

My initial impression is that I should be able to achieve this using Python and GTK widgets. Am I right? How can I find the commands and structures I will need to work with? If someone could give me basic info to get me started I would greatly appreciate it.

Look up

Perl gtk+ bindings
Python gtk+ bindings
OCaml gtk+ bindings

- I think you've got the idea.

Also, look up ImageMagick.

paulsm4 07-07-2010 11:15 AM

Hi -

Quote:

Q: My initial impression is that I should be able to achieve this using Python and GTK widgets. Am I right?
Yes, absolutely.

This has some great examples (including a complete, working file dialog):

http://wiki.wxpython.org/AnotherTutorial

'Hope that helps .. PSM

PS:
There are also many great resources here:
http://www.wxwidgets.org/

Sergei Steshenko 07-07-2010 11:26 AM

Quote:

Originally Posted by paulsm4 (Post 4026388)
Hi -



Yes, absolutely.

This has some great examples (including a complete, working file dialog):

http://wiki.wxpython.org/AnotherTutorial

'Hope that helps .. PSM

PS:
There are also many great resources here:
http://www.wxwidgets.org/

Strictly speaking, wxWidgets is a different than grk+ toolkit, though under Linux it often "sits" on top of gtk+. There is also wxX11 - that one does not use gtk+.

Other toolkits - of course, Qt, with Python bindings if desired.

KonfuseKitty 07-07-2010 01:15 PM

Thanks, guys, that's very helpful. I'm now looking at wxWidgets, their site does seem easier to get started with than my previous attempts at researching GTK+. Just to be sure, out of the three toolkits mentioned - wxWidgets, GTK+, QT - which would be my best choice? I wouldn't want to be caught out by any gotchas later.

Sergei Steshenko 07-07-2010 01:51 PM

Quote:

Originally Posted by KonfuseKitty (Post 4026493)
Thanks, guys, that's very helpful. I'm now looking at wxWidgets, their site does seem easier to get started with than my previous attempts at researching GTK+. Just to be sure, out of the three toolkits mentioned - wxWidgets, GTK+, QT - which would be my best choice? I wouldn't want to be caught out by any gotchas later.

Qt. But make sure it looks fine on a Gnome desktop.

paulsm4 07-07-2010 03:13 PM

Hi, again -

Quote:

Q: Out of the three toolkits mentioned - wxWidgets, GTK+, QT - which would be my best choice?
Personally, I prefer GTK+ (but I'm a fairly low-level, K&R C kinda' guy ;))

For you, I strongly feel "wxPython" is a probably the best fit.

IMHO .. PSM

Sergei Steshenko 07-07-2010 03:17 PM

Quote:

Originally Posted by paulsm4 (Post 4026605)
Hi, again -



Personally, I prefer GTK+ (but I'm a fairly low-level kinda' guy ;))
...

gtk+ is full of reinvented wheels making it look as a high level thingy. And historically gtk+ used to be a hack which feels until now while Qt looks to me as an orderly project from the very beginning.

KonfuseKitty 07-08-2010 04:52 AM

Ha, the irony... I came across the Wikipedia page on pyGTK which had a script for a Hello World window... I copied it into a file and it worked! So for now I'm going with GTK+. Considering my needs are quite basic, I hope I'll be fine. I like the fact it works 'out of the box', nothing new to install. I'm reading the pyGTK FAQ at the moment, which isn't the best teaching resource, but then I'll get started with the reference. I'm sure to be posting more questions as I go along. Thanks for all the input, it's much appreciated.


All times are GMT -5. The time now is 12:40 PM.