title: import urllib.parse fails when Python run from command line
body: <p>I have observed the following behavior in python 3.4.2, and I am unableto explain it. Hopefully someone could shed some light on the matter:</p>
  
  <p>In IPython:</p>
  
  <pre><code>In [129]: import urllib
  
  In [130]: print(urllib.parse)
  &lt;module 'urllib.parse' from '/Users/ashwin/.pyenv/versions/3.4.2/lib/python3.4/urllib/parse.py'&gt;
  </code></pre>
  
  <p>I've imported a module, and printed one of its attributes. Everything works as expected. So far, life is good.</p>
  
  <p>Now, I do the same thing from the command line:</p>
  
  <pre><code>$ python -c 'import urllib; print(urllib.parse)'  
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
  AttributeError: 'module' object has no attribute 'parse'
  </code></pre>
  
  <p>Say what?! that's not how that's supposed to work.<br>
  Ok, maybe this is a python-wide behavior; maybe modules are not immediately imported when using the <code>-c</code> flag. Let's try another module:</p>
  
  <pre><code>$ python -c 'import datetime; print(datetime.datetime)'
  &lt;class 'datetime.datetime'&gt;
  </code></pre>
  
  <p>What?! How does it work for <code>datetime</code> and not for <code>urllib</code>? I'm using the same version of python in both places (3.4.2)</p>
  
  <p>Does anyone have any thoughts on this?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Per one of the comments:</p>
  
  <pre><code>$ which -a ipython
  /Users/ashwin/.pyenv/shims/ipython
  /Library/Frameworks/Python.framework/Versions/2.7/bin/ipython
  /usr/local/bin/ipython
  /usr/local/bin/ipython
  </code></pre>
  
  <p>And</p>
  
  <pre><code>$ which -a python
  /Users/ashwin/.pyenv/shims/python
  /Library/Frameworks/Python.framework/Versions/2.7/bin/python
  /usr/bin/python
  /usr/bin/python
  </code></pre>