I just started playing with Jython, and sometimes running jython on a .py file generates a .class file, but this doesn’t always happen.
At first I thought the trigger was that you had to define a Python class inside the .py file, but evidently a .class file is not always generated even then.
What is the mechanism that triggers the class file?
Thanks.
With regular Python,
.pycfiles are generated when youimporta module but not when it’s the__main__module.It is the same with Jython —
.classfiles are generated when youimporta Jython module.You can use
jythoncto manually compile a module.