parameters: (self)
docstring: Lock the mailbox.
docstring_summary: Lock the mailbox.
docstring_tokens: Lock the mailbox .
function: def lock(self):
          """Lock the mailbox."""
          if not self._locked:
              self._file = open(os.path.join(self._path, '.mh_sequences'), 'rb+')
              _lock_file(self._file)
              self._locked = True
function_tokens: def lock ( self ) : if not self . _locked : self . _file = open ( os . path . join ( self . _path , '.mh_sequences' ) , 'rb+' ) _lock_file ( self . _file ) self . _locked = True