我想从python中的用户那里获取多行输入,这段代码从用户那里获取多行输入put输出只是最后一行
我制作了这个程序,它使用pywhatkit
库将文本转换为手写体,我希望用户可以多行输入,它可以多行输入,但不能打印,只能打印最后一行
from colorama import init
from termcolor import colored
import pywhatkit as kit
print("")
init()
print(colored('Support me on Instagram: @shiva5harma ', 'white', 'on_red'))
print("")
print("Enter/Paste your content. Ctrl-D or Ctrl-Z ( windows ) to save it.")
contents = []
while True:
try:
text = input()
except EOFError:
break
contents.append(text)
print("")
print("-- Lcation Example: C:/User/owner/Desktop/image_name.png --")
print("")
path=str(input("Enter Location where to store image\n"))
try:
print("")
print("I'm working on it Please Wait.......\n")
kit.text_to_handwriting(text,path)
except:
print("Error Occured")
finally:
print("Your Image is ready !! Your will find your Image here\n",path)
您在此行中使用了错误的参数:
我认为应该是这样的:
相关问题 更多 >
编程相关推荐