瀏覽代碼

find open port when packaging as executable

Rodja Trappe 1 年之前
父節點
當前提交
bcc0cb39ff
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      website/documentation.py

+ 2 - 2
website/documentation.py

@@ -670,11 +670,11 @@ def create_full() -> None:
         with demo.python_window(classes='max-w-lg w-full'):
             ui.markdown('''
                 ```python
-                from nicegui import ui
+                from nicegui import native_mode, ui
 
                 ui.label('Hello from PyInstaller')
 
-                ui.run(reload=False)
+                ui.run(reload=False, native_mode.find_open_port())
                 ```
             ''')
         with demo.python_window('build.py', classes='max-w-lg w-full'):