J
James Johnston
I've never written a Python program before and I'm trying to read a config
file with file path/names (eg. c:\\python24\\*.dll, ... *.exe) to create an
output file of filename + md5 values. I'm confused. I'm trying to learn
how to use Wing IDE and step through the Stack Data. It seems to be
working but on the
I get a
Code:
#!/usr/bin/python
# Filename: md5makr_test4.py
import sys, os, os.path, glob, md5, ConfigParser
config = ConfigParser.ConfigParser()
config.read('md5makr.ini')
outputfilname = config.get('general', 'outputfile')
f = file(outputfilname,'wt')
fileconfig = config.get('general', 'inputfiles')
fl = file(fileconfig,'r')
fileData = fl.read()
for f1 in glob.glob(fileData):
filelist = f1
for fn in filelist:
data = file(fn,'rb').read()
hexstring = md5.md5(data).hexdigest()
f.write(fn + '\t' + hexstring + '/n')
f.close()
Any insight or help would be appreciated.
file with file path/names (eg. c:\\python24\\*.dll, ... *.exe) to create an
output file of filename + md5 values. I'm confused. I'm trying to learn
how to use Wing IDE and step through the Stack Data. It seems to be
working but on the
for fn in filelist:
data = file(fn,'rb').read()
data = file(fn,'rb').read()
I get a
IOError: (2, 'No such file or directory', 'c')
Traceback (innermost last):
File "c:\Python examples\md5makr_test4.py", line 1, in ?
#!/usr/bin/python
File "c:\Python examples\md5makr_test4.py", line 20, in ?
data = file(fn,'rb').read()
Traceback (innermost last):
File "c:\Python examples\md5makr_test4.py", line 1, in ?
#!/usr/bin/python
File "c:\Python examples\md5makr_test4.py", line 20, in ?
data = file(fn,'rb').read()
Code:
#!/usr/bin/python
# Filename: md5makr_test4.py
import sys, os, os.path, glob, md5, ConfigParser
config = ConfigParser.ConfigParser()
config.read('md5makr.ini')
outputfilname = config.get('general', 'outputfile')
f = file(outputfilname,'wt')
fileconfig = config.get('general', 'inputfiles')
fl = file(fileconfig,'r')
fileData = fl.read()
for f1 in glob.glob(fileData):
filelist = f1
for fn in filelist:
data = file(fn,'rb').read()
hexstring = md5.md5(data).hexdigest()
f.write(fn + '\t' + hexstring + '/n')
f.close()
Any insight or help would be appreciated.