python在 Linux shell 上輸入時(shí),會(huì)打印歡迎消息:[root@localhost ~]# pythonPython 2.7.5 (default, Nov 20 2015, 02:00:19)[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.這些線從哪里來?它們是在編譯或安裝過程中確定的嗎?我的系統(tǒng)上有另一個(gè)版本的python可執(zhí)行文件和一組庫(kù),但是當(dāng)我輸入它時(shí)python,它也顯示與上面相同的歡迎消息。謝謝,更新:我使用絕對(duì)路徑來啟動(dòng)另一個(gè)版本的python。并且剛剛發(fā)現(xiàn)歡迎信息的內(nèi)容與 sys.version 和 sys.platform 相同。但是如果我把其他版本的python拷貝到不同的Linux機(jī)器B上,仍然使用絕對(duì)路徑運(yùn)行。我得到Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)[GCC 7.3.0] on linux2Type "help", "copyright", "credits" or "license" for more information.此歡迎信息與機(jī)器 B 的 python 相同。
交互式python解釋器的歡迎信息從何而來?
慕運(yùn)維8079593
2021-08-24 17:57:57