Nov-07-2017, 02:36 PM
Hi,
I'm trying to run my python script from a Windows 10 command prompt (batch file).
It works if I'm in the correct directory of where my python script resides (outside of python install dir); but not if I'm in a different directory.
My python 3.6.1 install is here: C:\Users\John\AppData\Local\Programs\Python\Python36\python.exe
My python script is here: C:\Python_TestScript\runtime\jm_run.py
If I change directory to C:\Python_TestScript\ and try to run I get:
However, if I change to the directory in which the script resides C:\Python_TestScript\runtime\ it works as expected:
Any ideas? This seems a bit odd to me.
Cheers,
J
I'm trying to run my python script from a Windows 10 command prompt (batch file).
It works if I'm in the correct directory of where my python script resides (outside of python install dir); but not if I'm in a different directory.
My python 3.6.1 install is here: C:\Users\John\AppData\Local\Programs\Python\Python36\python.exe
My python script is here: C:\Python_TestScript\runtime\jm_run.py
If I change directory to C:\Python_TestScript\ and try to run I get:
Quote:C:\Python_TestScript>C:\Users\John\AppData\Local\Programs\Python\Python36\python.exe C:\Python_TestScript\runtime\jm_run.py
C:\Python_TestScript>
However, if I change to the directory in which the script resides C:\Python_TestScript\runtime\ it works as expected:
Quote:C:\Python_TestScript\runtime>C:\Users\John\AppData\Local\Programs\Python\Python36\python.exe C:\Python_TestScript\runtime\jm_run.py
Creating summariser <summary>
Created the tree successfully using C:\!!PythonTest\KickOffTest\test.jmx
Starting the test @ Tue Nov 07 14:34:14 GMT 2017 (1510065254649)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary = 10 in 00:00:02 = 4.3/s Avg: 376 Min: 104 Max: 1591 Err: 0 (0.00%)
Tidying up ... @ Tue Nov 07 14:34:17 GMT 2017 (1510065257651)
... end of run
***** DONE *****
C:\Python_TestScript\runtime>
Any ideas? This seems a bit odd to me.
Cheers,
J