I've been running a python script from the command line that's inserting data in a database for a couple of hours now. It will take at least half a day more before it's finished. However, I want to take the laptop with me to somewhere else. My sleep at closing lid settings (if they exist) are at default (I've never looked at them). If I close the lid and open it in 4 or 5 hours, will the python script resume from where it left off? If not, can this be set to work in the preferences somehow?
It should continue, if your script has any error-handling for loosing connection to the database (assuming off-site DB).
Though the exact behaviour is hard to predict without seeing the actual code. Sleeping the system may also leed to unexpected results in the script.