title: How to run python inside an HTA application
body: <p>How do I run python inside an HTA application.</p>
  
  <p>OS = Windows 8.1</p>
  
  <p>Python = ActivePython-2.7.10.12-win64-x64</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;demo&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form name=fom1&gt;
  &lt;input type=button name=b1 value=add onclick=s1()&gt;&lt;br&gt;
  &lt;input type=button name=b2 value=add onclick=d1()&gt;&lt;br&gt;
  &lt;input type=button name=b3 value=add onclick=f1()&gt;&lt;br&gt;
  &lt;/form&gt;
  
  &lt;script language=vbscript&gt;
  sub s1
  msgbox "from vbscript"
  end sub
  &lt;/script&gt;
  
  &lt;script language=python&gt;
  alert("hi");
  
  def d1():
      alert("from python");
  
  &lt;/script&gt;
  
  &lt;script language=jscript&gt;
  function f1(){
      alert("from jscript");
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>That is my code for now. The vbscript and jscript works. But the python code does not seem to run. When I click on on b2 i get an error saying "the value of the property d1 is null or undefined."</p>