Skip to content

Commit 856daf4

Browse files
committed
Adding set_public
1 parent cdfb5e2 commit 856daf4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

PyPI/Package/src/webui/webui.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,20 @@ def set_root_folder(self, path):
304304
ctypes.c_char_p(path.encode('utf-8')))
305305

306306

307+
# Allow a specific window address to be accessible from a public network
308+
def set_public(self, status = True):
309+
global lib
310+
if self.window == 0:
311+
_err_window_is_none('set_public')
312+
return
313+
if lib is None:
314+
_err_library_not_found('set_public')
315+
return
316+
# Set public
317+
lib.webui_set_public(self.window,
318+
ctypes.c_bool(status))
319+
320+
307321
def _get_current_folder() -> str:
308322
return os.path.dirname(os.path.abspath(__file__))
309323

0 commit comments

Comments
 (0)