Deciding when to split a growing script into modules instead of one file

A Python script that started as fifty lines is now almost six hundred. It fetches data, cleans it, writes reports and sends notifications. Everything technically works, but scrolling between functions is becoming ridiculous. I'm tempted to split by responsibility into modules, though I don't want to design a grand architecture for a personal tool. What signs tell you it's time to split a script, and what would you keep in the entry-point file?

  • programming-help
  • split
  • growing
  • script
54

5 replies · Sort: Best

Best

No conversations include a reply from the original poster.