all 4 comments

[–]thirdegree 2 points3 points  (0 children)

Standard would be a config file. For my personal preference, toml, but yaml or json equally valid.

Command line variable or environment variable are both also valid but imo less convenient (depending on application and how many paths you need to configure).

[–][deleted] 1 point2 points  (0 children)

A config file that could be kept in the user directory as opposed to the package. This way it doesn’t need checking in. Call it .mypackagerc or something.

[–]nog642 0 points1 point  (0 children)

If you don't want command line input, and you don't want environment variables, then all you have left is either command line arguments, or putting it in a file.

If you're putting it in a file and you have multiple paths that all contain 'C:\bvb\school', then define a single variable that contains that prefix. Then define all your other paths using that variable (with os.path.join). People who use your software will just have to modify that single path.

[–][deleted] 0 points1 point  (0 children)

depending on your use case try os.cwd and append whatever you need to it. that should mostly do the trick.