vprof/base_profiler.py
def init_module(self, run_object):
        """Initializes profiler with a module."""
        self.profile = self.profile_module
        self._run_object, _, self._run_args = run_object.partition(' ')
        self._object_name = '%s (module)' % self._run_object
        self._globs = {
            '__file__': self._run_object,
            '__name__': '__main__',
            '__package__': None,
        }
        program_path = os.path.dirname(self._run_object)
        if sys.path[0] != program_path:
            sys.path.insert(0, program_path)
        self._replace_sysargs()
def init_module(self, run_object):
        self.profile = self.profile_module
        self._run_object, _, self._run_args = run_object.partition(' ')
        self._object_name = '%s (module)' % self._run_object
        self._globs = {
            '__file__': self._run_object,
            '__name__': '__main__',
            '__package__': None,
        }
        program_path = os.path.dirname(self._run_object)
        if sys.path[0] != program_path:
            sys.path.insert(0, program_path)
        self._replace_sysargs()
def init_module ( self , run_object ) : self . profile = self . profile_module self . _run_object , _ , self . _run_args = run_object . partition ( ' ' ) self . _object_name = '%s (module)' % self . _run_object self . _globs = { '__file__' : self . _run_object , '__name__' : '__main__' , '__package__' : None , } program_path = os . path . dirname ( self . _run_object ) if sys . path [ 0 ] != program_path : sys . path . insert ( 0 , program_path ) self . _replace_sysargs ( )
Initializes profiler with a module.
Initializes profiler with a module .