MOON
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
System: Linux vps.panamaemb.org.sg 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64
User: panama (500)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/root/usr/share/zsh/4.2.6/functions/_python
#compdef python

# Python 2.4

local curcontext="$curcontext" state line
typeset -A opt_args

_arguments -s -S \
  '(1 -)-c+[program passed in as string (terminates option list)]:python command:' \
  '-d[debug output from parser]' \
  '-E[ignore environment variables (such as PYTHONPATH)]' \
  '(1 * -)-h[display help information]' \
  '-i[inspect interactively after running script]' \
  '(1 * -)-m[run library module as a script (terminates option list)]:module:->modules' \
  '-O[optimize generated bytecode]' \
  '-OO[remove doc-strings in addition to the -O optimizations]' \
  '-Q+[division options]:division option:(old warn warnall new)' \
  "-S[don't imply 'import site' on initialization]" \
  '-t[issue warnings about inconsistent tab usage]' \
  '-tt[issue errors about inconsistent tab usage]' \
  '-u[unbuffered binary stdout and stderr]' \
  '-v[verbose (trace import statements)]' \
  '(1 * -)-V[display version information]' \
  '-W+[warning control]:warning filter (action:message:category:module:lineno):(default always ignore module once error)' \
  '-x[skip first line of source, allowing use of non-Unix forms of #!cmd]' \
  '(-)1:script file:_files -g "*.py(|c|o)(-.)"' \
  '*:script argument:_files' && return

if [[ "$state" = modules ]]; then
  local -a modules
  modules=(
    ${${=${(f)"$(_call_program modules $words[1] -c \
      'from\ pydoc\ import\ help\;\ help\(\"modules\"\)')"}[2,-3]}:#\(package\)}
  )
  _wanted modules expl module compadd -a modules
fi

return 1