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
test for its existence
source code
get the size
source code
open in append mode
source code
open for reading
source code
open for writing
source code
remove file
source code
close the file object
source code
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)

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

Overrides: object.__init__