<reponame>quentinql/mytb<filename>mytb/file/suffix_file.py
#!/usr/bin/env python

# ############################################################################
# Copyright  : (C) 2014-2021 by MHComm. All rights reserved
#
# Name       : mytb.file.suffix_file
"""
  Summary    :  opens files depending on suffix with normal open gzip or bzip

__author__ = "<NAME>"
__email__ = "<EMAIL>"

"""
# #############################################################################


class SuffixFile(object):
    """ Fileobject, that will inspect its suffix to decide how to open
    """
    # TODO: Implement suffixes
    @classmethod
    def open(cls, fname, mode="r", **kwargs):
        """ opens file with respective compression / decompression """
        return open(fname, mode, **kwargs)

#!/usr/bin/env python

# ############################################################################
# Copyright  : (C) 2014-2021 by MHComm. All rights reserved
#
# Name       : mytb.file.suffix_file
"""
  Summary    :  opens files depending on suffix with normal open gzip or bzip

__author__ = "<NAME>"
__email__ = "<EMAIL>"

"""
# #############################################################################


class SuffixFile(object):
    """ Fileobject, that will inspect its suffix to decide how to open
    """
    # TODO: Implement suffixes
    @classmethod
    def open(cls, fname, mode="r", **kwargs):
        """ opens file with respective compression / decompression """
        return open(fname, mode, **kwargs)
#!/usr/bin/env python # ############################################################################ # Copyright  : (C) 2014-2021 by MHComm. All rights reserved # # Name       : mytb.file.suffix_file Summary    :  opens files depending on suffix with normal open gzip or bzip  __author__ = "<NAME>" __email__ = "<EMAIL>" # ############################################################################# Fileobject, that will inspect its suffix to decide how to open # TODO: Implement suffixes opens file with respective compression / decompression