new command: 'get'
authorThomasV <thomasv@gitorious>
Fri, 26 Oct 2012 15:35:35 +0000 (17:35 +0200)
committerThomasV <thomasv@gitorious>
Fri, 26 Oct 2012 15:35:35 +0000 (17:35 +0200)
electrum

index 60329d8..4f25f06 100755 (executable)
--- a/electrum
+++ b/electrum
@@ -82,8 +82,10 @@ 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\"",
+    'get': 
+             "Get config parameter.",
     'set': 
-             "Set wallet parameter. (gui)",
+             "Set config parameter.",
     'deseed':
             "Remove seed from the wallet. The seed is stored in a file that has the name of the wallet plus '.seed'",
     'reseed':
@@ -100,7 +102,7 @@ offline_commands = [ 'password', 'mktx',
                      'label', 'contacts',
                      'help', 'validateaddress',
                      'signmessage', 'verifymessage',
-                     'eval', 'set', 'create', 'addresses',
+                     'eval', 'set', 'get', 'create', 'addresses',
                      'import', 'seed',
                      'deseed','reseed',
                      'freeze','unfreeze',
@@ -438,6 +440,10 @@ if __name__ == '__main__':
         print eval(args[1])
         wallet.save()
 
+    elif cmd == 'get':
+        key = args[1]
+        print wallet.config.get(key)
+
     elif cmd == 'set':
         key, value = args[1:3]
         if key not in ['seed_version', 'master_public_key', 'use_encryption']: