2014-02-27 55 views

回答

2

可以定義或者要使用哪一個:

  • 通過指定FULLPATH可執行;
  • 或具有不同的別名。

例如,我都Python 2.7版和Python 3.2本機上:

$ python 
Python 2.7.3 (default, Dec 18 2012, 13:50:09) 
[GCC 4.5.3] on cygwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> 

$ python3 
Python 3.2.3 (default, Jul 23 2012, 16:48:24) 
[...] 

$ /usr/bin/python2.7 
Python 2.7.3 (default, Dec 18 2012, 13:50:09) 
[...] 

$ /usr/bin/python3.2 
Python 3.2.3 (default, Jul 23 2012, 16:48:24) 
[...] 
+0

我試圖通過'Py_SetProgramName( 「路徑/到/蟒」)'來做到這一點。但是,如果我檢查'Py_GetProgramFullPath()'它會返回一個不同的路徑。如何指定可執行文件的完整路徑? – DaPhil

相關問題