Re: [Tutor] animations and movies
pyglet http://www.pyglet.org/ thats an option too On Fri, May 9, 2008 at 7:34 AM, bhaaluu <[EMAIL PROTECTED]> wrote: > http://pygame.org/news.html > > On Thu, May 8, 2008 at 9:40 PM, <[EMAIL PROTECTED]> > wrote: > > hey just wondering if any one can point me in the right direction for > coding > > animations and playing movies > > > > This message is intended for the addressee named and may contain > privileged > > information or confidential information or both. If you are not the > intended > > recipient please delete it and notify the sender. > > > > ___ > > Tutor maillist - Tutor@python.org > > http://mail.python.org/mailman/listinfo/tutor > > > > -- > b h a a l u u at g m a i l dot c o m > Kid on Bus: What are you gonna do today, Napoleon? > Napoleon Dynamite: Whatever I feel like I wanna do. Gosh! > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- Vaibhav Bhawsar ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] threading: getting latest elements from list/dict
Hello I have a thread updating a dictionary with new elements. How can I check for new elements as they are inserted into the dictionary by the thread? In general is it safe to read a dictionary or a list while it is being updated by a running thread? Does the dictionary or list have to be locked while reading? many questions! :) vaibhav ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] threading: getting latest elements from list/dict
Hello I have a thread updating a dictionary with new elements. How can I check for new elements as they are inserted into the dictionary by the thread? In general is it safe to read a dictionary or a list while it is being updated by a running thread? Does the dictionary or list have to be locked while reading? many questions! :) vaibhav ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] howto mysqldb dictionary cursor
I have been trying to get the DictCursor working with mysqldb module but can't seem to. I have pasted the basic connection code and the traceback from pydev. The connection does open with the default cursor class. can't figure out how to use the dict cursor class instead of the default one. many thanks. import MySQLdb import sys # connect to the MySQL server try: conn = MySQLdb.connect(host="localhost ",read_default_file='~/.my.cnf',db='test',cursorclass=MySQLdb.cursors.DictCursor) cur = conn.cursor() print conn except MySQLdb.Error, e: print "Error %d: %s" % (e.args[0], e.args[1]) sys.exit (1) Traceback (most recent call last): File "/Users/.src/db/test.py", line 7, in ? conn = MySQLdb.connect(host="localhost",read_default_file='~/.my.cnf',db='te st',cursorclass=MySQLdb.cursors.DictCursor) AttributeError: 'module' object has no attribute 'cursors' ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] knowing when a list is updated by a thread
Some good ideas! Kent I looked at the queue module and that looks like something I would use. will post my results. Thanks On Wed, Apr 23, 2008 at 9:52 AM, Hansen, Mike <[EMAIL PROTECTED]> wrote: > > > > Evey time someone recommends Queue I think "oh boy this will > > really help > > me". Then I go to the Library Reference, read the Queue docs > > and think > > "oh boy who can help me understand this". Even the sample code is > > confusing. > > > > Is there some other documentation or example? > > > > > > -- > > Bob Gailer > > http://effbot.org/zone/librarybook-index.htm > > That might help. It looks like it has some example code. Look at the > Threads and Processes link and search for queue. > > Mike > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- Vaibhav Bhawsar ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] knowing when a list is updated by a thread
i have this code to print every new element in a list only when the list length changes (while the list is updated by a thread running elsewhere)...I was wondering if there is a pythonic way to do this? how does one know when there is a new element in the list? prevlength = 0 while geoCode.running: places = geoCode.getResults() #returns a list with most up to date elements..the list grows as the thread that updates it if len(places) > prevlength: print places[prevlength] prevlength = len(places) thank you! -- Vaibhav Bhawsar ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] knowing when a list is updated by a thread
i have this code to print every new element in a list only when the list length changes (while the list is updated by a thread running elsewhere)...I was wondering if there is a pythonic way to do this? how does one know when there is a new element in the list? prevlength = 0 while geoCode.running: places = geoCode.getResults() #returns a list with most up to date elements..the list grows as the thread that updates it if len(places) > prevlength: print places[prevlength] prevlength = len(places) thank you! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor