Hi. I'm trying to resolve an issue with strings.
The command(inclusi ve of the back-slashes)
condor_q -l -constraint "ProjectId==\"a noopr_samadams. fnal.gov_161903 _30209\""
is the only way the command returns the right result.
I'm trying to run this command from inside a python program.
The way I can get it work is by:
os.system('cond or_q -l -constraint "ProjectId==\\\ "anoopr_samadam s.fnal.gov_1619 03_30209\\\""')
But, I'd rather use the os.exec functions to get the output. But
os.execvp("cond or_q",["condor_q", "-l","-constraint",'"P rojectId==\\\"a noopr_samadams. fnal.gov_161903 _30209\\\""'])
doesnt work. Its definately a problem with one of the million
backslashes and quotes present, but I'm not able to figure it out.
What am I doing wrong?
Thanks,
Anoop ///
_______________ _______________ _______________ ___
The happiest time of a person's life is after his first divorce.
-- J.K. Galbraith
The command(inclusi ve of the back-slashes)
condor_q -l -constraint "ProjectId==\"a noopr_samadams. fnal.gov_161903 _30209\""
is the only way the command returns the right result.
I'm trying to run this command from inside a python program.
The way I can get it work is by:
os.system('cond or_q -l -constraint "ProjectId==\\\ "anoopr_samadam s.fnal.gov_1619 03_30209\\\""')
But, I'd rather use the os.exec functions to get the output. But
os.execvp("cond or_q",["condor_q", "-l","-constraint",'"P rojectId==\\\"a noopr_samadams. fnal.gov_161903 _30209\\\""'])
doesnt work. Its definately a problem with one of the million
backslashes and quotes present, but I'm not able to figure it out.
What am I doing wrong?
Thanks,
Anoop ///
_______________ _______________ _______________ ___
The happiest time of a person's life is after his first divorce.
-- J.K. Galbraith
Comment