Yoda-Canada / Magic-SSG

MIT License
0 stars 3 forks source link

File open is costly procedure #7

Open Loran-l opened 3 years ago

Loran-l commented 3 years ago

get_title function opens a file, but is there a way to reduce this with passing already oppended file (file pointer)?

For this, instead with open(filename) as input_file. just do file_pointer=open(file Name). and then you can pass it to any amount of functions, just close it some where at the end of main