Created
November 5, 2014 09:11
-
-
Save zzl0/3b58379c3eb67bf0ac36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
def get_table_id(tbl_file): | |
""" | |
Get table id from .ctb file. | |
""" | |
with open(tbl_file, 'rb') as f: | |
f.seek(-4, 2) # seek to last 4 byte | |
bytes = f.read(4) | |
return struct.unpack('<I', bytes)[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment