# Path: misc.py
# def trueFunc(*args, **kwords):
#     return True


import sys
        import gzip
from collections import namedtuple
from itertools import imap, izip, ifilter
from misc import trueFunc
    final_str = deltaRecordHeaderToString(dr)
    
    for alignment in dr.alignments:
        final_str += "\n" + deltaAlignmentHeaderToString(alignment)
        p = "\n".join(map(str, alignment.positions))
        final_str += "\n"+p
        
    return final_str
    


class FileOrStream:
    '''Opens a File or a Stream from a String'''

    _streams = {"stdin": sys.stdin,
                 "stdout":sys.stdout,
                 "stderr":sys.stderr}

    def __init__(self, s, *args ):
        '''s is a string representation of what you 
        want to open, could be file or string'''

        self.s = s
        self.eargs = args
        self.isStream = False

    def __enter__(self):
        if self.s in FileOrStream._streams:
            self.isStream = True
            return FileOrStream._streams[self.s]

# Path: misc.py
# def trueFunc(*args, **kwords):
#     return True


# Path: nucio.py
import sys
        import gzip
from collections import namedtuple
from itertools import imap, izip, ifilter
from misc import trueFunc

    final_str = deltaRecordHeaderToString(dr)
    
    for alignment in dr.alignments:
        final_str += "\n" + deltaAlignmentHeaderToString(alignment)
        p = "\n".join(map(str, alignment.positions))
        final_str += "\n"+p
        
    return final_str
    


class FileOrStream:
    '''Opens a File or a Stream from a String'''

    _streams = {"stdin": sys.stdin,
                 "stdout":sys.stdout,
                 "stderr":sys.stderr}

    def __init__(self, s, *args ):
        '''s is a string representation of what you 
        want to open, could be file or string'''

        self.s = s
        self.eargs = args
        self.isStream = False

    def __enter__(self):
        if self.s in FileOrStream._streams:
            self.isStream = True
            return FileOrStream._streams[self.s]

        self.fh = open(self.s, *self.eargs)