0

I'm new to python. The last programming language learnt is VBA. I know that with python you can import libraries or module such as the requests, math, and selenium. VBA has a tool called the object browser where you can explore a library classes/objects, members of a class, and properties. Is this capable in python also? If so, how do I access it? This would be helpful in learning and exploring all the capabilities that come with an imported python library/module. Any similar tools to this would be great!

enter image description here

0

Rather than a graphical explorer python provides 2 commands in interactive sessions dir and help these can be used respectively to see what methods are available and to view the documentation on them, note that some packages provide more than others.

So in an interactive session you can do: enter image description here

I would suggest installing ipython - this can be done with pip install ipython from the command line. This adds to the interactive session, amongst many other things:

  • Tab Completion Typing part of something then pressing the tab key will show you possible completions enter image description here
  • Fast help with ? Adding ? after something displays the help enter image description here
  • Source display with ?? Adding ?? after something displays the source code enter image description here

The Python documentation is online and available for download and is excellent. There is also the pydoc document generator & help system supplied with python. It can be used:

  • To display help on a module in the command prompt with: path_to_python\Lib\pydoc.py module_name
  • To start a web server and open a browser window with: path_to_python\Lib\pydoc.py -b
  • To start a web server with: path_to_python\Lib\pydoc.py -n

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.