Variable: tramp-python-id
tramp-python-id is a variable defined in tramp-sh.el.gz.
Value
"%y -c '\nimport os, pwd, grp;\n\ndef idform(id):\n return \"{:d}({:s})\".format(id, grp.getgrgid(id)[0]);\n\nuid = os.getuid();\nuser = pwd.getpwuid(uid)[0];\ngid = os.getgid();\ngroup = grp.getgrgid(gid)[0]\ngroups = map(idform, os.getgrouplist(user, gid));\n\nprint(\"uid={:d}({:s}) gid={:d}({:s}) groups={:s}\"\n .format(uid, user, gid, group, \",\".join(groups)));' %n"
Documentation
Python script printing id output.
Format specifiers are replaced by tramp-expand-script, percent
characters need to be doubled.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defconst tramp-python-id
"%y -c '
import os, pwd, grp;
def idform(id):
return \"{:d}({:s})\".format(id, grp.getgrgid(id)[0]);
uid = os.getuid();
user = pwd.getpwuid(uid)[0];
gid = os.getgid();
group = grp.getgrgid(gid)[0]
groups = map(idform, os.getgrouplist(user, gid));
print(\"uid={:d}({:s}) gid={:d}({:s}) groups={:s}\"
.format(uid, user, gid, group, \",\".join(groups)));' %n"
"Python script printing `id' output.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")