Python Forum
Which IDE comes with help ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which IDE comes with help ?
#4
This is not a direct answer but as I work on Linux, I always have a terminal open on my desktop. I created a small program named 'pyman', so that when I type in the console for example
Output:
pyman xmlrpc
it will open these search results in the default web browser. Here is this command's code. Enjoy the rich features Wink
#!/usr/bin/env python3
# -*-coding: utf8-*-
# pyman -- program to browse python documentation.
import argparse
import webbrowser

__version__ = '2019.11.8'

def main(word, version):
    assert version in (2, 3)
    url = "https://docs.python.org/{}/search.html".format(
        version) + ('?q=' + word if word else '')
    webbrowser.open(url)

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description="Search python documentation")
    parser.add_argument('-v', '--version', dest='version', type=int, help='Python version 2 or 3. Defaults to 3.', default=3)
    parser.add_argument('word', metavar='WORD', help='The word to search',
                        default='', nargs='?')
    ns = parser.parse_args()
    main(ns.word, ns.version)
Reply


Messages In This Thread
Which IDE comes with help ? - by tonycstech - Nov-08-2019, 05:28 AM
RE: Which IDE comes with help ? - by perfringo - Nov-08-2019, 07:21 AM
RE: Which IDE comes with help ? - by ichabod801 - Nov-08-2019, 01:51 PM
RE: Which IDE comes with help ? - by tonycstech - Nov-18-2019, 01:07 AM
RE: Which IDE comes with help ? - by Gribouillis - Nov-08-2019, 02:30 PM
RE: Which IDE comes with help ? - by perfringo - Nov-18-2019, 08:36 AM
RE: Which IDE comes with help ? - by tonycstech - Nov-25-2019, 02:30 AM
RE: Which IDE comes with help ? - by perfringo - Nov-25-2019, 07:35 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020