1

My inputs into the actions tab are:

program/script: Powershell.exe  
add arguments: "lamps_h.py"  
start in: c:\selenium

It says "running" but nothing happens. It is a python script that I usually run in the shell terminal.

I have been learning coding for about 3 months so please forgive my ignorance.
Also, this is my first post, so if I missing some etiquette rule, please let me know.

5
  • Are you sure it's not ending quickly? Commented Jan 4, 2018 at 6:52
  • At a CMD prompt, if I use powershell test.py, I get a red stderr message. If I use the fullpath to test.py and pass it to powershell, then it works. Powershell with my limited past experience does not inherit current directory. Commented Jan 4, 2018 at 8:28
  • If lamps_h.py is in c:\folder 1, then you may need to use powershell "c:\folder 1\lamps_h.py" at a CMD prompt. Similarly, try "c:\folder 1\lamps_h.py" for your add arguments value. Commented Jan 4, 2018 at 9:15
  • @michael_heath - I tried both, did not work but says running... I am thinking maybe i need to make a path directly to power shell but i cant find it... Commented Jan 4, 2018 at 10:37
  • Powershell should be in your path variable so I doubt you need it. In CMD, type set ps to see value of PSModulePath. Type set path to see value of path. Or see all variables and values by just typing set. On my system, powershell is in C:\Windows\system32\WindowsPowerShell\v1.0. Commented Jan 4, 2018 at 10:51

1 Answer 1

3

To run Python programs in Task Manager on Windows: In "Programs/Script" input path to python.exe In "Add Arguments"input script file name In "Additional Information" input path to location where file is saved

For example:

Path to Python: C:\Users\your_user_name\AppData\Local\Programs\Python\Python36-32\Python.exe

Script name ./script.py

Path to location where script is saved: C:/foldername/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.