It is also possible that the command that you are running is sending the output to stderr instead of stdout
Try this instead:-
That doesn't work etiher. Also the exact same command works with subprocess.check_call. What's weird is the subprocess.check_output works in the python shell but not from the python script.
Hi,
I am having a trivial doubt. Please see the below pipeline code sequence.
command1 | (command 2; commend 3)
I am aware that the command that follows pipe will run in the sub shell by the Unix kernel. But how about here? Since these set of commands are grouped under "parantheses", will... (6 Replies)
I have a cron on a Linux server that isn't executing properly.
CRON (with specific info replaced):
MAILTO=emailaddress@server.com
*/2 * * * * python /data/site/cron.py
OUTPUT:
python: can't open file '/data/site/cron.py
': No such file or directoryAdditional info
- The python path is... (3 Replies)
Hi Guys,
Just a question about subprocesses.. Lately one of our servers has started to throw out the following error:
SYSTEM ERROR: Too many subprocesses, cannot fork. Errno=12
We've already increased the threshold twice. Its now up to 8000 and the swap space has also been increased. We... (6 Replies)
Hi,
I am trying to run a shell script using subprocess in python.
I can run simple script with arguments using subprocess.But I am not able to embed xterm in subrocess command.
#!/usr/bin/python
import subprocess
subprocess.call()
Above code gives me error.
Please help me in... (2 Replies)
Hi guys,
I'm learning python and perl and i was trying to run from python a perl script using the subprocess module.
I have an issue that i don't understand regarding this.
I run this code:
#!/usr/bin/python
import subprocess
p2 = subprocess.Popen(,stdout=subprocess.PIPE)
output2 =... (2 Replies)
Greetings!
I set up a basic threading specimen which does the job:#!/usr/bin/python
import threading
class a(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
print("thread a finished")
class b(threading.Thread):
... (0 Replies)
Hi Experts,
Good morning.
I am trying to convert my hello.py to hello .exe file.
I followed the steps as mentioned in the documentation but getting errors in the end. Please help.
What I did as below--
Created hello.py file
print ("Hello world!")
raw_input('')
Then... (0 Replies)
I have a string like below
Note: I have have a single to any number of comma "," seperated string assigned to jdbc_trgt variable.
I need to split jdbc_trgt using comma(,) as the delimiter.
I tried the below but it fails as i dont know how can i read each split string iterately.
for... (4 Replies)
Discussion started by: mohtashims
4 Replies
LEARN ABOUT DEBIAN
pegasus-config
PEGASUS-CONFIG(1)PEGASUS-CONFIG(1)NAME
pegasus-config - The authority for where parts of the Pegasus system exists on the filesystem. pegasus-config can be used to find libraries
such as the DAX generators.
SYNOPSIS
pegasus-config [-h] [--help] [-V] [--version] [--noeoln]
[--perl-dump] [--perl-hash] [--python-dump] [--sh-dump]
[--bin] [--conf] [--java] [--perl] [--python]
[--python-externals] [--schema] [--classpath]
[--local-site] [--full-local]
DESCRIPTION
pegasus-config is used to find locations of Pegasus system components. The tool is used internally in Pegasus and by users who need to find
paths for DAX generator libraries and schemas.
OPTIONS -h, --help
Prints help and exits.
-V, --version
Prints Pegasus version information
--perl-dump
Dumps all settings in perl format as separate variables.
--perl-hash
Dumps all settings in perl format as single perl hash.
--python-dump
Dumps all settings in python format.
--sh-dump
Dumps all settings in shell format.
--bin
Print the directory containing Pegasus binaries.
--conf
Print the directory containing configuration files.
--java
Print the directory containing the jars.
--perl
Print the directory to include into your PERL5LIB.
--python
Print the directory to include into your PYTHONLIB.
--python-externals
Print the directory to the external Python libraries.
--schema
Print the directory containing schemas.
--classpath
Builds a classpath containing the Pegasus jars.
--noeoln
Do not produce a end-of-line after output. This is useful when being called from non-shell backticks in scripts. However, order is
important for this option: If you intend to use it, specify it first.
--local-site [d]
Create a site catalog entry for site "local". This is only an XML snippet without root element nor XML headers. The optional argument
"d" points to the mount point to use. If not specified, defaults to the user's $HOME directory.
--full-local [d]
Create a complete site catalog with only site "local". The an XML snippet without root element nor XML headers. The optional argument
"d" points to the mount point to use. If not specified, defaults to the user's $HOME directory.
EXAMPLE
To set the PYTHONPATH variable in your shell for using the Python DAX API:
export PYTHONPATH=`pegasus-config --python`
To set the same path inside Python:
config = subprocess.Popen("pegasus-config --python-dump", stdout=subprocess.PIPE, shell=True).communicate()[0]
exec config
To set the PERL5LIB variable in your shell for using the Perl DAX API:
export PERL5LIB=`pegasus-config --perl`
To set the same path inside Perl:
eval `pegasus-config --perl-dump`;
die("Unable to eval pegasus-config output: $@") if $@;
will set variables a number of lexically local-scoped my variables with prefix "pegasus_" and expand Perl's search path for this script.
Alternatively, you can fail early and collect all Pegasus-related variables into a single global %pegasus variable for convenience:
BEGIN {
eval `pegasus-config --perl-hash`;
die("Unable to eval pegasus-config output: $@") if $@;
}
AUTHOR
Pegasus Team http://pegasus.isi.edu
05/24/2012 PEGASUS-CONFIG(1)