擅长:python、mysql、java
<p>您应该使用<a href="https://docs.python.org/3/library/os.path.html" rel="nofollow noreferrer">^{<cd1>}</a>和<code>os.filesep</code>来操作文件路径。在</p>
<pre><code>import os
import time
def shot():
ts = time.time()
path = os.path.join("home","sudhanshu","Desktop","shots","sb")
extention = ".png"
screensave = datetime.datetime.fromtimestamp(ts).strftime('%d%m%Y%H%M%S')
print(os.path.join(path, screensave+extention))
wd.save_screenshot(os.path.join(path, screensave+extention))
</code></pre>