下面的命令,可以使用 python compileall,并且排除一个子目录。
python -m compileall -x r"*/folder1*" /python-folder/
请问,如何排除 2 个子目录呢?谢谢。
python -m compileall -x r"*/folder1*" /python-folder/
请问,如何排除 2 个子目录呢?谢谢。
|
LatinOct 22, 2019
1
自己写 compile 脚本包装下
|
|
CookyOct 22, 2019 via Android
3
find,grep,xargs
|
|
4
@Latin 可以借用 compileall -x (regex)的吧?只是这个 regex 稍复杂点。
|
|
5
@ihidchaos 使用 compileall -x (regex) 应该是最简洁的吧?只是这个 regex 稍复杂点。
|
|
6
@Cooky 使用 compileall -x (regex) 应该是最简洁的吧?只是这个 regex 稍复杂点。
|
|
LatinOct 22, 2019
7
看来大家都是混淆成 pyc 啊 手动滑稽
|
|
8
@tinydebian https://docs.python.org/3.6/library/compileall.html
 |
|
9
@Latin 是啊,compileall 就是 byte-comile => .pyc 文件的。
有 2 个子目录,我想排除掉( skipped )。如果只是 skip 一个子目录 -x r"*/folder1*" 工作得非常好,但是我不知道怎么写这个 regex 来排除 2 个 或 3 个 子目录。 |