Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 08-26-08   #11 (permalink)
The Game
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: In A Faraday Cage
Posts: 2,675

Rep: 280 lattyware is a proven memberlattyware is a proven memberlattyware is a proven member
Unique Rep: 206
Folding Team Rank: 533
Hardware Reviews: 1
Trader Rating: 0
Default

Too true. ICT is a course in being a receptionist. It's a joke.

This thread had been here for ages, then it suddenly gets active out of nowhere XD
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club

"I disapprove of what you say, but I will defend to the death your right to say it." --Evelyn Beatrice Hall

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2x 1TB SATA, 2 x 500GB SATA
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch Linux x64
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline I fold for Overclock.net Overclocked Account lattyware's Gallery   Reply With Quote
Old 08-29-08   #12 (permalink)
Luck : 10pts
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Fl, US
Posts: 12,839
Blog Entries: 3

Rep: 365 Licht is a proven memberLicht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 242
Trader Rating: 0
Default

Quote:
Originally Posted by DarkNite View Post
integer not interger
You know it took me a month after i first started to notice that.


Hey Latty, might want to ask BFRD about getting this stickied.

System: Uzicht #4.5
CPU
Phenom II X4 920
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
HD4850 + HD3870
Hard Drive
4x WD1600AAJS RAID0
Sound Card
X-Fi Extreme Gamer Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Xigmatec Rifle
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows 7 Ultimate x86-x64
Monitor
Samsung SyncMaster 19"Wide
Licht is online now Overclocked Account Licht's Gallery   Reply With Quote
Old 08-31-08   #13 (permalink)
The Game
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: In A Faraday Cage
Posts: 2,675

Rep: 280 lattyware is a proven memberlattyware is a proven memberlattyware is a proven member
Unique Rep: 206
Folding Team Rank: 533
Hardware Reviews: 1
Trader Rating: 0
Default

You think it's sticky-worthy?
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club

"I disapprove of what you say, but I will defend to the death your right to say it." --Evelyn Beatrice Hall

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2x 1TB SATA, 2 x 500GB SATA
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch Linux x64
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline I fold for Overclock.net Overclocked Account lattyware's Gallery   Reply With Quote
Old 08-31-08   #14 (permalink)
Luck : 10pts
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Fl, US
Posts: 12,839
Blog Entries: 3

Rep: 365 Licht is a proven memberLicht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 242
Trader Rating: 0
Default

Quote:
Originally Posted by lattyware View Post
You think it's sticky-worthy?
That is for him to decide under my thoughts.

System: Uzicht #4.5
CPU
Phenom II X4 920
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
HD4850 + HD3870
Hard Drive
4x WD1600AAJS RAID0
Sound Card
X-Fi Extreme Gamer Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Xigmatec Rifle
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows 7 Ultimate x86-x64
Monitor
Samsung SyncMaster 19"Wide
Licht is online now Overclocked Account Licht's Gallery   Reply With Quote
Old 05-18-09   #15 (permalink)
New to Overclock.net
 
paulopastore's Avatar
 
Join Date: May 2009
Posts: 1

Rep: 0 paulopastore Unknown
Unique Rep: 0
Trader Rating: 0
Default Great Tutorial

I was looking for a good tutorial for pygtk and glade and yours fited perfectly.
Hope I can have some better interfaces for python programs!

Thanks a lot
paulopastore is offline   Reply With Quote
Old 05-19-09   #16 (permalink)
The Game
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: In A Faraday Cage
Posts: 2,675

Rep: 280 lattyware is a proven memberlattyware is a proven memberlattyware is a proven member
Unique Rep: 206
Folding Team Rank: 533
Hardware Reviews: 1
Trader Rating: 0
Default

Quote:
Originally Posted by paulopastore View Post
I was looking for a good tutorial for pygtk and glade and yours fited perfectly.
Hope I can have some better interfaces for python programs!

Thanks a lot
Glad I could help.
That said, this guide is getting a bit old, and Glade is being replaced with gtk.Builder - this removes the need for an extra library, and will have more features.
That said, gtk.Builder needs a very new version of the GTK, so it's still not mainstream, so this is not something you should worry about right now.
gtk.Builder is also largely very similar to glade. Glade will still exist as a GUI to create gtk.Builder files, and you can convert pretty easily. Changing the code should again be pretty simple.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club

"I disapprove of what you say, but I will defend to the death your right to say it." --Evelyn Beatrice Hall

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2x 1TB SATA, 2 x 500GB SATA
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch Linux x64
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline I fold for Overclock.net Overclocked Account lattyware's Gallery   Reply With Quote
Old 06-22-09   #17 (permalink)
New to Overclock.net
 
Join Date: Jun 2009
Posts: 1

Rep: 0 maegregory Unknown
Unique Rep: 0
Trader Rating: 0
Cool Tried your GUI, got error, what's wrong please?

Hello!! I'm trying to learn how to build my GUIs from your tutorial (very good, thanks). I went over all of it. After finished, I run the Python file of the GUI "tutgui.py" and got:

GTK Not Availible
>>>
>>> import gtk
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 48, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
>>>

I use Python 2.5 on Win32 xp platform, I know you use different OS. What you think I need to do/install/reinstall/add to the code/take off code... to correct this issue? If it is not matter of my system and I should specify something else in your code for it to run on my Win32?, where if so? should I use Pygtk somewhere in the codes?

Please heeeeeeelp!
Thanks so much,
Angelica.
maegregory is offline   Reply With Quote
Old 06-22-09   #18 (permalink)
With great difficulty
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,210

Rep: 614 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 370
FAQs Submitted: 6
Trader Rating: 5
Default

I'm guessing you need to install GTK for windows
__________________
System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 06-23-09   #19 (permalink)
The Game
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: In A Faraday Cage
Posts: 2,675

Rep: 280 lattyware is a proven memberlattyware is a proven memberlattyware is a proven member
Unique Rep: 206
Folding Team Rank: 533
Hardware Reviews: 1
Trader Rating: 0
Default

Quote:
Originally Posted by maegregory View Post
Hello!! I'm trying to learn how to build my GUIs from your tutorial (very good, thanks). I went over all of it. After finished, I run the Python file of the GUI "tutgui.py" and got:

GTK Not Availible
>>>
>>> import gtk
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 48, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
>>>

I use Python 2.5 on Win32 xp platform, I know you use different OS. What you think I need to do/install/reinstall/add to the code/take off code... to correct this issue? If it is not matter of my system and I should specify something else in your code for it to run on my Win32?, where if so? should I use Pygtk somewhere in the codes?

Please heeeeeeelp!
Thanks so much,
Angelica.
Quote:
Originally Posted by rabidgnome229 View Post
I'm guessing you need to install GTK for windows
Indeed, you need to install the GTK and pyGTK.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club

"I disapprove of what you say, but I will defend to the death your right to say it." --Evelyn Beatrice Hall

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2x 1TB SATA, 2 x 500GB SATA
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch Linux x64
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline I fold for Overclock.net Overclocked Account lattyware's Gallery   Reply With Quote
Old 08-24-09   #20 (permalink)
New to Overclock.net
 
Join Date: Aug 2009
Posts: 1

Rep: 1 FokkerCharlie Unknown
Unique Rep: 1
Trader Rating: 0
Default

Hi Lattyware et al

I know this is an old thread, but it was one of the first that I came across when searching for help, and probably the best getting-started walkthrough for Glade and python. Anyway, you mention that gtk.Builder is replacing libglade, so I thought I would follow that route (starting to learn a bit of python), and after much huffing and puffing have got your adder program to work with gtkbuilder.

Here's the code that works for me if anyone's interested:

Code:
import sys
try:  
    import pygtk  
    pygtk.require("2.0")  
except:  
    pass  
try:  
    import gtk  
except:  
    print("GTK Not Availible")
    sys.exit(1)

class adder:

    result = 0

    def __init__( self, number1, number2 ):
        self.result = int( number1 ) + int( number2 )
        
    def giveResult( self ):
        return str(self.result)
        
class adderGui:

    wTree = gtk.Builder()

    def __init__( self ):
        self.builder = gtk.Builder()
        self.builder.add_from_file("Adder.glade")
        self.window = self.builder.get_object ("windowMain")
        if self.window:
            self.window.connect("destroy", gtk.main_quit)
        self.entry1 = self.builder.get_object ("entry1")
        self.entry2 = self.builder.get_object ("entry2")
        
        dic = { 
            "on_buttonQuit_clicked" : self.quit,
            "on_buttonAdd_clicked" : self.add,
            "on_windowMain_destroy" : self.quit,
        }
        
        self.builder.connect_signals( dic )

    def add(self, widget):
        entry1 = self.builder.get_object ("entry1")
        entry2 = self.builder.get_object ("entry2")
        try:
            thistime = adder( entry1.get_text(), entry2.get_text() )
        except ValueError:
            self.builder.get_object("hboxWarning").show()
            self.builder.get_object("image1").show()
            self.builder.get_object("entryResult").set_text("ERROR")
            return 0
        self.builder.get_object("hboxWarning").hide()
        self.builder.get_object("image1").hide()
        self.builder.get_object("entryResult").set_text(thistime.giveResult())
  
    def quit(self, widget):
        sys.exit(0)
        
adderGui = adderGui()
adderGui.window.show()
gtk.main()
I daresay that it could be tidier or bettered in many ways (pointers welcome). Any suggestions as to where to go next?

Cheers
Charlie

Last edited by FokkerCharlie : 08-24-09 at 03:15 AM
FokkerCharlie is offline   Reply With Quote
Reply

Tags
glade, gui, programming, python, tutorial


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 03:26 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.17693 seconds with 9 queries