thomasmacpherson / piface

Everything piface
68 stars 35 forks source link

Emulator crashes when run interactively from the Python shell #1

Open tompreston opened 12 years ago

tompreston commented 12 years ago

The Pi Face emulator and the Python shell both crash when trying to initialise the emulator interactively.

$ python
>>> import piface.emulator as emulator
>>> emulator.init()
>>> 

The emulator pops up but it doesn't respond to user input, same with the shell.

This works though:

$ python -c "import piface.emulator as emulator;
from time import sleep
emulator.init();
led1 = emulator.LED(1);
led1.turn_on();
sleep(2);
led1.turn_off()"

I think this has something to do with the threaded nature of emulator and the Python shell not liking it.