def load(self, *filenames): """Load our hotshot dataset (iteratively)""" try: self.SetModel(pstatsloader.PStatsLoader(*filenames)) except (IOError, OSError, ValueError), err: self.SetStatusText( _('Failure during load of %(filenames)s: %(err)s') % dict(filenames=" ".join([repr(x) for x in filenames]), err=err))
def load(self, *filenames): """Load our hotshot dataset (iteratively)""" try: self.SetModel(pstatsloader.PStatsLoader(*filenames)) self.SetTitle( _("Run Snake Run: %(filenames)s") % {'filenames': ', '.join(filenames)[:120]}) except (IOError, OSError, ValueError, MemoryError), err: self.SetStatusText( _('Failure during load of %(filenames)s: %(err)s') % dict(filenames=" ".join([repr(x) for x in filenames]), err=err))
def load(self, *filenames): """Load our dataset (iteratively)""" if len(filenames) == 1: if os.path.basename(filenames[0]) == 'index.coldshot': return self.load_coldshot(os.path.dirname(filenames[0])) elif os.path.isdir(filenames[0]): return self.load_coldshot(filenames[0]) try: self.loader = pstatsloader.PStatsLoader(*filenames) self.ConfigureViewTypeChoices() self.SetModel(self.loader) self.viewType = self.loader.ROOTS[0] self.SetTitle( _("Run Snake Run: %(filenames)s") % {'filenames': ', '.join(filenames)[:120]}) except (IOError, OSError, ValueError, MemoryError) as err: self.SetStatusText( _('Failure during load of %(filenames)s: %(err)s') % dict(filenames=" ".join([repr(x) for x in filenames]), err=err))