10 ответов
+ 1
If your operating system is POSIX-compliant then you can issue a shell command to create it by using "touch":
import os
os.system("touch test.xml")
If the file does not exist, then it will create the file. Else it will update the access and modification date and time stamps of the existing file. See the man page for options to change its behavior.
+ 6
Operand , very difficult to guess what are you doing in your code. it would be helpful, if you could show us your code. please put it in playground and link it here.
thanks!
+ 1
Lothar https://code.sololearn.com/cf8ufFzGu3ze/?ref=app I need the site code to download
+ 1
Line 22 after downloaded no Space: download/ + arg...
0
What do you mean in advanced? Function open(test.xml,"w") create file test.xml for write then you need close this file.
0
Václav Dostál but the error remained
0
Hmm, it is harder... And what about implement https://realpython.com/JUMP_LINK__&&__python__&&__JUMP_LINK-requests/
0
Does it help to correct the spelling in line 22 from '/dowloads/' to '/downloads/'?
0
Václav Dostál What will it change? The problem is in creating the file, because the exception clearly states that this directory does not exist.
0
There Is from ... import exception And May by it shows error. But try as Brian wrote /downloads/.