Opens the storage writer.

    Raises:
      IOError: if the storage writer is already opened.
      OSError: if the storage writer is already opened.
779589
def Open(self):
    
    if self._is_open:
      raise IOError('Storage writer already opened.')

    self._is_open = True

    self._first_written_event_source_index = len(self._event_sources)
    self._written_event_source_index = self._first_written_event_source_index
128549
def Serialize(self, writer):
        
        super(StorageItem, self).Serialize(writer)
        writer.WriteVarBytes(self.Value)
645188
def open(self, file, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None, closefd=True, opener=None):
        
        if opener is not None and sys.version_info < (3, 3):
            raise TypeError(
                "open() got an unexpected keyword argument 'opener'")
        fake_open = FakeFileOpen(self.filesystem, use_io=True)
        return fake_open(file, mode, buffering, encoding, errors,
                         newline, closefd, opener)
514653
def open(self):
        '''
        
        '''
        if self.__arch is not None:
            raise salt.exceptions.SaltException('Archive already opened.')
        self.__arch = tarfile.TarFile.bz2open(self.archive_path, 'w')
1132786
public function open()
    {
        if ($this->isOpen() === true) {
            $msg = "The MemoryStream is already open.";
            throw new MemoryStreamException($msg, $this, MemoryStreamException::ALREADY_OPEN);
        }

        $this->setOpen(true);
    }
989045
def _write(self, to_write):
        
        self._file.write(to_write.encode(self._encoding or
                                         self._default_encoding))
178563
def do_write(self, args):
        

        if not self.current:
            print('There are no resources in use. Use the command "open".')
            return

        try:
            self.current.write(args)
        except Exception as e:
            print(e)
1189433
def acquire_write(self):
        
        self.monitor.acquire()
        while self.rwlock != 0:
            self.writers_waiting += 1
            self.writers_ok.wait()
            self.writers_waiting -= 1
        self.rwlock = -1
        self.monitor.release()
1359769
def flush(self):
        '''
        '''
        with self._lock:
            if self._closed:
                raise IOError('Writer is closed')
            self._byte_queue.join()
            self._writer.flush()
747437
protected function openWriter()
    {
        if ($this->shouldAddBOM) {
            // Adds UTF-8 BOM for Unicode compatibility
            $this->globalFunctionsHelper->fputs($this->filePointer, EncodingHelper::BOM_UTF8);
        }
    }
1360362
public void openWrite()
  {
    TempCharBuffer ptr = _head;

    _head = null;
    _tail = null;

    TempCharBuffer.freeAll(ptr);
  }
1317679
def _open(self):
        
        if not hasattr(self, '_file'):
            self._file = self.gc.open(self.name)
            self.sheet_names = self._file.worksheets()
336928
def open(self):
        
        self.clearException()
        try:
            if self._isOpen:
                logger.warn("Resources already open. Closing them first before opening.")
                self._closeResources()
                self._isOpen = False

            assert not self._isOpen, "Sanity check failed: _isOpen should be false"
            logger.debug("Opening {}".format(self))
            self._openResources()
            self._isOpen = True

            if self.model:
                self.model.sigItemChanged.emit(self)
            else:
                logger.warning("Model not set yet: {}".format(self))

        except Exception as ex:
            if DEBUGGING:
                raise
            logger.exception("Error during tree item open: {}".format(ex))
            self.setException(ex)
1130693
public void writeOpen(Writer writer) throws IOException {
		writer.append(OPENPARENTHESIS).append(FUNCTION).append(SPACEOPTIONAL).append(PARENTHESIS).append(SPACEOPTIONAL)
				  .append(OPENBRACE).append(CR); // (function() {\n
		writer.append(TAB).append(USESTRICT).append(SEMICOLON).append(CR); // 'use strict';
	}
1063745
def open(self, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None):
        
        if mode != 'r' or buffering != -1 or encoding or errors or newline:
            raise NotImplementedError('Only the default open() ' +
                                      'arguments are supported')

        return self._accessor.open(self)
1192714
def try_opening_file(self):
        ''''''
        if os.path.isfile(self.path):
            self.file = open(self.path, 'r')
            self.file_is_opened = True
544163
def open(self):
        """"""
        url = self.url
        try:
            request = urllib.request.Request(url)
            handle = urllib.request.build_opener()
        except IOError:
            return None
        return (request, handle)