本文整理汇总了Python中User.handshake方法的典型用法代码示例。如果您正苦于以下问题:Python User.handshake方法的具体用法?Python User.handshake怎么用?Python User.handshake使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User
的用法示例。
在下文中一共展示了User.handshake方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import User [as 别名]
# 或者: from User import handshake [as 别名]
def main():
block = Block()
transaction = Transaction()
block_user = User()
running = True
user_id = block_user.sign_in()
while running:
if user_id < 11:
print("You are an admin. Welcome to the admin page")
break
else:
print("Welcome to the main menu")
print("1) Create a transaction")
print("2) Check on the blockchain")
print("3) look at my account")
print("Enter the number or word associated with what you want to do "
"(i.e. transaction, blockchain, or account")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")
us_input = input("What would you like to do: ")
us_input = us_input.lower()
if us_input == "exit" or us_input == "done":
running = False
elif us_input == "1" or us_input == "transaction":
transaction.candidate_list()
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
elif us_input == "2" or us_input == "blockchain":
block.block_size()
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
elif us_input == "3" or us_input == "account":
block_user.handshake()
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
else:
print("Please enter a valid input")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("Byebye")