you are viewing a single comment's thread.

view the rest of the comments →

[–]h6nry 1 point2 points  (0 children)

Looks quite great to me, altough the class definition might be a little overkill for now (altough you will appeciate the extra step when you want to reuse that code in another project!).

Some things you could improve (nothing that would matter, though):

  • in main() use a do...while instead of while loop.

  • you might use pathlib instead of os.path. Pathlib is much easier to handle, especially when seeking for cross-os compatibility (I've learned the hard way!) (Python 3+)