Hi BartonC,
Thanks for the response. Currently I have the records in a text file that I open and read from a script. As I am trying to make the script a standalone application, and include the default dataset. Do you think it would be okay to bundle the text file with the program, and if the user selects "use default dataset" that it could just open "sample.txt" from there. I don't want to have to use a backend db with this. If I have to go down this route maybe sqllite would be a good idea?
Cheers for the response
Not sure if a .txt file counts as a resource in an executable.
Besides, if it's kept external, it's adjustable (like ini files).
Nor have I played with SQLLite.
What you could do is define your dataset in pure python:
- class recordset:
-
attr1 = value1
-
# etc.
-
-
# or
-
-
recordset = (
-
(val1, val2, etc)
-
(val1, val2, etc)
-
(val1, val2, etc)
-
(val1, val2, etc)
-
)
and import that. This looks like hand coding, but could be generated from your text file.
It's really just a text file, but as long is you use python syntax/import it'll work.