Beispiel #1
0
 def __call__(self, fname):
     """ Pops up the dialogs required for the import of the
         CSV to happen.
     """
     self.csv_loader = CSVLoader(filename=fname)
     self.csv_loader.guess_defaults()
     controller = CallbackCSVLoader(model=self.csv_loader,
                     callback=self.csv_loaded_callback)
     controller.edit_traits()
Beispiel #2
0
class CSVSourceFactory(HasTraits):
    """ Functor to load a CSV-like data from a file.
    """

    def csv_loaded_callback(self, object):
        """ 
        """
        self.data_source_wizard = DataSourceWizardView(
                data_sources=self.csv_loader.data_dict)
        self.data_source_wizard.edit_traits()


    def __call__(self, fname):
        """ Pops up the dialogs required for the import of the
            CSV to happen.
        """
        self.csv_loader = CSVLoader(filename=fname)
        self.csv_loader.guess_defaults()
        controller = CallbackCSVLoader(model=self.csv_loader,
                        callback=self.csv_loaded_callback)
        controller.edit_traits()