casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
clearstat.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_clearstat
00013 def clearstat():
00014 
00015         """Clear all autolock locks
00016 
00017 This task is useful if another task that is running indicates
00018 that it is trying to obtain a lock on a file.
00019 
00020 Typing 'go clearstat()'  will not change the current task being scrutinized
00021 Typing 'clearstat()'     will change the current task assignment to clearpstat
00022                          which is generally not what is desired.
00023 
00024   
00025         """
00026 
00027 #
00028 #    The following is work around to avoid a bug with current python translation
00029 #
00030         mytmp = {}
00031 
00032         pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/'
00033         trec = casac.utils().torecord(pathname+'clearstat.xml')
00034 
00035         casalog.origin('clearstat')
00036         if trec.has_key('clearstat') and casac.utils().verify(mytmp, trec['clearstat']) :
00037             result = task_clearstat.clearstat()
00038 
00039         else :
00040           result = False
00041         return result