| Home | Trees | Indices | Help |
|---|
|
|
1 # PyCV - A Computer Vision Package for Python Incorporating Fast Training of Face Detection 2 3 # Copyright 2007 Nanyang Technological University, Singapore. 4 # Authors: Minh-Tri Pham, Viet-Dung D. Hoang, and Tat-Jen Cham. 5 6 # This file is part of PyCV. 7 8 # PyCV is free software: you can redistribute it and/or modify 9 # it under the terms of the GNU General Public 10 # License as published by the Free Software Foundation, either version 11 # 3 of the License, or (at your option) any later version. 12 13 # PyCV is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 18 # You should have received a copy of the GNU General Public License 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 20 21 # --------------------------------------------------------------------- 22 #!/usr/bin/env python 23 24 __all__ = ['sdpath','datapath','tprint','speak','ordinal', 'get_version'] 25 26 from time import ctime 27 from os.path import join, dirname 28 29 sdpath = dirname(__file__) 30 datapath = join( sdpath, 'data' ) 31 32 # _logfile = open(join( sdpath, 'mylog.txt' ), 'w') -- disable this for now 3335 """Print a message to stdout but also fprint it to the global log file.""" 36 s2 = ctime()+": "+str(x) 37 print s238 # _logfile.write(s2+'\n') -- disable this for now 39 40 try: 41 from win32com.client import Dispatch 42 _speaker = Dispatch("SAPI.SpVoice") 46 except: 5052 """Return the string representing the n-th position of a series, e.g. 0th, 1st, 2nd, 3rd, etc.""" 53 b = (n/10)%10 54 if b == 1: 55 suffix = 'th' 56 else: 57 a = n%10 58 if a == 1: 59 suffix = 'st' 60 elif a == 2: 61 suffix = 'nd' 62 elif a == 3: 63 suffix = 'rd' 64 else: 65 suffix = 'th' 66 return str(n)+suffix67 72
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Feb 25 10:24:20 2008 | http://epydoc.sourceforge.net |