here is the code i am trying to read ascii value which is string and print , but execution stops at file open file print statement :(
import os
import sys
import string
filename = "c:\\test.exe"
try:
f = open(filename,"rb")
except IOError:
print'cannot open the file'
sys.exit(0)
print'file is opened'
try:
s=""
a=f.read(1)
while((a.isalnum() )or( a.isspace())):
s=s+a
a=f.read()
iLen = len(s)
if(iLen>3):
print(s)
except EOFError:
sys.exit(0)