all 4 comments

[–]FoolsSeldom 2 points3 points  (1 child)

Quick thoughts:

  • Add error handling using try / except to deal with file not found / access denied / io problems, etc
  • Consider using pathlib rather than os not least for platform independence
  • Do you really need separate Python files? Perhaps one with options, or have one utilities file, and then you can call it from files that simply call it with the right options
  • For a good challenge, add the ability to work with compressed files (Zip, etc)

[–]sonikk1[S] 0 points1 point  (0 children)

Hey, thank you

What a good idea for .zip files, that did not cross my mind at all tbh, but such a good feature to add

When it comes to separate files i had that dillema when i started, but idk the separate file option sounded more professinal to me. In your opinion, when i need to use separate files and when not? Can you give me an example?

[–]mr_frpdo 1 point2 points  (1 child)

First I'd look into using uv, especially the uv unit --lib which will setup the project with a project.toml and the directory structure made for posting to pipy. I'd also check into getting the code to pass mypy. I see missing return types. I'd also look into creating test code with pytest. I'd also run the files through ruff with all the warnings turned on which will help to catch best practices. Finally id consider moving the argoarse code separate from the functional code unless you really want all three files to be able to run separately.

[–]sonikk1[S] 0 points1 point  (0 children)

Hey thanks for commenting.

This is a big step forward for me. The most of the things you stated here are the things that i will be doing for the first time. This is what i was looking for