A parsed version of a blockMeshDict-file. Adds some
convenience-methods to access parts of the file
|
__init__(self,
name,
backup=False,
debug=False,
doMacroExpansion=False)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
blocks(self)
Returns a list with the 8 vertices that define each block |
source code
|
|
|
|
|
|
|
patches(self)
Returns a dictionary with lists of 4-tuples that define each patch |
source code
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__str__(self)
Generates a string from the contents in memory Used to be called
makeString |
source code
|
|
|
getValueDict(self)
Get a dictionary with the values with the decorators removed |
source code
|
|
|
|
|
restore(self)
if a backup-copy was made the file is restored from this |
source code
|
|
|
__enter__(self)
Making the 'with'-statement happy |
source code
|
|
|
__exit__(self,
typ,
value,
traceback)
Making the 'with'-statement happy |
source code
|
|
|
baseName(self)
Returns the basic file name (without .gz) |
source code
|
|
|
|
|
|
|
encode(self,
txt)
Encode a string to byte if necessary (for Python3) |
source code
|
|
|
|
|
goMatch(self,
l,
exp,
out=None,
stop=None)
Read lines until a regular expression is matched |
source code
|
|
|
goTo(self,
l,
s,
out=None,
echoLast=False,
stop=None)
Read lines until a token is found |
source code
|
|
|
|
|
|
|
|
|
readFile(self)
read the whole File into memory |
source code
|
|
|
realName(self)
The full filename with appended .gz (if zipped) |
source code
|
|
|
writeEncoded(self,
out,
txt)
Convert the text to 'bytes' is we encounter a zipped file |
source code
|
|
|
|
|
|
|
copyfile(self,
src,
dst)
Encapsulates the shutil copyfile and provides an alternative for old
Python-version |
source code
|
|
|
copytree(self,
src,
dst,
symlinks=False,
force=False)
Encapsulates the shutil copytree and provides an alternative for old
Python-version |
source code
|
|
|
diskUsage(self,
fpath)
Calculate the disk space used at the specified path in bytes |
source code
|
|
|
execute(self,
cmd,
debug=False,
workdir=None,
echo=None)
Execute the command cmd. |
source code
|
|
|
find(self,
pattern,
path,
directoriesToo=True)
Find all files whose names match |
source code
|
|
|
humanReadableSize(self,
num)
Lifted from
http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size
Gets a number in bytes and returns a human readable string |
source code
|
|
|
listDirectory(self,
d)
Lists the files in a directory, but excludes certain names and files
with certain endings |
source code
|
|
|
remove(self,
f)
Remove a file if it exists. |
source code
|
|
|
rmtree(self,
dst,
ignore_errors=False)
Encapsulates the shutil rmtree and provides an alternative for old
Python-version |
source code
|
|
|
|
|
|