title: Python module import difference "string.maketrans"
body: <p>I have come across a strange python module import issue.</p>
  
  <p>When I trying to import the <a href="https://github.com/misja/python-boilerpipe" rel="nofollow">boilerpipe</a> module,</p>
  
  <pre><code>from boilerpipe.extract import Extractor
  </code></pre>
  
  <p>I got this exception:</p>
  
  <pre><code> Original exception was:
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/boilerpipe-1.2.0-py2.7.egg/boilerpipe/extract/        __init__.py", line 2, in &lt;module&gt;
      import urllib2
    File "/usr/lib/python2.7/urllib2.py", line 94, in &lt;module&gt;
      import httplib
    File "/usr/lib/python2.7/httplib.py", line 1140, in &lt;module&gt;
      import ssl
    File "/usr/lib/python2.7/ssl.py", line 58, in &lt;module&gt;
      import textwrap
        File "/usr/lib/python2.7/textwrap.py", line 40, in &lt;module&gt;
  class TextWrapper:
    File "/usr/lib/python2.7/textwrap.py", line 82, in TextWrapper
      whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
  AttributeError: 'module' object has no attribute 'maketrans'
  </code></pre>
  
  <p>I've searched over internet and saying that in Python 2.6 the 'str' module has been renamed to 'string' module. So this looks like some where in code library it didn't import "string" module properly.</p>
  
  <p><strong>Yet the really strange thing is,</strong> when I run the python code from <code>home</code> directory and run the same piece of code (either by using <code>python</code> shell or using <code>python pyfile.py</code>), it works fine! No more import error. </p>
  
  <p>So I'm bit confusing. Can anyone give me any hint?</p>
  
  <p>Thanks!</p>