__author__ = 'wanghuafeng'
from datetime import timedelta, datetime
yesterday = datetime.today() + timedelta(-1)
yesterday_format = yesterday.strftime('%Y_%m_%d')
print yesterday_format #2015_01_05
filepath = '/home/ferrero/cloudinn/data/%s/prebuilds/'%yesterday_format
filepath2 = yesterday.strftime(r'/home/ferrero/cloudinn/data/%Y_%m_%d/prebuilds/')
print filepath#/home/ferrero/cloudinn/data/2015_01_05/prebuilds/
print filepath2#/home/ferrero/cloudinn/data/2015_01_05/prebuilds/