From: Tomas Musil Date: Sat, 7 Apr 2012 10:14:33 +0000 (+0200) Subject: readme file, help X-Git-Url: http://git.tomasm.cz/imago.git/commitdiff_plain/15a3ebaaddc23a2f69048d1def5a7f960d141d6b?hp=8d05ccd11445ae069ae14dfb95d566907546e989 readme file, help --- diff --git a/README b/README new file mode 100644 index 0000000..349fdb6 --- /dev/null +++ b/README @@ -0,0 +1,7 @@ +Requirements: +Python 2.7 or 2.6 +PIL +pygame + +Usage: +Run "imago.py --help" for help and usage examples. diff --git a/im_debug.py b/im_debug.py index 9b72ed3..44ee17c 100644 --- a/im_debug.py +++ b/im_debug.py @@ -1,5 +1,10 @@ -import pygame -import Image +try: + import pygame + import Image +except ImportError, msg: + import sys + print >>sys.stderr, msg + sys.exit(1) def show(image, caption=''): if image.mode != 'RGB': diff --git a/imago.py b/imago.py index 6ab51a1..d234fec 100755 --- a/imago.py +++ b/imago.py @@ -1,9 +1,19 @@ #!/usr/bin/env python -"""Usage: imago.py file""" + +"""Usage: imago.py file + analyses the given file + imago.py file --debug + shows every step of the computation + imago.py --help + shows this help""" import sys import math -import Image, ImageDraw +try: + import Image, ImageDraw +except ImportError, msg: + print >>sys.stderr, msg + sys.exit(1) import im_debug import filter from hough import Hough