5

So I just installed the python interpreter and wanted to use the help(sys) feature to get more information about the sys module, but I got this error and had no idea what went wrong.

C:\Users\Jake>python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> help(sys)
'more' is not recognized as an internal or external command,
operable program or batch file.

>>>

Is this a matter of not having the source code for the sys module on my computer or something else entirely? Any help would be greatly appreciated.

2
  • 1
    Do you have 64-bit Python on 32-bit Windows or something? Commented Oct 28, 2011 at 4:11
  • no, definitely 64 bit python and windows Commented Oct 29, 2011 at 0:10

4 Answers 4

8

Python uses the more program to show the help text. It's saying it can't find the more program. It should be at C:\Windows\System32\more.com. You need to have C:\Windows\System32 in your PATH environment variable.

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

2 Comments

I definitely have the more.com file in the C:\Windows\System32 directory, so I put C:\Windows\System32 in my PATH variable, re-executed the command, but got the same result.
Ya, I called more from the command line, then ran the interpreter, and both work now! Don't know if it was something I did or just windows being windows, but thanks for the help!
3

more is a program used to display text in the terminal. I believe it generally comes with Windows installations. Python is trying to use it to display the help text, but it seems that your computer doesn't have it, or your python interpreter isn't able to use it.

Here's a list of common Windows shell commands, including more.

Comments

0

It looks like you have the sys module on your system, since import sys worked fine.

I'm not sure what the issue is exactly, but you can find plenty of info on sys and other modules at Python site.

Also, on Linux you can run a pydoc server and browse the module help pages in a browser.

$ pydoc -p <port>

$ firefox http://localhost:<port>/

Though I'm not sure what it takes to set up pydoc in Windows.

1 Comment

Ya, I have a chm file with all of the documentation for Python. I was just watching a video where they did it and I wanted to try it for myself. Not too pivotal, but still nice to have
0

Make sure that:

  1. the directory containing more.com is in your PATH environment variable
  2. the .COM extension is in your PATHEXT environment variable

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.