Skip to content

Instantly share code, notes, and snippets.

@dogrdon
Last active February 25, 2016 16:46
Show Gist options
  • Save dogrdon/1801b8ba0fbe0c54b11b to your computer and use it in GitHub Desktop.
Save dogrdon/1801b8ba0fbe0c54b11b to your computer and use it in GitHub Desktop.
Handy commandline tool for providing the essential business analytics necessary to determine the outcome of using regular expressions as a potential solution.
import sys
import time
if len(sys.argv) < 2:
print("You need to tell me how many problems you have for which you are trying to apply regex as a solution")
print("run script as `python addregex.py <no. of problems>`")
sys.exit()
problems = int(sys.argv[1])
def whynotregex(problems_sum):
print("You had %s problem(s) before adding regex into the mix" % (str(problems_sum)))
problems_sum += 1
print("Computing analytics...")
time.sleep(3)
print("Now you have %s problems" % (str(problems_sum)))
time.sleep(1)
print("While it is possible that a glitch isn't one,")
time.sleep(1)
print("I still feel bad for you...")
time.sleep(2)
print("...son")
if __name__ == '__main__':
whynotregex(problems)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment