Press ESC to exit()
Michael C <[email protected]> Mon, 1 May 2017 11:10:19 -0700
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CANyKM1gxF6esK_fWEgVS8B0MYUx_Rd5HMeaezeh=m7LpfJn_4g@mail.gmail.com> |
--===============7295941376363688802== Content-Type: multipart/alternative; boundary=001a114ab64c07bec8054e7a5630 --001a114ab64c07bec8054e7a5630 Content-Type: text/plain; charset=UTF-8 Hi all, I am trying to write a script to exit itself when ESC is pressed. I have found several answers regarding it such as this: http://stackoverflow.com/questions/43709710/push-esc-to-terminate-python-script?noredirect=1#comment74464169_43709710 But those only work when the program goes to that point. Is there a way to write it so that it would run exit() even when the program is in the background? Thanks! --001a114ab64c07bec8054e7a5630 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi all, I am trying to write a script to exit itself when = ESC is pressed. I have found several answers regarding it such as this:<div= ><br></div><div><a href=3D"http://stackoverflow.com/questions/43709710/push= -esc-to-terminate-python-script?noredirect=3D1#comment74464169_43709710">ht= tp://stackoverflow.com/questions/43709710/push-esc-to-terminate-python-scri= pt?noredirect=3D1#comment74464169_43709710</a><br></div><div><br></div><div= >But those only work when the program goes to that point.</div><div><br></d= iv><div>Is there a way to write it so that it would run exit() even when th= e program is in the=C2=A0</div><div>background?</div><div><br></div><div>Th= anks!</div></div> --001a114ab64c07bec8054e7a5630-- --===============7295941376363688802== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============7295941376363688802== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users --===============7295941376363688802==--