Python Forum
Problem with executing 2 .py files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with executing 2 .py files
#1
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")
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem executing a script on a remote host tester_V 3 2,447 Sep-26-2021, 04:25 AM
Last Post: tester_V
  Multi-processing - problem with running multiple *.py files at the same time Antonio 5 3,799 Sep-12-2018, 01:08 PM
Last Post: volcano63
  Problem with remove Temp Files karlo_ds 1 3,148 Oct-26-2017, 11:42 PM
Last Post: wavic

Forum Jump:

User Panel Messages

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