Package wsatools :: Module File :: Class File
[hide private]

Class File

source code


general File class

Instance Methods [hide private]
 
__init__(self, fname)
Split name into parts, eg.:...
source code
 
exists(self)
test for its existence
source code
 
getsize(self)
get the size
source code
 
aopen(self)
open in append mode
source code
 
ropen(self)
open for reading
source code
 
wopen(self)
open for writing
source code
 
remove(self)
remove file
source code
 
close(self)
close the file object
source code
 
isClosed(self)
test if the file is closed
source code
 
chmod(self, mode)
change the mode of the file
source code
 
readlines(self, strip=True, commentChar=None, omitEmptyLines=False, findValues=[], omitValues=[])
read all lines and strip the linebreaks
source code
 
readline(self, strip=False)
read one line (including linebreak)
source code
 
writelines(self, lines)
write all lines in given list, appending linebreaks
source code
 
writeline(self, the_line)
write given line, no linebreak appended
source code
 
writetheline(self, the_line)
write given line with linebreak
source code
 
copyFile(self, outfile, the_line='')
copy file linewise; up to line 'the_line' if given
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fname)
(Constructor)

source code 
Split name into parts, eg.:
/diskNN/wsa/ingest/fits/20050101_v0/w20050101_01234_sf_st_cat.fits
{           path                   }{         base                }
{        topdir        }{  subdir  }{         root           }{ext}
{ diskdir  }{  common  }{          fileID (w/o cat)     }
                                    { sdate }{runno}{ ftype  }

Overrides: object.__init__