-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Make Ctrl+C to quit Spyder on Posix systems #5159
Conversation
spyder/app/mainwindow.py
Outdated
@@ -288,6 +288,7 @@ def signal_handler(signum, frame=None): | |||
pass | |||
else: | |||
signal.signal(signal.SIGTERM, signal_handler) | |||
signal.signal(signal.SIGINT, signal_handler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to
if not DEV:
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's useful to have it when working in DEV mode. That way you can get a traceback when Spyder freezes for whatever reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's useful to have it when working in DEV mode. That way you can get a traceback when Spyder freezes for whatever reason.
Still this is very unconventional behavior. I am sure there must be a way where we can get a traceback AND quit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think very few people uses DEV, so I don't think we should look for more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we do that? raise something print the output,, wait a bit and then close spyder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yes, raising a exception in the internal console will make spyder quit, although the traceback won't correspond 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yes, raising a exception in the internal console will make spyder quit, although the traceback won't correspond 😕
Then it is not the solution I "requested"!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also print the other traceback, although I don't like that option.
Maybe skipping the keyboard error where internal console catch errors, although I don't understand the internals of the console and idk if it's possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rlaverde, please finish this one with my initial suggestion. I know that's not ideal, but it will affect mainly to us.
spyder/app/mainwindow.py
Outdated
signal.signal(signal.SIGINT, signal_handler) | ||
if not DEV: | ||
# Make spyder quit when presing ctrl+C in the console | ||
# In DEV because Ctrl+C doens't quit, because it helps to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the first because
in this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs a rebase against 3.x to fix the error in Circle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doens't
-> doesn't
…raceback when spyder freezes, see: spyder-ide#5129).
5643448
to
e228150
Compare
Fixes #5305
Related to #5114
See: #5129 (comment)