How to get Bundle ID of MAC application?
<p>I want to use Python and <code>atomac</code> module to trigger an application in MAC OS like following scripts:</p>

<pre><code>atomac.launchAppByBundleID()
app_win = atomac.getAppRefByBundleId(app_bundle_ID)
</code></pre>

<p>But I don't know how to get the Bundle ID (<code>app_bundle_ID</code>) of the application.</p>

<p>I use two methods to get the bundler ID:</p>

<pre><code>osascript -e 'id of app "SomeApp"'
</code></pre>

<p>and</p>

<pre><code>mdls -name kMDItemCFBundleIdentifier -r SomeApp.app
</code></pre>

python osx ui-automation