Jun-14-2018, 11:42 AM
I want to write a code which can create "mydata.csv" file, (python execution should pause here) write values into "mydata.csv", after closing "mydata.csv" python code execution should resume.
|
How to Make Python code execution pause and resume to create .csv and read values.
|
|
Jun-14-2018, 11:42 AM
I want to write a code which can create "mydata.csv" file, (python execution should pause here) write values into "mydata.csv", after closing "mydata.csv" python code execution should resume.
Jun-14-2018, 02:45 PM
You need to provide a more detailed objective.
It's hard to imagine exactly what you are actually trying to do.
Jun-14-2018, 04:16 PM
You're describing synchronous code.
fd = open('your_file', 'w')
# code which does other stuff
# now we have new data, write it
fd.write(data)
# code
# close the file descriptor before your program exits
fd.close()
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians! |
|
|