MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / undoChangesClick

Function undoChangesClick

src/gamesbyexample/__init__.py:136–146  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

134
135
136def undoChangesClick(*args):
137 global undoChangesBtnSV, undoChangesButton
138 i = CURRENT_SELECTED_INDEX
139
140 # Restore the file from the original one in the _originalFiles.zip backup.
141 originalFilesZipFile = zipfile.ZipFile(os.path.join(FOLDER_OF_THIS_FILE, '_originalFiles.zip'), 'r')
142 originalFilesZipFile.extract(PROGRAMS[i]['filename'], FOLDER_OF_THIS_FILE)
143
144 # Disable the undo button now that there are no changes.
145 undoChangesBtnSV.set('File is Unchanged')
146 undoChangesButton.config(state='disabled')
147
148
149def openInventWithPythonWebpage(*args):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected