[gen] Changes in parameters of some basic field methods to enable field.languages to be defined dymanically via a method.

This commit is contained in:
Gaetan Delannay 2014-09-05 17:13:23 +02:00
parent 18afb4416c
commit f8a7103c7a
15 changed files with 153 additions and 112 deletions

View file

@ -72,6 +72,17 @@ def cleanFolder(folder, exts=extsToClean, folders=(), verbose=False):
if verbose: print('Removing folder %s...' % toDelete)
FolderDeleter.delete(toDelete)
# ------------------------------------------------------------------------------
def resolvePath(path):
'''p_path is a file path that can contain occurences of "." and "..". This
function resolves them and procuces a minimal path.'''
res = []
for elem in path.split(os.sep):
if elem == '.': pass
elif elem == '..': res.pop()
else: res.append(elem)
return os.sep.join(res)
# ------------------------------------------------------------------------------
def copyFolder(source, dest, cleanDest=False):
'''Copies the content of folder p_source to folder p_dest. p_dest is