コード例 #1
0
ファイル: __init__.py プロジェクト: raboof/sk1-wx
def get_profile_info(filepath):
    """Returns profile info.
    If file is not suitable profile or doesn't exist
    returns None. 
    """
    try:
        profile = libcms.cms_open_profile_from_file(filepath)
        ret = libcms.cms_get_profile_info(profile)
    except Exception:
        ret = None
    return ret
コード例 #2
0
ファイル: __init__.py プロジェクト: sk1project/sk1-wx
def get_profile_info(filepath):
	"""
	Returns profile info.
	If file is not suitable profile or doesn't exist
	returns None. 
	"""
	try:
		profile = libcms.cms_open_profile_from_file(filepath)
		ret = libcms.cms_get_profile_info(profile)
	except:
		ret = None
	return ret
コード例 #3
0
ファイル: __init__.py プロジェクト: raboof/sk1-wx
def get_profile_descr(filepath):
    """Returns profile description tuple (name, copyright, info).
    If file is not suitable profile or doesn't exist
    returns None. 
    """
    try:
        profile = libcms.cms_open_profile_from_file(filepath)
        ret = (libcms.cms_get_profile_name(profile),)
        ret += (libcms.cms_get_profile_copyright(profile),)
        ret += (libcms.cms_get_profile_info(profile),)
    except Exception:
        ret = ('', '', '')
    return ret
コード例 #4
0
ファイル: __init__.py プロジェクト: sk1project/sk1-wx
def get_profile_descr(filepath):
	"""
	Returns profile description tuple (name, copyright, info).
	If file is not suitable profile or doesn't exist
	returns None. 
	"""
	try:
		profile = libcms.cms_open_profile_from_file(filepath)
		ret = (libcms.cms_get_profile_name(profile),)
		ret += (libcms.cms_get_profile_copyright(profile),)
		ret += (libcms.cms_get_profile_info(profile),)
	except:
		ret = ('', '', '')
	return ret