相关疑难解决方法(0)

当键盘上没有中断键时,excel VBA中断执行

我只是注意到我的笔记本电脑(戴尔XPS 15z)上没有BREAK键(没有专用的数字键盘).我正在逐步运行调试器,然后当一切看起来都很好时,我就让它发挥出来.然而,它正在无限循环中运行,现在我意识到没有休息键就没有办法阻止它!

这是一个糟糕的笑话吗?我不得不重启电脑; 有更优雅的方式吗?

谢谢.

keyboard excel vba excel-vba

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

无法在KeyboardInterrupt [Python]上关闭套接字

from socket import socket, AF_INET, SOCK_STREAM

sock = socket(AF_INET, SOCK_STREAM)
sock.bind(("localhost", 7777))
sock.listen(1)
while True:
    try:
        connection, address = sock.accept()
        print("connected from " + address)
        received_message = sock.recv(300)
        if not received_message:
            break
        connection.sendall(b"hello")

    except KeyBoardInterrupt:
        connection.close()
Run Code Online (Sandbox Code Playgroud)

所以我试图把我的头包裹在套接字并拥有这个非常简单的脚本,但出于某种原因,我不能用a杀死这个脚本 KeyboardInterrupt

我怎么用KeyboardInterrupt 那个杀死脚本,为什么我不能用它杀死它KeyboardInterrupt

python sockets

7
推荐指数
2
解决办法
6791
查看次数

标签 统计

excel ×1

excel-vba ×1

keyboard ×1

python ×1

sockets ×1

vba ×1