Using this general structure:
setup.py
/package
__init__.py
project.py
/data
client.log
I have a script that saves a list of names to client.log
, so I don't have to reinitialize that list each time I need access to it or run the module. Before I set up this structure with pkg_resources
, I used open('.../data/client.log', 'w')
to update the log with explicit paths, but this doesn't work anymore.
Is there any way to edit data files within modules? Or is there a better way to save this list?