sequences.utils package¶
Submodules¶
sequences.utils.fileStructure module¶
-
class
sequences.utils.fileStructure.
PerforcePath
(path, *args, **kwargs)[source]¶ Bases:
sequences.utils.fileStructure.FilestructurePath
-
priority
= 40¶
-
p4
¶
-
local_path
¶
-
depot_path
¶
-
get_stats
()[source]¶ Get Perforces stats (fstat) for this Perforce path This always retrieves the latest information, no caching
-
stats
¶ Get Perforces stats (fstat) for this Perforce path Uses caching
-
get_revisions
()[source]¶ Get Perforces revsions (filelog) for this Perforce path This always retrieves the latest information, no caching
-
revisions
¶ Get Perforces revisions (filelog) for this Perforce path Uses caching
-
clientData
¶
-
where
¶ Get Perforces where (where) for this Perforce path Uses caching
-
fileinfo
¶ Get Perforces fileinfo (file) for this Perforce path Uses caching
-
different
¶
-
revision
¶
-
next_revision
¶
-
sequences.utils.perforce module¶
-
class
sequences.utils.perforce.
TempP4ExceptionLevel
(p4, lvl)[source]¶ Bases:
object
Temporarily adjust the P4 exception level
Example
>>> with TempP4ExceptionLevel(p4, 1): >>> # do stuff
Parameters: - p4 (
P4.P4
) – P4 instance - lvl (
int
) – Exception Level
- p4 (
-
sequences.utils.perforce.
get_p4_and_client_from_path
(path)[source]¶ Given a path, return a p4 instance and clientData if possible. Will search within the cached instances, otherwise attempts to find an appropriate client and returns the new data
-
sequences.utils.perforce.
get_depot_paths
(p4=None, refresh=False)[source]¶ From a p4 instance, get a list of all depot paths available
Parameters: p4 (P4) – perforce instance Returns: - Depot paths in the format of
- [‘//{depotName}’, ...]
Return type: list of str
-
sequences.utils.perforce.
get_clients_with_specs
(p4=None, clients=None, ignoreStreams=False, useCache=True)[source]¶ Get a list of clients with their full specs This contains the view mappings
-
sequences.utils.perforce.
get_child_dirs
(p4, path, **kwargs)[source]¶ Return all child directories of the given path as strings Kwargs are passed to filter_item
-
sequences.utils.perforce.
get_child_files
(p4, path, includeDeleted=False, **kwargs)[source]¶ Return all perforce files inside the given directory as strings
sequences.utils.utils module¶
-
sequences.utils.utils.
get_os
()¶ Get the os of the current system in a standard format. mac, windows, linux
-
sequences.utils.utils.
path_normalize
(filename, allowBackslash=False, normcase=False, removeDoubleSlashes=True)¶ Normalize filename Make sure all slashes match the platform
-
sequences.utils.utils.
path_contains
(root, path, normalize=True, normcase=True)¶ Return True if root contains path Prevents false positives such as:
/root /root2/project
-
sequences.utils.utils.
join_paths
(*paths)¶ Join paths using forward slashes
-
sequences.utils.utils.
filter_item
(item, include=['*'], exclude=[])¶ Return True if the given item passes the given filters, False if it doesn’t
key
- can be given an attrgetter or itemgetter to be used on item
-
sequences.utils.utils.
get_folder_contents
(path, includeFiles=True, includeDirs=True, **kwargs)¶