Previous topic

oyProjectManager.db.declarative

Next topic

oyProjectManager.utils.uncompress_range

This Page

oyProjectManager.utilsΒΆ

Functions

abspath(p1, p2) Converts the p2 to abspath by joining it with p1
all_equal(elements) return True if all the elements are equal, otherwise False.
backupFile(full_path[, maximum_backupCount]) backups a file by copying it and then renaming it by adding .#.bak
common_prefix(*sequences) return a list of common elements at the start of all sequences, then a
createFolder(folderPath) utility method that creates a folder if it doesn’t exists
embedded_numbers(s)
file_name_conditioner(fileName) conditions the file name by replacing the whitespaces and slashes and
findFiles(pattern, search_path[, pathsep])
fixWindowsPath(path) replaces / with for windows
getBackupFiles(full_path) returns the backup files of the given file, returns None if couldn’t
getBackupNumber(full_path) returns the backup number of the file
getChildFiles(path[, return_full_path]) returns the child files for the given path
getChildFolders(path[, return_full_path]) returns the child folders for the given path
getMaximumBackupNumber(full_path) returns the maximum backup number of the file
invalidCharacterRemover(text, validChars) its a more stupid way to condition a text
maintainMaximumBackupCount(full_path, ...) keeps maximum of given number of backups for the given file
matchRange(_range) validates the range string
mkdir(path) Creates a directory in the given path
multiple_replace(text, adict)
open_browser_in_location(path) Opens the os native browser at the given path
padNumber(number, pad) pads a number with zeros
relpath(p1, p2[, sep, pardir]) return a relative path from p1 equivalent to path p2.
sort_string_numbers(str_list) sorts strings with embedded numbers
sort_strings_with_embedded_numbers(alist) sorts a string with embedded numbers
stringConditioner(text[, allowSpaces, ...]) removes any spaces, underscores, and turkish characters from the name
uncompress_range(_range) a shotRange is a string that contains numeric data with ”,” and “-“
unique(s) Return a list of elements in s in arbitrary order, but without