Press ESC to exit()
Michael C <[email protected]> Mon, 1 May 2017 11:28:30 -0700
| Newsgroups | gmane.comp.python.ctypes,gmane.comp.python.tutor |
|---|---|
| Message-ID | <CANyKM1jb4kFK0EWT7rGLnGZZam2kA6zaKyp6DT=ynZ0FxJ+GcA@mail.gmail.com> |
--===============0067214345815202182==
Content-Type: multipart/alternative; boundary=001a1140fadc0b232d054e7a976c
--001a1140fadc0b232d054e7a976c
Content-Type: text/plain; charset=UTF-8
Hi all, I found out that one way to press ESC to kill the script was to use
my previous
script language, AutoHotKey and this is how it works:
AutoHotKey code
## function that kills the window with title '*Python 3.6.1 Shell*'
kill()
{
WinKill, *Python 3.6.1 Shell*
}
## When ESC is pressed, runs the function 'kill'
Esc::kill()
Yes, that's the entire script.
Is there a way to write it in Python on windows?
Thanks!
--001a1140fadc0b232d054e7a976c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi all, I found out that one way to press ESC to kill the =
script was to use my previous<div>script language, AutoHotKey and this is h=
ow it works:</div><div><br></div><div><br></div><div><div>AutoHotKey code</=
div><div>=C2=A0## function that kills the window with title '*Python 3.=
6.1 Shell*'<br></div><div><br></div><div><div>kill() =C2=A0 =C2=A0 =C2=
=A0 =C2=A0=C2=A0</div><div>{</div><div><span class=3D"gmail-Apple-tab-span"=
style=3D"white-space:pre"> </span>WinKill, *Python 3.6.1 Shell*</div><div>=
}</div><div><br></div><div><div>## When ESC is pressed, runs the function &=
#39;kill'</div></div><div>Esc::kill() =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</div></div></div><div><br></div><div><br></=
div><div><br></div><div>Yes, that's the entire script.</div><div><br></=
div><div><br></div><div>Is there a way to write it in Python on windows?</d=
iv><div><br></div><div><br></div><div>Thanks!</div></div>
--001a1140fadc0b232d054e7a976c--
--===============0067214345815202182==
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
--===============0067214345815202182==
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
--===============0067214345815202182==--