I have 2 scripts, one is a Tkinter Gui which opens several programs and urls with buttons, and another which opens another Tkinter Gui with a drop down for specific file docs. I have created a Windows Task Manager task to run the first script when I log on. The first script successfully calls the second when testing them through IDLE but when running it through the task manager it will not open the second script. Does anyone know why this might occur? I am using the execfile command to open the second script.
Asked
Active
Viewed 59 times
0
-
1No idea why. What happens if you test in Command Prompt, which is much closer to logon execution (which I otherwise know nothing about)? Also, execfile combines file open, read, and exec of read result. It is gone in 3.x, to be replaced by open, read, and exec calls. If you recode your 2.x code with 3 separate steps, you might be able to find out which fails. – Terry Jan Reedy Feb 17 '17 at 19:22
-
Are you using relative paths for the call to `execfile`? the current working directory of the task is almost certainly different than when you are editing the file in IDLE. – Bryan Oakley Feb 17 '17 at 19:38