Package starcluster :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Utils module for StarCluster

Classes [hide private]
  AttributeDict
Subclass of dict that allows read-only attribute-like access to dictionary key/values
Functions [hide private]
 
print_timing(func)
Decorator for printing execution time (in mins) of a function
source code
 
is_valid_device(dev) source code
 
is_valid_partition(part) source code
 
is_valid_bucket_name(bucket_name)
Check if bucket_name is a valid S3 bucket name (as defined by the AWS docs)
source code
 
validate_ip(ip_address) source code
 
is_valid_image_name(image_name)
Check if image_name is a valid AWS image name (as defined by the AWS docs)
source code
 
make_one_liner(script)
Returns command to execute python script as a one-line python program
source code
 
is_url(url) source code
 
is_iso_time(iso) source code
 
iso_to_datetime_tuple(iso) source code
 
datetime_tuple_to_iso(tup) source code
Variables [hide private]
  ipy_shell = <IPython.Shell.IPShellEmbed instance at 0x1dfd758>
  __package__ = 'starcluster'
Function Details [hide private]

make_one_liner(script)

source code 

Returns command to execute python script as a one-line python program

e.g. 

    import os
    script = '''
    import os
    print os.path.exists('hi')
    '''
    os.system(make_one_liner(script))

Will print out:

    <module 'os' from ...>
    False