I'm trying to call a bash script with python, but I need it to be last thing executed.
I thought just adding this at the end of my script would do it :
val = subprocess.check_call("/scripts/files.sh '%s'" % title, shell=True)
But it's being executed before the code above it, why?
Last lines above it :
print(q_1)
print(q_2)
print(q_3)
cursor.execute(q_1)
cursor.execute(q_2)
cursor.execute(q_3)
mariadb_connection.commit()
cursor.close()
mariadb_connection.close()
I do use val = subprocess.check_call
before all this code to run another bash script too, if that matters
How can I be sure my script will be the last thing executed?