home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
catdo_35.zip
/
tables.py
< prev
next >
Wrap
Text File
|
1999-12-17
|
441b
|
21 lines
# Copyright Stefan Schwarzer, 1999
files = ( 'latin1_cp437', 'latin1_cp850' )
for file in files:
# read table
print file
f = open( file, 'r' )
table = f.readlines()
f.close()
# write converted file
f = open( file, 'w' )
for i in range( 128 ):
table[ i ] = table[ i ][ 0 ]
table[ i ] = hex( ord( table[ i ] ) )
f.write( `table[ i ]`[1:-1] + ',' )
f.close()