Browse Source

find open port when packaging as executable

Rodja Trappe 1 năm trước cách đây
mục cha
commit
bcc0cb39ff
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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'):