title: Can't run Python macro in LibreOffice
body: <p>I'm trying to learn to write macros for LibreOffice in Python. I made simple macro, put in into <code>~/.config/libreoffice/4/user/Scripts/python/</code> and found it in <strong>Tools/Macros/Organize Macros/Python.../My Macros</strong>. So far all works as expected, macro is visible.  </p>
  
  <p>But when I click on it, the <strong>Run</strong> button stays grayed out. I cannot run it. Does anyone know what might be the cause?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: File is executable, I set the rights to 777 just to be sure. Python code is valid.</p>
  
  <p>EDIT2: I reinstalled LibreOffice and it works now. Probably was something wrong with my installation. Script file in <code>~/.config/libreoffice/4/user/Scripts/python/</code> set as executable works. And @ngulam examples worked even before reinstall.  </p>
  
  <p>Thanks for all the advice you've given me and have a good day.</p>