A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| #!/usr/bin/env bash | |
| mkdir spider | |
| cd spider/ | |
| yum update -y | |
| # install pip on centos6 | |
| rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| yum install -y python-pip | |
| # install wget | |
| yum install -y wget |
| #/usr/bin/env python | |
| # coding=utf-8 | |
| import random | |
| import re | |
| def color(messages): | |
| color = '\x1B[%d;%dm' % (1,random.randint(30,37)) | |
| return '%s %s\x1B[0m' % (color,messages) |