473,327 Members | 2,055 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,327 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 1458
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.