environment/lib/python2.7/site-packages/IPython/core/shellapp.py
def _run_cmd_line_code(self):
        """Run code or file specified at the command-line"""
        if self.code_to_run:
            line = self.code_to_run
            try:
                self.log.info("Running code given at command line (c=): %s" %
                              line)
                self.shell.run_cell(line, store_history=False)
            except:
                self.log.warn("Error in executing line in user namespace: %s" %
                              line)
                self.shell.showtraceback()

        # Like Python itself, ignore the second if the first of these is present
        elif self.file_to_run:
            fname = self.file_to_run
            try:
                self._exec_file(fname)
            except:
                self.log.warn("Error in executing file in user namespace: %s" %
                              fname)
                self.shell.showtraceback()
def _run_cmd_line_code(self):
        if self.code_to_run:
            line = self.code_to_run
            try:
                self.log.info("Running code given at command line (c=): %s" %
                              line)
                self.shell.run_cell(line, store_history=False)
            except:
                self.log.warn("Error in executing line in user namespace: %s" %
                              line)
                self.shell.showtraceback()

        # Like Python itself, ignore the second if the first of these is present
        elif self.file_to_run:
            fname = self.file_to_run
            try:
                self._exec_file(fname)
            except:
                self.log.warn("Error in executing file in user namespace: %s" %
                              fname)
                self.shell.showtraceback()
def _run_cmd_line_code ( self ) : if self . code_to_run : line = self . code_to_run try : self . log . info ( "Running code given at command line (c=): %s" % line ) self . shell . run_cell ( line , store_history = False ) except : self . log . warn ( "Error in executing line in user namespace: %s" % line ) self . shell . showtraceback ( ) # Like Python itself, ignore the second if the first of these is present elif self . file_to_run : fname = self . file_to_run try : self . _exec_file ( fname ) except : self . log . warn ( "Error in executing file in user namespace: %s" % fname ) self . shell . showtraceback ( )
Run code or file specified at the command-line
Run code or file specified at the command - line