Skip to content

Instantly share code, notes, and snippets.

current_datetime = datetime.datetime.now(ustimezones.pacific()) # What time is it in California?
delta = str(current_datetime.replace(tzinfo=None) - date_time)
import os, sys
from time import gmtime, strftime
from stat import *
def walktree(top, callback):
for f in os.listdir(top):
pathname = os.path.join(top, f)
mode = os.stat(pathname)[ST_MODE]
if S_ISDIR(mode):
# It's a directory, recurse into it