I learned quite a bit about the terminal doing

this lab, especially becuase I had to try it a few
times before getting under the 60 second timer.

When I was having trouble getting mwc update to work, I ended up
opening the code using code return_to_ship.py to see what the problem
might have been. I did some googling with what the path fucntion does
and started to think that maybe my log file was not being created. I
added print(Path(LOG_FILE).absolute()) to the code and then redid the
adventure and then looked at the hidden files in Finder and saw that the
log file was created. I removed that code line and re-saved return_to_ship.py.
I'm still not sure if the saving of the file or not having a log file
was the issue before, but I think everything should be all set now.

I think the terminal might be useful if you want to create a number of
files or add a program/funciton that may create files for you.
This would be easier than doing everything manually with the Finder.
This commit is contained in:
Chris Mekelburg 2024-09-05 18:48:03 -04:00
parent 92a498c79c
commit fff448772c
5 changed files with 1 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
adventure/.DS_Store vendored Normal file

Binary file not shown.

BIN
adventure/seafloor/.DS_Store vendored Normal file

Binary file not shown.

BIN
adventure/seafloor/sunken_ship/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -41,6 +41,7 @@ def win():
print_fancy(VICTORY)
win_time = datetime.now().isoformat()
Path(LOG_FILE).write_text(f"finished the lab at {win_time}\n")
def chest_was_opened():
return Path(CHEST_TIMER_FILE).exists()