title: Simple Launchd to run python script
body: <p>I'm running this every minute to debug and it keeps returning with <code>com.apple.xpc.launchd[1] (com.me.DesktopChanger[16390]): Service exited with abnormal code: 2</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;Label&lt;/key&gt;
      &lt;!-- The label should be the same as the filename without the extension --&gt;
      &lt;string&gt;com.me.DesktopChanger&lt;/string&gt;
      &lt;!-- Specify how to run your program here --&gt;
      &lt;key&gt;ProgramArguments&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;/usr/bin/python&lt;/string&gt;
          &lt;string&gt;~/Library/Application\ Support/DesktopChanger/DesktopChanger.py&lt;/string&gt;
      &lt;/array&gt;
  
          &lt;key&gt;StartInterval&lt;/key&gt;
          &lt;integer&gt;60&lt;/integer&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>The launchd script is called: <code>com.me.DesktopChanger.plist</code></p>
  
  <p>The python script is located at: <code>/Users/Tom/Library/Application Support/DesktopChanger/DesktopChanger.py</code></p>
  
  <p>and <code>which python</code> returns: <code>/usr/bin/python</code> </p>
  
  <p>running <code>ls -l</code> also returns:</p>
  
  <p><code>-rw-r--r--@ 1 Tom  staff  623  6 Feb 13:40 com.me.DesktopChanger.plist</code></p>
  
  <p>and the python script with <code>ls -l</code> shows:</p>
  
  <p><code>-rwxr-xr-x@  1 Tom  staff   672  2 Dec 14:24 DesktopChanger.py</code></p>