Python/Pygame: Can you run a program whilst having a Pygame window that can still update?
<p>this is my first question. What I would like to achieve is in a normal window for the text-based game to be running, however I would also like to have a pygame window running as well that shows a map that updates. Thank you in advance.</p>

<p>By <em>normal window</em>, I guess you mean the console window from which your program runs.<br> You need a <em>thread</em>.<br> In the following example, that thread is the one reading the standard input from the command line. </p>

<pre><code>from threading import Thread

userInput= None

def readInput():
    while True:
        userInput = raw_input (" where to ? ")
        print("%s ok."%userInput)

t = Thread( target=readInput )
t.start()
</code></pre>

<p>You could also have the while loop as the main loop of your program, and the thread would run the pygame loop. Or even have two threads, one for both.</p>

python pygame