当我运行此代码时:
from pydub import AudioSegment
sound = AudioSegment.from_mp3("i.mp3")
sound.export("F:\\bh", format="wav")
Run Code Online (Sandbox Code Playgroud)
注意:
错误发生在我尝试导出的每个位置
from cryptography.fernet import Fernet
import base64
# Put this somewhere safe!
key = Fernet.generate_key()
f = Fernet()
token = f.encrypt(b"A really secret message. Not for prying eyes.")
token
print f.decrypt(token)
Run Code Online (Sandbox Code Playgroud)
我怎样才能生成自己的密钥而不是fernet.genrate_key()?
如果我使用Ubuntu 18.04创建virtualenv,则会local创建一个名为gets 的目录.
virtualenv test-env
cd test-env
ls -l local/
Run Code Online (Sandbox Code Playgroud)
输出:
lrwxrwxrwx 1 foo foo 30 Jan 30 10:47 bin -> /home/foo/tmp/test-env/bin
lrwxrwxrwx 1 foo foo 34 Jan 30 10:47 include -> /home/foo/tmp/test-env/include
lrwxrwxrwx 1 foo foo 30 Jan 30 10:47 lib -> /home/foo/tmp/test-env/lib
Run Code Online (Sandbox Code Playgroud)
版:
virtualenv --version
15.0.3
Run Code Online (Sandbox Code Playgroud)
这在其他机器上不会发生(例如企业SuSE Linux)
AFAIK不需要此目录.
有没有办法避免这个目录被调用local哪个不需要?
(这是关于Python 2.7)