commit d0a6e244b1e3aceb4069041387b32547fb1b6eca
parent bb74a6c39340180186421ecd09d6f8fdd7a7d050
Author: ThomasV <thomasv@gitorious>
Date: Sat, 20 Oct 2012 10:23:34 +0200
new 'set' command for the CLI
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/electrum b/electrum
@@ -82,6 +82,8 @@ options:\n --fee, -f: set transaction fee\n --fromaddr, -s: send from address
'Verifies a signature\nSyntax: verifymessage <address> <signature> <message>\nIf you want to lead or end a message with spaces, or want double spaces inside the message make sure you quote the string. I.e. " Hello This is a weird String "',
'eval':
"Run python eval() on an object\nSyntax: eval <expression>\nExample: eval \"wallet.aliases\"",
+ 'set':
+ "Set wallet parameter. (gui)",
'deseed':
"Remove seed from the wallet. The seed is stored in a file that has the name of the wallet plus '.seed'",
'reseed':
@@ -98,7 +100,7 @@ offline_commands = [ 'password', 'mktx',
'label', 'contacts',
'help', 'validateaddress',
'signmessage', 'verifymessage',
- 'eval', 'create', 'addresses',
+ 'eval', 'set', 'create', 'addresses',
'import', 'seed',
'deseed','reseed',
'freeze','unfreeze',
@@ -418,6 +420,14 @@ if __name__ == '__main__':
print eval(args[1])
wallet.save()
+ elif cmd == 'set':
+ key, value = args[1:3]
+ if key in ['gui', 'server', 'proxy', 'fee', 'gap_limit', 'use_change']:
+ wallet.config.set_key(key, value, True)
+ print True
+ else:
+ print False
+
elif cmd in [ 'addresses']:
for addr in wallet.all_addresses():
if options.show_all or not wallet.is_change(addr):