Mercurial > repos > marcel > caddsuite_linux_x86_64
view CADDSuite/galaxyconfigs/confFiles.py @ 8:9ab6da6cd36c
Uploaded
author | marcel |
---|---|
date | Fri, 02 Sep 2011 08:48:21 -0400 |
parents | bac3c274238f |
children |
line wrap: on
line source
# -*- coding: utf-8 -*- """ XML format classes """ import data import logging from galaxy.datatypes.sniff import * import commands log = logging.getLogger(__name__) class ini( data.Text ): file_ext = "ini" def sniff( self, filename ): self.no_sections = commands.getstatusoutput("grep -c \"\[Docking-Settings\]\" "+filename) if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): return True else: self.no_sections = commands.getstatusoutput("grep -c \"\[ReferenceArea\" "+filename) if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): return True else: self.no_sections = commands.getstatusoutput("grep -c \"\[PharmacophoreConstraint\" "+filename) if (self.no_sections[0] == 0) & (self.no_sections[1] > 0): return True else: return False