Changeset 161
- Timestamp:
- 09/24/08 15:38:53 (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGES
r159 r161 15 15 log_roll(int size); 16 16 log_size(void); 17 Added by: Bas van der Vlies 18 19 - We now have proper destructors (free memory) in SWIG for attrl and attropl 20 attributes. 17 21 Added by: Bas van der Vlies 18 22 -
trunk/README
r144 r161 4 4 Information, documentation and reporting bugs for the package: 5 5 https://subtrac.sara.nl/oss/pbs_python 6 7 bug resport: 8 pbs_python add sara dot nl 6 9 7 10 =============== Brief description ============================= -
trunk/TODO
r94 r161 1 - Setup a web site for documentation and an email list -
trunk/src/PBSQuery.py
r143 r161 125 125 126 126 def _free(self, memory): 127 pbs.pbs_statfree(memory) 127 # Not needed any more 128 #pbs.pbs_statfree(memory) 129 a = 1 128 130 129 131 def _statserver(self, attrib_list=None): -
trunk/src/pbs.py
r144 r161 1 # This file was created automatically by SWIG .1 # This file was created automatically by SWIG 1.3.29. 2 2 # Don't modify this file, modify the SWIG interface instead. 3 3 # This file is compatible with both classic and new-style classes. 4 4 5 5 import _pbs 6 6 import new 7 new_instancemethod = new.instancemethod 7 8 def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 9 if (name == "thisown"): return self.this.own(value) 8 10 if (name == "this"): 9 if isinstance(value, class_type): 10 self.__dict__[name] = value.this 11 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown 12 del value.thisown 11 if type(value).__name__ == 'PySwigObject': 12 self.__dict__[name] = value 13 13 return 14 14 method = class_type.__swig_setmethods__.get(name,None) 15 15 if method: return method(self,value) 16 if (not static) or hasattr(self,name) or (name == "thisown"):16 if (not static) or hasattr(self,name): 17 17 self.__dict__[name] = value 18 18 else: … … 23 23 24 24 def _swig_getattr(self,class_type,name): 25 if (name == "thisown"): return self.this.own() 25 26 method = class_type.__swig_getmethods__.get(name,None) 26 27 if method: return method(self) 27 28 raise AttributeError,name 29 30 def _swig_repr(self): 31 try: strthis = "proxy of " + self.this.__repr__() 32 except: strthis = "" 33 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 28 34 29 35 import types … … 37 43 38 44 39 40 45 new_attrl = _pbs.new_attrl 41 42 46 new_attropl = _pbs.new_attropl 43 44 47 new_batch_status = _pbs.new_batch_status 45 46 48 get_error = _pbs.get_error 47 49 ATTR_a = _pbs.ATTR_a … … 93 95 ATTR_altid = _pbs.ATTR_altid 94 96 ATTR_etime = _pbs.ATTR_etime 97 ATTR_exitstat = _pbs.ATTR_exitstat 98 ATTR_forwardx11 = _pbs.ATTR_forwardx11 99 ATTR_submit_args = _pbs.ATTR_submit_args 100 ATTR_umask = _pbs.ATTR_umask 95 101 ATTR_aclgren = _pbs.ATTR_aclgren 96 102 ATTR_aclgroup = _pbs.ATTR_aclgroup … … 123 129 ATTR_count = _pbs.ATTR_count 124 130 ATTR_number = _pbs.ATTR_number 125 ATTR_reqprop = _pbs.ATTR_reqprop 131 ATTR_acllogic = _pbs.ATTR_acllogic 132 ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy 133 ATTR_keepcompleted = _pbs.ATTR_keepcompleted 134 ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes 126 135 ATTR_aclroot = _pbs.ATTR_aclroot 127 136 ATTR_managers = _pbs.ATTR_managers … … 131 140 ATTR_logevents = _pbs.ATTR_logevents 132 141 ATTR_logfile = _pbs.ATTR_logfile 142 ATTR_loglevel = _pbs.ATTR_loglevel 133 143 ATTR_mailfrom = _pbs.ATTR_mailfrom 134 144 ATTR_nodepack = _pbs.ATTR_nodepack … … 143 153 ATTR_pingrate = _pbs.ATTR_pingrate 144 154 ATTR_ndchkrate = _pbs.ATTR_ndchkrate 145 ATTR_procpack = _pbs.ATTR_procpack 155 ATTR_tcptimeout = _pbs.ATTR_tcptimeout 156 ATTR_jobstatrate = _pbs.ATTR_jobstatrate 157 ATTR_polljobs = _pbs.ATTR_polljobs 158 ATTR_downonerror = _pbs.ATTR_downonerror 159 ATTR_jobnanny = _pbs.ATTR_jobnanny 160 ATTR_ownerpurge = _pbs.ATTR_ownerpurge 161 ATTR_qcqlimits = _pbs.ATTR_qcqlimits 162 ATTR_momjobsync = _pbs.ATTR_momjobsync 163 ATTR_maildomain = _pbs.ATTR_maildomain 164 ATTR_pbsversion = _pbs.ATTR_pbsversion 165 ATTR_submithosts = _pbs.ATTR_submithosts 166 ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit 167 ATTR_autonodenp = _pbs.ATTR_autonodenp 168 ATTR_servername = _pbs.ATTR_servername 169 ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize 170 ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth 171 ATTR_nextjobnum = _pbs.ATTR_nextjobnum 146 172 ATTR_NODE_state = _pbs.ATTR_NODE_state 147 173 ATTR_NODE_np = _pbs.ATTR_NODE_np … … 149 175 ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype 150 176 ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs 177 ATTR_NODE_status = _pbs.ATTR_NODE_status 178 ATTR_NODE_note = _pbs.ATTR_NODE_note 151 179 CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED 152 180 NO_HOLD = _pbs.NO_HOLD … … 155 183 MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT 156 184 DELDELAY = _pbs.DELDELAY 185 DELPURGE = _pbs.DELPURGE 186 EXECQUEONLY = _pbs.EXECQUEONLY 157 187 USER_HOLD = _pbs.USER_HOLD 158 188 OTHER_HOLD = _pbs.OTHER_HOLD … … 168 198 ND_timeshared = _pbs.ND_timeshared 169 199 ND_cluster = _pbs.ND_cluster 200 Q_DT_batch = _pbs.Q_DT_batch 201 Q_DT_interactive = _pbs.Q_DT_interactive 202 Q_DT_rerunable = _pbs.Q_DT_rerunable 203 Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable 170 204 MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR 171 205 MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE … … 192 226 MAXPATHLEN = _pbs.MAXPATHLEN 193 227 MAXNAMLEN = _pbs.MAXNAMLEN 228 MAX_NOTE = _pbs.MAX_NOTE 229 MAX_NOTE_STR = _pbs.MAX_NOTE_STR 194 230 PBS_MAXUSER = _pbs.PBS_MAXUSER 195 231 PBS_MAXGRPN = _pbs.PBS_MAXGRPN … … 232 268 __swig_getmethods__ = {} 233 269 __getattr__ = lambda self, name: _swig_getattr(self, attrl, name) 234 def __init__(self): raise RuntimeError, "No constructor defined" 235 def __repr__(self): 236 return "<%s.%s; proxy of C attrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) 270 def __init__(self): raise AttributeError, "No constructor defined" 271 __repr__ = _swig_repr 237 272 __swig_setmethods__["name"] = _pbs.attrl_name_set 238 273 __swig_getmethods__["name"] = _pbs.attrl_name_get … … 248 283 if _newclass:op = property(_pbs.attrl_op_get, _pbs.attrl_op_set) 249 284 def __str__(*args): return _pbs.attrl___str__(*args) 250 251 class attrlPtr(attrl): 252 def __init__(self, this): 253 _swig_setattr(self, attrl, 'this', this) 254 if not hasattr(self,"thisown"): _swig_setattr(self, attrl, 'thisown', 0) 255 _swig_setattr(self, attrl,self.__class__,attrl) 256 _pbs.attrl_swigregister(attrlPtr) 285 __swig_destroy__ = _pbs.delete_attrl 286 __del__ = lambda self : None; 287 attrl_swigregister = _pbs.attrl_swigregister 288 attrl_swigregister(attrl) 257 289 258 290 class attropl(_object): … … 261 293 __swig_getmethods__ = {} 262 294 __getattr__ = lambda self, name: _swig_getattr(self, attropl, name) 263 def __init__(self): raise RuntimeError, "No constructor defined" 264 def __repr__(self): 265 return "<%s.%s; proxy of C attropl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) 295 def __init__(self): raise AttributeError, "No constructor defined" 296 __repr__ = _swig_repr 266 297 __swig_setmethods__["name"] = _pbs.attropl_name_set 267 298 __swig_getmethods__["name"] = _pbs.attropl_name_get … … 277 308 if _newclass:op = property(_pbs.attropl_op_get, _pbs.attropl_op_set) 278 309 def __str__(*args): return _pbs.attropl___str__(*args) 279 280 class attroplPtr(attropl): 281 def __init__(self, this): 282 _swig_setattr(self, attropl, 'this', this) 283 if not hasattr(self,"thisown"): _swig_setattr(self, attropl, 'thisown', 0) 284 _swig_setattr(self, attropl,self.__class__,attropl) 285 _pbs.attropl_swigregister(attroplPtr) 310 __swig_destroy__ = _pbs.delete_attropl 311 __del__ = lambda self : None; 312 attropl_swigregister = _pbs.attropl_swigregister 313 attropl_swigregister(attropl) 286 314 287 315 class batch_status(_object): … … 290 318 __swig_getmethods__ = {} 291 319 __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name) 292 def __init__(self): raise RuntimeError, "No constructor defined" 293 def __repr__(self): 294 return "<%s.%s; proxy of C batch_status instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) 320 def __init__(self): raise AttributeError, "No constructor defined" 321 __repr__ = _swig_repr 295 322 __swig_setmethods__["name"] = _pbs.batch_status_name_set 296 323 __swig_getmethods__["name"] = _pbs.batch_status_name_get … … 302 329 __swig_getmethods__["text"] = _pbs.batch_status_text_get 303 330 if _newclass:text = property(_pbs.batch_status_text_get, _pbs.batch_status_text_set) 304 305 class batch_statusPtr(batch_status): 306 def __init__(self, this): 307 _swig_setattr(self, batch_status, 'this', this) 308 if not hasattr(self,"thisown"): _swig_setattr(self, batch_status, 'thisown', 0) 309 _swig_setattr(self, batch_status,self.__class__,batch_status) 310 _pbs.batch_status_swigregister(batch_statusPtr) 331 batch_status_swigregister = _pbs.batch_status_swigregister 332 batch_status_swigregister(batch_status) 311 333 312 334 RESOURCE_T_NULL = _pbs.RESOURCE_T_NULL 313 335 RESOURCE_T_ALL = _pbs.RESOURCE_T_ALL 314 315 336 avail = _pbs.avail 316 317 337 pbs_asyrunjob = _pbs.pbs_asyrunjob 318 319 338 pbs_alterjob = _pbs.pbs_alterjob 320 321 339 pbs_connect = _pbs.pbs_connect 322 323 340 pbs_query_max_connections = _pbs.pbs_query_max_connections 324 325 341 pbs_default = _pbs.pbs_default 326 327 342 pbs_deljob = _pbs.pbs_deljob 328 329 343 pbs_disconnect = _pbs.pbs_disconnect 330 331 344 pbs_holdjob = _pbs.pbs_holdjob 332 333 345 pbs_locjob = _pbs.pbs_locjob 334 335 346 pbs_manager = _pbs.pbs_manager 336 337 347 pbs_movejob = _pbs.pbs_movejob 338 339 348 pbs_msgjob = _pbs.pbs_msgjob 340 341 349 pbs_orderjob = _pbs.pbs_orderjob 342 343 350 pbs_rescquery = _pbs.pbs_rescquery 344 345 351 pbs_rescreserve = _pbs.pbs_rescreserve 346 347 352 pbs_rescrelease = _pbs.pbs_rescrelease 348 349 353 pbs_rerunjob = _pbs.pbs_rerunjob 350 351 354 pbs_rlsjob = _pbs.pbs_rlsjob 352 353 355 pbs_runjob = _pbs.pbs_runjob 354 355 356 pbs_selectjob = _pbs.pbs_selectjob 356 357 357 pbs_sigjob = _pbs.pbs_sigjob 358 359 358 pbs_statfree = _pbs.pbs_statfree 360 361 359 pbs_statjob = _pbs.pbs_statjob 362 363 360 pbs_selstat = _pbs.pbs_selstat 364 365 361 pbs_statque = _pbs.pbs_statque 366 367 362 pbs_statserver = _pbs.pbs_statserver 368 369 363 pbs_statnode = _pbs.pbs_statnode 370 371 364 pbs_submit = _pbs.pbs_submit 372 373 365 pbs_terminate = _pbs.pbs_terminate 374 375 366 totpool = _pbs.totpool 376 377 367 usepool = _pbs.usepool 378 379 368 openrm = _pbs.openrm 380 381 369 closerm = _pbs.closerm 382 383 370 downrm = _pbs.downrm 384 385 371 configrm = _pbs.configrm 386 387 372 addreq = _pbs.addreq 388 389 373 allreq = _pbs.allreq 390 391 374 flushreq = _pbs.flushreq 392 393 375 activereq = _pbs.activereq 394 395 376 fullresp = _pbs.fullresp 396 397 377 getreq = _pbs.getreq 398 378 LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE 399 400 379 log_close = _pbs.log_close 401 402 380 log_err = _pbs.log_err 403 404 381 log_event = _pbs.log_event 405 406 382 log_open = _pbs.log_open 407 408 383 log_record = _pbs.log_record 409 384 log_roll = _pbs.log_roll 385 log_size = _pbs.log_size 410 386 setup_env = _pbs.setup_env 411 412 387 chk_file_sec = _pbs.chk_file_sec 413 388 PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR … … 559 534 Returns the pbs python interface version as a string. 560 535 """ 561 return '2.9. 4'536 return '2.9.8' 562 537 563 538 # A useful dict with error codes to text … … 657 632 return (e, "Could not find a text for this error, uhhh") 658 633 634 659 635 cvar = _pbs.cvar 660 636 -
trunk/src/pbs_ifl.h
r160 r161 175 175 - insert usage code in proper location 176 176 */ 177 178 /* HvB required */179 #define ATTR_reqprop "required_property"180 181 177 182 178 #define ATTR_aclroot "acl_roots" -
trunk/src/pbs_python.h
r160 r161 175 175 - insert usage code in proper location 176 176 */ 177 178 /* HvB required */179 #define ATTR_reqprop "required_property"180 177 181 178 #define ATTR_aclroot "acl_roots" -
trunk/src/pbs_wrap.c
r159 r161 2860 2860 } 2861 2861 SWIGINTERN void delete_attrl(struct attrl *self){ 2862 if (SARA_DEBUG) 2863 printf("Bas free attrl\n"); 2862 2864 free(self); 2863 2865 } … … 2870 2872 } 2871 2873 SWIGINTERN void delete_attropl(struct attropl *self){ 2874 if (SARA_DEBUG) 2875 printf("Bas free attropl\n"); 2872 2876 free(self); 2873 2877 }
Note: See TracChangeset
for help on using the changeset viewer.