i am a beginner, i tried to have python to run a binary file
my code looks like this:
It means to create two file metafile and datafile,read data from flash and write them to these files.But the result of run the code don't meet my demand.(PS. I run ./nandpro -0 0x96 -b 100 -c 0 -d datafilename -m metafilename -f badmark.txt the result is right)
print number
i am using python 2.7
please help, thank you very much.
my code looks like this:
Code:
import subprocess as sp p2=sp.Open(['./nandpro','-0' repr(rdppa),'-b',repr(block),'-c',repr(ch_num),'-d',datafilename,'-m',metafilename,'-f','bad_mark.txt'],stdout=sp.PIPE,stderr=sp.PIPE)
print number
i am using python 2.7
please help, thank you very much.
Comment