Note: The example output is an ipython (an enhanced python programming console) feature instead of a python 3 standard (@DTing). One can obtain a list of member functions by dir(libname)
command when the default console is used (@Matthew Runchey).
In a python 2.7 console, one has the command libname.
to print out member functions of an imported library libname
.
The expected output should be something like:
>>> import hashlib
>>> hashlib.
hashlib.algorithms hashlib.new hashlib.sha224 hashlib.sha384
hashlib.md5 hashlib.sha1 hashlib.sha256 hashlib.sha512
(the example is taken from around 0:13 in this video: https://youtu.be/dG3tOsGEYP4 )
However, my python 3.4 console (Win7 x64) gave a syntax error.
>>> import hashlib
>>> hashlib.
File "<stdin>", line 1
hashlib.
^
SyntaxError: invalid syntax
So what is the correct way of doing the same thing in python 3?