0

I am using subprocess.Popen to control programs in a tasks scheduler.

The code I am using to open programs is:

subprocess.Popen("python " + filename + ".py")

The problem I am facing is this (I am using Python):

When I run my taskscheduler from the Python IDLE, everything runs as expected. However, when I run the task scheduler from the command line, The programs that open actually run in the same "shell" or command window as the task scheduler itself.

I don't want this to happen. I have played with the shell=True command, but I haven't gotten it to work yet. Any ideas?

Paul Mougel
  • 16,728
  • 6
  • 57
  • 64
Neil Aggarwal
  • 511
  • 1
  • 10
  • 29
  • 1
    http://stackoverflow.com/questions/19308415/execute-terminal-command-from-python-in-new-terminal-window – Vlad Nov 20 '13 at 16:39
  • What do you mean they run in the same "shell"? Can you describe a little better what you're seeing (and what you want to be seeing?) – mgilson Nov 20 '13 at 16:43
  • are you trying to say that you want to run the program on a separate shell? – John Nov 20 '13 at 16:46
  • Hey, thanks for the notes. So, I run the taskscheduler using windows task scheduler. So I am running my own scheduler using windows task scheduler. When I run it, all the programs that open using Popen, run within the task scheduler window (all the print statements I have to confirm that the program is running and not errored). I want the programs to each run in their own "shells". The reason I quote shells, is because I am not sure if that is the right vocab. – Neil Aggarwal Nov 20 '13 at 20:25

0 Answers0