Re: [Tutor] Tkinter mainloop()

2010-07-07 Thread Francesco Loffredo
RTFM I happened to find the answer just a couple of hours after having sent this message. How could I miss the update method of the Canvas? Now my game works as expected, maybe I'll post it when it's complete. Thanks to all! Francesco Il 05/07/2010 21.00, Francesco Loffredo ha scritto:

Re: [Tutor] Tkinter mainloop()

2010-07-07 Thread Francesco Loffredo
Il 06/07/2010 17.32, Alan Gauld wrote: Francesco Loffredo ilcomputertraspare...@gmail.com wrote How can I ask a Canvas to redraw itself at my command? And if i can't, when should I call the auto move? You can ask the canvas to repaint itself by calling update_idle_tasks() method. Thank you,

Re: [Tutor] Tkinter mainloop()

2010-07-07 Thread Alan Gauld
Francesco Loffredo ilcomputertraspare...@gmail.com wrote You can ask the canvas to repaint itself by calling update_idle_tasks() method. Thank you, Alan. As many answers, this poses me a new question: why should I call update_idle_tasks() instead of update() ? What's the difference between

Re: [Tutor] newbie to gui programming

2010-07-07 Thread Alan Gauld
Nick Raptis airsc...@otenet.gr wrote Really good news is that on this very list on another thread, someone suggested Dabo http://dabodev.com/ It's a python library on top of wxPython and it's database-logic-GUI But its not a complete wrapper for wxPython so you still need to revert to

[Tutor] Does DreamPie work well?

2010-07-07 Thread Richard D. Moores
http://dreampie.sourceforge.net/ Thanks, Dick Moores ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Problems with subtraction!

2010-07-07 Thread col speed
I apologise in advance for such a silly question. Normally, I start to write to the list and work the answer out before sending the mail. Not this time. I'm trying to work out which triangles contain the cartesian origin (0, 0) and have the following: t = [-340, 495, -153, -910, 835, -947] print

Re: [Tutor] Problems with subtraction!

2010-07-07 Thread Evert Rol
The second number should be negative ( I WANT it to be negative). For example: print (0 - t[4])*(t[3] - t[5]) , (0 - t[5])*(t[2] - t[4]) gives : -30895 -935636 And in the python shell: -30895 -935636 -966531 No, because you have to *subtract* the second answer from the first (

Re: [Tutor] Problems with subtraction!

2010-07-07 Thread col speed
On 7 July 2010 18:59, Evert Rol evert@gmail.com wrote: The second number should be negative ( I WANT it to be negative). For example: print (0 - t[4])*(t[3] - t[5]) , (0 - t[5])*(t[2] - t[4]) gives : -30895 -935636 And in the python shell: -30895 -935636 -966531 No,

Re: [Tutor] newbie to gui programming

2010-07-07 Thread Nick Raptis
Well, choice is a great thing! Except when you're new and all that choice seems overwhelming :) When I started out python a year ago, I knew just enough C to know that I didn't want C/C++ to be my first language that I learned. That's why I found the wxPython style a nuisance, because I was at

[Tutor] differences between mmap and StringIO

2010-07-07 Thread Eduardo Vieira
Hello, I'm getting confused about the usage of those 2 modules. Which should I use one to get/manipulate data from a text file? Regards, Eduardo www.express-sign-supply.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] differences between mmap and StringIO

2010-07-07 Thread Nick Raptis
Actually, for simple file operations I'd neither. Standard file usage is described here, if you haven't checked it out, which I'm sure you have http://docs.python.org/library/stdtypes.html#file-objects StringIO is useful as a buffer. That is, you make a file-like object in memory with