I am surprised to see a module's code being executed *during* a compile
by "jythonc" (version 2.1). Though the attached example is bad
programing style, is it fundamentally required that a module's
executable code be contained within a "class", or "def" block?
=== a.py ===
import b # Yes, I deliberately put the import here.
=== b.py ===
value = 2+2
print "VALUE =", value
=== Output from "jythonc a.py", note the output "VALUE = 4" ===
VALUE = 4
Creating .java files:
Compiling .java to .class...
Compiling with args: ['/home/local/j2sdk1.4.2_06/bin/javac',
Thanks in advance!
Get latest updates about Open Source Projects, Conferences and News.