Python Forum
How to Make Python code execution pause and resume to create .csv and read values.
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Make Python code execution pause and resume to create .csv and read values.
#1
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. Wall Wall Wall
Reply
#2
You need to provide a more detailed objective.
It's hard to imagine exactly what you are actually trying to do.
Reply
#3
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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How does this code create a class? Pedroski55 3 124 10 hours ago
Last Post: Pedroski55
  kill python execution program lebossejames 0 237 Mar-16-2024, 11:16 AM
Last Post: lebossejames
  How can I pause only one object? actualpy 1 356 Feb-01-2024, 07:43 PM
Last Post: deanhystad
  I want to create one resume parser api using Python Flask parthsukhadiya 1 839 Nov-28-2023, 05:07 PM
Last Post: Pedroski55
  Recommended way to read/create PDF file? Winfried 3 2,871 Nov-26-2023, 07:51 AM
Last Post: Pedroski55
  hi need help to make this code work correctly atulkul1985 5 773 Nov-20-2023, 04:38 PM
Last Post: deanhystad
  newbie question - can't make code work tronic72 2 678 Oct-22-2023, 09:08 PM
Last Post: tronic72
  Different code execution times Wirbelwind94 4 753 Oct-06-2023, 12:30 PM
Last Post: snippsat
  Cleaning my code to make it more efficient BSDevo 13 1,359 Sep-27-2023, 10:39 PM
Last Post: BSDevo
  How to pause execution (on windows)? pstein 1 553 Jun-23-2023, 06:58 PM
Last Post: rob101

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020