Python: How to open files in external programs?
<p>I'm wondering how to open files in programs such as notepad and picture viewer depending on the extension the file has.</p>

<p>I've done some research and people have mentioned a module named Image but when i try and import this module i get an ImportError.</p>

<p>Heres what I have so far:</p>

<pre><code>def openFile():
    fileName = listbox_1.get(ACTIVE)
    if fileName.endswith(".jpg"):
        fileName.open()
</code></pre>

<p>I will also have htmp and json files that i will need to open in notepad.</p>

<p>thanks in advance and hope its clear</p>

<p>EDIT: using python 3.3 on windows</p>
