parameters: (self, local, remote, **kwargs)
docstring: Pushes an object from the host to the gce instance.
  
      Args:
        local: Path on the host filesystem.
        remote: Path on the instance filesystem.
docstring_summary: Pushes an object from the host to the gce instance.
docstring_tokens: Pushes an object from the host to the gce instance .
function: def Push(self, local, remote, **kwargs):
      """Pushes an object from the host to the gce instance.
  
      Args:
        local: Path on the host filesystem.
        remote: Path on the instance filesystem.
      """
      adb_wrapper.VerifyLocalFileExists(local)
      if os.path.isdir(local):
        self.Shell('mkdir -p %s' % cmd_helper.SingleQuote(remote))
  
        # When the object to be pushed is a directory, adb merges the source dir
        # with the destination dir. So if local is a dir, just scp its contents.
        for f in os.listdir(local):
          self._PushObject(os.path.join(local, f), os.path.join(remote, f))
          self.Shell('chmod 777 %s' %
                     cmd_helper.SingleQuote(os.path.join(remote, f)))
      else:
        parent_dir = remote[0:remote.rfind('/')]
        if parent_dir:
          self.Shell('mkdir -p %s' % cmd_helper.SingleQuote(parent_dir))
        self._PushObject(local, remote)
        self.Shell('chmod 777 %s' % cmd_helper.SingleQuote(remote))
function_tokens: def Push ( self , local , remote , * * kwargs ) : adb_wrapper . VerifyLocalFileExists ( local ) if os . path . isdir ( local ) : self . Shell ( 'mkdir -p %s' % cmd_helper . SingleQuote ( remote ) ) # When the object to be pushed is a directory, adb merges the source dir # with the destination dir. So if local is a dir, just scp its contents. for f in os . listdir ( local ) : self . _PushObject ( os . path . join ( local , f ) , os . path . join ( remote , f ) ) self . Shell ( 'chmod 777 %s' % cmd_helper . SingleQuote ( os . path . join ( remote , f ) ) ) else : parent_dir = remote [ 0 : remote . rfind ( '/' ) ] if parent_dir : self . Shell ( 'mkdir -p %s' % cmd_helper . SingleQuote ( parent_dir ) ) self . _PushObject ( local , remote ) self . Shell ( 'chmod 777 %s' % cmd_helper . SingleQuote ( remote ) )