什么是PythonLauncher?
以下是官方文檔給出的解釋
Newinversion3.3.
ThePythonlauncherforWindowsisautilitywhichaidsinlocatingandexecutingofdifferentPythonversions.It
allowsscripts(orthecommand-line)toindicateapreferenceforaspecificPythonversion,andwilllocateand
executethatversion.
UnlikethePATHvariable,thelauncherwillcorrectlyselectthemostappropriateversionofPython.Itwillprefer
per-userinstallationsoversystem-wideones,andordersbylanguageversionratherthanusingthemostrecently
installedversion.
翻譯:
3.3版本新增功能
適用于Windows的Python啟動(dòng)器是一個(gè)實(shí)用組件,可幫助您定位和執(zhí)行不同的Python版本。它允許腳本(或命令行)為特定的Python版本指示首選項(xiàng),定位并執(zhí)行該版本。
不同于PATH變量,PythonLauncher將正確選擇最合適的Python版本。它更喜歡每個(gè)用戶在系統(tǒng)范圍內(nèi)的安裝,并且運(yùn)行指定的Python版本,而不是使用最近安裝的版本。
PythonLauncher的位置
在安裝Python3.3以上版本的Python時(shí),我們可以看到下圖中的一個(gè)選項(xiàng),當(dāng)我們勾選時(shí),系統(tǒng)便會(huì)幫助我們自動(dòng)安裝PythonLauncher。
圖中標(biāo)注的小字告訴我們,安裝PythonLauncher后可以通過(guò)全局命令‘py’來(lái)更方便地啟動(dòng)Python。不勾選launcher項(xiàng)時(shí),系統(tǒng)則不會(huì)安裝PythonLauncher(但默認(rèn)情況下該工具都是被勾選的)。
以上內(nèi)容為大家介紹了python培訓(xùn)之launcher是什么,希望對(duì)大家有所幫助,如果想要了解更多Python相關(guān)知識(shí),請(qǐng)關(guān)注IT培訓(xùn)機(jī)構(gòu):千鋒教育。