Python 3.13: Fix and polish #1

Merged
vilmibm merged 15 commits from noelle/tilde-train:python-3.13 into trunk 2025-06-02 22:23:23 +00:00
Contributor

I gave the script a pretty thorough cleanup by removing commented code, replacing deprecated functions, turning multiple print()s into a single one, using modern libraries for path manipulation...
I tried to avoid entirely re-implementing its features for now.
Each change has been broken into its own commit, so I recommend stepping through them to get a sense of each individual diff.

Future improvements I'd like to make:

  • Use argparse to handle CLI.
  • Instead of moving the big train string, put it on a pad, and move the cropped view of the pad from left to right.
  • Better on-boarding for new users.
I gave the script a pretty thorough cleanup by removing commented code, replacing deprecated functions, turning multiple `print()`s into a single one, using modern libraries for path manipulation... I tried to avoid entirely re-implementing its features for now. Each change has been broken into its own commit, so I recommend stepping through them to get a sense of each individual diff. Future improvements I'd like to make: - Use [argparse](https://docs.python.org/3/library/argparse.html) to handle CLI. - Instead of moving the big train string, put it on a [pad](https://docs.python.org/3/library/curses.html#curses.newpad), and move the cropped view of the pad from left to right. - Better on-boarding for new users.
noelle added 15 commits 2025-06-02 21:35:58 +00:00
That fixes these SyntaxWarnings:

tilde-train.py:60: SyntaxWarning: invalid escape sequence '\_'
  |  |              | |__/V\_| |
tilde-train.py:76: SyntaxWarning: invalid escape sequence '\-'
  == - /  \-/  \-----/  \-/  \ - ==
tilde-train.py:86: SyntaxWarning: invalid escape sequence '\-'
  - /  \-/  \------/  \-/  \ -
Also remove trailing whitespace in the header.
This lets us trim all the trailing whitespace in the file automatically.
For better code intelligence
So the link strings don't just grow over time
This makes it easier to track what's happening in the function
Since it's wrapped in a `<pre>`, I assume it's meant to be inserted into
HTML?
vilmibm approved these changes 2025-06-02 22:23:08 +00:00
vilmibm left a comment
Owner

<3__<3

<3__<3
vilmibm merged commit dcccaebbab into trunk 2025-06-02 22:23:23 +00:00
noelle deleted branch python-3.13 2025-06-04 22:43:53 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vilmibm/tilde-train#1
No description provided.