libtbx.introspection
index
/net/chevy/raid1/nat/src/cctbx_project/libtbx/introspection.py

 
Modules
       
posixpath
os
sys

 
Classes
       
__builtin__.object
caller_location
current_process_status
method_debug_log
proc_file_reader
machine_memory_info
virtual_memory_info

 
class caller_location(__builtin__.object)
     Methods defined here:
__init__(self, frames_back=0)
__str__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class current_process_status(__builtin__.object)
    An interface to the *NIX utility 'ps' to get info on the current process
(only tested on MacOS X till further notice, so beware dragons)
 
SYNOPSIS:
  ps = current_process_status() # <1>
  .....
  print ps['RSS'] # resident size at the time of <1>
  .....
  ps.refresh() # <2>
  .....
  print ps['%CPU'] # % CPU at the time of <2>
 
  Methods defined here:
__getitem__(self, field_name)
__init__(self)
refresh(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
conversions = {'%CPU': <type 'float'>, 'RSS': <type 'int'>, 'VSZ': <type 'int'>}

 
class machine_memory_info(proc_file_reader)
    
Method resolution order:
machine_memory_info
proc_file_reader
__builtin__.object

Methods defined here:
__init__(self)
memory_free(self)
memory_total(self)
show(self, out=None, prefix='')

Methods inherited from proc_file_reader:
get_bytes(self, vm_key)

Data descriptors inherited from proc_file_reader:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class method_debug_log(__builtin__.object)
    For Python 2.4 or greater.  Use an instance of this class as a
  decorator for class methods, and it will print the call signature and
  call location before the method is executed.
 
  Example:
  debug = libtbx.introspection.method_debug_log()
  class a (object) :
    @debug
    def foo (self, x) :
      print x
 
  def main () :
    my_object = a()
    a.foo(1)
  main()
 
  Running this results in the following output when LIBTBX_DEBUG_LOG is set:
a.foo(1) @ test.py(13) main
1
 
  Methods defined here:
__call__(self, f)
__init__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class proc_file_reader(__builtin__.object)
     Methods defined here:
get_bytes(self, vm_key)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class virtual_memory_info(proc_file_reader)
    
Method resolution order:
virtual_memory_info
proc_file_reader
__builtin__.object

Methods defined here:
__init__(self)
current_max_sizes(self)
current_max_sizes_legend(self)
resident_set_size(self)
show(self, out=None, prefix='', show_max=False)
show_if_available(self, out=None, prefix='', show_max=False)
stack_size(self)
update_max(self)
virtual_memory_peak_size(self)
virtual_memory_size(self)

Data and other attributes defined here:
have_vmpeak = False
max_resident_set_size = 0
max_stack_size = 0
max_virtual_memory_size = 0

Methods inherited from proc_file_reader:
get_bytes(self, vm_key)

Data descriptors inherited from proc_file_reader:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
check_point(frames_back=0)
get_mac_os_x_memory_total()
number_of_processors(return_value_if_unknown=None)
print_trace(frame, event, arg)
show_stack(max_frames_back=None, frames_back=0, reverse=False, out=None, prefix='')
show_stack_true_stderr()
start_print_trace()
stop_print_trace()
varnames(frames_back=0)

 
Data
        Auto = <libtbx.AutoType object>
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
kb_exponents = {'GB': 3, 'KB': 1, 'MB': 2, 'PB': 5, 'TB': 4}