Skip to content

Handling with pyc files ignores standard python flags #41

@kreuzberger

Description

@kreuzberger

Hi!
During development we added the -B (DontWriteByteCode) and the environment variables for that to our execution.
PythonQt seems to ignore those flags in PythonQtImporter and writes/loads the pyc files directly.

I think the writing of pyc files NOT in pycache has historical py2 reasons, but could the flag be evaluated in PythonQtImporter?
There is a function to load with standard python loader in PythonQt.h, but i seems too different to the "reqular" parseFile Method
and is not referenced by the interface to evaluate it.

Could handling of this flag be integrated? Or a PythonQt specific Flag would be also ok? Second would be better to have "normal" python behaviour of writing cache files only for imported files/modules and not during call of evalFile

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions