--- OSA_system2/OSAS_helpers.py 2005/03/17 19:26:52 1.9 +++ OSA_system2/OSAS_helpers.py 2010/02/15 19:09:10 1.12 @@ -2,7 +2,14 @@ import os.path from types import * import xml.dom.minidom -import zLOG +import logging + +#ersetzt logging +def logger(txt,method,txt2): + """logging""" + logging.info(txt+ txt2) + + OSASObjectTypes=['OSAS_metaDataFile','OSAS_dir','Osas_file','OSAS_imageFolder','OSAS_dir_archive','OSAS_file_archive','OSAS_videoFolder','OSAS_videoFile','OSAS_videoFolder'] OSASDirObjects=['OSAS_dir','OSAS_imageFolder',] @@ -13,7 +20,7 @@ def getText(nodelist): """gibt text aus nodelist""" rc = "" for node in nodelist: - if node.nodeType == node.TEXT_NODE: + if node.nodeType == node.TEXT_NODE: rc = rc + node.data return rc @@ -77,10 +84,10 @@ def getBib(nodelist): for node in nodelist: - if node.nodeType == node.ELEMENT_NODE: - """nothing""" + if node.nodeType == node.ELEMENT_NODE: + """nothing""" - rc = rc+""+str(node.nodeName)+": "+getText(node.childNodes)+"" + rc = rc+""+str(node.nodeName)+": "+getText(node.childNodes)+"" #print rc return rc+"" @@ -115,7 +122,7 @@ def getPropertyOfDirs(indexMeta,property def dirHasProperty(path,indexMeta,propertyName,propertyValue): - """gibt 1 zurück falls path hat propertyName und properName=propertyValue + """gibt 1 zurueck falls path hat propertyName und properName=propertyValue @param propertyName:Property von path in index.meta des parent folders von path @param propertyValue:Wert der Property @param path: Pfad der getestet werden soll @@ -153,7 +160,7 @@ def isImageFolderGuess(path): for a in dir: suffix=os.path.splitext(a)[1].lower() - + if suffix in imagesuffixes: return 1 @@ -191,6 +198,6 @@ def toList(fields): def localDate(): """gives formatted local date""" - return strftime("%d.%m.%Y",localtime()) + return strftime("%d.%m.%Y",localtime())