[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] passing in args with spaces





On Jan 2, 2018, at 6:23 PM, Larry Martell <larry.martell@xxxxxxxxx> wrote:

I am using htcondor.Submit() and trying to pass in an argument with a
space in it. The argument key in my submit dict has this:

"--arg_with_space 'word1 word2'"

and in the StarterLog I see:

--arg_with_space ''''word1 word2''''


I am following what I read here:
http://research.cs.wisc.edu/htcondor/manual/current/condor_submit.html.


Yep, that is where you want to look. 

Looks to me like you are having problems with Pythonâs rules for escaping string literals. See
https://docs.python.org/2.0/ref/strings.html

I have also tried it without single quotes and with double quotes,
both escapes with backslashes and not escaped, none of which worked.


Could you send us the properly Python escaped dictionary key you tried? Iâd expect the following would work (didnât test it however):

âââ"--arg_with_space 'word1 word2'"âââ

Ie surround the string you posted above with three single quote mark (so-called triple quoting in python). 

I also suggest testing you job submit description first with the condor_submit command line tool, and if all is good then proceed to convert to Python via the htcondor.Submit() class. This way you can identify if the problem is in your HTCondor job submit description or Python-specific. 


What is the proper way to pass in an argument with a space in it?
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/