I try to run several simple command line commands on my system and although the code run i cannot see my window opening.
For example:
command = 'cmd'
os.system(command)
Why i cannot see my cmd
window ? all i can see in the console window (i am using pycharm
) is this:
Microsoft Windows [Version 10.0.18362.449]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\blabla\tmp>
I also try to open appium
server using command line
and i have .bat
file that call appium
(this is what i put into the .bat
file and this work fine manually):
This is the path to my .bat
file:
C:\tmp\scripts\start_appium.bat
Command
p = subprocess.Popen("start_appium.bat", cwd=r"C:\tmp\scripts")
stdout, stderr = p.communicate()
And i received this error
:
Traceback (most recent call last): File "C:\Python37\lib\subprocess.py", line 775, in init restore_signals, start_new_session) File "C:\Python37\lib\subprocess.py", line 1178, in _execute_child startupinfo) File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.4\helpers\pydev_pydev_bundle\pydev_monkey.py", line 536, in new_CreateProcess return getattr(_subprocess, original_name)(app_name, patch_arg_str_win(cmd_line), *args) FileNotFoundError: [WinError 2] The system cannot find the file specified