Nov-07-2018, 04:21 AM
i have a couple use cases where i need to include some big file contents. because these use cases are very complex and have too many things going on to sanely discuss them here, i will, instead, present a simplistic useless case; the kind of thing you might see in a classroom environment.
file (
here is that overly simplistic purpose. i need to create a python source file the is a means to transport a big file contents so that running the script "unpacks" the file to where the program is run.
the question i need to ask points to this simplistic purpose. what is the the best way to efficiently put a big (a few kilobytes to a few megabytes) file contents into python source code, so that, in the simplistic case, with included logic code, invoking the script can write that contents to a file.
my first thought is to have many lines of continued concatenated string with data in base 16, base 64, or base 85. any other ideas?
file (
here is that overly simplistic purpose. i need to create a python source file the is a means to transport a big file contents so that running the script "unpacks" the file to where the program is run.
the question i need to ask points to this simplistic purpose. what is the the best way to efficiently put a big (a few kilobytes to a few megabytes) file contents into python source code, so that, in the simplistic case, with included logic code, invoking the script can write that contents to a file.
my first thought is to have many lines of continued concatenated string with data in base 16, base 64, or base 85. any other ideas?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.