Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
include ../py/mkenv.mk | |
-include mpconfigport.mk | |
# define main target | |
PROG = micropython | |
# qstr definitions (must come before including py.mk) | |
QSTR_DEFS = qstrdefsport.h | |
# OS name, for simple autoconfig |
var re = /^(\d{4})[-\/\.]{0,1}(?:(?:(11|0?[469])[-\/\.]?([12]\d|30|0?[1-9]))|(?:(1[02]|0?[13578])[-\/\.]{0,1}([1-2]\d|3[01]|0?[1-9]))|(?:(0?2)[-\/\.]{0,1}(2[1-9]|1\d|0?[1-9])))$/; | |
// test | |
[ | |
// valid dates | |
'2012-4-21', | |
'2012-04-21', | |
'2012-5-1', | |
'2012-05-31', | |
'2012-11-21', |
#!/usr/bin/python | |
#codeing:utf-8 | |
import os | |
from optparse import OptionParser | |
if __name__ == "__main__": | |
usage = "usage: %prog [options] arg" | |
parser = OptionParser(usage) |
# File: mp3_tag.py | |
# | |
# Description: This module provides MP3 tags correction, i.e. from | |
# any encoding X to UTF-8, the standard across different apps | |
# and platforms. The default parameters target the common Chinese | |
# encoding GBK. | |
# | |
# Features: 1. it recursively handles MP3 files > 512KB in all subdirectories. | |
# 2. outputs a log formatted to show the directory structure | |
# with failures (decoding/encoding error, the field will be |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
import logging | |
log = logging.getLogger(__name__) | |
from functools import wraps | |
from flask import session, request, g | |
from flaskext.principal import Principal as RealPrincipal, identity_loaded, Identity, AnonymousIdentity | |
__all__ = ['Principal'] |