[Tutor] overlap of ranges

2005-05-04 Thread János Juhász
Hi All, one of my colleague asked me, about how the overlap of two ranges can be calculated easily. a = (24,27) # range1 (endpoint1,endpoint2) b = (10,227) # range1 (endpoint1,endpoint2) min( max(a), max(b) ) - max( min(a), min(b) ) 3 When the result is positive, then the two ranges overlap

Re: [Tutor] problem

2005-05-04 Thread Feziwe Mpondo
#keeps asking for password until it has been entered 3 times password = input( tell me a password: ) correct = False answer = Flower if password == answer: while correct == False ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Problem with threading

2005-05-04 Thread Alberto Troiano
Hi I took a look at the code and now I'm confused I'll use CRON and I will make a python script that take parameters (username) and work only for that user but the script will never finish ÇThe FTP connection that starts the camera never ends unless I shutdown my server. Now I'm thinking that

[Tutor] No Need to press Enter (Joseph Quigley)

2005-05-04 Thread Joseph Quigley
What is the secret to have the user press the Q key, and the program exits without pressing the Enter key? Or the Control and Q keys to exit? For the Macintosh, would the same command/s for Control Q keys be the same as the Apple Q key? Thanks, JQ

[Tutor] Psyco (Joseph Quigley)

2005-05-04 Thread Joseph Quigley
For those who use Psyco: Is it any good? I'm searching for instructions on how to use it, should I stop? For those who don't know about Psyco: It is supposed to be a Python Compiler. The programs are said to run faster than normal Python and they almost run as fast as C.

Re: [Tutor] Psyco (Joseph Quigley)

2005-05-04 Thread Max Noel
On May 4, 2005, at 16:35, Joseph Quigley wrote: For those who use Psyco: Is it any good? I'm searching for instructions on how to use it, should I stop? I hear it's quite good at what it does. Note, however, that it only works on x86 computers (i.e. IBM PC compatibles).

[Tutor] Web Calendar written in Python

2005-05-04 Thread Mark Brown
Does anyone know of a Web Calendar written in Python? TIA Mark ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Fwd: No Need to press Enter (Joseph Quigley)

2005-05-04 Thread D. Hartley
I don't know if this is what you're looking for, but in my game I set Running = 1, and then had: if event.key == K_q: running = 0 ... which exits the game as soon as you hit q (i.e., no hitting enter). I can send the full code if it would be more helpful, if

Re: [Tutor] Psyco (Joseph Quigley)

2005-05-04 Thread Andrei
Max Noel wrote on Wed, 4 May 2005 17:30:48 +0100: On May 4, 2005, at 16:35, Joseph Quigley wrote: For those who use Psyco: Is it any good? I'm searching for instructions on how to use it, should I stop? Depends on the application. If you have a performance problem in the code (this is

[Tutor] making a cgi search safe(r)

2005-05-04 Thread Gabriel Farrell
Greetings, I'm setting up a search for an online catalog. It works right now by passing the cgi search query to the command-line swish-e via os.popen. I'll do it via a direct interface as soon as I figure out how to do that with swig or the swishe module. In the meantime, I'm trying to sanitize

[Tutor] Python riddles

2005-05-04 Thread jfouhy
As seen on python-announce (via Dr Dobbs): http://www.pythonchallenge.com/ Good fun! -- John. [currently on riddle 6] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Web Calendar written in Python

2005-05-04 Thread Lee Harr
Does anyone know of a Web Calendar written in Python? I believe that SchoolBell is using Zope 3 ... http://www.schooltool.org/schoolbell _ Express yourself instantly with MSN Messenger! Download today it's FREE!

Re: [Tutor] Importing C,C++,Asm modules

2005-05-04 Thread Bill Burns
On Wednesday 04 May 2005 4:39 am, Ali Polatel wrote: Dear friends, Is there a way to import C,C++ or Asm modules to python scripts? If yes how? Thanks and regards, Hi Ali, If you're asking if you can take C or C++ code and compile it in such a way as to be able to import it

Re: [Tutor] No Need to press Enter

2005-05-04 Thread Chris Smith
From: Joseph Quigley What is the secret to have the user press the Q key, and the program exits without pressing the Enter key? Or the Control and Q keys to exit? For the Macintosh, would the same command/s for Control Q keys be the same as the Apple Q key? I see that Diane has suggested