title: Conditional import of modules in Python
body: <p>In my program I want to import simplejson or json based on whether the OS the user is on is Windows or Linux. I take the OS name as input from the user. Now, is it correct to do the following?</p>
  
  <pre><code>osys = raw_input("Press w for windows,l for linux")
  if (osys == "w"):
      import json as simplejson
  else:
      import simplejson  
  </code></pre>