41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
"""Provider/supplier
|
|
|
|
distribued with GPL-2 or later license
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
"""
|
|
# from rougail.objspace import get_variables
|
|
# from rougail.utils import normalize_family
|
|
#
|
|
#
|
|
# def provider_supplier(objectspace,
|
|
# path_prefix,
|
|
# ):
|
|
# n_path_prefix = normalize_family(path_prefix)
|
|
# for variable in get_variables(objectspace):
|
|
# if variable.path_prefix != n_path_prefix:
|
|
# continue
|
|
# if hasattr(variable, 'provider'):
|
|
# family_name, variable.name = variable.path.rsplit('.', 1)
|
|
# objectspace.paths.set_provider(variable,
|
|
# variable.name,
|
|
# family_name,
|
|
# )
|
|
# if hasattr(variable, 'supplier'):
|
|
# family_name, variable.name = variable.path.rsplit('.', 1)
|
|
# objectspace.paths.set_supplier(variable,
|
|
# variable.name,
|
|
# family_name,
|
|
# )
|