You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so I used the following code to refresh a Pandas Dataframe every so often automatically...it works, based on the console input but I need the refreshed DataTable to show up in my "List View" tab in Flet....putting a While loop anywhere inside the body of Flet seems to prevent other controls (located after the while loop) from being added to the page but keeping the loop AFTER all controls are added seems to prevent the data from being refreshed. Is there anything I can do?
How I made the timed refresh:
############## Code Block #############
import time
def timeout_block():
timeout = 10 # timeout in seconds
while True:
start_time = time.time()
print("Running Code...")
if time.time() - start_time > timeout:
break
# code to repeat the loop after the timeout
time.sleep(timeout)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
so I used the following code to refresh a Pandas Dataframe every so often automatically...it works, based on the console input but I need the refreshed DataTable to show up in my "List View" tab in Flet....putting a While loop anywhere inside the body of Flet seems to prevent other controls (located after the while loop) from being added to the page but keeping the loop AFTER all controls are added seems to prevent the data from being refreshed. Is there anything I can do?
How I made the timed refresh:
############## Code Block #############
import time
def timeout_block():
timeout = 10 # timeout in seconds
Call function
timeout_block()
Beta Was this translation helpful? Give feedback.
All reactions