Epydoc: mrv.maya.ui.browse.layout
module containing layouts which combine finder ui modules
Ask the user whether he wants to handle his unsaved modifications. This may cause the current file to be saved, or the modifications to be discarded. :return: True if the changes have been handled properly, or False if the
caller should not proceed
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.StackControlBase
Control allowing to display a set of custom bookmarks, which are stored in optionVars
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add a new bookmark :param bookmark: tuple of root,relative_path or a single absolute path. In the
latter case, the root will be the natural root of the absolute path
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.
Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | list of currently available items |
---|
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given bookmark from the list of bookmarks :param bookmark: full path to the bookmark to remove. Its not an error
if it doesn’t exist in the first place
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to
select, or the item’s id
Raises ValueError: | |
---|---|
if the item does not exist |
Returns: | First selected index - the index is 1-based, or -1 if there |
---|
is nothing selected :note: even if multiple selections are possible
Returns: | tuple of all selected 1-based indices, or an empty tuple if there |
---|
is nothing selected
Returns: | the first selected item, or None if nothing is selected |
---|
Returns: | list of all selected items as strings, or an empty list if nothing |
---|
is selected
Returns: | unformatted selected item or None |
---|
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this control to a list of bookmarks :param bookmarks: list of either tuples of (root, path) pairs or absolute paths
whose root will be chosen automatically
Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following
maya’s behaviour
Returns: | self |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.FormLayout, mrv.maya.ui.browse.interface.iFinderFilter
Control providing a filter for finder urls which are file paths
Bases: object
defines the way a child is constrained, possibly to other children
Todo: | proper constraint system, but could be complicated to make it really easy to use |
---|
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
Returns: | list of items which may be shown in the element at element_index |
---|---|
Parameters: |
|
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Apply the given setup to the form layout, specified using kwargs
Parameter: | kwargs – arguments you would set use to setup the form layout |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout.FileOpenFinder
Bases: mrv.maya.ui.FinderLayout
Finder customized for opening files
Bases: object
defines the way a child is constrained, possibly to other children
Todo: | proper constraint system, but could be complicated to make it really easy to use |
---|
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Apply the given setup to the form layout, specified using kwargs
Parameter: | kwargs – arguments you would set use to setup the form layout |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.ColumnLayout, mrv.maya.ui.browse.interface.iOptions
Options implementation providing options useful during file-open
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
Returns: | dict with keyword options reflecting the settings of the |
---|
interface. These should be given to the file command
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.TextField
Control displaying a relative url. If it is ediable, a filepath may be entered and queried
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if the control can be edited by the user |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | string representing the currently active path |
---|
Returns: | popup menus attached to this control |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.FilePathControl
A filepath control which tries to maintain changes applied by the user. It assumes that the system will use setPath to adjust the path, and checks for changes in the path string which will be reapplied to the newly set path if possible
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if the control can be edited by the user |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | string representing the currently active path |
---|
Returns: | popup menus attached to this control |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.browse.interface.iFinderProvider
Implements a provider for a file system
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | string representing the file root |
---|
Stores and associates a given url_index with a url_item. Makes the stored item queryable by the storedUrlItemByIndex method :param url_index: index from 0 to n, where 0 corresponds to the first item
in the url
Parameter: | url_item – the string item to store at the given index |
---|
Returns: | string item previously stored at the given index, or None |
---|
if there is no information available
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.interface.iDagItem
Represents a Maya file reference
Note: | do not cache these instances but get a fresh one when you have to work with it |
---|---|
Note: | as FileReference is also a iDagItem, all the respective methods, especially for parent/child iteration and query can be used as well |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | all intermediate child references of this instance |
---|
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
remove unresolved edits or all edits on this reference
Parameters: |
|
---|---|
Returns: | self |
Returns: | the references copy number - starting at 0 for the first reference |
---|---|
Note: | we do not cache the copy number as mayas internal numbering can change on when references change - the only stable thing is the reference node name |
Create a reference with the given namespace
Parameters: |
|
---|---|
Raises ValueError: | |
if the namespace does already exist |
|
Raises RuntimeError: | |
if the reference could not be created |
Returns: | True if our file reference exists in maya |
---|
Find the reference for each path in paths. If you provide the path X 2 times, but you only have one reference to X, the return value will be [FileReference(X), None] as there are less references than provided paths.
Parameters: |
|
---|---|
Returns: | list(FileReference|None, ...) if a filereference was found for given occurrence of Path, it will be returned at index of the current path in the input paths, otherwise it is None. |
Note: | zip(paths, result) to get a corresponding tuple list associating each input path with the located reference |
Import the reference until the given depth is reached
Parameter: | depth –
|
---|---|
Returns: | list of FileReference objects that are now in the root namespace - this list could be empty if all subreferences are fully imported |
Returns: | True if the reference is loaded |
---|
Returns: | True if reference is locked |
---|
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Creates iterator over nodes in this reference
Parameters: |
|
---|---|
Raises ValueError: | |
if incompatible arguments have been given |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
list all references in the scene or under the given root
Parameters: |
|
---|---|
Returns: | list of FileReference s objects |
Return all references recursively
Parameter: | kwargs – support for arguments as in ls, hence you can use the rootReference flag to restrict the set of returned FileReferences. |
---|
Returns: | namespace object of the full namespace holding all objects in this reference |
---|
Returns: | the parent reference of this instance or None if we are root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | Path object with the path containing the reference’s data |
---|---|
Parameters: |
|
Note: | we always query it from maya as our numbers change if some other reference is being removed and cannot be trusted |
Returns: | wrapped reference node managing this reference |
---|
Remove the given reference from the scene
Note: | assures that no namespaces of that reference are left, remaining objects will be moved into the root namespace. This way the namespaces will not be left as waste. This fails if there are referenced objects in the subnamespace - we currently ignore that issue as the main reference removal worked at that point. |
---|---|
Note: | kwargs passed to namespace.delete |
Replace this reference with filepath
Parameter: | filepath – the path to the file to replace this reference with Reference instances will be handled as well. |
---|---|
Returns: | self |
Returns: | the root of the DAG - it has no further parents |
---|
set the reference loaded or unloaded
Parameter: | state – True = unload reference, True = load reference |
---|---|
Returns: | self |
Set the reference to be locked or unlocked
Parameter: | state – if True, the reference is locked , if False its unlocked and can be altered |
---|---|
Returns: | self |
set the reference to use the given namespace
Parameter: | namespace – Namespace instance or name of the short namespace |
---|---|
Raises RuntimeError: | |
if namespace already exists or if reference is not root | |
Returns: | self |
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Epydoc: mrv.maya.ui.browse.layout.FileReferenceFinder
Bases: mrv.maya.ui.FinderLayout
Finder Layout for creating references
Bases: object
defines the way a child is constrained, possibly to other children
Todo: | proper constraint system, but could be complicated to make it really easy to use |
---|
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Apply the given setup to the form layout, specified using kwargs
Parameter: | kwargs – arguments you would set use to setup the form layout |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.TextScrollList
Keeps a list of possible roots which can be chosen. Each root is represented by a Provider instance.
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | list of currently available items |
---|
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Returns: | list of currently used providers |
---|
Remove the given provider from the list :param provider: FileProvider instance or root from which the provider
can be determined
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.
Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | First selected index - the index is 1-based, or -1 if there |
---|
is nothing selected :note: even if multiple selections are possible
Returns: | tuple of all selected 1-based indices, or an empty tuple if there |
---|
is nothing selected
Returns: | the first selected item, or None if nothing is selected |
---|
Returns: | list of all selected items as strings, or an empty list if nothing |
---|
is selected
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout.FileSaveFinder
Bases: mrv.maya.ui.FinderLayout
Finder optimized to choose a location to save a file
Bases: object
defines the way a child is constrained, possibly to other children
Todo: | proper constraint system, but could be complicated to make it really easy to use |
---|
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Apply the given setup to the form layout, specified using kwargs
Parameter: | kwargs – arguments you would set use to setup the form layout |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.StackControlBase
Implements a stack which shows only the base names of files
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | list of currently available items |
---|
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to
select, or the item’s id
Raises ValueError: | |
---|---|
if the item does not exist |
Returns: | First selected index - the index is 1-based, or -1 if there |
---|
is nothing selected :note: even if multiple selections are possible
Returns: | tuple of all selected 1-based indices, or an empty tuple if there |
---|
is nothing selected
Returns: | the first selected item, or None if nothing is selected |
---|
Returns: | list of all selected items as strings, or an empty list if nothing |
---|
is selected
Returns: | unformatted selected item or None |
---|
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set the given items to be shown. :param items: iterable of items
if empty, the control will be empty after this call.
Returns: | self |
---|
Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following
maya’s behaviour
Returns: | self |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.util.EventSenderUI
The Finder control implements a finder-like browser, which displays URLs. URLs consist of items separated by the “/” character. Whenever a item is selected, an iProvider compatible instance will be asked for the subitems of the corresponding URL. Using these, a new field will be set up for presentation. A filter can be installed to prevent items from being shown.
An added benefit is the ability to automatically match previously selected path items on a certain level of the URL with the available ones, allowing to quickly parse through URLs with a similar structure.
A limitation of the current implementation is, that you can only keep one item selected at once in each url item area.
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
Returns: | the finder’s main layout which contains all controls |
---|
Returns: | list of event ids that exist on our class |
---|
Returns: | number of url elements that are currently shown. A url of 1/2 would |
---|
have two url elements
Returns: | current url provider |
---|
Returns: | string representing the currently selected, / separated URL, or None if there is no url selected |
---|---|
Parameter: | absolute – if True, an absolute URL will be provided using the provider’s root |
Returns: | The selected url item at the given element index or None if nothing is selected |
---|---|
Parameter: | index – 0 to numUrlElements()-1 |
Raies indexerror: | |
User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.
Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set or unset a filter. All items will be sent through the filter, and will be shown only if they pass. :param filter: Functor called f(url,t) and returns True for each item which may
be shown in the Finder. The url is the full relative url leading to, but excluding the item t, whose visibility is being decided upon
Set the provider to use :param provider: iFinderProvider compatible instance, or None
If no provider is set, the instance will be blank
Set the given url to be selected :param url: / separated relative url. The individual items must be available
in the provider.
Parm require_all_items: | |
---|---|
if False, the control will display as many items as possible. Otherwise it must display all given items, or raise ValueError | |
Parameter: | allow_memory – if true, provider memory may be used to show the longest chosen url, being possibly more than you specify. Currently not implemented |
Returns: | list of item ids which are currently being shown |
---|---|
Parameter: | index – 0 based element index to numUrlElements()-1 |
Raises IndexError: | |
User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.
Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.StackControlBase
Element with special abilities to suite the finder better. This involves keeping a list of unformatted items which can be used as unique item identifiers.
Set the items to a list of unique identifiers which represent the possibly different items actually present in the list.
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | all intermediate child instances |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
Returns: | formatted version of item |
---|
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | list of currently available items |
---|
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to
select, or the item’s id
Raises ValueError: | |
---|---|
if the item does not exist |
Returns: | First selected index - the index is 1-based, or -1 if there |
---|
is nothing selected :note: even if multiple selections are possible
Returns: | tuple of all selected 1-based indices, or an empty tuple if there |
---|
is nothing selected
Returns: | the first selected item, or None if nothing is selected |
---|
Returns: | list of all selected items as strings, or an empty list if nothing |
---|
is selected
Returns: | unformatted selected item or None |
---|
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set the given items to be shown. :param items: iterable of items
if empty, the control will be empty after this call.
Returns: | self |
---|
Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following
maya’s behaviour
Returns: | self |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout.FinderLayout
Bases: mrv.maya.ui.FormLayout
Implements a layout with a finder as well a surrounding elements. It can be configured using class configuration variables, and allows easy modification through derivation
Instance Variables * finder * options
Bases: object
defines the way a child is constrained, possibly to other children
Todo: | proper constraint system, but could be complicated to make it really easy to use |
---|
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Apply the given setup to the form layout, specified using kwargs
Parameter: | kwargs – arguments you would set use to setup the form layout |
---|
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.maya.ui.FrameLayout
A simple helper to wrap a box around a layout or control.
Returns: | NameUI of the currently set parent |
---|---|
Raises RuntimeError: | |
if no active parent was set |
Add the given child UI item to our list of children
Parameters: |
|
---|---|
Returns: | the newly added child, allowing contructs like button = layout.addChild( Button( ) ) |
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
S.capitalize() -> unicode
Return a capitalized version of S, i.e. make the first character have upper case.
S.center(width[, fillchar]) -> unicode
Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
Returns: | stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” ) |
---|---|
Raises KeyError: | |
if a child with that name does not exist |
Returns: | children of this layout |
---|
Returns: | all child instances recursively |
---|---|
Note: | the order of children is lexically ordered at this time |
Note: | this implementation is slow and should be overridden by more specialized subclasses |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> string or unicode
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
S.encode([encoding[,errors]]) -> string or unicode
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Returns: | True if this instance still exists in maya |
---|
S.expandtabs([tabsize]) -> unicode
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdecimal() -> bool
Return True if there are only decimal characters in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isnumeric() -> bool
Return True if there are only numeric characters in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> unicode
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Returns: | list with our child instances |
---|---|
Parameter: | predicate – function returning True for each child to include in result, allows to easily filter children |
Note: | it’s a copy, so you can freely act on the list |
Note: | children will be returned in the order in which they have been added |
Returns: | list of event ids that exist on our class |
---|
S.ljust(width[, fillchar]) -> int
Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> unicode
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | children of this layout |
---|
Returns: | children of this layout |
---|
Returns: | (x,y) tuple of x and y dimensions of the UI element |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | True if this instance still exists in maya |
---|
Returns: | popup menus attached to this control |
---|
Returns: | popup menus attached to this control |
---|
Returns: | parent instance of this ui element |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Returns: | popup menus attached to this control |
---|
Remove the given child from our list
Returns: | True if the child was found and has been removed, False otherwise |
---|
S.replace (old, new[, count]) -> unicode
Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> unicode
Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
S.rstrip([chars]) -> unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Set this container active, such that newly created items will be children of this layout
Returns: | self |
---|---|
Note: | always use the addChild function to add the children ! |
Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout
Returns: | self |
---|---|
Note: | can safely be called several times |
Returns: | shortname of the ui ( name without pipes ) |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> unicode
Return a copy of S with uppercase characters converted to lowercase and vice versa.
S.title() -> unicode
Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
S.translate(table) -> unicode
Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.
Returns: | the python class able to create this class |
---|---|
Note: | The return value is NOT the type string, but a class |
If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.
Use this callback to register yourself from all your event senders, then call the base class method.
Note: | This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya. |
---|
S.upper() -> unicode
Return a copy of S converted to uppercase.
S.zfill(width) -> unicode
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: str, mrv.interface.iDagItem
Represents a filesystem path.
For documentation on individual methods, consult their counterparts in os.path.
Return true if current user has access to this path.
mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
S.capitalize() -> string
Return a copy of the string S with only its first character capitalized.
S.center(width[, fillchar]) -> string
Return S centered in a string of length width. Padding is done using the specified fill character (default is a space)
Returns: | child paths as retrieved by queryiing the file system. |
---|---|
Note: | files cannot have children, and willl return an empty array accordingly |
Parameters: |
|
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Change file mode
Returns: | self |
---|
Change file ownership
Returns: | self |
---|
Change the root directory path
Returns: | self |
---|
Returns: | True if this path contains environment variables |
---|
Returns: | Version of self with all separators set to be ‘sep’. The difference |
---|
to normpath is that it does not cut trailing separators
Copy data and source bits to dest
Returns: | Path to dest |
---|
Shutil.copy2 self to dest
Returns: | Path to dest |
---|
Copy self to dest
Returns: | Path to dest |
---|
Copy our mode to dest
Returns: | Path to dest |
---|
Copy our stats to dest
Returns: | Path to dest |
---|
Deep copy this file or directory to destination
Parameter: | kwargs – passed to shutil.copytree |
---|---|
Returns: | Path to dest |
S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
S.decode([encoding[,errors]]) -> object
Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registered with codecs.register_error that is able to handle UnicodeDecodeErrors.
Calculate the hash for this file using the given hashobject. It must support the ‘update’ and ‘digest’ methods.
Note: | This reads through the entire file. |
---|
D.dirs() -> List of this directory’s subdirectories.
The elements of the list are path objects. This does not walk recursively into subdirectories (but see path.walkdirs).
With the optional pattern argument, this only lists directories whose names match the given pattern. For example, d.dirs(“build-*”).
S.encode([encoding[,errors]]) -> object
Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that is able to handle UnicodeEncodeErrors.
S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
Clean up a filename by calling expandvars() and expanduser()
This is commonly everything needed to clean up a filename read from a configuration file, for example.
If you are not interested in trailing slashes, you should call normpath() on the resulting Path as well.
Returns: | Copy of self with all variables expanded ( using expand ) |
---|
non-recursively !
Raises ValueError: | |
---|---|
If we could not expand all environment variables as their values where missing in the environment |
S.expandtabs([tabsize]) -> string
Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
D.files() -> List of the files in this directory.
The elements of the list are path objects. This does not walk into subdirectories (see path.walkfiles).
With the optional pattern argument, this only lists files whose names match the given pattern. For example, d.files(“*.pyc”).
S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
Return True if self.basename() matches the given pattern.
Returns: | the current working directory as a path object. |
---|
Return a list of path objects that match the pattern.
pattern - a path relative to this directory, with wildcards.
For example, path(‘/users’).glob(‘/bin/‘) returns a list of all the files users have in their bin directories.
S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | true if the file can be written to |
---|
S.isalnum() -> bool
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
S.isalpha() -> bool
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
S.isdigit() -> bool
Return True if all characters in S are digits and there is at least one character in S, False otherwise.
S.islower() -> bool
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
S.isspace() -> bool
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
S.istitle() -> bool
Return True if S is a titlecased string and there is at least one character in S, i.e. uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
S.join(iterable) -> string
Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.
Open this file, read all lines, return them in a list.
the file. The default is None, meaning the content of the file is read as 8-bit characters and returned as a list of (non-Unicode) str objects.
for the options. Default is ‘strict’
character combinations (“r”, “n”, “rn”) are translated to “n”. If false, newline characters are stripped off. Default is True.
This uses “U” mode in Python 2.3 and later.
Create a hard link at ‘newpath’, pointing to this file.
Returns: | Path to newpath |
---|
return list of items in this directory.
Use D.files() or D.dirs() instead if you want a listing of just files or just subdirectories.
The elements of the list are path objects.
With the optional ‘pattern’ argument, this only lists items whose names match the given pattern.
S.ljust(width[, fillchar]) -> string
Return S left-justified in a string of length width. Padding is done using the specified fill character (default is a space).
S.lower() -> string
Return a copy of the string S converted to lowercase.
S.lstrip([chars]) -> string or unicode
Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping
Smarter makedir, see os.makedirs
Returns: | self |
---|
Make this directory, fail if it already exists
Returns: | self |
---|
Move self to dest
Returns: | Path to dest |
---|
The same as path.basename(), but with one file extension stripped off.
For example, path(‘/home/guido/python.tar.gz’).name == ‘python.tar.gz’, but path(‘/home/guido/python.tar.gz’).namebase == ‘python.tar’
Return the name of the owner of this file or directory.
This follows symbolic links.
On Windows, this returns a name of the form ur’DOMAINUser Name’. On Windows, a group can own a file or directory.
Returns: | the parent directory of this Path or None if this is the root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.
Return the path to which this symbolic link points.
The result may be an absolute or a relative path.
Return the path to which this symbolic link points.
The result is always an absolute path.
Return a relative path from self to dest.
If there is no relative path from self to dest, for example if they reside on different drives in Windows, then this returns dest.abspath().
Remove this file
Returns: | self |
---|
see os.removedirs
Returns: | self |
---|
os.rename
Returns: | Path to new file |
---|
os.renames, super rename
Returns: | Path to new file |
---|
S.replace (old, new[, count]) -> string
Return a copy of string S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
S.rjust(width[, fillchar]) -> string
Return S right-justified in a string of length width. Padding is done using the specified fill character (default is a space)
Remove this empty directory
Returns: | self |
---|
Remove self recursively
Parameter: | kwargs – passed to shutil.rmtree |
---|---|
Returns: | self |
Returns: | the root of the DAG - it has no further parents |
---|
S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.
S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in the string S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator.
S.rstrip([chars]) -> string or unicode
Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping
Set the access and modified times of this file.
Returns: | self |
---|
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in the string S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
Return a list of the path components in this path.
The first item in the list will be a path. Its value will be either os.curdir, os.pardir, empty, or the root directory of this path (for example, ‘/’ or ‘C:’). The other items in the list will be strings.
path.path.joinpath(*result) can possibly yield the original path, depending on the input.
p.splitdrive() -> Return (p.drive, <the rest of p>).
Split the drive specifier from this path. If there is no drive specifier, p.drive is empty, so the return value is simply (path(‘’), p). This is always the case on Unix.
p.splitext() -> Return (p.stripext(), p.ext).
Split the filename extension from this path and return the two parts. Either part may be empty.
The extension is everything from ‘.’ to the end of the last path segment. This has the property that if (a, b) == p.splitext(), then a + b == p.
S.splitlines([keepends]) -> list of strings
Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.
S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
S.strip([chars]) -> string or unicode
Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping
p.stripext() -> Remove one file extension from the path.
For example, path(‘/home/guido/python.tar.gz’).stripext() returns path(‘/home/guido/python.tar’).
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
S.swapcase() -> string
Return a copy of the string S with uppercase characters converted to lowercase and vice versa.
Create a symbolic link at ‘newlink’, pointing here.
Returns: | Path to newlink |
---|
Open this file, read it in, return the content as a string.
This uses “U” mode in Python 2.3 and later, so “rn” and “r” are automatically translated to ‘n’.
S.title() -> string
Return a titlecased version of S, i.e. words start with uppercase characters, all remaining cased characters have lowercase.
Returns: | A path using only slashes as path separator |
---|
Convert the path separator to the type required by the current operating system - on windows / becomes and on linux becomes /
Returns: | native version of self |
---|
Set the access/modified times of this file to the current time. Create the file if it does not exist.
Returns: | self |
---|
S.translate(table [,deletechars]) -> string
Return a copy of the string S, where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256.
unlink this file
Returns: | self |
---|
S.upper() -> string
Return a copy of the string S converted to uppercase.
create iterator over files and subdirs, recursively.
The iterator yields path objects naming each child item of this directory and its descendants.
It performs a depth-first traversal of the directory tree. Each directory is returned just before all its children.
Parameters: |
|
---|
Open this file and write the given bytes to it.
Default behavior is to overwrite any existing file. Call p.write_bytes(bytes, append=True) to append instead. :return: self
Write the given lines of text to this file.
By default this overwrites any existing file at this path.
This puts a platform-specific newline sequence on every line. See ‘linesep’ below.
lines - A list of strings.
Use the keyword argument append=True to append lines to the file. The default is to overwrite the file. Warning: When you use this with Unicode data, if the encoding of the existing data in the file is different from the encoding you specify with the encoding= parameter, the result is mixed-encoding data, which can really confuse someone trying to read the file later.
Returns: | self |
---|
Write the given text to this file.
The default behavior is to overwrite any existing file; to append instead, use the ‘append=True’ keyword argument.
There are two differences between path.write_text() and path.write_bytes(): newline handling and Unicode handling. See below.
text - str/unicode - The text to be written.
This is ignored if ‘text’ isn’t a Unicode string.
Default is ‘strict’. See help(unicode.encode) for the options. This is ignored if ‘text’ isn’t a Unicode string.
characters to be used to mark end-of-line. The default is os.linesep. You can also specify None; this means to leave all newlines as they are in ‘text’.
the file already exists (True: append to the end of it; False: overwrite it.) The default is False.
(“n”, “r”, and “rn”) to your platforms default end-of-line sequence (see os.linesep; on Windows, for example, the end-of-line marker is “rn”).
using the “linesep=” keyword argument. If you specifically want write_text() to preserve the newlines as-is, use “linesep=None”.
there are additional standard Unicode end-of-line sequences, check the code to see them.
writing with fopen(filename, “w”) in C or file(filename, “w”) in Python.)
If “text” isn’t Unicode, then apart from newline handling, the bytes are written verbatim to the file. The “encoding” and ‘errors’ arguments are not used and must be omitted.
If ‘text’ is Unicode, it is first converted to bytes using the specified ‘encoding’ (or the default encoding if ‘encoding’ isn’t specified). The ‘errors’ argument applies only to this conversion.
Returns: | self |
---|
S.zfill(width) -> string
Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.
Epydoc: mrv.maya.ui.browse.layout
Bases: mrv.interface.Interface
Interface for all custom options layouts to be used with the FinderLayout. They take a weak-reference to their parent FinderLayout allowing them to set themselves up if necessary. The options they represent must be read by a custom implementation of the FinderLayout
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | the root of the DAG - it has no further parents |
---|
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |