Some time ago, a dear friend of mine came up to me and asked about the Python module binascii – particularly about the methods hexlify() and unhexlify(). Since he asked for it, I’m going to share my answer publicly with you.

First of all, I’m defining the used nomenclature:

  • ASCII characters are being written in single quotes
    • decimal numbers are of the type Long with a L suffix
    • hex values have a x prefix

First, let me quote the documentation:

binascii.b2a_hex(data) binascii.hexlify(data) Return the hexadecimal representation of the binary data. Every byte of data is converted into the corresponding 2-digit hex representation. The resulting string is...

Update: This is a re-post of an older blog post of mine. Originally it was posted on my personal blog where it has >130 comments and ~ 250'000 views over the last years. I'm deprecating my personal blog in favor of this 200OK blog.

Finding the perfect IDE for Python isn’t an easy feat. There are a great many to chose from, but even though some of them offer really nifty features, I can’t help myself but feel attracted to VIM anyway. I feel that no IDE accomplishes the task of giving the comfort of complete power over the code...

  • vim
  • coding
  • ctags
  • exuberant ctags
  • ide
  • minibuf
  • omni completion
  • pep 8
  • programming
  • python
  • python ide
  • taglist
  • tasklist
  • tutorial
  • vi
  • vimpdb
  • walkthrough

Update: This is a re-post of an older blog post of mine. Originally it was posted on my personal blog where it has ~40 comments and >35'000 views over the last years. I'm deprecating my personal blog in favor of this 200OK blog.

In this short tutorial, I’m going to show you how to scrape a website with the 3rd party html-parsing module BeautifulSoup in a practical example. We will search the wonderful translation engine dict.cc , which holds the key to over 700k translations from English to German and vice versa. Note that BeautifulSoup...

  • python
  • beautifulsoup
  • howto
  • scraping
  • tutorial
  • web scraping
  • webscraping