def open(filename, compression=None, mode='rb', *args, **kwargs):
    """ Override default open() function """
    open_statement = 'builtins.open(filename, mode=mode, *args, **kwargs)'
    if compression:
        open_statement = open_statement.replace('builtins', compression)
    return eval(open_statement)
