I was also thinking to add a sys argument when invoking script and check it.
My motive is "I will give scripts to somebody else and he should not run the script directly without running the parent script". -- https://mail.python.org/mailman/listinfo/python-list