[Tutor] Is generator function similar to multi threading?

2007-03-16 Thread ammar azif
Is generator function similar to multi threading? - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.___ Tutor maillist - Tutor@python.org

Re: [Tutor] windows file permissions

2007-03-16 Thread Tim Golden
Kirk Bailey wrote: I answered my own question digging around and testing stuff. I can't tell you how glad I am to hear that: I was just girding my loins (so to speak) to embark on an explanation of the Win32 ACL model which would have involved seven levels of explanation at the end of which you

Re: [Tutor] Is generator function similar to multi threading?

2007-03-16 Thread Kent Johnson
ammar azif wrote: Is generator function similar to multi threading? Only in that they can be alternative ways to solve the same problem. Generator functions are similar to co-routines and can be used to create multiple lightweight tasks. SimPy (http://simpy.sourceforge.net/) is an example of

Re: [Tutor] Is generator function similar to multi threading?

2007-03-16 Thread Michael Sparks
On Friday 16 March 2007 06:52, ammar azif wrote: Is generator function similar to multi threading? Yes, however unlike threads they are more general. They can be used in two main ways: * To generate a sequence of values * To achieve something similar to multithreading, but without using

[Tutor] fine in interpreter, hangs in batch

2007-03-16 Thread Switanek, Nick
Hi, After creating a list of words ('wordlist'), I can run the following code in the interactive window of PythonWin in about ten seconds. If I run the script containing the code, the script seems to hang on the loop. I'd be grateful for help as to why; I often seem to have something that works

Re: [Tutor] fine in interpreter, hangs in batch

2007-03-16 Thread Jerry Hill
On 3/16/07, Switanek, Nick [EMAIL PROTECTED] wrote: After creating a list of words ('wordlist'), I can run the following code in the interactive window of PythonWin in about ten seconds. If I run the script containing the code, the script seems to hang on the loop. I'd be grateful for help as

[Tutor] Passing a list, dict or tuple to MySQLdb?

2007-03-16 Thread Alan Wardroper
I think what you want is ...(*list_of_tuples) similar to the syntax used when calling functions with position arguments from a list. Thanks, that bypasses the TypeError: not all arguments converted during string formatting error but raises a new error TypeError: execute() takes at most

[Tutor] cookie expiration date format

2007-03-16 Thread Tim Johnson
Hi: I want to be able to expire a cookie programmatically. In other languages, I just set the expiration date to 'yesterday'. If I look at the documentation at: http://docs.python.org/lib/node644.html for the Cookie object, I see the following:

[Tutor] Built-in function to check a character is ASCII character?

2007-03-16 Thread ammar azif
Is there any Built-in function to check whether a character is an ASCII character? I am trying to learn event driven programming in python. Heres my code: while 1: key=msvcrt.getch() if key==255: continue else: print the key is , key But the output is:- the key

Re: [Tutor] cookie expiration date format

2007-03-16 Thread Luke Paireepinart
Tim Johnson wrote: Hi: I want to be able to expire a cookie programmatically. In other languages, I just set the expiration date to 'yesterday'. If I look at the documentation at: http://docs.python.org/lib/node644.html for the Cookie object, I see the following:

Re: [Tutor] Built-in function to check a character is ASCII character?

2007-03-16 Thread Luke Paireepinart
ammar azif wrote: Is there any Built-in function to check whether a character is an ASCII character? I am trying to learn event driven programming in python. Heres my code: while 1: key=msvcrt.getch() if key==255: continue Here's your problem. import msvcrt