View Single Post
  #4 (permalink)  
Old 01-19-2008, 02:47 AM
v0id's Avatar   
v0id v0id is offline
Super Moderator
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,573
Last Blog:
CherryPy(thon)
Credits: 54
Rep Power: 28
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default

That's right, you need some kind of loop, and a while-loop would be just fine. I see you've a way to exit your program (option 5), and because you have that, it's easy to wrap a loop around the rest of the code.
Code:
while True:
    # Everything you want to have in the loop
    # ...
The reason why I talked about your option 5, is because normally a while-loop will run while its condition is true, but because you've an alternative way of quitting, we can simply make the loop run forever (of course, until your alternative way will stop it)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
-
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
-
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

I'm always up for a chat, so feel free to contact me...
Reply With Quote