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>Pygame only supports one display. However, you could divide the screen into multiple <a href="http://www.pygame.org/docs/ref/surface.html" rel="nofollow">Surfaces</a> where one Surface is for the map and the other for the game.</p>

<p>Something like this:</p>

<pre><code>screen = pygame.display.set_mode((100, 100))

top_rect = pygame.Rect((0, 0), (screen.get_width(), screen.get_height() // 2))
bottom_rect = pygame.Rect((0, screen.get_height() // 2), (screen.get_width(), screen.get_height() // 2))

top_screen = screen.subsurface(top_rect)
bottom_screen = screen.subsurface(bottom_rect)
</code></pre>

<p>And update them:</p>

<pre><code>screen.blit(top_screen)
screen.blit(bottom_screen)
pygame.display.update()
</code></pre>

python pygame