utils.py¶
Module that contains general-use utilities. Some of these are useful outside of
hutch-python, while others are used in multiple places throughout the
module.
| Context manager to safely run a block of code. | |
| Get the current experiment for  | |
| alias of  | |
| Count the number of objects in a nested  | |
| Return all objects with the  | |
| Given a string module path to an object, return that object. | |
| Find a  | |
| Strip the first section of an underscore-separated  | |
| Display the hutch’s banner. | 
In [1]: hutch_banner()
 _    _       _       _       _____       _   _                 
| |  | |     | |     | |     |  __ \     | | | |                
| |__| |_   _| |_ ___| |__   | |__) |   _| |_| |__   ___  _ __  
|  __  | | | | __/ __| '_ \  |  ___/ | | | __| '_ \ / _ \| '_ \ 
| |  | | |_| | || (__| | | | | |   | |_| | |_| | | | (_) | | | |
|_|  |_|\__,_|\__\___|_| |_| |_|    \__, |\__|_| |_|\___/|_| |_|
                                     __/ |                      
                                    |___/