python executable not stoppable

11 views
Skip to first unread message

Yanwu Gu

unread,
May 27, 2020, 3:36:39 AM5/27/20
to PyInstaller

I have a simple python script that is printing time every second:


import time

while True:
  localtime = time.localtime()
  result = time.strftime("%I:%M:%S %p", localtime)
  print(result)
  time.sleep(1)


I use pyinstaller --onefile myclock.py to create an executable.

However, when I run the executable, i cant terminate it by ctrl c or ctrl z. Any idea why? Any work around?


Reply all
Reply to author
Forward
0 new messages