From 15a3ebaaddc23a2f69048d1def5a7f960d141d6b Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Sat, 7 Apr 2012 12:14:33 +0200 Subject: [PATCH] readme file, help --- README | 7 +++++++ im_debug.py | 9 +++++++-- imago.py | 14 ++++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 README 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 -- 2.4.2