这是我的代码:
import eel
eel.init('web')
@eel.expose
def getMean(word):
from PyDictionary import PyDictionary
dictionary=PyDictionary(word)
print(dictionary.printMeanings())
eel.start('main.html')
在桌面上创建一个文件夹,然后在此文件夹中创建app.py文件。将此代码写入app.py文件中。