Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:42:08+00:00 2026-06-15T06:42:08+00:00

in python interactive shell, if you do >>> import os >>> help(os) you will

  • 0

in python interactive shell, if you do

>>> import os
>>> help(os)

you will get a linux man-like help page. anybody has ideas how to do it in pure python? Now I have implemented a similar shell by raw_input and python readline module. But I totally have no idea how to do the help page.

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:42:09+00:00Added an answer on June 15, 2026 at 6:42 am

    Look at the code for pydoc, i.e.:

        Python27\Lib\pydoc.py
    

    (This is for Windows, of course everywhere else the slashes go the other way.)

    Helper class’s help member function calls doc function calls render_doc, which is probably the function you want.

    import sys
    import pydoc
    
    plainSysDoc = pydoc.plain((pydoc.render_doc(sys)))
    print plainSysDoc
    

    pydoc.plain is a formatting function (that removes bold formatting).

    As a side note, while fact checking this answer I learned that pydoc can be called from the command line:

    pydoc sys
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In shells like the interactive python shell, you can usually use the arrow keys
I'd like to extend the Python interactive shell to allow execution of non-python specific
Is there any command line interactive shell for C just like in Python ?
In Python's interactive shell you can get a list of built-in functions (if you
What is the design pattern behind python like interactive shell . I want to
I am trying to use the help() function in the Python interactive shell to
When I run the python 2.7 interactive shell (in Ubuntu 12.04 LTS) I get
I can import MySQLdb from the interactive python command line but Zope gives me
Python language has a well known feature named interactive mode where the interpreter can
I would like to add some interactive capability to a python CLI application I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.