← 输入框|github.com|刷新
Skip to content

Intrepreter arguments #2688

Open

Description

@IsegrimDerGraue

Is there already any way to pass arguments to the embedded Interpreter / PythonEngine?
For example -B to avoid bytecode or -Xmodules_freeze=off to avoid frozen modules?

Py.SetArgv() and PythonEngine.Initialize() pass arguments to sys.argv, but in case of -B, bytecode is created anyway.

Best regards
Andreas

Activity

  1. filmor commented on Feb 19, 2026

    @filmor
    Member

    See https://docs.python.org/3.14/c-api/init_config.html.

    I commented on a similar issue here #2664 (comment).

    There is currently no implementation for any of the config APIs (PyPreConfig, PyConfig, PyInitConfig), any addition would be appreciated. The "FFI-friendly" one, PyInitConfig, is only available in Python 3.14, though (for which we really need to get the release out of the door... :/).

  2. IsegrimDerGraue commented on Feb 19, 2026

    @IsegrimDerGraue
    Author

    ah ... pity ...
    In case of -B the flag can be set in script. But i found no workaround for the frozen modules yet.
    Nevertheless ... thanks.

  3. added theissue type on Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions