Contains interface definitions
Epydoc: mrv.interface.Interface
Bases: object
Base for all interfaces. All interfaces should derive from here.
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 |
Epydoc: mrv.interface.iChoiceDialog
Bases: mrv.interface.Interface
Interface allowing access to a simple confirm dialog allowing the user to pick between a selection of choices, one of which he has to confirm
Note: | for convenience, this interface contains a brief implementation as a basis for subclasses, using standard input and standard ouput for communication |
---|
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 |
Make the choice
Returns: | name of the choice made by the user, the type shall equal the type given as button names |
---|---|
Note: | this implementation always returns the default choice |
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 |
Epydoc: mrv.interface.iDagItem
Bases: mrv.interface.Interface
Describes interface for a DAG item. Its used to unify interfaces allowing to access objects in a dag like graph Of the underlying object has a string representation, the defatult implementation will work natively. Otherwise the getParent and getChildren methods should be overwritten
Note: | a few methods of this class are abstract and need to be overwritten |
---|---|
Note: | this class expects the attribute ‘_sep’ to exist containing the separator at which your object should be split ( for default implementations ). This works as the passed in pointer will belong to derived classes that can define that attribute on instance or on class level |
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 |
Epydoc: mrv.interface.iDuplicatable
Bases: mrv.interface.Interface
Simple interface allowing any class to be properly duplicated
Note: | to implement this interface, implement createInstance and copyFrom in your class |
---|
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 |
Copy the data from other into self as good as possible Only copy the data that is unique to your specific class - the data of other classes will be taken care of by them !
Note: | you must support args and kwargs if one of your iDuplicate bases does |
---|
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
Returns: | altered instance |
---|---|
Note: | instance will be altered during the process |
Create and Initialize an instance of self.__class__( ... ) based on your own data
Returns: | new instance of self |
---|---|
Note: | using self.__class__ instead of an explicit class allows derived classes that do not have anything to duplicate just to use your implementeation |
Note: | you must support args and kwargs if one of your iDuplicate bases does |
Implements a c-style copy constructor by creating a new instance of self and applying the copyFrom methods from base to all classes implementing the copyfrom method. Thus we will call the method directly on the class
Parameters: |
|
---|
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 |
Epydoc: mrv.interface.iProgressIndicator
Bases: mrv.interface.Interface
Interface allowing to submit progress information The default implementation just prints the respective messages Additionally you may query whether the computation has been cancelled by the user
Note: | this interface is a simple progress indicator itself, and can do some computations for you if you use the get() method yourself |
---|
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: | the current progress value |
---|---|
Note: | if set to relative mode, values will range from 0.0 to 100.0. Values will always be within the ones returned by range |
Returns: | True if the process may be cancelled |
---|
Returns: | true if the operation should be aborted |
---|
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | true if internal progress computations are relative, False if they are treated as absolute values |
---|
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: | a prefix indicating the progress according to the current range and given value |
---|
Returns: | tuple( min, max ) value |
---|
Refresh the progress indicator so that it represents its values on screen.
Parameter: | message – message passed along by the user |
---|
Returns: | the root of the DAG - it has no further parents |
---|
Returns: | True if roundRobin mode is enabled |
---|
Set the progress of the progress indicator to the given value
Parameters: |
|
---|
Multifunctional, all in one convenience method setting all important attributes at once. This allows setting up the progress indicator with one call instead of many
Note: | If a kw argument is None, it will not be set |
---|---|
Parameters: |
|
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 |
Returns: | current progress as it is stored internally, without regarding the range or round-robin options. |
---|---|
Note: | This allows you to use this instance as a counter without concern to the range and round-robin settings |
Bases: mrv.interface.Interface
Prompt a value from the user, providing a default if no input is retrieved
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 |