'Set the path of the wallet.'

def get_wallet_path(self):

    if self.get('wallet_path'):
        return os.path.join(self.get('cwd'), self.get('wallet_path'))
    path = self.get('default_wallet_path')
    if (path and os.path.exists(path)):
        return path
    dirpath = os.path.join(self.path, 'wallets')
    if (not os.path.exists(dirpath)):
        if os.path.islink(dirpath):
            raise BaseException(('Dangling    link:    ' + dirpath))
        os.mkdir(dirpath)
    new_path = os.path.join(self.path, 'wallets', 'default_wallet')
    old_path = os.path.join(self.path, 'electrum.dat')
    if (os.path.exists(old_path) and (not os.path.exists(new_path))):
        os.rename(old_path, new_path)
    return new_path
