Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def set_opt(key, val, disguise = False):
	if key.startswith('--'):
		key = key[2:]
	key = pythonise_option_key(key)
	if "pass" in key or "Pass" in key:
		disguise = True
	if key in path_keys:
		val = os.path.expanduser(val)
	debug("set option %s = %s" % (key, val if disguise is False else "*****"))
	if key not in app_globals.OPTIONS:
		debug("Ignoring key: %s" % (key,))
		return False
	app_globals.OPTIONS[key] = val
	return True
        


src/g/o/google-reader-iphone-sync-HEAD/src/sync/config_test.py   google-reader-iphone-sync(Download)
	def test_should_set_global_options(self):
		config.app_globals.OPTIONS = {'foo':1}
		config.set_opt('foo',2)
		self.assertEqual(config.app_globals.OPTIONS['foo'], 2)
 
	def test_should_not_set_nonexistant_global_options(self):
		config.app_globals.OPTIONS = {'foo':1}
		config.set_opt('bar',2)