Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)
??????????????? None ???????????????? None
Argument:
        v - ???????
        default_value - ???
Return:
        ??????? None ????????????????

        def convert_to_nonempty_text(v, default_value=None):
	""" ??????????????? None ???????????????? None
	Argument:
		v - ???????
		default_value - ???
	Return:
		??????? None ????????????????
	"""

	if v is None:
		return default_value

	r = None

	if isinstance(v, unicode):
		r = v
	elif isinstance(v, str):
		r = unicode(v, 'utf-8', 'ignore')
	else:
		try:
			r = str(v)
		except:
			sys.stderr.write("WARN: cannot convert input (%r) to string. @[codepkgr_common.convert_to_nonempty_text]\n" % (v,))
			r = None

	if r is not None:
		r = r.strip()
		if len(r) > 0:
			return r
	return default_value
        


src/c/o/codepackager-1.02/lib/codepackager/codepkgrtypes.py   codepackager(Download)
		dmap = {}
 
	codepkg_name = codepkgr_common.convert_to_nonempty_text(cmap.get("package-name", cmap.get("pkg-name")))
	device_folder = codepkgr_common.convert_to_nonempty_text(cmap.get("device-folder", cmap.get("package-folder", dmap.get("device-folder"))))
	archive_folder = codepkgr_common.convert_to_nonempty_text(cmap.get("archive-folder", dmap.get("archive-folder")))
	tmp_folder = codepkgr_common.convert_to_nonempty_text(cmap.get("tmp-folder", dmap.get("tmp-folder")), "/tmp")
		dmap_binpath = {}
 
	with_vcs = codepkgr_common.convert_to_nonempty_text(cmap.get("vcs"))
	vcs_binpath = None
	if with_vcs is not None: