title: Python script imported from another module
body: <p>I have a <code>mymodyle.py</code> module that contains a function called <code>main</code>:</p>
  <pre><code>def main(event):
      parser = Parse(event)
      parsed_event = parser.parse()
      return parsed_event
  
  if __name__ == '__main__':
      event = &quot;ABCD&quot;
      main(event)
  </code></pre>
  <p>This function will be called from another module:</p>
  <pre><code>import mymodule
  </code></pre>
  <p>And the <code>main</code> function will be called via <code>mymodule.main(event)</code> - it will pass the event as an argument to main function of <code>mymodule</code> module.</p>
  <p>If I run it from another module, do I need to add the dunder at the end because it won't be called anyway :</p>
  <pre><code>if __name__ == '__main__':
          event = &quot;ABCD&quot;
          main(event)
  </code></pre>
  <p>Another question: Do I need to add the <code>else</code> given that it will be called from another module?</p>
  <pre><code>if __name__ == '__main__':
              event = &quot;ABCD&quot;
              main(event)
  else:
      //DO SOMETHING
  </code></pre>