Re: [Tutor] pygame blinking text

2011-12-12 Thread Prasad, Ramit
>This is a common problem when people start GUI/graphics programming; >once you enter the GUI mainloop, you're no longer in control of the >program flow. Instead the mainloop will process events and callbacks; >therefore if you want a blinking text, you had to arrange such that your >blinker fu

Re: [Tutor] pygame blinking text

2011-12-12 Thread Lie Ryan
On 12/13/2011 01:01 AM, Cranky Frankie wrote: I tried putting the ty_message block in a WHILE TRUE loop, and that didn't work. Then I tried the same with the games.screen.add(ty_message) line and that didn't work either. I think what might work is if I can find a way to delete the ty_message and

Re: [Tutor] timedelta, difference calculation

2011-12-12 Thread Lie Ryan
On 12/13/2011 06:46 AM, rail shafigulin wrote: i found something interesting during the timedate difference calculation import datetime import time def main(): mydatetime = datetime.datetime.now() time.sleep(1) mydatetime2 = datetime.datetime.now() diff = mydatetime - mydatetime2

Re: [Tutor] pygame blinking text

2011-12-12 Thread Steven D'Aprano
Cranky Frankie wrote: [...] Is there any way to get blinking text with pygame? This is not a deal breaker, but I thought the blinking text would be neat. To punish your users for completing the game? Ha ha only serious. -- Steven ___ Tutor mail

Re: [Tutor] Need Explanation...

2011-12-12 Thread Homme, James
Hi Alan, I'm sorry. I'm coming pretty much from Cobol and freaking out about OO, so my questions may not be coming from a familiar place. I think I was referring partly to the idea that, for example, len and open are built in functions, whereas append is part of a list. I just am now to the plac

Re: [Tutor] Need Explanation...

2011-12-12 Thread Alan Gauld
James H wrote: Is that the same problem with using the len function on sequences > and open on files, or is it different? I don't think so. I'm not sure which problem you are referring to with these? Neither return None... But a python list is mutable. I'm hardly an expert, but the idea is

[Tutor] timedelta, difference calculation

2011-12-12 Thread rail shafigulin
i found something interesting during the timedate difference calculation import datetime import time def main(): mydatetime = datetime.datetime.now() time.sleep(1) mydatetime2 = datetime.datetime.now() diff = mydatetime - mydatetime2 print(diff) if __name__ == '__main__': main() if

Re: [Tutor] pygame blinking text

2011-12-12 Thread Timo
Op 12-12-11 15:01, Cranky Frankie schreef: My Python presentation is just about complete. As a nice ending I want to do a pygame program that displays the group's .jpg, with the words "Thank You!" blinking, say on for a second and off for a second. Unfortunatley, I can't get the works to blink, b

Re: [Tutor] return, why do I need it?

2011-12-12 Thread Prasad, Ramit
>No one has mentioned it so far, but the interactive interpreter is what you >should use for debugging short code snippets. I always program with two >windows open - one with my editor and one with the interpreter. This lets me >try out short bits of code without running my whole program. +1 R

[Tutor] pygame blinking text

2011-12-12 Thread Cranky Frankie
My Python presentation is just about complete. As a nice ending I want to do a pygame program that displays the group's .jpg, with the words "Thank You!" blinking, say on for a second and off for a second. Unfortunatley, I can't get the works to blink, but I can get them to appear for a short time:

[Tutor] Remove python modules

2011-12-12 Thread John De
Hi, I want to build python-2.7.2 and omit some modules that I don't need in order to create a smaller Python interpreter. Am I able to do this? Any recommendations? Thank you ___ Tutor maillist - Tutor@python.o

Re: [Tutor] Need Explanation...

2011-12-12 Thread James Reynolds
Sent from my iPad On Dec 12, 2011, at 7:08 AM, "Homme, James" wrote: > Hi, > Alan said: > Because app() returns the result of append(). > But append() returns None, since it modifies the list in place. > > This is one of the few features of Python I dislike. It would not have been > difficul

Re: [Tutor] Need Explanation...

2011-12-12 Thread Homme, James
Hi, Alan said: Because app() returns the result of append(). But append() returns None, since it modifies the list in place. This is one of the few features of Python I dislike. It would not have been difficult to make these modifier methods return the thing modified. This style would then allow

Re: [Tutor] Running a script!

2011-12-12 Thread Robert Sjoblom
On 12 December 2011 11:59, Bulent Arikan wrote: > Thank you Dax! That was it! Now I can run the script. > > Cheers, > Bulent You don't have to submit the entire digest when you're replying; trim it down to what you're actually replying to. Also, please avoid posting your reply on top -- it makes

Re: [Tutor] Tutor Digest, Vol 94, Issue 44

2011-12-12 Thread Bulent Arikan
could not > find a specific command. It also seemed strange to me that there was not a > shortcut in Mac OS to run scripts unlike Windows. > > Thank you for your time and help, > > -- > B?LENT > -- next part -- > An HTML attachment was scrubbed... &

Re: [Tutor] (no subject)

2011-12-12 Thread Hugo Arts
On Mon, Dec 12, 2011 at 3:56 AM, shawn taylor wrote: > firstname = raw_input ("Enter your first name ") > lastname = raw_input ("Enter your last name ") > idnumber = raw_input ("Enter your id number ") > birthday = raw_input ("Enter your birthday mm/dd/ ") > username1 = firstname[0] + lastname

Re: [Tutor] best book for OOP

2011-12-12 Thread Sarma Tangirala
> Object Oriented Analysis and Design with Applications > by Grady Booch (1st edition) > Classic text on OO Design with code and case studies realized in 5 different OOP languages (Smalltalk, Object Pascal, C++, Lisp, ADA) > Explains why OOP is important and how to ise it effectively. Also introsdu

Re: [Tutor] Visual and audible system bell

2011-12-12 Thread Alan Gauld
On 12/12/11 07:57, David Smith wrote: In a terminal window print ("\a") triggers a visual and audible bell as set in Terminal window preferences. However print ("\a") and pressing Enter in a Python Shell window results in neither a visible nor an audible system bell. I assume the second