vi:si:et:sw=4:sts=4:ts=4
This commit is contained in:
parent
dafe20aa04
commit
4a6e2702b4
11 changed files with 921 additions and 921 deletions
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# 2008
|
# 2008
|
||||||
|
|
||||||
from hashes import *
|
from hashes import *
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# 2008
|
# 2008
|
||||||
import gzip
|
import gzip
|
||||||
import StringIO
|
import StringIO
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import math
|
import math
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ def floatValue(strValue, default=''):
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def test_floatValue():
|
def test_floatValue():
|
||||||
print "floatValue"
|
|
||||||
assert floatValue('abc23.4') == '23.4'
|
assert floatValue('abc23.4') == '23.4'
|
||||||
assert floatValue(' abc23.4') == '23.4'
|
assert floatValue(' abc23.4') == '23.4'
|
||||||
assert floatValue(' abc') == ''
|
assert floatValue(' abc') == ''
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL written 2008 by j@pad.ma
|
# GPL written 2008 by j@pad.ma
|
||||||
import sha
|
import sha
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL written 2008 by j@pad.ma
|
# GPL written 2008 by j@pad.ma
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
|
|
||||||
|
|
||||||
_iso639_languages = [
|
_iso639_languages = [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import gzip
|
import gzip
|
||||||
import StringIO
|
import StringIO
|
||||||
import urllib
|
import urllib
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- Mode: Python; -*-
|
# -*- Mode: Python; -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import re
|
import re
|
||||||
|
|
||||||
_articles = ('the', 'la', 'a', 'die', 'der', 'le', 'el',
|
_articles = ('the', 'la', 'a', 'die', 'der', 'le', 'el',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL written 2008 by j@pad.ma
|
# GPL written 2008 by j@pad.ma
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -168,13 +168,13 @@ def normalizeNewlines(text):
|
||||||
|
|
||||||
def recapitalize(text):
|
def recapitalize(text):
|
||||||
"Recapitalizes text, placing caps after end-of-sentence punctuation."
|
"Recapitalizes text, placing caps after end-of-sentence punctuation."
|
||||||
# capwords = ()
|
#capwords = ()
|
||||||
text = text.lower()
|
text = text.lower()
|
||||||
capsRE = re.compile(r'(?:^|(?<=[\.\?\!] ))([a-z])')
|
capsRE = re.compile(r'(?:^|(?<=[\.\?\!] ))([a-z])')
|
||||||
text = capsRE.sub(lambda x: x.group(1).upper(), text)
|
text = capsRE.sub(lambda x: x.group(1).upper(), text)
|
||||||
# for capword in capwords:
|
#for capword in capwords:
|
||||||
# capwordRE = re.compile(r'\b%s\b' % capword, re.I)
|
# capwordRE = re.compile(r'\b%s\b' % capword, re.I)
|
||||||
# text = capwordRE.sub(capword, text)
|
# text = capwordRE.sub(capword, text)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def phone2numeric(phone):
|
def phone2numeric(phone):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# Written 2007 by j@mailb.org
|
# Written 2007 by j@mailb.org
|
||||||
|
|
||||||
from threading import Event
|
from threading import Event
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# vi:si:et:sw=2:sts=2:ts=2
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ setup(
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue