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.
The sys module in Python provides various functions and variables that are used to manipulate different parts of the Python runtime environment. It allows operating on the interpreter as it provides access to the variables and functions that interact strongly with the interpreter.
We can also use the inspect module in python to locate a module. We will use inspect. getfile() method of inspecting module to get the path. This method will take the module's name as an argument and will return its path.
It's in Python/Python/sysmodule.
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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With