How come the dir() function in Python doesn't show all of the callable attributes?
import win32com.client
iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application")
currentTrack = win32com.client.CastTo(iTunes.CurrentTrack,"IITFileOrCDTrack")
print dir(currentTrack)
Result:
['AddArtworkFromFile', 'CLSID', 'Delete', 'GetITObjectIDs', 'Play', 'Reveal', 'UpdateInfoFromFile', 'UpdatePodcastFeed', '_ApplyTypes_', '__doc__', '__eq__', '__getattr__', '__init__', '__module__', '__ne__', '__repr__', '__setattr__', '_get_good_object_', '_get_good_single_object_', '_oleobj_', '_prop_map_get_', '_prop_map_put_', 'coclass_clsid']
print currentTrack.Location
Location is callable and returns the file path, but is not listed in the first result. It also doesn't show up with code completion tools. Is it because it's being fetched through a getter method? I see it listed under _prop_map_get_ and _prop_map_put_.
Also, why does currentTrack.Location return a file path when currentTrack._prop_map_get_['Location'] returns "(1610874880, 2, (8, 0), (), 'Location', None)?" Where is it getting the file path string?