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
however when I try to do it in python like so:
p = subprocess.Popen(["goest",'-f \'\"%s %s\" name addr\' ',
'file_name'], shell=True)
It always failed.
I also try like so:
p = subprocess.Popen(["goest","-f '\"%s %s\" name addr' ",
'file_name'], shell=True)
It also failed.
Does anybody have a good suggestion for this matter? thanks in
advance.
Evan 3 6504
On Nov 4, 8:47*am, Evan <xdi...@gmail.comwrote:
It always failed.
It also failed.
Does anybody have a good suggestion for this matter? thanks in
advance.
What do you mean by "it failed"? It always helps to paste the actual
error message you received.
On Nov 3, 10:47*pm, Evan <xdi...@gmail.comwrote:
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
however when I try to do it in python like so:
p = subprocess.Popen(["goest",'-f \'\"%s %s\" name addr\' ',
'file_name'], shell=True)
It always failed.
I also try like so:
p = subprocess.Popen(["goest","-f '\"%s %s\" name addr' ",
'file_name'], shell=True)
It also failed.
Does anybody have a good suggestion for this matter? thanks in
advance.
It looks like there are _4_ items on the command line:
goset
-f
' "%s %s" name addr '
file_name
so the call should be:
p = subprocess.Popen(["goest", "-f", "' \"%s %s\" name addr '",
"file_name"], shell=True)
(Untested)
On Tue, 04 Nov 2008 03:26:21 -0800, MRAB wrote:
On Nov 3, 10:47Â*pm, Evan <xdi...@gmail.comwrote:
>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
It looks like there are _4_ items on the command line:
goset
-f
' "%s %s" name addr '
file_name
so the call should be:
p = subprocess.Popen(["goest", "-f", "' \"%s %s\" name addr '",
"file_name"], shell=True)
The argument after '-f' doesn't have the single quotes at both ends.
They tell the shell that it is just one argument and the shell removes
them before calling ``goset`` (or ``goest``).
Ciao,
Marc 'BlackJack' Rintsch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: L Major |
last post by:
Hi
Unfortunately, I am limited to using tables for part of my current
project. I have a form that spans across a number of TR and TD in the
shape of checkboxes.
Doctype is XHTML 1.0...
|
by: Peter Olcott |
last post by:
www.halting-problem.com
|
by: Hemant Shah |
last post by:
Folks,
We have an SQL statement that was coded in an application many years ago
(starting with DB V2 I think). When I upgraded to UDB 8.2, the optimizer
does not use optimal path to access the...
|
by: Andrew Maclean |
last post by:
I guess this problem can be distilled down to: How do I search through a
string, find the first matching substring, replace it, and continue through
the string doing this. Can replace_if() be used...
|
by: Ed Gonen |
last post by:
Hi,
I have the following problem. I've created 2 WebServices (A and B) that
reference to the same assembly - Credentials. Each WebService (A and B)
expose method GetCredentials that returns the...
| |
by: Joe Fawcett |
last post by:
Dear All
We have an application where users login, their name/password details are
stored in a table, and now we want to add a third party bulletin board that
lives in its own virtual directory....
|
by: Jason |
last post by:
I am having a rounding problem in a value i am trying to display in VB.NET.
If I have the following code:
Dim x As Single = 2726.795
Dim y As Single = Math.Round(2726.795, 2)
Dim s as String =...
|
by: Keeper |
last post by:
class object (COM-object) return dimension "System.Single".
problem:
Object o; // object = VARIANT
o = comclass.GetData();
Single dm = (Single) o; // Error, problem convertation
Help!!!
|
by: beebelbrox |
last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code.
WIndows OS MSaccess 2003
This code is attached to an unbound form that will display a specific recordset...
|
by: boeledi |
last post by:
I'm new in GDI programming and I am facing the following problem.
I try to dynamically create "thumbnail"-like images (JPEG) in which I
need to draw text.
This works fine, except that the text is...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |