Python Forum

Full Version: Problem with executing 2 .py files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to run lector.py firstly and gmail.py in second place, but when I try it, the programm finishes at lector.py and don't continue running. I've tried in multiple ways but it's impossible, what is going wrong? Here is the script:

from functools import partial
import os
import lector
import gmail

os.system ("C:/Users/Andrés/Desktop lector.py")
os.system ("C:/Users/Andrés/Desktop gmail.py")
I think the command should be python C:/Users/Andrés/Desktop/lector.py instead of C:/Users/Andrés/Desktop lector.py. Also the subprocess module could be used to get the exit status and error messages from the given command.