trepan/inout/scriptin.py
def open(self, inp, opts=None):
        """Use this to set what file to read from. """
        if isinstance(inp, io.TextIOWrapper):
            self.input = inp
        elif isinstance(inp, 'string'.__class__):  # FIXME
            self.name  = inp
            self.input = open(inp, 'r')
        else:
            raise IOError("Invalid input type (%s) for %s" %
                          (inp.__class__.__name__, inp))
        return
def open(self, inp, opts=None):
        """Use this to set what file to read from. """
        if isinstance(inp, io.TextIOWrapper):
            self.input = inp
        elif isinstance(inp, 'string'.__class__):  # FIXME
            self.name  = inp
            self.input = open(inp, 'r')
        else:
            raise IOError("Invalid input type (%s) for %s" %
                          (inp.__class__.__name__, inp))
        return
Use this to set what file to read from.