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问题。 –
您可以指定如何从命令行执行脚本吗? –