PK#?qK22there/__init__.py""" Print current file and line number import there print(there) """ __version__ = '0.0.7' import sys import inspect import types from builtins import print as _print import os.path import syslog HOME = os.path.expanduser('~') LEN_HOME = len(HOME) def compress(path): if path.startswith(HOME): return '~'+path[LEN_HOME:] return path class There(types.ModuleType): """ Simply a global object that act as undefined. """ __version__ = __version__ @property def Undefined(self): return self def __str__(self): cf = inspect.currentframe().f_back return '{}:{}'.format(compress(cf.f_code.co_filename), cf.f_lineno) def __repr__(self): return str(self) cf = inspect.currentframe().f_back return ''.format(compress(cf.f_code.co_filename), cf.f_lineno) def print(self, *args, **kwargs): cf = inspect.currentframe().f_back _print('{}:{}'.format(compress(cf.f_code.co_filename), cf.f_lineno), '|',*args, **kwargs) def syslogprint(self, *args): cf = inspect.currentframe().f_back syslog.syslog(syslog.LOG_NOTICE, '{}:{}'.format(compress(cf.f_code.co_filename), cf.f_lineno) + '|' + ' '.join([str(x) for x in args]).replace('\n','\\n')) @property def LINE(self): cf = inspect.currentframe().f_back return compress(cf.f_code.co_filename) @property def FILE(self): cf = inspect.currentframe().f_back return cf.f_lineno There.__name__ = 'There' There = There('there', """ Simply a global object that act as undefined. """ ) There.__version__ = __version__ if sys.modules[__name__] is There: print('doing nothing') pass else: There.__file__ = sys.modules[__name__].__file__ sys.modules[__name__] = There PK곉Ih X)>>there-0.0.7.dist-info/LICENSEThe MIT License (MIT) Copyright (c) 2016 Matthias Bussonnier 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!HiWdthere-0.0.7.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q0343 /, (-JLR()*M ILR(4KM̫#DPK!HMKthere-0.0.7.dist-info/METADATATKnA)j7dG DD'Xz3'fv,P3Nv_fͿp>˟Ò)^o`8Oװ J1xeXk9}otRh: (>XCZ;W,mQ3F,,2Eŵ#%[ZP6 YF߷M*p&sbKXx:ӮQ8ٛn7 }ȣ^51o;S3,]λ,+Ss*Y =:cSRɐ,]>@ΨrvGD P NH9E1$ۋIWwU|mЕe_@Y&`V )TD%A orFz)wpDykINUZqDdܳ !69+qf7ѧFe,Prr<ǖ$ǯG*l&| 2ʨ$D>XA``qhGK?en8x)%tqv.RoQ&EL?!A8[ucSqMr\ȑMqCU ܱx UH-!D %))ű.&qn2s(5~v5<}N;6߱k3",1-y5PK!Hiithere-0.0.7.dist-info/RECORDu˒C@}X̢HE fE0])dY|b(֏zTxX;E'9o>< 4$m:N<Ȼ? zQv[r49udilu3w[-˝'7VL*ypP?1y@i8^tA Tk}e^4>ytqLZ:o)0q2fvYNCcMPK#?qK22there/__init__.pyPK곉Ih X)>>athere-0.0.7.dist-info/LICENSEPK!HiWd there-0.0.7.dist-info/WHEELPK!HMKj there-0.0.7.dist-info/METADATAPK!HiiAthere-0.0.7.dist-info/RECORDPKit