Skip to content

Commit

Permalink
tools/extracticon.py: use command line argument
Browse files Browse the repository at this point in the history
  • Loading branch information
miniupnp committed May 11, 2019
1 parent a4787e1 commit 5b25e08
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/extracticon.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/usr/bin/python
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab
#
# Extract ICONs from MZ/NE MS Windows executable file
#

from struct import *
import sys

with open('../bin/data/DUNE2.ICO', 'rb') as content_file:
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = '../bin/data/DUNE2.ICO'

print 'reading %s' % (filename)
with open(filename, 'rb') as content_file:
content = content_file.read()

icon_header = {}
Expand Down

0 comments on commit 5b25e08

Please sign in to comment.