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

Re: [HTCondor-users] python equivalent to condor_config_val -rset



Hi Greg,

I think you want the RemoteParam class in the python bindings (appeared in 8.3.x).  Usage is something like:

>>> import htcondor
>>> collector = htcondor.Collector()
>>> schedd_ad = collector.locate(htcondor.DaemonTypes.Schedd)
>>> params = htcondor.RemoteParam(schedd_ad)
>>> params['SCHEDD_DEBUG']
'D_FULLDEBUG'

âparamsâ behaves like a dictionary - setting items in the dictionary is equivalent to a -rset.

Further, the âhtcondor.paramâ dictionary-like-object is the condor config values for the running python process.  This parses the config as the âTOOLâ subsystem.  If, instead, you want the python process to get the same parameters as a schedd, you can do:

>>> htcondor.set_subsystem(âSCHEDDâ)
>>> htcondor.reload_config()

HTH,

Brian

> On Nov 10, 2015, at 10:21 AM, greg.corbett@xxxxxxxxxx wrote:
> 
> Hi
>  
> Is there an equivalent to condor_config_val and the ârset option within the python bindings?
>  
> Greg
> _______________________________________________
> 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/