看板 Python 關於我們 聯絡資訊
小弟在兩台電腦(win7,win8)上安裝不同版本的Ipython, 但執行結果有些差異性,想請問該設什麼參數讓B電腦與A一致 A電腦: In[1]:x = '我' In[2]:print x Out:我 B電腦: In[1]:x = '我' In[2]:print x.decode('utf8','ignore').encode('big5','ignore') Out:我 ========================== A電腦: In[1]: print 'abc' Out:abc B電腦; In [1]: print 'abc' IndentationError: unexpected indent If you want to paste code into IPython, try the %paste and %cpaste magic functions. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.245.64.168
timTan:你好,你出問題的那一行,前面多了一個空格。 05/09 18:59