<rss version="2.0">
		<channel>
			<title>LearningPython Forums - All Discussions</title>
			<lastBuildDate>Tue, 07 Sep 2010 05:58:29 -0400</lastBuildDate>
			<link>http://www.learningpython.com/forums/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.1.10</generator>
			<item>
		<title>PyGame tutorial II</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=37</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=37</guid>
		<pubDate>Fri, 13 Aug 2010 10:06:23 -0400</pubDate>
		<author>Jonte135</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>None</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=36</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=36</guid>
		<pubDate>Fri, 09 Apr 2010 04:04:38 -0400</pubDate>
		<author>ivan.ivanenko</author>
		<description>
			<![CDATA[None]]>
		</description>
	</item>
	<item>
		<title>simple textview problem</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=27</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=27</guid>
		<pubDate>Tue, 30 Oct 2007 15:12:41 -0400</pubDate>
		<author>squeakyfrommage</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Silly SPAM</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=35</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=35</guid>
		<pubDate>Thu, 08 Apr 2010 22:51:10 -0400</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Cocos2d + PyGTK?</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=33</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=33</guid>
		<pubDate>Sat, 13 Jun 2009 04:35:18 -0400</pubDate>
		<author>mots</author>
		<description>
			<![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?]]>
		</description>
	</item>
	<item>
		<title>zoom and pan in pygtk</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=34</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=34</guid>
		<pubDate>Thu, 18 Jun 2009 16:45:43 -0400</pubDate>
		<author>mak89</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>Problems with a gtk.TextView</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=16</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=16</guid>
		<pubDate>Tue, 13 Feb 2007 10:56:20 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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??]]>
		</description>
	</item>
	<item>
		<title>my frist python proyect</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=32</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=32</guid>
		<pubDate>Wed, 15 Oct 2008 19:59:35 -0400</pubDate>
		<author>axl456</author>
		<description>
			<![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!!]]>
		</description>
	</item>
	<item>
		<title>redesigning the &quot;smart package manager&quot; gui</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=31</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=31</guid>
		<pubDate>Sun, 06 Jul 2008 19:46:06 -0400</pubDate>
		<author>Jonathan R</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Bind nuance</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=30</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=30</guid>
		<pubDate>Sat, 15 Mar 2008 03:54:46 -0400</pubDate>
		<author>maylo</author>
		<description>
			<![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?]]>
		</description>
	</item>
	<item>
		<title>RAD GUI Programming with Glade and smartglade</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=29</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=29</guid>
		<pubDate>Fri, 09 Nov 2007 07:09:56 -0500</pubDate>
		<author>pyrgen</author>
		<description>
			<![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>]]>
		</description>
	</item>
	<item>
		<title>sys.exit() - Necessary ?</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=28</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=28</guid>
		<pubDate>Sun, 04 Nov 2007 22:15:07 -0500</pubDate>
		<author>matelot</author>
		<description>
			<![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>]]>
		</description>
	</item>
	<item>
		<title>gtk.combo problem</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=26</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=26</guid>
		<pubDate>Thu, 25 Oct 2007 01:56:44 -0400</pubDate>
		<author>rhitam30111985</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>Exhance your PyGTK app</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=13</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=13</guid>
		<pubDate>Sat, 27 Jan 2007 17:16:18 -0500</pubDate>
		<author>supertux</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>Manipulating Style of widgets</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=25</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=25</guid>
		<pubDate>Wed, 19 Sep 2007 05:19:20 -0400</pubDate>
		<author>kdikert</author>
		<description>
			<![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!]]>
		</description>
	</item>
	<item>
		<title>Images are now supported</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=24</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=24</guid>
		<pubDate>Wed, 23 May 2007 11:24:07 -0400</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>New style for Glade-3.20</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=22</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=22</guid>
		<pubDate>Tue, 22 May 2007 21:49:10 -0400</pubDate>
		<author>mbastien</author>
		<description>
			<![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/]]>
		</description>
	</item>
	<item>
		<title>Suggestions?</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=2</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=2</guid>
		<pubDate>Thu, 18 Jan 2007 09:50:46 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Linux</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=15</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=15</guid>
		<pubDate>Sun, 04 Feb 2007 13:33:06 -0500</pubDate>
		<author>Dave</author>
		<description>
			<![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?]]>
		</description>
	</item>
	<item>
		<title>Change objects in a gtk.table</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=21</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=21</guid>
		<pubDate>Sat, 05 May 2007 12:48:27 -0400</pubDate>
		<author>hpl</author>
		<description>
			<![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 />^__^]]>
		</description>
	</item>
	<item>
		<title>Python411 podcast series</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=18</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=18</guid>
		<pubDate>Tue, 27 Feb 2007 20:32:18 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>PyWeek 4</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=19</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=19</guid>
		<pubDate>Thu, 22 Mar 2007 22:33:25 -0400</pubDate>
		<author>selsine</author>
		<description>
			<![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!]]>
		</description>
	</item>
	<item>
		<title>pyGame tutorials at ShowMeDo - might be useful?</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=3</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=3</guid>
		<pubDate>Thu, 18 Jan 2007 12:45:38 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Python in large-scale enterprise application</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=20</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=20</guid>
		<pubDate>Thu, 22 Mar 2007 22:40:28 -0400</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Passing extra information to signal handlers</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=17</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=17</guid>
		<pubDate>Thu, 15 Feb 2007 10:08:05 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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.]]>
		</description>
	</item>
	<item>
		<title>Subscribe to threads</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=12</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=12</guid>
		<pubDate>Sat, 27 Jan 2007 17:11:55 -0500</pubDate>
		<author>supertux</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>Short little Py2EXE Tutorial</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=14</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=14</guid>
		<pubDate>Wed, 31 Jan 2007 23:09:53 -0500</pubDate>
		<author>selsine</author>
		<description>
			<![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]]>
		</description>
	</item>
	<item>
		<title>RRD Tutorial</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=9</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=9</guid>
		<pubDate>Sun, 21 Jan 2007 16:06:51 -0500</pubDate>
		<author>supertux</author>
		<description>
			<![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 ;)]]>
		</description>
	</item>
	<item>
		<title>classes and libglade with &quot;large&quot; applications</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=6</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=6</guid>
		<pubDate>Thu, 18 Jan 2007 16:48:31 -0500</pubDate>
		<author>greg</author>
		<description>
			<![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?]]>
		</description>
	</item>
	<item>
		<title>PyQt 4 Tutorial</title>
		<link>http://www.learningpython.com/forums/comments.php?DiscussionID=10</link>
		<guid isPermaLink="false">http://www.learningpython.com/forums/comments.php?DiscussionID=10</guid>
		<pubDate>Tue, 23 Jan 2007 13:39:56 -0500</pubDate>
		<author>supertux</author>
		<description>
			<![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]]>
		</description>
	</item>
	
		</channel>
	</rss>