October 9th, 2012, 08:53 AM
Some wield problem
I just want to decompress a bz2 file and wrote a short script but
it can't work. just the error:compressed file ended before the logical end-of-stream was detected
I don't know how to fix it.Help me,please.
file_path = raw_input('input the compressed filename:\n')
filename = os.path.basename(file_path)
dest_path = raw_input('input the dest path.\n')
dest_file = os.path.join(dest_path,filename)
f = bz2.BZ2File(filename,'rU')
ff = open(dest_file,'w')
for line in f.readlines():
October 9th, 2012, 07:01 PM
[/code] are essential for python code and Makefiles!