libtbx.utils
index
/net/chevy/raid1/rwgk/dist/cctbx_project/libtbx/utils.py

 
Modules
       
atexit
bz2
glob
gzip
hashlib
math
os
libtbx.pbs_utils
re
libtbx.sge_utils
sys
time
traceback

 
Classes
       
__builtin__.object
detect_binary_file
indentor
buffered_indentor
input_with_prompt
multi_out
null_out
time_log
timer_base
user_plus_sys_time
wall_clock_time
Keep
host_and_user
import_python_object
show_times

 
class Keep
    

 
class buffered_indentor(indentor)
    
Method resolution order:
buffered_indentor
indentor
__builtin__.object

Methods defined here:
__init__(self, file_object=None, indent='', parent=None)
write(self, block)
write_buffer(self)

Methods inherited from indentor:
shift_right(self, indent=' ')

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

 
class detect_binary_file(__builtin__.object)
     Methods defined here:
__init__(self, monitor_initial=None, max_fraction_non_ascii=None)
is_binary_file(self, block)

Static methods defined here:
from_initial_block(file_name, monitor_initial=None, max_fraction_non_ascii=None)

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

 
class host_and_user
     Methods defined here:
__init__(self)
show(self, out=None, prefix='')

 
class import_python_object
     Methods defined here:
__init__(self, import_path, error_prefix, target_must_be, where_str)

 
class indentor(__builtin__.object)
     Methods defined here:
__init__(self, file_object=None, indent='', parent=None)
shift_right(self, indent=' ')
write(self, block)

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

 
class input_with_prompt(__builtin__.object)
     Methods defined here:
__del__(self)
__init__(self, prompt, tracebacklimit=0)

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

 
class multi_out(__builtin__.object)
     Methods defined here:
__init__(self)
close(self)
flush(self)
isatty(self)
register(self, label, file_object, atexit_send_to=None)
replace_stringio(self, old_label, new_label, new_file_object, new_atexit_send_to=None)
write(self, str)
writelines(self, sequence)

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

 
class null_out(__builtin__.object)
     Methods defined here:
close(self)
flush(self)
isatty(self)
write(self, str)
writelines(self, sequence)

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

 
class show_times
     Methods defined here:
__call__(self)
__init__(self, time_start=None, out=None)

 
class time_log(__builtin__.object)
     Methods defined here:
__init__(self, label, use_wall_clock=False)
average(self)
log(self)
log_elapsed(self, local_label)
report(self)
start(self)
stop(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:
legend = 'time_log: label: n accumulation delta average'

 
class timer_base(__builtin__.object)
     Methods defined here:
__init__(self)
delta(self)
elapsed(self)
show_delta(self, prefix='', out=None)
show_elapsed(self, prefix='', out=None)

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

 
class user_plus_sys_time(timer_base)
    
Method resolution order:
user_plus_sys_time
timer_base
__builtin__.object

Methods defined here:
get(self)

Methods inherited from timer_base:
__init__(self)
delta(self)
elapsed(self)
show_delta(self, prefix='', out=None)
show_elapsed(self, prefix='', out=None)

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

 
class wall_clock_time(timer_base)
    motivation: when running multithreaded code, user_plus_sys_time
would report the cumulated times for all threads: not very useful
to analyse the scaling with the number of threads! Wall clock time, although
it is less reliable is the only solution in that case
 
 
Method resolution order:
wall_clock_time
timer_base
__builtin__.object

Methods defined here:
get(self)

Methods inherited from timer_base:
__init__(self)
delta(self)
elapsed(self)
show_delta(self, prefix='', out=None)
show_elapsed(self, prefix='', out=None)

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

 
Functions
       
bz2_open(file_name, mode)
copy_file(source, target, compress=None)
count_max(assert_less_than)
date_and_time()
escape_sh_double_quoted(s)
the result is supposed to be double-quoted when passed to sh
exercise()
file_size(file_name)
flat_list(nested_list)
format_cpu_times(show_micro_seconds_per_tick=True)
format_exception()
get_memory_from_string(mem_str)
getenv_bool(variable_name, default=False)
gzip_open(file_name, mode)
hashlib_md5 = openssl_md5(...)
Returns a md5 hash object; optionally initialized with a string
human_readable_time(time_in_seconds)
human_readable_time_as_seconds(time_units, time_unit)
if_none(value, default)
n_dim_index_from_one_dim(i1d, sizes)
number_from_string(string)
numbers_as_str(values, fmt='%.6g', sep=', ', brackets=('[', ']'))
plural_s(n, suffix='s')
remove_files(pattern)
search_for(pattern, mode, re_flags=0, lines=None, file_name=None)
select_matching(key, choices, default=None)
sequence_index_dict(seq, must_be_unique=True)
show_exception_info_if_full_testing(prefix='EXCEPTION_INFO: ')
show_times_at_exit(time_start=None, out=None)
show_total_time(out=None, show_micro_seconds_per_bytecode_instruction=True)
tupleize(x)
warn_if_unexpected_md5_hexdigest(path, expected_md5_hexdigests, hints=[], out=None)
write_this_is_auto_generated(f, file_name_generator)
xlen(seq)

 
Data
        disable_tracebacklimit = False
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
windows_device_names = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', ...]