473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

the errors when using the subprocess.Open

i am a beginner, i tried to have python to run a binary file
my code looks like this:
Expand|Select|Wrap|Line Numbers
  1. import subprocess as sp
  2. 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)
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.
Nov 4 '14 #1
1 1459
bvdet
2,851 Expert Mod 2GB
I think you need to call subprocess.call or subprocess.Popen. See Python documentation.
Nov 4 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: murali | last post by:
Hi, I get tollowing linking errors Main.cpp:30 undefined reference to Matrix<int>::Matrix(int,int) whats that '' and what might be the problem ?? line 30 of main:...
3
by: Dan Foody | last post by:
I've embedded a .NET 1.1 control in a web page for use in IE (using the "object" tag). There are two challenges I'm facing: if the machine does not have the 1.1 framework installed or if the .NET...
0
by: Steve D | last post by:
Following up a message I posted yesterday, I am writing a program using Process.GetProcesses(remotecomputername) to monitor processes on other computers in a network. It seems to work fine for some...
1
by: Toon Verstraelen | last post by:
Hi, I recently had a thread problem and I could reduce it to a very short example that shows the problem. I hope it has its origin in my misunderstanding of how python threads work. Here it is:...
4
by: Russell Warren | last post by:
I've been having a hard time tracking down a very intermittent problem where I get a "permission denied" error when trying to rename a file to something that has just been deleted (on win32). ...
6
by: robintw | last post by:
Hi all, I'm trying to use some functions which are in an external library file called qhdlc.lib from within my C++ .Net program. I have a header file for this library (qhdlc.h) and have set the...
3
by: Jarek Zgoda | last post by:
Hi, all, anybody has an idea on how to set ulimit (-v in my case, linux) for process started using subprocess.Popen? -- Jarek Zgoda Skype: jzgoda | GTalk: zgoda@jabber.aster.pl | voice:...
1
by: Gabriel Genellina | last post by:
En Tue, 29 Jul 2008 10:04:46 -0300, Gordon Maria <Maria.Gordon@afconsult.comescribi�: You should call os.waitpid() after killing the child process, to let the OS free the resources allocated...
3
by: Evan | last post by:
Hello - i'm trying to call subprocess.popen on the 'command-based' function in linux. When I run the command from the shell, like so: goset -f ' "%s %s" name addr ' file_name it works fine...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.