'Returns the input file object'

def get_infile(self, inname):

    if inname:
        print(('Reading    input    from    %s' % inname), file=sys.stderr)
        fobj = open(inname, 'rb')
        self.file_objects.append(fobj)
    else:
        print('Reading    input    from    stdin', file=sys.stderr)
        fobj = sys.stdin
    return fobj
