title: urllib.request and urllib2 both not working
body: <p>I am trying to learn Python and I was trying to learn modules. The Python version I am using is Python 2.7.4. The module I was trying to learn was urllib. But whenever I am trying to run the code below I am getting an error called 'no import named request'. The code is given below.</p>
  
  <pre><code>import urllib.request
  
  class App():
      def main(self):
          inp = raw_input('Please enter a string\n')
          print(inp)
          inp = input('Please enter a value\n')
          print(inp)
  
  if __name__ == '__main__':
      App().main()
  </code></pre>
  
  <p>Then I tried using urllib2. So I changed the first line with</p>
  
  <pre><code>import urllib2
  </code></pre>
  
  <p>But then it say 'IndentationError: expected an indented block'. But if I write </p>
  
  <pre><code>import urllib
  </code></pre>
  
  <p>then I don't get any error. But then I can't use any of the functions of that library.</p>