3
def myfunc():
    """ My docstring """
    print "hello"

help(myfunc)

I get

'more' is not recognized as an internal or external command,
operable program or batch file.

Windows 7 64bit, Python 2.6

3
  • 3
    Why you no have more? Commented Aug 30, 2011 at 9:56
  • 1
    This is not a Python question. This is simply a Window question. Commented Aug 30, 2011 at 10:03
  • Can you specify how you execute your script from the command-line? Commented Aug 30, 2011 at 10:04

2 Answers 2

3

Python's help() function tries to, in your case, execute the more command. It should look something like this, when more is installed:

>>> help(myfunc)
Help on function myfunc in module __main__:

myfunc()
    My docstring

But you can also do

>>> print myfunc.__doc__
 My docstring

to read the docstring.

Sign up to request clarification or add additional context in comments.

Comments

1

I think that the problem is not that your Windows OS doesn't have more but that Windows 7 UAC (User Access Control) runs your command line window in user mode instead of admin mode. To solve the problem, run cmd as an administrator and then run python from that window. That should take care of it. I am assuming that you have already located the more program in C:\Windows\System32\more.com

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.