Index: fact/tools/pyscripts/new_pyfact/pyfact.py
===================================================================
--- fact/tools/pyscripts/new_pyfact/pyfact.py	(revision 17801)
+++ fact/tools/pyscripts/new_pyfact/pyfact.py	(revision 17802)
@@ -5,4 +5,5 @@
 #
 import os
+import sys
 import ctypes
 from ctypes import *
@@ -13,14 +14,29 @@
 import ROOT
 hostname = ROOT.gSystem.HostName()
-if 'isdc' in hostname:
-    ROOT.gSystem.Load("/usr/lib64/libz.so")
-elif ('neiseLenovo' in hostname or 'factcontrol' in hostname):
-    ROOT.gSystem.Load("/usr/lib/libz.so")
-elif ("max-K50AB" in hostname or "watz" in hostname):
-    ROOT.gSystem.Load("/usr/lib/x86_64-linux-gnu/libz.so")
-elif ("grolsch" in hostname):
-    ROOT.gSystem.Load("/usr/lib/i386-linux-gnu/libz.so")
-else:
-    print "Error,Warning,Whatever libz stuff makes me crazy."
+
+libz_path_dict = {
+    # hostname  :   /path/to/libz.so
+    'isdc'          : "/usr/lib64/libz.so",
+    'neiseLenovo'   : "/usr/lib/libz.so",
+    'factcontrol'   : "/usr/lib/libz.so",
+    "max-K50AB"     : "/usr/lib/x86_64-linux-gnu/libz.so",
+    "watz"          : "/usr/lib/x86_64-linux-gnu/libz.so",
+    "grolsch"       : "/usr/lib/i386-linux-gnu/libz.so",
+}
+libz_loaded = False
+for my_hostname in libz_path_dict:
+    if my_hostname in hostname:
+        ROOT.gSystem.Load(libz_path_dict[my_hostname])
+        libz_loaded = True
+if not libz_loaded:
+    print """Warning - Warning - Warning - Warning - Warning - Warning - Warning
+    I most probably need to load libz.so but I don't know where it is.
+    
+    Please edit pyfact.py around line 16-24 and insert your hostname and your
+    path to your libz.so 
+    Sorry for the inconvenience.
+    """
+    sys.exit(-1)
+
     
 root_make_string = ROOT.gSystem.GetMakeSharedLib()
@@ -174,14 +190,24 @@
 if __name__ == '__main__':
     """ tests  """
-    import sys
-    if len(sys.argv) == 2:
-        print "Example for aux-file or uncalibrated raw-file"
-        f = Fits(sys.argv[1])
-    elif len(sys.argv) == 3:
-        print "Example for calibrated raw-file"
-        f = RawData(sys.argv[1], sys.argv[2])
-    else:
-        f = None 
-        
+    if len(sys.argv) < 3:
+        print """ Usage:
+        ----------------------------------------------------------------------
+        To just build the shared object libs call:
+        python pyfact.py
+        
+        To build (if necessary) and open an example file
+        python -i pyfact.py /path/to/data_file.zfits /path/to/calib_file.drs.fits.gz
+        
+        Any of the 3 file 'types': fits.gz    zfits    fits
+        should be supported.
+        
+        To clean all of automatically built files, do something like:
+        rm *.so *.d AutoDict_* extern_Mars_mcore/*.so extern_Mars_mcore/*.d
+        ----------------------------------------------------------------------
+        """
+        sys.exit(1)
+    print "Example for calibrated raw-file"
+    f = RawData(sys.argv[1], sys.argv[2])
+    
     print "number of events:", f.header['NAXIS2']
     print "date of observation:", f.header['DATE']
@@ -204,13 +230,13 @@
     print "Event Id:", f.cols['EventNum']
     
-    if len(sys.argv) == 3:
-        import matplotlib.pyplot as plt
-        plt.ion()
-        for i in range(f.header['NPIX']):
-            plt.cla()
-            plt.plot(f.cols['CalibData2D'][i], '.:', label='pixel %d'%i)
-            plt.legend()
-            answer = raw_input('anykey for next pixel; "q" to quit. :')
-            if 'q' in answer.lower():
-                break
-    
+    import matplotlib.pyplot as plt
+    plt.ion()
+    for i in range(f.header['NPIX']):
+        plt.cla()
+        plt.title("Event %d"%(f.cols['EventNum']))
+        plt.plot(f.cols['CalibData2D'][i], '.:', label='pixel %d'%i)
+        plt.legend()
+        answer = raw_input('anykey for next pixel; "q" to quit. :')
+        if 'q' in answer.lower():
+            break
+
