def myfunc():
""" My docstring """
print "hello"
help(myfunc)
'more' is not recognized as an internal or external command,
operable program or batch file.
64位Windows 7,Python 2.6中
def myfunc():
""" My docstring """
print "hello"
help(myfunc)
'more' is not recognized as an internal or external command,
operable program or batch file.
64位Windows 7,Python 2.6中
Python's help() function嘗試,你的情況,執行more命令。它應該是這個樣子,安裝更多的時候:
>>> help(myfunc)
Help on function myfunc in module __main__:
myfunc()
My docstring
但你也可以做
>>> print myfunc.__doc__
My docstring
閱讀文檔字符串。
我認爲問題不在於你的Windows操作系統沒有more
但Windows 7的UAC(用戶訪問控制)中運行你的命令行窗口中user mode
代替admin mode.
爲了解決這個問題,運行cmd
以管理員身份然後從該窗口運行python。這應該照顧它。我假設你已經找到more
程序C:\Windows\System32\more.com
爲什麼你沒有[更多](http://www.computerhope.com/morehlp.htm)? – Keith
這不是一個Python問題。這只是一個Window問題。 –
您可以指定如何從命令行執行腳本嗎? –