Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

batch files and path in python (subprocess | sys)

15 views
Skip to first unread message

Xristos Xristoou

unread,
May 24, 2016, 5:05:58 PM5/24/16
to
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
0 new messages