inventory = []
with open("inventory.txt", "r") as file:
for line in file:
data = line.strip().split("\t")
inventory.append(data)
found = False
for item in inventory:
if description.lower() in item[1].lower():
found = True
print("Item details:")
print(f"Item Code: {item[0]}")
print(f"Description: {item[1]}")
print(f"Category: {item[2]}")
print(f"Unit: {item[3]}")
print(f"Price: {item[4]}")
print(f"Quantity: {item[5]}")
print(f"Minimum Threshold: {item[6]}")
print()
if not found:
print("No items found with the given description.")
3条答案
按热度按时间j9per5c41#
基于在线搜索,我认为你的问题的具体答案是肯定的,你只能使用专业版的集成UML插件。要在Community Edition中实现这一点,正如Dinko所说,您必须使用第三方插件PlantUML。
nbysray52#
PyCharm中类的Generating UMLs默认包含在内。也许你已经禁用了它们。转到
File -> Settings -> Plugins
并搜索UML。应该有Python UML
图和UML
,下面应该有 bundled 关键字。您可以右键单击class并选择
Diagrams
来生成它。例如,这个类:
字符串
表示为:
的数据
对于
PlantUML
插件,除了插件本身,您不需要安装任何东西。安装时,您可以创建新的PlantUML
文件并选择要生成的默认图。t40tm48m3#
def search_by_description():description = input(“输入要搜索的项目说明:“)
字符串