Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Timed Exit
Post: RE: Timed Exit

I am using Windows 8.1 Since I don't have SIGALRM, what should I do? Is there a Windows equivalent? Thank You.
Tbot Game Development 11 20,198 Apr-10-2018, 12:46 PM
    Thread: Timed Exit
Post: RE: Timed Exit

I do not have any docs named signal.py Code: import signal class TimeOut: def __init__(self, timeout): self.timeout = timeout self._orig_handler = signal.signal(signal.SIGALRM, se...
Tbot Game Development 11 20,198 Apr-10-2018, 12:09 AM
    Thread: Timed Exit
Post: RE: Timed Exit

Even still, I got this error: Error:Traceback (most recent call last): File "Untitled", line 15 with TimeOut(5): File "Untitled", line 6, in __init__ self._orig_handler = signal.signal(sig...
Tbot Game Development 11 20,198 Apr-09-2018, 12:22 PM
    Thread: Timed Exit
Post: RE: Timed Exit

What is the final code then? When I run class TimeOut: def __init__(self, timeout): self.timeout = timeout self._orig_handler = signal.signal(signal.SIGALRM, self._timeout) def...
Tbot Game Development 11 20,198 Apr-08-2018, 03:06 PM
    Thread: Timed Exit
Post: Timed Exit

Hello, I am making a Python game where there is a sequence of letters, and you have to guess it right within a certain amount of time. However, once the player pushes enter, the code is reviewed. Unle...
Tbot Game Development 11 20,198 Apr-08-2018, 01:38 PM
    Thread: Sequence subtraction
Post: RE: Sequence subtraction

So, this is the final code: errorlevel = 0 errors = 0 r1 = raw_input("Commands:") word = 'sdddwwx' for i in range(min(len(r1), len(word))): if r1[i] != word[i]: errors += 1 if errorlevel ...
Tbot Game Development 9 5,787 Apr-08-2018, 01:09 AM
    Thread: Sequence subtraction
Post: RE: Sequence subtraction

Now, how do I get rid of errors if the string is only one letter, while using the code below: code = raw_input("Code:") errors = 0 word = 'sdddwwx' if word[0] == code[0]: print("Good!") else: ...
Tbot Game Development 9 5,787 Apr-07-2018, 12:59 PM
    Thread: Sequence subtraction
Post: RE: Sequence subtraction

How do I compare it against the correct word code?
Tbot Game Development 9 5,787 Apr-06-2018, 10:11 PM
    Thread: Sequence subtraction
Post: RE: Sequence subtraction

What do you mean by Quote:Just loop over word.
Tbot Game Development 9 5,787 Apr-06-2018, 12:23 PM
    Thread: Sequence subtraction
Post: Sequence subtraction

Hello! I am making a game where you enter a path for a drone to fly in, and you must enter the movements right. In the case below, the correct way to get through would be the sequence sddddwx. However...
Tbot Game Development 9 5,787 Apr-06-2018, 12:52 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020