environment/lib/python2.7/site-packages/IPython/parallel/apps/baseapp.py
def write_pid_file(self, overwrite=False):
        """Create a .pid file in the pid_dir with my pid.

        This must be called after pre_construct, which sets `self.pid_dir`.
        This raises :exc:`PIDFileError` if the pid file exists already.
        """
        pid_file = os.path.join(self.profile_dir.pid_dir, self.name + u'.pid')
        if os.path.isfile(pid_file):
            pid = self.get_pid_from_file()
            if not overwrite:
                raise PIDFileError(
                    'The pid file [%s] already exists. \nThis could mean that this '
                    'server is already running with [pid=%s].' % (pid_file, pid)
                )
        with open(pid_file, 'w') as f:
            self.log.info("Creating pid file: %s" % pid_file)
            f.write(repr(os.getpid())+'\n')
def write_pid_file(self, overwrite=False):
        pid_file = os.path.join(self.profile_dir.pid_dir, self.name + u'.pid')
        if os.path.isfile(pid_file):
            pid = self.get_pid_from_file()
            if not overwrite:
                raise PIDFileError(
                    'The pid file [%s] already exists. \nThis could mean that this '
                    'server is already running with [pid=%s].' % (pid_file, pid)
                )
        with open(pid_file, 'w') as f:
            self.log.info("Creating pid file: %s" % pid_file)
            f.write(repr(os.getpid())+'\n')
def write_pid_file ( self , overwrite = False ) : pid_file = os . path . join ( self . profile_dir . pid_dir , self . name + u'.pid' ) if os . path . isfile ( pid_file ) : pid = self . get_pid_from_file ( ) if not overwrite : raise PIDFileError ( 'The pid file [%s] already exists. \nThis could mean that this ' 'server is already running with [pid=%s].' % ( pid_file , pid ) ) with open ( pid_file , 'w' ) as f : self . log . info ( "Creating pid file: %s" % pid_file ) f . write ( repr ( os . getpid ( ) ) + '\n' )
Create a .pid file in the pid_dir with my pid.

        This must be called after pre_construct, which sets `self.pid_dir`.
        This raises :exc:`PIDFileError` if the pid file exists already.
Create a . pid file in the pid_dir with my pid .