@staticmethod
def get_file_info(codeobj):
    """Returns the file and line number of a code object.

            If the code object has a __file__ attribute (e.g. if
            it is a module), then the returned line number will
            be 0
        """
    fname = getattr(codeobj, '__file__', None)
    linenum = 0
    if fname is None:
        func_code = codeobj.__code__
        fname = func_code.co_filename
        linenum = func_code.co_firstlineno
    fname = fname.replace('.pyc', '.py')
    return fname, linenum
