Created
January 26, 2018 14:58
-
-
Save zed/7219ddf356e25bfd9527c2762729b5d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
"""Demonstrate that without `sys.exit()` exit status is zero after `app.exit(1)`.""" | |
import sys | |
from PyQt5.Qt import QApplication, QPushButton | |
app = QApplication(sys.argv) | |
w = QPushButton("Exit 1") | |
w.clicked.connect(lambda: app.exit(1)) | |
w.show() | |
sys.exit(app.exec()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment