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 StringI

[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 op

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 t

Re: [Tutor] Problems with subtraction!

2010-07-07 Thread col speed
On 7 July 2010 18:59, Evert Rol 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 >

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

[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

[Tutor] Does DreamPie work well?

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

Re: [Tutor] newbie to gui programming

2010-07-07 Thread Alan Gauld
"Nick Raptis" 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 wxPython at some stage

Re: [Tutor] Tkinter mainloop()

2010-07-07 Thread Alan Gauld
"Francesco Loffredo" 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 the two methods? Its a littl