K
K
KitCat122021-12-20 20:45:06
Python
KitCat12, 2021-12-20 20:45:06

What is the best way to store file paths in a module?

Specifically interested in options with .pyfiles (if you can do this at all, if not, then the best way). At first I just wanted to store variables with paths in a separate file, then it occurred to me to make a class, then I remembered about the date classes. But for some reason I don't think it's all right. What is the best and right way to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-12-20
@Vindicar

Paths to what files, actually?
I would make them relative, and at the start I would stitch them with the path along which the script lies. In principle, you can put this logic in a separate class, if you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question