imagej / imagej-scripting

ImageJ-specific applications of the SciJava script languages
Other
25 stars 15 forks source link

Correct if __name__ == '__main__' #31

Closed LauLauThom closed 6 years ago

LauLauThom commented 6 years ago

Contrary to a normal python installation, __name__ is not always equal to __main__ but instead __builtin__. This workaround was reported here and there.

imagejan commented 6 years ago

Thanks @Jindil for the contribution. I wish we could have fixed https://github.com/scijava/scripting-jython/issues/9 instead of implementing this workaround, but at least this makes the template scripts functional again.

@m-entrup for the future, in order to keep the commit history clean, we can squash commits like these three here into a single one before merging.