本文整理匯總了Python中Function.countUserFile方法的典型用法代碼示例。如果您正苦於以下問題:Python Function.countUserFile方法的具體用法?Python Function.countUserFile怎麽用?Python Function.countUserFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Function
的用法示例。
在下文中一共展示了Function.countUserFile方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: input
# 需要導入模塊: import Function [as 別名]
# 或者: from Function import countUserFile [as 別名]
func.warning("\n>>> ADD FILE")
fileName = input("Quale file vuoi inserire?\n")
if fileName is not "0":
add_file(fileName, sessionID, SN, SN_host, host, listPkt)
elif (choice == "remove" or choice == "r"):
func.warning("\n>>> REMOVE FILE")
fileName = input("Quale file vuoi rimuovere?\n")
if fileName is not "0":
remove_file(fileName, sessionID, SN, SN_host, host, listPkt)
elif (choice == "user" or choice == "u" and SN):
func.warning("\n>>> USER LIST")
print ("USER IP\t\t\tSESSIONID")
for user in listUsers:
print(str(user[0], "ascii") + " " + str(user[1], "ascii") + "\t" + str(user[2], "ascii") + "\t" + str(func.countUserFile(user[2], listFiles)))
elif (choice == "file" or choice == "f" and SN):
func.warning("\n>>> FILES LIST")
print ("MD5\tFILENAME\tSESSIONID")
for file in listFiles:
print(str(file[0], "ascii") + "\t" + str(file[1].strip(), "ascii") + "\t" + str(file[2], "ascii"))
elif (choice == "search" or choice == "s"):
func.warning("\n>>> SEARCH")
query = input("\nInserisci il nome del file da cercare: ")
while(len(query) > const.LENGTH_QUERY):
func.error("Siamo spiacenti ma accettiamo massimo 20 caratteri.")
query = input("\nInserisci il nome del file da cercare: ")
search(sessionID, query, SN, SN_host, host, listPkt)