Quantcast
Channel: Linux.org.ru: Форум (тех. форум)
Viewing all articles
Browse latest Browse all 73911

Gentoo / Python / Pygments

$
0
0

У меня что-то с питоном - при попытке запуска ebuild/emerge/pip выползает usage модуля pygments.

$ >>> emerge -L
Pygments version 2.1.3, (c) 2006-2015 by Georg Brandl.

Lexers:
~~~~~~~

Запустил без параметров, жмакнул ctrl-c:

$ >>> pip3
^CTraceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/usr/lib64/python3.5/site-packages/pygments/cmdline.py", line 504, in main
    return main_inner(popts, args, usage)
  File "/usr/lib64/python3.5/site-packages/pygments/cmdline.py", line 374, in main_inner
    code = sys.stdin.buffer.read()
KeyboardInterrupt

$ >>> emerge -1 portage
Usage: /usr/bin/emerge [-l <lexer> | -g] [-F <filter>[:<options>]] [-f <formatter>]
          [-O <options>] [-P <option=value>] [-s] [-v] [-o <outfile>] [<infile>]

       /usr/bin/emerge -S <style> -f <formatter> [-a <arg>] [-O <options>] [-P <option=value>]
       /usr/bin/emerge -L [<which> ...]
       /usr/bin/emerge -N <filename>
       /usr/bin/emerge -H <type> <name>
       /usr/bin/emerge -h | -V

Highlight the input file and write the result to <outfile>.

If no input file is given, use stdin, if -o is not given, use stdout.

If -s is passed, lexing will be done in "streaming" mode, reading and
highlighting one line at a time.  This will only work properly with
...

. ... ещё куча текста из help

$ >>> cat /usr/bin/emerge
#!/usr/bin/python3.5

# -*- coding: utf-8 -*-
import re
import sys

from pygments.cmdline import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

Последнее законно? Зачем импортировать Main из стороннего модуля? И всё такое. Я, конечно, не то чтобы спец по portage, но выглядит это странно.

Помогите, пожалуйста. Гугл не помог.

 , ,


Viewing all articles
Browse latest Browse all 73911

Trending Articles