def __init__(self, f, sub=slice(None)):
if isinstance(f, basestring):<EOL><INDENT>self._auto_close = True<EOL>self._f = open(f)<EOL><DEDENT>else:<EOL><INDENT>self._auto_close = False<EOL>self._f = f<EOL><DEDENT>self._sub = sub<EOL>self._counter = <NUM_LIT:0><EOL>
Argument:
 | ``f``  --  a filename or a file-like object

Optional argument:
 | ``sub``  --  a slice indicating which frames to read/skip