Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.output_donation_data()
self.update_donor_data()
self.output_donor_data()
# TEAM BLOCK ############################################
if self.team_id:
self.my_team.team_run()
##########################################################
self.first_run = False
print(time.strftime("%H:%M:%S"))
def __str__(self):
return f"A participant with Extra Life ID {self.extralife_id}. Team info: {self.my_team}"
if __name__ == "__main__": # pragma: no cover
participant_conf = extralife_io.ParticipantConf()
p = Participant(participant_conf)
while True:
p.run()
time.sleep(15)
def __init__(self):
"""Setup the GUI.
Set up QTimers:
1) to allow the text on the GUI to update without blocking the user from interacting with the GUI.
2) to run the participant.py updates
Then we instantiate the other windows:
tracker and settings
Finally, connect the buttons.
"""
super(self.__class__, self).__init__()
self.participant_conf = extralife_io.ParticipantConf()
# deal with version mismatch
self.version_mismatch = self.participant_conf.get_version_mismatch()
self.version_check()
self.setupUi(self)
# timer to update the main text
self.timer = QtCore.QTimer(self)
self.timer.setSingleShot(False)
self.timer.setInterval(15000) # milliseconds
self.timer.timeout.connect(self.get_some_text)
self.timer.start()
# setup the participant
self.my_participant = participant.Participant(self.participant_conf)