I just discovered that while doing check of the functions available in os.path
using dir(os.path)
is not the same as shown by dir(__import__("os.path", globals={}, locals={}, fromlist=[], level=-1))
,
in the later case it is actually showing all the modules of OS
while I just want to look inside for the modules that are inside of path of os
.
I have used example of os.path
, actually in the example I am working on has module and method input by user..
please explain why is there a difference how should I get the same result while using dir(__import__("os.path"))
just as in dir(os.path)
??