#!/usr/bin/env python
import os
import sys
import traceback

try:
  with open(os.environ.get('CRAFTFILE', os.path.join(os.getcwd(), 'crafty.py'))) as f:
    try:
      exec(f.read()+'\nfrom craft.crafty import run\nrun()')
    except Exception, e:
      print(traceback.print_exc())
except IOError as e:
  print("\nERR: Cannot find a crafty.py file")

