30 lines
587 B
Python
30 lines
587 B
Python
|
|
#!/usr/bin/env python
|
||
|
|
import binascii
|
||
|
|
#import subprocess
|
||
|
|
#import sys
|
||
|
|
#import platform
|
||
|
|
#import os
|
||
|
|
#codeFile = open("Commodore - Amiga.lpl", 'r')
|
||
|
|
#
|
||
|
|
#codeFile.close()
|
||
|
|
|
||
|
|
#file_name="Commodore - Amiga.lpl"
|
||
|
|
file_name="lista.lpl"
|
||
|
|
|
||
|
|
print'\n'
|
||
|
|
_f=file(file_name,'r')
|
||
|
|
l=_f.readline()
|
||
|
|
while l:
|
||
|
|
if '"label":' in l:
|
||
|
|
addr = l.find(': "')+3
|
||
|
|
stringa=l[addr:]
|
||
|
|
stringa=stringa[:-4]+'.png'
|
||
|
|
print stringa
|
||
|
|
f_out=open(stringa,'wb')
|
||
|
|
#print binascii.unhexlify(b'\x89\x50\x4E\x47\x0D\x0A\x1A\x0A').decode('utf8')
|
||
|
|
f_out.close()
|
||
|
|
l=_f.readline()
|
||
|
|
_f.close()
|
||
|
|
|
||
|
|
print "Done."
|