casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
rmtables.py
Go to the documentation of this file.
00001 #
00002 # This file was generated using xslt from its XML file
00003 #
00004 # Copyright 2009, Associated Universities Inc., Washington DC
00005 #
00006 import sys
00007 import os
00008 from  casac import *
00009 import string
00010 from taskinit import casalog
00011 #from taskmanager import tm
00012 import task_rmtables
00013 def rmtables(tablenames=['']):
00014 
00015         """
00016         Removes tables cleanly.
00017         Arguments may contain * or ?. Ranges [] are support but
00018         not ~ expansion.
00019  
00020         """
00021         if type(tablenames)==str: tablenames=[tablenames]
00022 
00023 #
00024 #    The following is work around to avoid a bug with current python translation
00025 #
00026         mytmp = {}
00027 
00028         mytmp['tablenames'] = tablenames
00029         pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/'
00030         trec = casac.utils().torecord(pathname+'rmtables.xml')
00031 
00032         casalog.origin('rmtables')
00033         if trec.has_key('rmtables') and casac.utils().verify(mytmp, trec['rmtables']) :
00034             result = task_rmtables.rmtables(tablenames)
00035 
00036         else :
00037           result = False
00038         return result