pywebview multiprocessing with pyinstaller
Liripo opened this issue · 3 comments
Liripo commented
Specification
- pywebview version: 5.3
- operating system: windowns
- web renderer: default
question
When I compile this program using pyinstaller, a duplicate window opens.
import webview
import multiprocessing
def test():
while True:
1
def on_closed(process):
if process.is_alive():
process.terminate()
process.join()
return None
process = multiprocessing.Process(target=test)
process.start()
index_html = "index.html"
win = webview.create_window('test!', str(index_html))
win.events.closed += lambda: on_closed(process)
webview.start(http_server=True,debug=False)
pyinstaller --onefile .\test.py
.\dist\test.exe
r0x0r commented
Maybe wrapping top level code in if __name__ == '__main__'
helps
Sped0n commented