LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-07-2010, 10:56 AM   #1
KonfuseKitty
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu 10.10
Posts: 22

Rep: Reputation: 0
Question 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.
 
Old 07-07-2010, 11:10 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by KonfuseKitty View Post
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.
 
Old 07-07-2010, 11:15 AM   #3
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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/

Last edited by paulsm4; 07-07-2010 at 11:18 AM.
 
Old 07-07-2010, 11:26 AM   #4
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by paulsm4 View Post
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.
 
Old 07-07-2010, 01:15 PM   #5
KonfuseKitty
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu 10.10
Posts: 22

Original Poster
Rep: Reputation: 0
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.
 
Old 07-07-2010, 01:51 PM   #6
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by KonfuseKitty View Post
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.
 
Old 07-07-2010, 03:13 PM   #7
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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

Last edited by paulsm4; 07-07-2010 at 03:19 PM.
 
Old 07-07-2010, 03:17 PM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by paulsm4 View Post
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.
 
Old 07-08-2010, 04:52 AM   #9
KonfuseKitty
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu 10.10
Posts: 22

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
gtk, gtk+, image, nautilus, programming, python, viewer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 02:59 PM
How to start bash commands automatically every time I start the computer brgsousa Linux - Software 2 10-18-2007 12:26 PM
Computer doesn't start; fans start then stop; 1 long, 1 short beep PatrickMay16 General 18 09-26-2007 08:48 PM
disable cold start and warm start snmp traps chkisco Linux - Newbie 0 10-28-2005 03:58 AM
fc2-gnome : Applications dont start / very slow to start nox104 Linux - Software 0 08-18-2004 09:53 PM


All times are GMT -5. The time now is 11:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration