@@ -0,0 +1,740 @@
+from jsonrpc import JSONRPCException, ServiceProxy%0A%0AMaxProcessSum = 200000   # Maximum amount of coins to merge%0AMaxOutputSum = 500       # Maximum transaction value%0AMaxInputSum = 50         # Maximum input value, inputs with greater size will be ignored%0A%0Aaccess = ServiceProxy(%22http://alexd:123456789@127.0.0.1:8344%22)   # http://username:password@host:port/%0A%0Atry:%0A    balance = access.getbalance()%0A    print 'Balance = ', balance%0A%0A    if balance %3E MaxProcessSum:%0A        print 'Balance is above MaxProcessSum, setting amount to ', MaxProcessSum%0A        balance = MaxProcessSum%0A%0A        if balance %3E MaxOutputSum:%0A            access.mergecoins(balance, MaxOutputSum, MaxInputSum)%0Aexcept JSONRPCException,e:%0A    print 'Error: %25s' %25 e.error%0A%0A%0A

Add defragmentation script example