本文整理汇总了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)