Browse Source

disable reload on windows; fixes #486

Rodja Trappe 2 năm trước cách đây
mục cha
commit
81191541cd
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      examples/script_executor/main.py

+ 3 - 1
examples/script_executor/main.py

@@ -1,6 +1,7 @@
 #!/usr/bin/env python3
 import asyncio
 import os.path
+import platform
 import shlex
 
 from nicegui import background_tasks, ui
@@ -34,4 +35,5 @@ with ui.row():
         ui.button(command, on_click=lambda _, c=command: background_tasks.create(run_command(c))).props('no-caps')
 
 
-ui.run()
+# NOTE on windows reload must be disabled to make asyncio.create_subprocess_exec work (see https://github.com/zauberzeug/nicegui/issues/486)
+ui.run(reload=platform.system() != "Windows")