diff --git a/igor2/packed.py b/igor2/packed.py index 15c8cdf..caf413a 100644 --- a/igor2/packed.py +++ b/igor2/packed.py @@ -43,7 +43,7 @@ # a later record in the packed file. -def load(filename, strict=True, ignore_unknown=True): +def load(filename, strict=True, ignore_unknown=True, initial_byte_order=None): logger.debug('loading a packed experiment file from {}'.format(filename)) records = [] if hasattr(filename, 'read'): @@ -51,7 +51,8 @@ def load(filename, strict=True, ignore_unknown=True): else: f = open(filename, 'rb') byte_order = None - initial_byte_order = '=' + if initial_byte_order is None: + initial_byte_order = '=' try: while True: PackedFileRecordHeader.byte_order = initial_byte_order