小编tha*_*der的帖子

使用“.code”快捷方式使用 VS Code 时出现“-bash: //MacOS/Electron: No such file or directory”

我的 IDE 是 VS Code 当我在终端中打开 VS Code 时,我突然使用了它很多次

. code或者source code

它显示错误

-bash: //MacOS/Electron: No such file or directory
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Run Code Online (Sandbox Code Playgroud)

[流程完成]

我该如何解决?我只是想让我的正常代码与以前一样再次正常工作

linux ide terminal visual-studio-code

11
推荐指数
2
解决办法
1万
查看次数

如何使用 2 因素身份验证从 python 发送电子邮件?

我创建了 python 文件,可以使用打开的不太安全的应用程序发送电子邮件,但我需要将其关闭。如何使用 2FA 发送电子邮件?

# import simple mail transfer protocol library
import smtplib 

# import EmailMessage method
from email.message import EmailMessage

contacts = ['<email@email.com>', '<email2@email.com>']
EMAIL_ADDRESS = '<my_gmail>'
EMAIL_PASSWORD = '<my_gmail_password>'

# Create empty Email Message object
msg = EmailMessage()
msg['Subject'] = 'Automated python email sender 5'
msg['From'] = EMAIL_ADDRESS
msg['To'] = contacts
msg.set_content('<sample_content>')

# contact manager we will make sure our connection is closed automatically without us doing it manually
# 465 is the port number for plain …
Run Code Online (Sandbox Code Playgroud)

python email gmail smtp google-2fa

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

email ×1

gmail ×1

google-2fa ×1

ide ×1

linux ×1

python ×1

smtp ×1

terminal ×1

visual-studio-code ×1