0

Im trying to create a python script with executes a series of python and sql scripts.

Some need to be executed using one python executable and some using another.

I've tried

from subprocess import call 
call([r"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\pythonw.exe", r"C:\Path\to\python\file\blabla.py"])

And

call([r"cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3", "pythonw.exe", r"C:\Path\to\python\file\blabla.py"])

But the script isnt being executed.

I think the problem might be "How to execute an .exe file in windows terminal including full path to it"?

1 Answer 1

1

Please check my code. It is working well in my side.

from subprocess import call

call([r"C:\Python38\python.exe", r"E:\python\hello.py"])

As i think, the problem is that you use pythonw.exe. if you use pythonw.exe, you can see any log in terminal. Pythonw is useful for running script with GUI.

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.