def list(self, cart_glob=['*.json']):
        """
        List all carts
        """
        carts = []
        for glob in cart_glob:
            # Translate cart names into cart file names
            if not glob.endswith('.json'):
                search_glob = glob + ".json"
            else:
                search_glob = glob

            for cart in juicer.utils.find_pattern(Constants.CART_LOCATION, search_glob):
                cart_name = cart.split('/')[-1].replace('.json', '')
                carts.append(cart_name)

        return carts
def list ( self , cart_glob = [ '*.json' ] ) : carts = [ ] for glob in cart_glob : if not glob . endswith ( '.json' ) : search_glob = glob + ".json" else : search_glob = glob for cart in juicer . utils . find_pattern ( Constants . CART_LOCATION , search_glob ) : cart_name = cart . split ( '/' ) [ - 1 ] . replace ( '.json' , '' ) carts . append ( cart_name ) return carts
List all carts