Вот код.
s = input("Enter directory to file with: \n")
sleep(2)
f = open(s + ".txt", "r")
print(f.read() + "\n")
w = input("Repeat? y/n\n")
if w == "y":
sleep(2)
def paste(text013: str):
pyperclip.copy(text013)
press_and_release('ctrl + v')
paste(f.read() + "\n")
paste(f.read() + "\n")
paste(f.read() + "\n")
paste(f.read() + "\n")
paste(f.read() + "\n")
if w == "n":
def paste(text014: str):
pyperclip.copy(text014)
press_and_release('ctrl + v')
f = open(s, "r")
paste(f.read() + "\n")
В консоль пишет:
Traceback (most recent call last):
File "C:\Users\Admin\Desktop\DragonHack\OWOTRAIDv2.py", line 238, in <module>
f = open(s, "r")
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Admin\\Desktop\\DragonHack\\sword'</blockquote>