Reputation: 1447
I'm compiling some python codes with python2
(Python 2.7.6). I am using the following command:
python2 -m compileall $DIRETORIO$FONTE
But it is outputing the message below every time I compile my code:
Compiling Python/File.py ...
How can I disable this message? Is it possible?
Upvotes: 0
Views: 125
Reputation: 1123620
Yes, with the -q
switch. From the -h
command-line help option for the compileall
script:
-q: output only error messages
or from the module documentation:
-q
Do not print the list of files compiled, print only error messages.
Applying that to your command line:
python2 -m compileall -q $DIRETORIO$FONTE
This still will output error messages. On Python 3, you can specify -q
twice (use -q -q
or -qq
) to suppress all output.
Upvotes: 1
Reputation: 1447
From compileall — Byte-compile Python librarie (or typing python -m compileall --help
):
-q
Do not print the list of files compiled, print only error messages.
The -q
has to be written after compileall
keyword. Code above can be update as follows:
python2 -m compileall -q $DIRETORIO$FONTE
Upvotes: 0