title: In Python, how to begin with chardet module?
body: <p>I would like to try some code that uses the <strong>chardet module</strong>.
  This is the code i have found on the web :</p>
  
  <pre><code>import urllib2
  import chardet
  
  def fetch(url):
  try:
     result = urllib2.urlopen(url)
     rawdata = result.read()
     encoding = chardet.detect(rawdata)
     return rawdata.decode(encoding['encoding'])
  
  except urllib2.URLError, e:
     handleError(e)
  </code></pre>
  
  <p>But to try this code, i have to get the chardet module :
  But, i have two choices :
  <a href="https://pypi.python.org/pypi/chardet#downloads" rel="nofollow">https://pypi.python.org/pypi/chardet#downloads</a></p>
  
  <ul>
  <li>chardet-2.2.1-py2.py3-none-any.whl (md5)  Python Wheel    </li>
  <li>chardet-2.2.1.tar.gz (md5)     Python source</li>
  </ul>
  
  <p>I have chosen the Python Wheel and put this file in my Python27 directory.
  But still does not work.</p>
  
  <p>So my problems are : 
  - which type of chardet file to download + where to put this file for Python not to print this error :
  <em>Traceback (most recent call last):
    File "C:/Python27/s7/test5.py", line 2, in 
      import chardet
  ImportError: No module named chardet</em></p>
  
  <p>Note :(I'm on Python 2.7)</p>
  
  <p>Thanks in advance for any help or suggestions ! :D</p>
  
  <p>EDIT 1 : Sorry for being a very beginner, but in fact it is the python source that must be chosen!
  Especially, installing with setup.py, but it does not work to me !
  I opened the Windows command and wrote the path to the chardet-2.2.1(unzipped) , and then i wrote : python setup.py install, but it does not work ...:S</p>
  
  <p>I think it's better to open a new subject.</p>