when a jython script runs for the first time, __file__ returns the source filename. while running the script another time, __file__ returns the name of the bytecode file. Shouldn't it return the sourcefilename all the time? Is there a parameter to change the behaviour? The behaviour seems to be changed with the update from V2.7.2 to V2.74.
Activity
jeff5 commentedon Dec 3, 2024
I don't observe this in tests.
If you import a module, then yes it makes a compiled file and reads it the second time, but so does CPython.
It may have changed since 2.7.2. We're always fixing things. :)
HahnloserR commentedon Dec 5, 2024
Sorry, you're absolutely right, I was talking about an imported module.
I helped myself by disabling the generation of bytecode.
Is there a significant difference in execution time using bytecode or not?
jeff5 commentedon Dec 6, 2024
I don't have any figures, and only the obvious to point out, that it does the compilation again.