def get_own_names(self): print "Getting list of own domains. May take a while." nameDictList = pnc.name_list() self.nameDictDict = {} for d in nameDictList: self.nameDictDict[d["name"]] = d print "Names found in current wallet:", len(nameDictList)
randomDelayMax = 10 # make it a little more difficult to recognize the domains are from one wallet updateAll = False # update all or only soon expiring soonDays = 62 import pynamecoin as pnc import time import random info = pnc.getinfo() for k in info: print("%s: " % k) + str(info[k]) print print "Getting list of own domains. May take a while." nameDictList = pnc.name_list() print "Total number of own domains in wallet: ", len(nameDictList) earliest = 999999 earliestNd = {} for nd in nameDictList: if nd["expires_in"] < earliest: earliest = nd["expires_in"] earliestNd = nd print "next expiry in %d blocks, %.2f days (1 block ~~~10min)" % ( earliest, earliest * 10.0 / 60.0 / 24.0) print "(" + earliestNd["name"] + " and maybe others)" print # Names expiring soon
updateAll = False # update all or only soon expiring soonDays = 62 import pynamecoin as pnc import time import random info = pnc.getinfo() for k in info: print ("%s: " % k) + str(info[k]) print print "Getting list of own domains. May take a while." nameDictList = pnc.name_list() print "Total number of own domains in wallet: ", len(nameDictList) earliest = 999999 earliestNd = {} for nd in nameDictList: if nd["expires_in"] < earliest: earliest = nd["expires_in"] earliestNd = nd print "next expiry in %d blocks, %.2f days (1 block ~~~10min)" % (earliest, earliest * 10.0 / 60.0 / 24.0) print "(" + earliestNd["name"] + " and maybe others)" print # Names expiring soon soonBlocks = soonDays * 24.0 * 60.0 / 10.0