def getCmdInfo( command, version='8.5', python=True ):
    """Since many maya Python commands are builtins we can't get use getargspec on them.
    besides most use keyword args that we need the precise meaning of ( if they can be be used with
    edit or query flags, the shortnames of flags, etc) so we have to parse the maya docs"""
    from parsers import CommandDocParser, mayaDocsLocation

    basicInfo = getCmdInfoBasic(command)

    try:
        docloc = mayaDocsLocation(version)
        if python:
            docloc = os.path.join( docloc , 'CommandsPython/%s.html' % (command) )
        else:
            docloc = os.path.join( docloc , 'Commands/%s.html' % (command) )

        f = open( docloc )
        parser = CommandDocParser(command)
        parser.feed( f.read() )
        f.close()

        example = parser.example
        example = example.rstrip()
        if python:
            pass

        # start with basic info, gathered using mel help command, then update with info parsed from docs
        # we copy because we need access to the original basic info below
        flags = basicInfo['flags'].copy()
        flags.update( parser.flags )

        if command in secondaryFlags:
            for secondaryFlag, defaultValue, modifiedList in secondaryFlags[command]:
                #_logger.debug(command, "2nd", secondaryFlag)
                flags[secondaryFlag]['modified'] = modifiedList
                #_logger.debug(sorted(modifiedList))
                #_logger.debug(sorted(parser.flags.keys()))
                for primaryFlag in modifiedList:
                    #_logger.debug(command, "1st", primaryFlag)
                    if 'secondaryFlags' in parser.flags[primaryFlag]:
                        flags[primaryFlag]['secondaryFlags'].append(secondaryFlag)
                    else:
                        flags[primaryFlag]['secondaryFlags'] = [secondaryFlag]


        # add shortname lookup
        #_logger.debug((command, sorted( basicInfo['flags'].keys() )))
        #_logger.debug((command, sorted( flags.keys() )))

        # args and numArgs is more reliable from mel help command than from parsed docs,
        # so, here we put that back in place and create shortflags.

        # also use original 'multiuse' info...

        for flag, flagData in flags.items():
            basicFlagData = basicInfo.get('flags', {}).get(flag)
            if basicFlagData:
                if 'args' in basicFlagData and 'numargs' in basicFlagData:
                    flagData['args'] = basicFlagData['args']
                    flagData['numArgs'] = basicFlagData['numArgs']
                    if (        'multiuse' in basicFlagData.get('modes', [])
                            and 'multiuse' not in  flagData.get('modes', [])):
                        flagData.setdefault('modes', []).append('multiuse')

        shortFlags = basicInfo['shortFlags']
        res = { 'flags': flags,
                'shortFlags': shortFlags,
                'description' : parser.description,
                'example': example }
        try:
            res['removedFlags'] = basicInfo['removedFlags']
        except KeyError: pass
        return res


    except __HOLE__:
        #_logger.debug("could not find docs for %s" % command)
        return basicInfo

        #raise IOError, "cannot find maya documentation directory"
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/internal/cmdcache.py/getCmdInfo