PKa O}}exceptor_magic/__init__.py"""magic to alert on fail or success""" __version__ = '0.2' from durbango.send_sms import send_sms import time from IPython.core.magic import Magics, magics_class, cell_magic @magics_class class Exceptor(Magics): @cell_magic def exceptor(self, line, cell): timeout = 60 try: start = time.time() self.shell.ex(cell) except: if time.time() - start > timeout: send_sms("Slow fail!") else: if time.time() - start > timeout: send_sms("done") def load_ipython_extension(ipython): ipython.register_magics(Exceptor) PK OSU f77$exceptor_magic-0.2.dist-info/LICENSEThe MIT License (MIT) Copyright (c) 2019 sam shleifer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!HMuSa"exceptor_magic-0.2.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,szd&Y)r$[)T&UD"PK!HΩ%exceptor_magic-0.2.dist-info/METADATAM@{}Z^%(POi6p,=`X̷Q F7bװ*GGehkowCu#{vd4DԑE6S➫5Hв @ڎlM~)8Ć:t(bkK(SH˪PK!H/#exceptor_magic-0.2.dist-info/RECORDλv0o QA(AB Q@T C\ej'MhW=)u^E[<7 fG/ E=cuzT?$8u#⫝̸x v q顋b;κ?-_M] e["k{<rڷsAm_mtikBޒ3?kB4Bc?mO}cΞIjyE 3=MFPKa O}}exceptor_magic/__init__.pyPK OSU f77$exceptor_magic-0.2.dist-info/LICENSEPK!HMuSa".exceptor_magic-0.2.dist-info/WHEELPK!HΩ%exceptor_magic-0.2.dist-info/METADATAPK!H/#exceptor_magic-0.2.dist-info/RECORDPK