Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Comando "print" após help() não funciona

Bom dia. Instalei o python e tudo ocorreu normalmente. Dei o comando "python". depois help(). quando digito, já habilitado o "help", a palavra print da o erro:

('more' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.

Poderiam me ajudar com isto? os comandos python e python-V funcionam normalmente.

obs: ja coloquei a pasta do python no path como possível resolução mas nada aconteceu.

4 respostas

Quando vc digita Python deve aparecer algo como:

C:\Users\user>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Então vc digita help e algo assim deve aparecer:

>>> help()

Welcome to Python 3.7's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.7/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help>

Ao lado desse 'prompt' help> , vc digitou print e deve aparecer:

help> print
Help on built-in function print in module builtins:

print(...)
    print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments:
    file:  a file-like object (stream); defaults to the current sys.stdout.
    sep:   string inserted between values, default a space.
    end:   string appended after the last value, default a newline.
    flush: whether to forcibly flush the stream.

help>

Não tenho certeza se era esse seu problema. Mas quando passei por algo parecido , nem o Python funcionava. A minha solução foi remover e reinstalar tudo.

Marcos, bom dia. Tudo bom? Tudo exatamente como vc falou até o passo

help>

quando digito "print" ao lado de "help>" a mensagem é exatamente essa:

'more' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.

solução!

Olá Tadeu,

Parece ser um problema no windows e não no python

Verifica se a pasta C:\Windows\System32\está no path, e se existe o arquivo more.com na pasta System32.

Lucas, perfeito ! Havia o arquivo more mas nao estava no path o system32 ! Muito obrigado, mano !

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software