Python Forum
Trying to clear a list automatically at certain times (guizero)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to clear a list automatically at certain times (guizero)
#4
1) from Library import SpecificFunction --or-- if you actually need the entire library (which is highly unlikely) just import Library

2) No it will not work - BUT - globals are very very bad things

3) Passing stud_dict1 into auto_refresh() as follows auto_refresh(stud_dict1)

Now part of your problem of course is you have a lot of variables so perhaps making this into a class would be better

class studentstuff:
    self.stud_dict1 = {str(row[1]): row[0] for _, row in pd.read_csv('1st hour.csv').iterrows()}
    etc...

    def update_lists():
        if self.cur_per == 1 and self.roster != self.stud_dict1:
-- or basically something to that effect -- aka read up on classes and such
Reply


Messages In This Thread
RE: Trying to clear a list automatically at certain times (guizero) - by Denni - Jul-26-2019, 05:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Example of guizero ListBox jreebel 1 2,339 Oct-29-2020, 08:17 PM
Last Post: Larz60+
  guizero repeat command pdihawk 2 3,011 Sep-28-2020, 01:32 PM
Last Post: pdihawk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020