[問題] 新手上路…

看板Python作者 (-﹃ -)時間16年前 (2009/06/20 20:38), 編輯推噓1(103)
留言4則, 3人參與, 最新討論串1/2 (看更多)
小弟因為研究需要 必須執行一個.py的程式檔 然而完全不懂python的IDE環境和編譯過程 在http://www.python.org/下載了windows環境可執行的Python2.6 可是進入程式集中的Python(command line)後 完全不知道如何下指令去執行我電腦中的.py程式檔案 關於此.py檔的說明 The script binary.py (you also need subr.py) implements this approach. To use, Usage: ./binary.py [parameters for svm-train] training_file testing_file 我要執行的檔名就是binary.py 但看完官網的toturial還是不懂如何執行 >>> C:\binary.py File "<stdin>", line 1 C:\binary.py ^ SyntaxError: invalid syntax >>> python binary.py -g 0.01 -c 10 DC_91_teuters91train.dat DC_91teuters91test File "<stdin>", line 1 python binary.py -g 0.01 -c 10 DC_91_teuters91train.dat DC_91teuters91test ^ SyntaxError: invalid syntax 請各位大大指教 ( ̄□ ̄|||)a -- 沒有男人或女人是值得為他流淚 因為值得的那一位不會讓你哭 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.117.164.99

06/20 20:39, , 1F
python binary.py trainingfile testingfile
06/20 20:39, 1F

06/20 20:40, , 2F
請問樓上binary.py應該放在哪個目錄下?
06/20 20:40, 2F

06/20 20:41, , 3F
我的Python26安裝於C:\Python26
06/20 20:41, 3F
※ 編輯: needforsleep 來自: 140.117.164.99 (06/20 20:53)

06/21 02:05, , 4F
先cd 到你放binary.py的目錄下執行1F
06/21 02:05, 4F
文章代碼(AID): #1AFDXJoi (Python)
討論串 (同標題文章)
文章代碼(AID): #1AFDXJoi (Python)