With config file path




















Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. Gets the physical path to the configuration file represented by this Configuration object.

If you're using setuptools , see the chapter on using non-package data files. Don't try to look for the files yourself. Another option is to keep all the. I don't think there is a clean way to deal with that. You could simply choose to test for the existence of the 'local' file, which would work in dev mode. Otherwise, fall back to the production path:.

The docs for Writing the Setup Script , under section 2. Installing Additional Files mention:. How are we doing?

Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. Where to put a configuration file in Python? Ask Question. Asked 10 years, 3 months ago. Active 10 months ago. Viewed 52k times. In addition, I would like to be portable if possible Work on windows for example. What's the good practice to do that?



0コメント

  • 1000 / 1000