You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/Naked/commands/pyh.py

49 lines
1.0 KiB

#!/usr/bin/env python
# encoding: utf-8
import sys
def python_help(help_string):
try:
needle = help_string
if needle.startswith("'") and needle.endswith("'"):
needle = needle[1:-1]
elif needle.startswith('"') and needle.endswith('"'):
needle = needle[1:-1]
help(needle)
except Exception as e:
print(e)
sys.stderr.write("•naked• There was an error processing the query.")
sys.exit(1)
def pyh_help():
from Naked.toolshed.system import exit_success
help_string = """
Naked pyh Command Help
======================
The pyh command searches the built-in Python documentation for a query term. The query term can be a Python built-in module, class/type, method, or function.
USAGE
naked pyh <query>
SECONDARY COMMANDS
none
OPTIONS
none
EXAMPLES
Module Docs: naked pyh sys
Class Docs: naked pyh dict
Method Docs: naked pyh dict.update
Function Docs: naked pyh max"""
print(help_string)
exit_success()
if __name__ == '__main__':
pass