batch files and path in python (subprocess | sys)
Xristos Xristoou
saxri89 at gmail.com
Tue May 24 17:05:43 EDT 2016
hello
i use some programs where support python api.
but to can use that api from programs need to define some paths(pythonpath program and more) and call some batch files(if i not do that i cant access api support).create an .bat file where if i run i can use api.
mybatch.bat
set ROOT=C:\path\path
call “%ROOT%“\path1\path1.bat
call “%ROOT%“\path2\path2\path2\path2\path2.bat
set GDPATH=%ROOT%\path3\path3
path %PATH%;”%ROOT%\path4\path4\path4\”
set PYTHONPATH=%PYTHONPATH%;%ROOT%\path4\path4\path4;
set PYTHONPATH=%PYTHONPATH%;%ROOT%\path5\path5\path5\path5
set SPATH=%ROOT%\path6
start “name ide” /B “path from idle.exe”
but i can use api only from this file i dont want that
i want to create a script where to run or call batch file with the |subprocess | and run on background(activate).
and i need define path with the |sys|,sys.path.extend,sys.path.append i am not sure who is right.
i need a mybatch.bat to convert to python script to take easy api
More information about the Python-list
mailing list