utils: Generically useful stuff that doesn’t fit elsewhere

utils: Generically useful stuff that doesn’t fit elsewhere

class CustomSortString(str_val, sort_val=None)

Bases: str

lower(*args, **kw)

Experimental API . Return a copy of the string converted to lowercase.

upper(*args, **kw)

Experimental API . Return a copy of the string converted to uppercase.

can_set_file_icon()

Experimental API . Can an icon image be associated with a file on this operating system.

chimerax_bin_dir_first_in_path()

Experimental API . Put ChimeraX’s bin directory first on the PATH. This is useful to override some library’s call to a system binary, ensuring the system finds the binary shipped with ChimeraX first.

chimerax_binary_directory()

Experimental API . Find the ChimeraX.app/Contents/bin directory.

flattened(input, *, return_types=(<class 'list'>, <class 'tuple'>, <class 'set'>), return_type=None, maxsize=9223372036854775807)

Experimental API . Return new flattened version of input

Parameters:
  • input (a sequence instance (list, tuple, or set))

  • return_type (optional return type (defaults to input type))

Return type:

A sequence of the same type as the input.

initialize_ssl_cert_dir()

Experimental API . Initialize OpenSSL’s CA certificates file.

Makes it so certificates can be verified.

Experimental API . An OS-agnostic way to make a symbolic link that does not require permissions on Windows to use.

Return type:

None

round_off(val, significant_digits)

Experimental API . Reduce a numerical value to the specified number of significant digits

set_file_icon(path, image)

Experimental API . Assoicate an icon image with a file to be shown by the operating system file browser.