readme file, help
authorTomas Musil <tomik.musil@gmail.com>
Sat, 7 Apr 2012 10:14:33 +0000 (12:14 +0200)
committerTomas Musil <tomik.musil@gmail.com>
Sat, 7 Apr 2012 10:14:33 +0000 (12:14 +0200)
README [new file with mode: 0644]
im_debug.py
imago.py

diff --git a/README b/README
new file mode 100644 (file)
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.
index 9b72ed3..44ee17c 100644 (file)
@@ -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':
 
 def show(image, caption=''):
     if image.mode != 'RGB':
index 6ab51a1..d234fec 100755 (executable)
--- a/imago.py
+++ b/imago.py
@@ -1,9 +1,19 @@
 #!/usr/bin/env python
 #!/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 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
 import im_debug
 import filter
 from hough import Hough