From dc7614b0aa2a882612af608a40c327f5d46f19cd Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Fri, 11 Mar 2016 10:01:24 +0100 Subject: [PATCH] Moved the main script to function 'main()' --- python/converters/plovasp/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/converters/plovasp/main.py b/python/converters/plovasp/main.py index 21511833..345de7fc 100644 --- a/python/converters/plovasp/main.py +++ b/python/converters/plovasp/main.py @@ -62,7 +62,7 @@ def generate_and_output_as_text(conf_filename, vasp_dir): pshells, pgroups = generate_plo(pars, el_struct) output_as_text(pars, el_struct, pshells, pgroups) -if __name__ == '__main__': +def main(): narg = len(sys.argv) if narg < 2: raise SystemExit(" Usage: python main.py []") @@ -77,3 +77,5 @@ if __name__ == '__main__': generate_and_output_as_text(filename, vasp_dir) +if __name__ == '__main__': + main()