testing - trying fix doule import
[findit] / src / files / search.py
index 7e7c7f2..2d660b6 100755 (executable)
@@ -170,7 +170,7 @@ class Gtk_Presentation(object):
     def get_data(self):
         for btn in self.outtable_rbtn.get_group():
             if btn.get_active():
-                out = btn.get_name()
+                out = 'files.' + btn.get_name()
         return self.path_entry.get_text(), int(self.qty_spin.get_value()), out
 
     def get_stopit(self):
@@ -179,7 +179,11 @@ class Gtk_Presentation(object):
     #=== Output type selecting ================================================
     def show_out_toplevel(self, btn, outtype, results):
         print 'Entering <' + outtype + '> output mode...'
-        out_submodule = __import__('files.' + outtype, None, None, outtype)
+        try:
+            eval(outtype)
+        except:
+            print 'import ', outtype
+            out_submodule = __import__(outtype, None, None, outtype)
 
         try:
             self.current_outtoplevel.destroy()