Function: tramp-get-remote-uid-with-python

tramp-get-remote-uid-with-python is a byte-compiled function defined in tramp-sh.el.gz.

Signature

(tramp-get-remote-uid-with-python VEC ID-FORMAT)

Documentation

Implement tramp-get-remote-uid for Tramp files using python.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defun tramp-get-remote-uid-with-python (vec id-format)
  "Implement `tramp-get-remote-uid' for Tramp files using `python'."
  (tramp-send-command-and-read
   vec
   (format "%s -c \"%s\""
	   (tramp-get-remote-python vec)
	   (if (equal id-format 'integer)
	       "import os; print (os.getuid())"
    "import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"')"))))