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

Re: [HTCondor-users] python bindings?

Welcome to the world of the Python bindings! What you have been returned is a ClassAd object, which will act very similar to a dict (and can be easily turned into a dict) but with some different properties:


Two properties of ClassAd objects that you should immediately be aware of is
1. The keys are case-insensitive
2. The values can contain expressions (classad.ExprTree objects) that can reference ClassAd functions ( see https://htcondor.readthedocs.io/en/latest/misc-concepts/classad-mechanism.html ) and that can reference other keys ("attributes") that may or may not be in the ClassAd object you have been returned

Jason Patton

On Thu, Sep 3, 2020 at 10:10 AM <mdidomenico4@xxxxxxxxx> wrote:
i'm newish to python and definitely new to the python bindings for
htcondor.  I don't understand the return values

(this is all pseudo code)

for job in schedd.xquery(projection=[]):

the returned values are something like

[ blah = "blah";
  blah = "blah";
  blah = "blah"; ]

what i expected was that 'job' would be a dictionary that i could then
iterate or reference into like a normal key/value hash

i looked over the docs and tutorials, but i think i'm missing
something fundamental here
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: