autopath normalisation

Usa of autopath is sensible only for executables and
only when they are executed!
This commit does on of three options:
a) class/function definition only -> no autopath (few cases)
b) def main present but autopath import on top of module ->
importing autopath in main function instead (most cases)
c) if __name__=='__main__' clause missing  ->
introducing ifmain clause and moving import autopath
only under ifmain clause (few cases)
I see. Good!

Best regards,
Filip Jurcicek

-------------------------------------------------------
Work tel. (CZ): +420221914402
Personal tel. (CZ): +420777805048
Skype: bozskyfilip

http://ufal.mff.cuni.cz/filip-jurcicek
http://ufal.mff.cuni.cz/grants


On 12 November 2014 17:15, Ondrej Platek <notifications@github.com> wrote:

> In alex/tests/test_vio_vad_jasr_ftts.py:
>
> >  import multiprocessing
> >  import sys
> >  import time
> > -import argparse
>
> Similar reasons as autopath:
>
>    - argparse is used only when the module is used as executable is not
>    needed when the class or function definition are used (I may revert this if
>    you do not like it)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/UFAL-DSG/alex/pull/94/files#r20229327>.
>