I am writing a script that creates windows when given a command.
My problem is that calling pyglet.run()
stops the loop.
I have tried calling pyglet.run()
in a separate script so it could run simultaneously as well as trying to call it with multiprocessing.
This is the relevant code:
import pyglet
windows = []
while True:
print('Command')
command = input()
if command == 'Make Window':
windows.append(pyglet.window.Window(800, 600, 'My Window'))
pyglet.app.run()
pyglet
has its own loop, defined by pyglet.app.run()
. Either work with pyglet
default functions or call new functions in pyglet
's loop