Completely useless python file
The python (sort of) equivalence of the 'leave me alone box'.
Renames itself whenever imported or run.
import inspect, os
def go_away():
my_name = inspect.getfile(inspect.currentframe())
if my_name == 'go_away.py':
os.rename(my_name, 'leave_me_alone.py')
else:
os.rename(my_name, 'go_away.py')
go_away()
Written by Ting Zhou
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Fun
Authors
Related Tags
#fun
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#