title: Python :- passing HTML form input to python code and execute it
body: <p>Hi i want to get input from html form and pass it to my python script and make it execute and then i want to print my result in browser without using any framework. below is my python code :</p>
  
  <pre><code>import re
  
  hap=['amused','beaming','blissful','blithe','cheerful','cheery','delighted']
  
  sad=['upset','out','sorry','not in mood','down']
  
  sad_count=0
  
  happy_count=0
  
  str1=raw_input("Enter Message...\n")
  
  happy_count=len(filter(lambda x:x in str1,hap)) 
  
  sad_count=len(filter(lambda x:x in str1,sad))
  
  if(happy_count&gt;sad_count):
  
          print("Hey buddy...your mood is HAPPY :-)")
  
  elif(sad_count&gt;happy_count):
  
              print("Ouch! Your Mood is Sad :-(")
  
  elif(happy_count==sad_count):
  
          if(happy_count&gt;0 and sad_count&gt;0):
  
              print("oops! You are in CONFUSED mood :o")
  
          else:
              print("Sorry,No mood found :&gt;")
  </code></pre>