We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bccf73d commit 63dcf1aCopy full SHA for 63dcf1a
2 files changed
set_pythonpath.bat
@@ -0,0 +1,22 @@
1
+@echo off
2
+
3
+set need_set_pythonpath=1
4
+for %%x in (python.exe) do set python_exe_path=%%~$PATH:x
5
+for /f "delims=" %%p in ('echo %python_exe_path%\..\lib\site-packages\quecpython') do set quecpython_path=%%~fp
6
+if "%PYTHONPATH%" == "" (
7
+ echo The path is not set, will be set now.
8
+ set PYTHONPATH=%quecpython_path%
9
+) else (
10
+ echo %PYTHONPATH% | findstr /C:"%quecpython_path%" > nul
11
+ if errorlevel 1 (
12
13
+ set PYTHONPATH=%PYTHONPATH%;%quecpython_path%
14
+ ) else (
15
+ echo The path is set before, won't be set again.
16
+ set need_set_pythonpath=0
17
+ )
18
+)
19
20
+if %need_set_pythonpath% == 1 (
21
+ setx PYTHONPATH %PYTHONPATH%
22
sudo.bat
0 commit comments