(self, name)
return self._current_file_data
Start writing a named file to the package.

    Args:
      name: (str) path which will identify the contents in the archive.

    Returns:
      A file-like object to write the contents to.
Start writing a named file to the package.
Start writing a named file to the package .
def StartFile(self, name):
    """Start writing a named file to the package.

    Args:
      name: (str) path which will identify the contents in the archive.

    Returns:
      A file-like object to write the contents to.
    """
    self.EndFile()
    self._current_file_data = StringIO.StringIO()
    name = '%s%s' % (self._file_path_prefix, name)
    # Let this explode if the name is not ascii.
    self._current_file_name = name.encode('ascii')
    self.CreateDirectory(os.path.dirname(self._current_file_name))
    return self._current_file_data
def StartFile ( self , name ) : self . EndFile ( ) self . _current_file_data = StringIO . StringIO ( ) name = '%s%s' % ( self . _file_path_prefix , name ) # Let this explode if the name is not ascii. self . _current_file_name = name . encode ( 'ascii' ) self . CreateDirectory ( os . path . dirname ( self . _current_file_name ) ) return self . _current_file_data