view bin/tomfoolery @ 6708:b8adb88a0f8e

<zgrep> ` echo \'t="tmflry"\' >> bin/tomfoolery
author HackBot
date Wed, 10 Feb 2016 02:56:51 +0000
parents 2dd82f6f2ed9
children 368451421035
line wrap: on
line source

#!/usr/bin/env python
import os as o,sys as s,subprocess as u
if len(s.argv) != 2:print"I have nothing to say to you.";exit()
if not o.path.isdir(t):print"Somebody should take a peek inside me.";exit()
if o.access(a, o.X_OK):print u.check_output([bash,a]),;exit()
a=s.argv[1];o.chdir(t)
with open(a,r)as f:print f.read(),
if not o.path.isfile(a):print u.check_output(["?",a]),;exit()
t="tmflry"