<?xml version="1.0" encoding="utf-8"?>
		<feed xmlns="http://www.w3.org/2005/Atom">
		  <title type="text">LearningPython Forums - All Discussions</title>
		  <updated>2010-09-10T04:57:34-04:00</updated>
		  <id>http://www.learningpython.com/forums/</id>
		  <link rel="alternate" type="text/html" hreflang="en" href="http://www.learningpython.com/forums/"/>
		  <link rel="self" type="application/atom+xml" href="http://www.learningpython.com/forums/?Feed=Atom"/>
		  <generator uri="http://getvanilla.com/" version="1.1.10">
			 Lussumo Vanilla
		  </generator>
		  <entry>
		<title>PyGame tutorial II</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=37" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=37</id>
		<published>2010-08-13T10:06:23-04:00</published>
		<updated>2010-08-26T16:04:32-04:00</updated>
		<author>
			<name>Jonte135</name>
			<uri>http://www.learningpython.com/forums/account.php?u=40</uri>
		</author>
		<summary type="text" xml:lang="en">
			This is about this tutorial: Link

I've replaced the snake character to another sprite and now I what surface to put in the code:
pygame.transform.rotate(Surface, angle)

I'm pretty new when to ...
		</summary>
		<content type="html">
			<![CDATA[This is about this tutorial: <a href="http://www.learningpython.com/2006/03/19/creating-a-game-in-python-using-pygame-part-two-creating-a-level/" >Link</a><br /><br />I've replaced the snake character to another sprite and now I what surface to put in the code:<br /><code >pygame.transform.rotate(Surface, angle)</code><br /><br />I'm pretty new when to Python when it comes to OOP so I'm having some trouble with the self things etc and I can't figure out what exactly the snake sprite is, in terms of code.]]>
		</content>
	</entry>
	<entry>
		<title>None</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=36" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=36</id>
		<published>2010-04-09T04:04:38-04:00</published>
		<updated>2010-04-09T04:04:38-04:00</updated>
		<author>
			<name>ivan.ivanenko</name>
			<uri>http://www.learningpython.com/forums/account.php?u=38</uri>
		</author>
		<summary type="text" xml:lang="en">
			None
		</summary>
		<content type="html">
			<![CDATA[None]]>
		</content>
	</entry>
	<entry>
		<title>simple textview problem</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=27" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=27</id>
		<published>2007-10-30T15:12:41-04:00</published>
		<updated>2010-04-08T22:59:59-04:00</updated>
		<author>
			<name>squeakyfrommage</name>
			<uri>http://www.learningpython.com/forums/account.php?u=19</uri>
		</author>
		<summary type="text" xml:lang="en">
			I'm trying to view a plaintext file in my gui (the textfile is the output of a seperate program).  I can't seem to figure out how to do this at all.  If anyone could explain it to me, or tell me ...
		</summary>
		<content type="html">
			<![CDATA[I'm trying to view a plaintext file in my gui (the textfile is the output of a seperate program).  I can't seem to figure out how to do this at all.  If anyone could explain it to me, or tell me where to look, I'd really appreciate it.  Thanks.]]>
		</content>
	</entry>
	<entry>
		<title>Silly SPAM</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=35" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=35</id>
		<published>2010-04-08T22:51:10-04:00</published>
		<updated>2010-04-08T22:51:10-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Sorry everyone for all of the spam that has filled up this forum. I stopped paying close attention to the notifications that I was getting and it looks like they were all for spam!

I've tried to ...
		</summary>
		<content type="html">
			<![CDATA[Sorry everyone for all of the spam that has filled up this forum. I stopped paying close attention to the notifications that I was getting and it looks like they were all for spam!<br /><br />I've tried to lock the forums down a little bit to stop it's increase and will hopefully delete all of the offending posts and comments over the coming days.<br /><br />mark.]]>
		</content>
	</entry>
	<entry>
		<title>Cocos2d + PyGTK?</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=33" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=33</id>
		<published>2009-06-13T04:35:18-04:00</published>
		<updated>2009-06-29T10:14:15-04:00</updated>
		<author>
			<name>mots</name>
			<uri>http://www.learningpython.com/forums/account.php?u=30</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hey, as you've written dodger (which embeds pyglet in pygtk) and cocos2d is built on pyglet, I hope you might help me... I want to build a game using pygtk for the UI and cocos2d for the rendering... ...
		</summary>
		<content type="html">
			<![CDATA[Hey, as you've written dodger (which embeds pyglet in pygtk) and cocos2d is built on pyglet, I hope you might help me... I want to build a game using pygtk for the UI and cocos2d for the rendering... But how do I embed a cocos2d director (which is a pyglet.window.window, I think) into a pygtk application?<br /><br />This is the most simple cocos2d app I can write:<br /><code >import cocos<br />class HelloWorld(cocos.layer.Layer):<br />    def __init__(self):<br />        super( HelloWorld, self ).__init__()<br />        label = cocos.text.Label('Hello, world',<br />                          font_name='Times New Roman',<br />                          font_size=32,<br />                          anchor_x='center', anchor_y='center')<br />        label.position = 320,240<br />        self.add( label )<br />     <br />cocos.director.director.init()<br />hello_layer = HelloWorld ()<br />main_scene = cocos.scene.Scene (hello_layer)<br />cocos.director.director.run (main_scene)<br /></code><br /><br />So how would I embed this director in a pygtk window? Any ideas?]]>
		</content>
	</entry>
	<entry>
		<title>zoom and pan in pygtk</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=34" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=34</id>
		<published>2009-06-18T16:45:43-04:00</published>
		<updated>2009-06-19T11:44:14-04:00</updated>
		<author>
			<name>mak89</name>
			<uri>http://www.learningpython.com/forums/account.php?u=31</uri>
		</author>
		<summary type="text" xml:lang="en">
			hello all,

I am trying to make some map interaction app in which I need to log zooming and panning actions, I have a problem implementing the zoomin, zoomout and pan action using pygtk. I have ...
		</summary>
		<content type="html">
			<![CDATA[hello all,<br /><br />I am trying to make some map interaction app in which I need to log zooming and panning actions, I have a problem implementing the zoomin, zoomout and pan action using pygtk. I have also tried pygame, but integrating it to pygtk is also a problem. Could someone please come to my recsue on  this, implementing the zooming and panning actions? Thanks in advance<br /><br />Mak89]]>
		</content>
	</entry>
	<entry>
		<title>Problems with a gtk.TextView</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=16" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=16</id>
		<published>2007-02-13T10:56:20-05:00</published>
		<updated>2009-02-28T15:30:54-05:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Post made by apurva

hey,
i really appreciate the efforts that you are making to make life simpler for absolute noobs like me
i am trying to develop a spam filter and for demo purposes, ...
		</summary>
		<content type="html">
			<![CDATA[Post made by <strong >apurva</strong><br /><br />hey,<br />i really appreciate the efforts that you are making to make life simpler for absolute noobs like me<br />i am trying to develop a spam filter and for demo purposes, simulating a mail viewer too(in glade+pygtk)<br /><br />Now, im getting stuck at a very trivial place.<br />I display a particular mail in a TextView... but if i choose another mail, it is getting appended placed at the cursor position(since i use insert_at_cursor for the textbuffer), but actually, the previous mail should be cleared first, and then this 1 should be displayed.<br />i set_overwrite(True) for the TextView object before printing, yet, the textview is not cleared.<br />where am i going wrong??]]>
		</content>
	</entry>
	<entry>
		<title>my frist python proyect</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=32" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=32</id>
		<published>2008-10-15T19:59:35-04:00</published>
		<updated>2008-10-15T19:59:35-04:00</updated>
		<author>
			<name>axl456</name>
			<uri>http://www.learningpython.com/forums/account.php?u=26</uri>
		</author>
		<summary type="text" xml:lang="en">
			hi everyone!!

pls excuse if i dont explain myself to good, im from latinamerica

well im new (really new) in the word of programming in any language not only in python..

i have read many ...
		</summary>
		<content type="html">
			<![CDATA[hi everyone!!<br /><br />pls excuse if i dont explain myself to good, im from latinamerica<br /><br />well im new (really new) in the word of programming in any language not only in python..<br /><br />i have read many tutorial but i havent found anything that explained me what i need..<br /><br />i want to create and aplication that replace strings for text archives massively, like the &quot;replace&quot; option on a text editor, but for lots of text archive at the same time..<br /><br />something that ask me what string i like to replace find it and replace on all the files on a folder.<br /><br />if you gave some headlines and tutorials to follow a'll be very happy :D<br /><br />thanks!!]]>
		</content>
	</entry>
	<entry>
		<title>redesigning the &quot;smart package manager&quot; gui</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=31" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=31</id>
		<published>2008-07-06T19:46:06-04:00</published>
		<updated>2008-07-21T00:12:20-04:00</updated>
		<author>
			<name>Jonathan R</name>
			<uri>http://www.learningpython.com/forums/account.php?u=24</uri>
		</author>
		<summary type="text" xml:lang="en">
			I started redesigning the &quot;smart package manager&quot; gui sometime ago. I used glade for the gui, now I'm trying to write the python end. 

My python code is here ...
		</summary>
		<content type="html">
			<![CDATA[I started redesigning the "smart package manager" gui sometime ago. I used glade for the gui, now I'm trying to write the python end. <br /><br />My python code is here <a href="http://downloads.thecompletecomputerresource.com/smart/smart%20gui/smartgui2.py" >http://downloads.thecompletecomputerresource.com/smart/smart%20gui/smartgui2.py</a> and my glade code is here <a href="http://downloads.thecompletecomputerresource.com/smart/smart%20gui/smartgui2-20080705.glade" >http://downloads.thecompletecomputerresource.com/smart/smart%20gui/smartgui2-20080705.glade</a><br /><br />Now I'm stuck on what to do next. self.wTree.signal_autoconnect (dic) doesn't seem right. After window1 in my glade file comes menubar. So I'm not sure what I should do. <br /><br />I'm not asking someone to write it for me, just some direction as to what to do next.]]>
		</content>
	</entry>
	<entry>
		<title>Bind nuance</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=30" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=30</id>
		<published>2008-03-15T03:54:46-04:00</published>
		<updated>2008-03-15T03:56:02-04:00</updated>
		<author>
			<name>maylo</name>
			<uri>http://www.learningpython.com/forums/account.php?u=22</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hello.  I'm working from tutorial code (http://wiki.wxpython.org/AnotherTutorial) building the calculator and came across this:

        self.Bind(wx.EVT_BUTTON, self.OnSeven, id=1)
        ...
		</summary>
		<content type="html">
			<![CDATA[Hello.  I'm working from tutorial code (http://wiki.wxpython.org/AnotherTutorial) building the calculator and came across this:<br /><br />        self.Bind(wx.EVT_BUTTON, self.OnSeven, id=1)<br />        self.Bind(wx.EVT_BUTTON, self.OnEight, id=2)<br />        self.Bind(wx.EVT_BUTTON, self.OnNine, id=3)<br />...<br />OnSeven, OnEight, and OnNine all have the same code except for what they display:<br />    def OnSeven(self, event):<br />        if self.formula:<br />            self.display.Clear()<br />            self.formula = False<br />        self.display.AppendText('7')<br /><br />Being lazy and clever, I thought I would change functions to all be the same and just pass a new value:<br />        self.Bind(wx.EVT_BUTTON, self.OnShow('7'), id=1)<br />        self.Bind(wx.EVT_BUTTON, self.OnShow('8'), id=2)<br />        self.Bind(wx.EVT_BUTTON, self.On('9'), id=3)<br />...<br />    def OnSeven(self, event, displayText):<br />        if self.formula:<br />            self.display.Clear()<br />            self.formula = False<br />        self.display.AppendText(displayText)<br /><br />When I run it, I get the following error:<br />Traceback (most recent call last):<br />  File &quot;./x.py&quot;, line 184, in &lt;module&gt;<br />    app = MyApp(0)<br />  File &quot;/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py&quot;, line 7757, in __init__<br />  File &quot;/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py&quot;, line 7354, in _BootstrapApp<br />  File &quot;./x.py&quot;, line 179, in OnInit<br />    frame = MyFrame(None, -1, 'calculator.py')<br />  File &quot;./x.py&quot;, line 52, in __init__<br />    self.Bind(wx.EVT_BUTTON, self.OnShow('7'), id=1)<br />TypeError: OnShow() takes exactly 3 arguments (2 given)<br /><br />After fooling around for a few hours with this, I'm getting to the point where I believe the Bind() doesn't allow functions with arguments.  Every example I've pulled on the web supports this but so far I haven't found any docs that say this too.<br /><br />Ideas?]]>
		</content>
	</entry>
	<entry>
		<title>RAD GUI Programming with Glade and smartglade</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=29" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=29</id>
		<published>2007-11-09T07:09:56-05:00</published>
		<updated>2007-11-12T10:06:40-05:00</updated>
		<author>
			<name>pyrgen</name>
			<uri>http://www.learningpython.com/forums/account.php?u=21</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi,
I came out with an interesting way to build GTK+ based applications using Python programming language, Glade GUI builder and smartglade module on almost all modern platforms. Inspired by ...
		</summary>
		<content type="html">
			<![CDATA[Hi,<br />I came out with an interesting way to build GTK+ based applications using Python programming language, Glade GUI builder and <strong >smartglade</strong> module on almost all modern platforms. Inspired by libglade, it brings a fresh way how to deal with widget identifiers in programs. It smartly fixes their names and initialize. smartglade allows dynamic loading of user interfaces from XML descriptions (Glade files or buffers). smartglade automatically creates (gets children, assigns identifiers and initialize them) corresponding widgets from XML descriptions. smartglade uses following Python modules: pygtk, gtk, gobject and xml.<br /><br />If anyone is interested in developing this module and keeping it very very simple and lightweight, you can find me here: <a href="http://pyrgen.googlepages.com/" >http://pyrgen.googlepages.com/</a><br /><br />See also:<br /><a href="http://pyrgen.googlepages.com/smartglade" >http://pyrgen.googlepages.com/smartglade</a><br /><br />Project page:<br /><a href="http://code.google.com/p/smartglade/" >http://code.google.com/p/smartglade/</a>]]>
		</content>
	</entry>
	<entry>
		<title>sys.exit() - Necessary ?</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=28" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=28</id>
		<published>2007-11-04T22:15:07-05:00</published>
		<updated>2007-11-12T09:49:17-05:00</updated>
		<author>
			<name>matelot</name>
			<uri>http://www.learningpython.com/forums/account.php?u=20</uri>
		</author>
		<summary type="text" xml:lang="en">
			In the tutorial code below,
&quot;sys.exit()&quot; is not necessary, right ?

Does it make any difference whether it's there or not ? 

thanks



#!/usr/bin/env python
# File name: ...
		</summary>
		<content type="html">
			<![CDATA[In the tutorial code below,<br />"sys.exit()" is not necessary, right ?<br /><br />Does it make any difference whether it's there or not ? <br /><br />thanks<br /><br /><br /><code ><br />#!/usr/bin/env python<br /># File name: cat.py<br /><br />import os, sys<br /><br />def readfile(filename):<br />    '''Print a file to the standard output.'''<br />    if not os.path.exists(filename):<br />        print 'The file', filename, 'does not exist.'<br />    #    sys.exit(1)<br /><br />    for line in file(filename):<br />        print line,<br /><br />if len(sys.argv) &lt; 2:<br />    print 'No action specified.'<br /> #   sys.exit()<br /><br />if sys.argv[1].startswith('--'):<br />    option = sys.argv[1][2:]<br />    if option == 'version':<br />        print 'Version 1.5'<br />    elif option == 'help':<br />        print '''\<br />This program prints files to the standard output.<br />Any number of files can be specified.<br />Options include:<br />    --version : Prints the version number<br />    --help    : Display this help.<br />'''<br />    else:<br />        print 'Unknown option.'<br />    #sys.exit()<br />else:<br />    for filename in sys.argv[1:]:<br />        readfile(filename)<br /></code>]]>
		</content>
	</entry>
	<entry>
		<title>gtk.combo problem</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=26" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=26</id>
		<published>2007-10-25T01:56:44-04:00</published>
		<updated>2007-10-25T01:56:44-04:00</updated>
		<author>
			<name>rhitam30111985</name>
			<uri>http://www.learningpython.com/forums/account.php?u=18</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi all.. i am trying to create a combo with the pop down list being modfied in real time as i type each character :

import ...
		</summary>
		<content type="html">
			<![CDATA[Hi all.. i am trying to create a combo with the pop down list being modfied in real time as i type each character :<br /><br />&lt;code&gt;import gtk<br />window=gtk.Window(gtk.WINDOW_TOPLEVEL)<br />window.connect(&quot;destroy&quot;,gtk.main_quit)<br />combo=gtk.Combo()<br />combo.set_use_arrows(True)<br /><br />wordlist=['aata','abbay','acute','adistance','bobbby','cat','cbount','daddy']<br />def entry_callback(widget,combo):<br /># ------<br /><br />combo.entry.connect(&quot;activate&quot;,entry_callback,combo)<br />window.add(combo)<br />window.show()<br />combo.show()<br />gtk.main()   <br />&lt;/code&gt;<br /><br />now my aim is when i enter a chareacter 'a' into the combo.entry field .. all the words beginning with the letter 'a'  wud be set in the popdown list .. if the next character is 'c' , meaning now the entry is 'ac' then the pop down list should be modified to only the word 'acute' .. now the problem is the combo.entry.get_text() function will return a string only when the enter key is pressed .. how do i set the pop down list without pressing the enter key ?  :(    assuming i already haev a function which is  a python version of the C function getch() . returning the character which is pressed on the keyboard .. here is the fucntion:<br /><br /><br /><br />&lt;code&gt;<br />def getch():<br />	import os, tty<br /><br />	fd = sys.stdin.fileno()<br />	tty_mode = tty.tcgetattr(fd)<br />	tty.setcbreak(fd)<br />	try:<br />	        ch = os.read(fd, 1)<br />	finally:<br />	        tty.tcsetattr(fd, tty.TCSAFLUSH, tty_mode)<br /><br />	return ch<br /><br />&lt;/code&gt;<br />but this wud catch a chaarcter entered in the console .. how do i do the same for the entry box of the combo.. any help appreciated.<br />regards]]>
		</content>
	</entry>
	<entry>
		<title>Exhance your PyGTK app</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=13" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=13</id>
		<published>2007-01-27T17:16:18-05:00</published>
		<updated>2007-10-02T09:50:38-04:00</updated>
		<author>
			<name>supertux</name>
			<uri>http://www.learningpython.com/forums/account.php?u=7</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi,

till now you should us a lot of basic stuff for PyGTK.

Maybe now it's time now for enhancing the applications.

I could think of the following:
 - Trayicon (easy under gnome with ...
		</summary>
		<content type="html">
			<![CDATA[Hi,<br /><br />till now you should us a lot of basic stuff for PyGTK.<br /><br />Maybe now it's time now for enhancing the applications.<br /><br />I could think of the following:<br /> - Trayicon (easy under gnome with egg.trayicon, does that work on win as well?)<br /> - Right-Click Menu (seen in a lot of PyGTK apps, but no idea how build my own)<br /><br />Anything more?<br /><br />Thanks,<br />supertux]]>
		</content>
	</entry>
	<entry>
		<title>Manipulating Style of widgets</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=25" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=25</id>
		<published>2007-09-19T05:19:20-04:00</published>
		<updated>2007-09-19T05:19:20-04:00</updated>
		<author>
			<name>kdikert</name>
			<uri>http://www.learningpython.com/forums/account.php?u=17</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi,

I am developing an application that will run on a PDA and it requires some special layouts and looks for the widgets. The PDA has a touch sensitive screen and the application is used by ...
		</summary>
		<content type="html">
			<![CDATA[Hi,<br /><br />I am developing an application that will run on a PDA and it requires some special layouts and looks for the widgets. The PDA has a touch sensitive screen and the application is used by pressing on the display with the finger tips. Because of this I need to make some UI elements really big so that they are easy to click on. I also need to make some customization on the default widgets in order to create an optimal UI. In order to save effort I want the widgets to lay out and respond to interaction in the default way, but I want to entirely control the drawing of the widgets in each of their states. I want to write the entire application in Python. I found many good examples on this page, but I still need some more information. I have the following problems:<br /><br />- I want to make a vertical scrollbar 40 pixels wide, so that it is easy to use with the finger tips. I find an attribute named &quot;slider-width&quot; listed in gtk.Range Style Properties in the GTK class reference. However, in the API reference I find no clue whatsoever on how to manipulate that value, or even in which construct it is stored in or how to read it. I need to know 1) how I can read the &quot;slider-width&quot; property of a gtk.VScrollbar and 2) how can I change the value.<br /><br />- There is a class called gtk.Style which I presume controlls the drawing of all basic widgets in a nice and efficient way. However, the PDA implementation of gtk.Style.paint_box() will draw only the right and bottom edges of the box. I would like to create my own Style implementation that would correct the problem, and also bring some additional visuality to the basic box. Is it possible to create such an own style? If I create a new own style it must inherit all attributes (such as colors) from the current default style. How do I implement the inheritance of the attributes?<br /><br />- If I use my own gtk.Style instance, is there any way to set it as the default style in the application initialization? All widgets that would be created afterwards would then use the recently assigned new default style.<br /><br />Thanks in advance!]]>
		</content>
	</entry>
	<entry>
		<title>Images are now supported</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=24" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=24</id>
		<published>2007-05-23T11:24:07-04:00</published>
		<updated>2007-05-23T11:24:07-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Just to let everyone know I've added support for attaching images and other files to posts.  I thought that this might help people that want to show other people code form time to time.

It's also ...
		</summary>
		<content type="html">
			<![CDATA[Just to let everyone know I've added support for attaching images and other files to posts.  I thought that this might help people that want to show other people code form time to time.<br /><br />It's also nice to be able to add an image to your post.]]>
		</content>
	</entry>
	<entry>
		<title>New style for Glade-3.20</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=22" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=22</id>
		<published>2007-05-22T21:49:10-04:00</published>
		<updated>2007-05-23T11:06:12-04:00</updated>
		<author>
			<name>mbastien</name>
			<uri>http://www.learningpython.com/forums/account.php?u=10</uri>
		</author>
		<summary type="text" xml:lang="en">
			I don't know about other people but I'm not a fan of the separate window applications like the way Glade used to be.  But now with version 3.2x it's more like traditional programs, along the lines of ...
		</summary>
		<content type="html">
			<![CDATA[I don't know about other people but I'm not a fan of the separate window applications like the way Glade used to be.  But now with version 3.2x it's more like traditional programs, along the lines of Visual Studio or QTsDesigner.<br /><br />Who else likes it this way?<br />http://glade.gnome.org/]]>
		</content>
	</entry>
	<entry>
		<title>Suggestions?</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=2" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=2</id>
		<published>2007-01-18T09:50:46-05:00</published>
		<updated>2007-05-22T22:59:06-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Does anyone have any suggestions for possible tutorials for http://www.learningpython.com? I'd love to hear any and all tutorial suggestions:

Favorite GUI tool kit. Favorite new Python library ...
		</summary>
		<content type="html">
			<![CDATA[Does anyone have any suggestions for possible tutorials for <a href="http://www.learningpython.com" >http://www.learningpython.com</a>? I'd love to hear any and all tutorial suggestions:<br /><br />Favorite GUI tool kit. Favorite new Python library that you want to play around with. Anything at all.<br /><br />Now I'm not saying that I can write any and all tutorials, simply that I enjoy writing tutorials and learning python, so any tips on how and where to expand my knowledge are appreciated.]]>
		</content>
	</entry>
	<entry>
		<title>Linux</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=15" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=15</id>
		<published>2007-02-04T13:33:06-05:00</published>
		<updated>2007-05-22T21:54:58-04:00</updated>
		<author>
			<name>Dave</name>
			<uri>http://www.learningpython.com/forums/account.php?u=4</uri>
		</author>
		<summary type="text" xml:lang="en">
			I see so many people on the internet using Linux to program. Why not use Windows? Whats the difference between Linux Windows and the apple mac?
		</summary>
		<content type="html">
			<![CDATA[I see so many people on the internet using Linux to program. Why not use Windows? Whats the difference between Linux Windows and the apple mac?]]>
		</content>
	</entry>
	<entry>
		<title>Change objects in a gtk.table</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=21" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=21</id>
		<published>2007-05-05T12:48:27-04:00</published>
		<updated>2007-05-22T17:29:55-04:00</updated>
		<author>
			<name>hpl</name>
			<uri>http://www.learningpython.com/forums/account.php?u=12</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hello everybody!
This is my first Post on this forum... before explaining my problem, I wanna thank Selsine for his blog!

Here are my problem with the pyGtk library:

I have made a table for my ...
		</summary>
		<content type="html">
			<![CDATA[Hello everybody!<br />This is my first Post on this forum... before explaining my problem, I wanna thank Selsine for his blog!<br /><br />Here are my problem with the pyGtk library:<br /><br />I have made a table for my window... table = gtk.Table(ROWS, COLS)<br />and I have attached into a table-cell an image...<br />img = gtk.Image()<br />img.set_from_file(&quot;image.jpg&quot;)<br />table.attach(img, x, x1, y, y1)<br />and this is ok... <br /><br />Now I want to change this image on the table-cell by a callback function (e.g. clicked button...)<br /><br />I have tried to find solution on the documentation and google... but I have been unable to solve.<br /><br />What I have to do? <br />Do you have another idea about change an image in the window by a callback function?<br /><br />Thanks!<br />^__^]]>
		</content>
	</entry>
	<entry>
		<title>Python411 podcast series</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=18" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=18</id>
		<published>2007-02-27T20:32:18-05:00</published>
		<updated>2007-04-10T00:32:35-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			I just came across these the other day while I was browsing the available podcasts on iTunes: Python411 Podcast Series

I've only listened to three or four but on a long plane ride they can ...
		</summary>
		<content type="html">
			<![CDATA[I just came across these the other day while I was browsing the available podcasts on iTunes: <a href="http://www.awaretek.com/python/index.html" >Python411 Podcast Series</a><br /><br />I've only listened to three or four but on a long plane ride they can actually be quite interesting.  They even have a few podcasts about pyGame.<br /><br />Check it out!<br /><br />selsine]]>
		</content>
	</entry>
	<entry>
		<title>PyWeek 4</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=19" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=19</id>
		<published>2007-03-22T22:33:25-04:00</published>
		<updated>2007-04-10T00:28:57-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Just in case everyone didn't know PyWeek 4 is happening during the first week of April.  If you are interested in having some fun with Python and PyGame head over to the website and signup!

I've ...
		</summary>
		<content type="html">
			<![CDATA[Just in case everyone didn't know PyWeek 4 is happening during the first week of April.  If you are interested in having some fun with Python and PyGame head over to the <a href="http://pyweek.org/4/" >website</a> and signup!<br /><br />I've signed up again, hopefully this time I'll actually finish a game!]]>
		</content>
	</entry>
	<entry>
		<title>pyGame tutorials at ShowMeDo - might be useful?</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=3" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=3</id>
		<published>2007-01-18T12:45:38-05:00</published>
		<updated>2007-04-10T00:27:23-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi there. If you were planning on doing some tutorials about pyGame, you might want to take a look at our two sets of pyGame tutorials.

The first by Chuck Arellano shows the user how to write an ...
		</summary>
		<content type="html">
			<![CDATA[Hi there. If you were planning on doing some tutorials about pyGame, you might want to take a look at our two sets of pyGame tutorials.<br /><br />The first by Chuck Arellano shows the user how to write an Arinoid clone in 4 parts (the 5th and final part is now in production). The second set by Florian Mayer shows the user how to get started with a window and basic animation over 3 parts:<br /><br />http://showmedo.com/videos/series?name=pythonArellanoPyGameSeries<br />http://showmedo.com/videos/series?name=pythonMayerPyGameSeries<br /><br />If these are useful, feel free to link to them. We've talked before about your tutorials and ShowMeDo...we'd still very much welcome videos made by you, if you'd be interested.<br /><br />Regards,<br />Ian.]]>
		</content>
	</entry>
	<entry>
		<title>Python in large-scale enterprise application</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=20" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=20</id>
		<published>2007-03-22T22:40:28-04:00</published>
		<updated>2007-04-05T23:51:46-04:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			I saw this a few weeks ago when I was surfing the net and meant to post it up here but never got around to it until tonight, life has a funny way of getting busy on you.

Anyway, it's an article ...
		</summary>
		<content type="html">
			<![CDATA[I saw this a few weeks ago when I was surfing the net and meant to post it up here but never got around to it until tonight, life has a funny way of getting busy on you.<br /><br />Anyway, it's an <a href="http://www.eweek.com/article2/0,1895,2100629,00.asp" >article</a> about a company that is using python (among other languages) to develop a reservation management system for Air Canada.<br /><br />Interesting read if you are interested in seeing what "really" happening out there in terms of commercial python development.]]>
		</content>
	</entry>
	<entry>
		<title>Passing extra information to signal handlers</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=17" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=17</id>
		<published>2007-02-15T10:08:05-05:00</published>
		<updated>2007-02-15T10:08:05-05:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			The other day I got the following comment from foxmjay posted on my Creating a GUI using PyGTK and Glade tutorial:

hi
thank you for this tutorial, i just started learning pygtk but it take much ...
		</summary>
		<content type="html">
			<![CDATA[The other day I got the following comment from foxmjay posted on my <a href="http://www.learningpython.com/2006/05/07/creating-a-gui-using-pygtk-and-glade/" >Creating a GUI using PyGTK and Glade</a> tutorial:<br /><br /><blockquote >hi<br />thank you for this tutorial, i just started learning pygtk but it take much time to make GUI with gtk directly in code so i searched for something like qt-designer and here i found this nice tutorial :) .but i have a question how to call a function with arguments when the button is pressed , i mean i want to call this function :<br /><br />def btnHelloWorld_clicked(self, widget, txt):<br />print “Hello World! %s” % txt<br /><br />so how could i mention the argument txt :<br /><br />dic = { “on_btnHelloWorld_clicked” : self.btnHelloWorld_clicked}<br />self.wTree.signal_autoconnect(dic)<br /><br />thanks </blockquote><br /><br />Thankfully the solution is quite simple since you can specify extra callback data when you connect a signal with its handler (a simple example):<br /><br /><code lang="python" ><br />#!/usr/bin/env python<br /><br />import sys<br />try:<br /> 	import pygtk<br />  	pygtk.require(&quot;2.0&quot;)<br />except:<br />  	pass<br />try:<br />	import gtk<br />  	import gtk.glade<br />except:<br />	sys.exit(1)<br /><br />class simpleData(object):<br /><br />	def __init__(self, text):<br />		self.text = text<br /><br />class HellowWorldGTK:<br />	&quot;&quot;&quot;This is an Hello World GTK application&quot;&quot;&quot;<br />	def __init__(self):<br /><br />		#Set the Glade file<br />		self.gladefile = &quot;pyhelloworld.glade&quot;<br />		self.wTree = gtk.glade.XML(self.gladefile)<br /><br />		#Create our dictionay and connect it<br />		dic = {&quot;on_MainWindow_destroy&quot; : gtk.main_quit }<br />		self.wTree.signal_autoconnect(dic)<br /><br />		button = self.wTree.get_widget(&quot;btnHelloWorld&quot;)<br />		button.connect(&quot;clicked&quot;, self.btnHelloWorld_clicked<br />			, simpleData(&quot;Text&quot;))<br /><br />	def btnHelloWorld_clicked(self, widget, data):<br />		print &quot;Hello World: &quot;, data.text<br />		data.text = &quot;New Text&quot;<br /><br />if __name__ == &quot;__main__&quot;:<br />	hwg = HellowWorldGTK()<br />	gtk.main()<br /></code><br /><br />The results from running this and clicking the button twice are:<br /><br /><code ><br />Hello World: Text<br />Hello World: New Text<br /></code><br /><br />So I decided to post this information here just in case anyone else has a similar question, or knows of a better way to do this.  Generally I would probably just add a member to the class that contains this information but perhaps there are some obvious reasons when doing this would be very useful, and I'm just missing them.<br /><br />selsine.]]>
		</content>
	</entry>
	<entry>
		<title>Subscribe to threads</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=12" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=12</id>
		<published>2007-01-27T17:11:55-05:00</published>
		<updated>2007-02-06T17:27:17-05:00</updated>
		<author>
			<name>supertux</name>
			<uri>http://www.learningpython.com/forums/account.php?u=7</uri>
		</author>
		<summary type="text" xml:lang="en">
			In most forums you can subscribe to threads to get a mail notify, that would be nice here too.

Or even better: if there would be an rss or atom feed that shows every single post.

regards
		</summary>
		<content type="html">
			<![CDATA[In most forums you can subscribe to threads to get a mail notify, that would be nice here too.<br /><br />Or even better: if there would be an rss or atom feed that shows every single post.<br /><br />regards]]>
		</content>
	</entry>
	<entry>
		<title>Short little Py2EXE Tutorial</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=14" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=14</id>
		<published>2007-01-31T23:09:53-05:00</published>
		<updated>2007-02-06T09:36:28-05:00</updated>
		<author>
			<name>selsine</name>
			<uri>http://www.learningpython.com/forums/account.php?u=1</uri>
		</author>
		<summary type="text" xml:lang="en">
			While I was browsing the wxPython wiki  I came across a short little tutorial on distributing your wxPython application on Windows.  Since it uses py2exe and because I've seen a bunch of questions ...
		</summary>
		<content type="html">
			<![CDATA[While I was browsing the <a href="http://wiki.wxpython.org" >wxPython wiki </a> I came across a short little tutorial on distributing your wxPython application on Windows.  Since it uses <a href="http://www.py2exe.org/" >py2exe</a> and because I've seen a bunch of questions asked about py2exe I thought I'd post a link to it here:<br /><a href="http://wiki.wxpython.org/index.cgi/DistributingYourApplication" ><br />Packaging your Application for Windows Users</a><br /><br />I tried it out with my small wxHello from my <a href="http://www.learningpython.com/2007/01/29/creating-a-gui-using-python-wxwidgets-and-wxpython/" >wxPython tutorial</a> and it seemed to work quite well.<br /><br />selsine]]>
		</content>
	</entry>
	<entry>
		<title>RRD Tutorial</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=9" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=9</id>
		<published>2007-01-21T16:06:51-05:00</published>
		<updated>2007-01-28T15:38:19-05:00</updated>
		<author>
			<name>supertux</name>
			<uri>http://www.learningpython.com/forums/account.php?u=7</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hey,

I just installed (re-)installed Munin, a tool that creates graphs for all stuff on my home-server (traffic, uptime, mailstats, etc.).

The graphs are really cool, and it seems that there ...
		</summary>
		<content type="html">
			<![CDATA[Hey,<br /><br />I just installed (re-)installed Munin, a tool that creates graphs for all stuff on my home-server (traffic, uptime, mailstats, etc.).<br /><br />The graphs are really cool, and it seems that there are also python bindings.<br /><br />Maybe you could write how to write such a tool in Python.<br /><br />That it measures something and then plots it in graphs (Day, Week, Month, Year) and so on.<br /><br />The site is here:<br />http://oss.oetiker.ch/rrdtool/index.en.html<br /><br />Or maybe you know another (better / easier) graph library.<br /><br />Thanks ;)]]>
		</content>
	</entry>
	<entry>
		<title>classes and libglade with &quot;large&quot; applications</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=6" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=6</id>
		<published>2007-01-18T16:48:31-05:00</published>
		<updated>2007-01-28T15:32:27-05:00</updated>
		<author>
			<name>greg</name>
			<uri>http://www.learningpython.com/forums/account.php?u=3</uri>
		</author>
		<summary type="text" xml:lang="en">
			The pygtk tutorials seem to use a single class per window or dialog and then signal_autoconnect(dict) to wire up the signals with the handlers, which are methods.  What is normally done with larger ...
		</summary>
		<content type="html">
			<![CDATA[The pygtk tutorials seem to use a single class per window or dialog and then signal_autoconnect(dict) to wire up the signals with the handlers, which are methods.  What is normally done with larger applications?  For instance if I have a main window with a menu, a few treeviews, and an area for plotting a graph should I just make a lot of methods to a single application class or should I partition the handler methods among different classes (like for each listview, the graph, etc.).  In reality, the methods just become function pointers than are passed to signal_autoconnect, so I'm not sure it matters, but what is the &quot;usual&quot; convention?]]>
		</content>
	</entry>
	<entry>
		<title>PyQt 4 Tutorial</title>
		<link rel="alternate" href="http://www.learningpython.com/forums/comments.php?DiscussionID=10" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.learningpython.com/forums/comments.php?DiscussionID=10</id>
		<published>2007-01-23T13:39:56-05:00</published>
		<updated>2007-01-27T17:14:00-05:00</updated>
		<author>
			<name>supertux</name>
			<uri>http://www.learningpython.com/forums/account.php?u=7</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hi selsine,

I would really like to see a tutorial for PyQt 4.

There are a lot of great tutorials for PyGTK and wxPython, but I found not yet anything good for PyQt 4.

I think with complete ...
		</summary>
		<content type="html">
			<![CDATA[Hi selsine,<br /><br />I would really like to see a tutorial for PyQt 4.<br /><br />There are a lot of great tutorials for PyGTK and wxPython, but I found not yet anything good for PyQt 4.<br /><br />I think with complete cross-platform abilities, Qt 4 is a toolkit worth having a look at.<br /><br />Thanks,<br />Timm]]>
		</content>
	</entry>
	
		</feed>