示例代碼從一個模塊: somevar = "a"
def myfunc(somevar = None):
# need to access both somevars ???
# ... if somevar was specified print it or use the global value
pass
if __name__ == '__main__
我在Python 2.6(並排安裝在CentOS需要Python2.4.3)工作,我有箭頭鍵的問題和退格等 我從源代碼編譯和我想象中的解決辦法是安裝的readline-devel的後重新編譯簡列如: Seeing escape characters when pressing the arrow keys in python shell 的問題是,我有很多安裝的模塊,並很擔心的事情打破。能夠在不破