Changing the directory where .pyc files are created

后端 未结 4 1976
天涯浪人
天涯浪人 2020-12-08 19:05

Is there a way to change the directory where .pyc file are created by the Python interpreter? I saw two PEPs about that subject (0304 and 3147), but none seems

4条回答
  •  忘掉有多难
    2020-12-08 19:36

    This might be useful for some: Miscellaneous options, especially -B option:

    If given, Python won’t try to write .pyc files on the import of source modules. See also PYTHONDONTWRITEBYTECODE.

提交回复
热议问题