-
Questionfrom nicegui import ui
class TestClass:
def __init__(self) -> None:
self.name = 'Nicegui !'
print('******************** INIT TESTCLASS *******************')
my_test_class = TestClass()
@ui.page('/')
def main_page():
ui.label('Hello NiceGUI!')
ui.run() Output******************** INIT TESTCLASS ******************* |
Beta Was this translation helpful? Give feedback.
Answered by
rodja
Apr 7, 2024
Replies: 2 comments 1 reply
-
maybe you have the page open in two tabs |
Beta Was this translation helpful? Give feedback.
0 replies
-
We answered the question in our FAQs: https://github.com/zauberzeug/nicegui/wiki/FAQs#why-is-my-code-executed-twice |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
yanel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We answered the question in our FAQs: https://github.com/zauberzeug/nicegui/wiki/FAQs#why-is-my-code-executed-twice