On Thu, 8 Dec 2011, Bill Janssen wrote:
Andi Vajda <va...@apache.org> wrote:
It seems that adding, before if __name__ == '__main__':
from jcc import _jcc
works just fine on 2.7 and 2.6 as well.
Yes, this works on 2.5, as well.
Speaking of which, I don't see when __name__ would be == '__main__'. I tried
various combinations with pdb and __name__ is always == 'jcc'.
If that makes sense to you as well, I can change that block to just say:
from _jcc import initVM
I put a print statement in... When you invoke it with Python 2.5 as
"python -m jcc", __name__ is "__main__". That's what runs the code,
so I don't think you can remove it.
Ah ha. All right, then this change should work:
...
# used when jcc is invoked with -m from python 2.5
if __name__ == '__main__':
import jcc.__main__
from jcc import _jcc
from _jcc import initVM
...
Andi..