- #1
Eclair_de_XII
- 1,083
- 91
- TL;DR Summary
- Let's say we have a module that allows the user to view sunset data, rent rates, and economic data for various regions of the United States. Let's say I have that data compiled. Would it be better for that data to be automatically be downloaded when the program is run, or should it be included with the module with instructions on where to put it?
I'm working with Python modules at the mo', and I am having trouble trying to decide how best to include supplementary material that is accessed by my module, but not necessarily a part of it. The program works alright when accessing it from the IDE, but it fails to recognize the files when I'm the program is being run from the shell, because these files are referenced with relative paths. Let's say I want an end-user to access these files. Do I trust him or her to follow my instructions on where to place the files, or do I write more script to automatically download the files to the right locations for him or her?
1. On one hand, the user will not always know where to place the files and if they might trick the module by placing a given file with the same name in the right location, with incorrect contents.
2. On the other hand, the user might not be trusting of programs that automatically download things to their computer, even if they are prompted to confirm the download.
I feel like option 1 is better, because the user can view the contents of the file(s) beforehand, and the instructions are explicit enough:
1. On one hand, the user will not always know where to place the files and if they might trick the module by placing a given file with the same name in the right location, with incorrect contents.
2. On the other hand, the user might not be trusting of programs that automatically download things to their computer, even if they are prompted to confirm the download.
I feel like option 1 is better, because the user can view the contents of the file(s) beforehand, and the instructions are explicit enough:
Python:
from os import getcwd
folder='sunset_data'
message='Please place the \"%s\" folder into %s'%(folder,getcwd())
print(message)
Last edited: