This module is part of the Python Sardana libray. It defines the base classes for MetaLibrary and MetaClass
Classes
Object representing a python module containing sardana classes. Public members:
module - reference to python module
file_path - complete (absolute) path (with file name at the end)
file_name - file name (including file extension)
path - complete (absolute) path
name - (=module name) module name (without file extension)
meta_classes - dict<str, SardanMetaClass>
- exc_info - exception information if an error occurred when loading
the module
object name
Returns the module name for this library.
Returns: | the module name |
---|---|
Return type: | str |
Returns a sequence of sourcelines corresponding to the module code.
Returns: | list of source code lines |
---|---|
Return type: | list<str> |
Adds a new :class:~`sardana.sardanameta.SardanaClass` to this library.
Parameters: | meta_class (:class:~`sardana.sardanameta.SardanaClass`) – the meta class to be added to this library |
---|
Returns a :class:~`sardana.sardanameta.SardanaClass` for the given meta class name or None if the meta class does not exist in this library.
Parameters: | meta_class_name (str) – the meta class name |
---|---|
Returns: | a meta class or None |
Return type: | :class:~`sardana.sardanameta.SardanaClass` |
Returns a sequence of the meta classes that belong to this library.
Returns: | a sequence of meta classes that belong to this library |
---|---|
Return type: | seq<:class:~`sardana.sardanameta.SardanaClass`> |
Returns True if the given meta class name belongs to this library or False otherwise.
Parameters: | meta_class_name (str) – the meta class name |
---|---|
Returns: | True if the given meta class name belongs to this library or False otherwise |
Return type: | bool |
Adds a new :class:~`sardana.sardanameta.SardanaFunction` to this library.
Parameters: | meta_function (:class:~`sardana.sardanameta.SardanaFunction`) – the meta function to be added to this library |
---|
Returns a :class:~`sardana.sardanameta.SardanaFunction` for the given meta function name or None if the meta function does not exist in this library.
Parameters: | meta_function_name (str) – the meta function name |
---|---|
Returns: | a meta function or None |
Return type: | :class:~`sardana.sardanameta.SardanaFunction` |
Returns a sequence of the meta functions that belong to this library.
Returns: | a sequence of meta functions that belong to this library |
---|---|
Return type: | seq<:class:~`sardana.sardanameta.SardanaFunction`> |
Returns True if the given meta function name belongs to this library or False otherwise.
Parameters: | meta_function_name (str) – the meta function name |
---|---|
Returns: | True if the given meta function name belongs to this library or False otherwise |
Return type: | bool |
Returns a :class:~`sardana.sardanameta.SardanaCode` for the given meta name or None if the meta does not exist in this library.
Parameters: | meta_name (str) – the meta name (class, function) |
---|---|
Returns: | a meta or None |
Return type: | :class:~`sardana.sardanameta.SardanaCode` |
Returns True if the given meta name belongs to this library or False otherwise.
Parameters: | meta_name (str) – the meta name |
---|---|
Returns: | True if the given meta (class or function) name belongs to this library or False otherwise |
Return type: | bool |
Returns a sequence of the meta (class and functions) that belong to this library.
Returns: | a sequence of meta (class and functions) that belong to this library |
---|---|
Return type: | seq<:class:~`sardana.sardanameta.SardanaCode`> |
Returns the module name for this library (same as :meth:~sardana.sardanameta.SardanaLibrary.get_module_name).
Returns: | the module name |
---|---|
Return type: | str |
Returns the module name for this library (same as :meth:~sardana.sardanameta.SardanaLibrary.get_name).
Returns: | the module name |
---|---|
Return type: | str |
Returns the python module for this library.
Returns: | the python module |
---|---|
Return type: | object |
Returns the this library documentation or “<Undocumented>” if no documentation exists.
Returns: | this library documentation or None |
---|---|
Return type: | str |
Returns a sequence of sourcelines corresponding to the module code.
Returns: | list of source code lines |
---|---|
Return type: | list<str> |
Returns the file path for this library. On posix systems is something like: /abs/path/filename.py
Returns: | this library file path |
---|---|
Return type: | str |
Returns the file name for this library. On posix systems is something like: filename.py
Returns: | this library file name |
---|---|
Return type: | str |
Returns True if this library has syntax errors or False otherwise.
Returns: | True if this library has syntax errors or False otherwise |
---|---|
Return type: | bool |
Sets the error information for this library
Parameters: | exc_info (tuple<type, value, traceback>) – error information. It must be an object similar to the one returned by sys.exc_info() |
---|
Gets the error information for this library or None if no error exists
Returns: | error information. An object similar to the one returned by sys.exc_info() |
---|---|
Return type: | tuple<type, value, traceback> |
Returns a serializable object describing this object.
Returns: | a serializable dict |
---|---|
Return type: | dict |
Adds a new logging child
Parameters: | child – (logging.Logger) the new child |
---|
Registers a new log level
Parameters: |
|
---|
Registers a new handler in this object’s logger
Parameters: | handler – (logging.Handler) the new handler to be added |
---|
Adds a new handler to the root logger
Parameters: | h – (logging.Handler) the new log handler |
---|
Adds a new listener for this object.
Parameters: | listener – a listener |
---|
Method to be called from subclasses to call superclass corresponding __init__ method. This method ensures that classes from diamond like class hierarquies don’t call their super classes __init__ more than once.
Same as call__init__ but without keyword arguments because PyQT does not support them.
Change the log name for this object.
Parameters: | name – (str) the new log name |
---|
The cleanUp. Default implementation does nothing Overwrite when necessary
Copies the log handlers of other object to this object
Parameters: | other – (object) object which contains ‘log_handlers’ |
---|
Record a critical message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.critical().
Parameters: |
|
---|
Record a debug message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.debug().
Parameters: |
|
---|
Record a deprecated warning message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.warning().
Parameters: |
|
---|
Disables the logging.StreamHandler which dumps log records, by default, to the stderr.
Enables the logging.StreamHandler which dumps log records, by default, to the stderr.
Record an error message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.error().
Parameters: |
|
---|
Log a message with severity ‘ERROR’ on the root logger, with exception information.. Accepted args are the same as logging.Logger.exception().
Parameters: |
|
---|
Record a fatal message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.fatal().
Parameters: |
|
---|
Flushes the log output
the object frontend
object full name
Returns the log children for this object
Returns: | (sequence<logging.Logger) the list of log children |
---|
Retuns the current log message format (the root log format)
Returns: | (str) the log message format |
---|
Gets the full log name for this object
Returns: | (str) the full log name |
---|
Retuns the current log level (the root log level)
Returns: | (int) a number representing the log level |
---|
Gets the log name for this object
Returns: | (str) the log name |
---|
Returns the log object for this object
Returns: | (logging.Logger) the log object |
---|
Returns the log parent for this object or None if no parent exists
Returns: | (logging.Logger or None) the log parent for this object |
---|
Retuns the root logger
Returns: | (logging.Logger) the root logger |
---|
Returns this sardana frontend object or None if no frontend is registered
Returns: | this objects frontend |
---|---|
Return type: | object |
Returns this sardana object full name
Returns: | this sardana object full name |
---|---|
Return type: | str |
Returns the interface this object implements.
Returns: | The interface this object implements. |
---|---|
Return type: | sardana.sardanadefs.Interface |
Returns a sequence of interface names this object implements.
Returns: | The sequence of interfaces this object implements. |
---|---|
Return type: | sequence<str> |
Returns the set of interfaces this object implements.
Returns: | The set of interfaces this object implements. |
---|---|
Return type: | class:set <sardana.sardanadefs.Interface> |
Return the sardana.Manager which owns this sardana object.
Returns: | the manager which owns this pool object. |
---|---|
Return type: | sardana.Manager |
Returns this pool object parent.
Returns: | this objects parent |
---|---|
Return type: | SardanaBaseObject |
Returns this sardana object parent’s name.
Returns: | this objects parent |
---|---|
Return type: | str |
Returns this sardana object type.
Returns: | this sardana object type |
---|---|
Return type: | ElementType |
Returns True if anybody is listening to events from this object
Returns: | True is at least one listener is listening or False otherwise |
---|
Record an info message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.info().
Parameters: |
|
---|
Class method to initialize the root logger. Do NOT call this method directly in your code
Record a log message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.log().
Parameters: |
|
---|
reference to the sardana.Manager
Removes the given handler from the root logger
Parameters: | h – (logging.Handler) the handler to be removed |
---|
Removes an existing listener for this object.
Parameters: | listener – the listener to be removed |
---|---|
Returns: | True is succeeded or False otherwise |
Resets the log message format (the root log format)
Resets the log level (the root log level)
sets the new log message format
Parameters: | level – (str) the new log message format |
---|
sets the new log level (the root log level)
Parameters: | level – (int) the new log level |
---|
Log the usual stack information, followed by a listing of all the local variables in each frame.
Parameters: | target – (int) the log level assigned to the record |
---|---|
Returns: | (str) The stack string representation |
Synchronises the log output
Record a trace message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.log().
Parameters: |
|
---|
Log the usual traceback information, followed by a listing of all the local variables in each frame.
Parameters: |
|
---|---|
Returns: | (str) The traceback string representation |
Record a warning message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.warning().
Parameters: |
|
---|
Object representing a python class.
Adds a new logging child
Parameters: | child – (logging.Logger) the new child |
---|
Registers a new log level
Parameters: |
|
---|
Registers a new handler in this object’s logger
Parameters: | handler – (logging.Handler) the new handler to be added |
---|
Adds a new handler to the root logger
Parameters: | h – (logging.Handler) the new log handler |
---|
Adds a new listener for this object.
Parameters: | listener – a listener |
---|
Method to be called from subclasses to call superclass corresponding __init__ method. This method ensures that classes from diamond like class hierarquies don’t call their super classes __init__ more than once.
Same as call__init__ but without keyword arguments because PyQT does not support them.
Change the log name for this object.
Parameters: | name – (str) the new log name |
---|
The cleanUp. Default implementation does nothing Overwrite when necessary
Returns a tuple (sourcelines, firstline) corresponding to the definition of this code object. sourcelines is a list of source code lines. firstline is the line number of the first source code line.
Copies the log handlers of other object to this object
Parameters: | other – (object) object which contains ‘log_handlers’ |
---|
Record a critical message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.critical().
Parameters: |
|
---|
Record a debug message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.debug().
Parameters: |
|
---|
Record a deprecated warning message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.warning().
Parameters: |
|
---|
Disables the logging.StreamHandler which dumps log records, by default, to the stderr.
Enables the logging.StreamHandler which dumps log records, by default, to the stderr.
Record an error message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.error().
Parameters: |
|
---|
Log a message with severity ‘ERROR’ on the root logger, with exception information.. Accepted args are the same as logging.Logger.exception().
Parameters: |
|
---|
Record a fatal message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.fatal().
Parameters: |
|
---|
Returns the file name for the library where this class is. On posix systems is something like: filename.py
Returns: | the file name for the library where this class is |
---|---|
Return type: | str |
Returns the file path for for the library where this class is. On posix systems is something like: /abs/path/filename.py
Returns: | the file path for for the library where this class is |
---|---|
Return type: | str |
Flushes the log output
the object frontend
object full name
Returns the log children for this object
Returns: | (sequence<logging.Logger) the list of log children |
---|
Retuns the current log message format (the root log format)
Returns: | (str) the log message format |
---|
Gets the full log name for this object
Returns: | (str) the full log name |
---|
Retuns the current log level (the root log level)
Returns: | (int) a number representing the log level |
---|
Gets the log name for this object
Returns: | (str) the log name |
---|
Returns the log object for this object
Returns: | (logging.Logger) the log object |
---|
Returns the log parent for this object or None if no parent exists
Returns: | (logging.Logger or None) the log parent for this object |
---|
Retuns the root logger
Returns: | (logging.Logger) the root logger |
---|
Returns a tuple (sourcelines, firstline) corresponding to the definition of the controller class. sourcelines is a list of source code lines. firstline is the line number of the first source code line.
Returns this sardana frontend object or None if no frontend is registered
Returns: | this objects frontend |
---|---|
Return type: | object |
Returns this sardana object full name
Returns: | this sardana object full name |
---|---|
Return type: | str |
Returns the interface this object implements.
Returns: | The interface this object implements. |
---|---|
Return type: | sardana.sardanadefs.Interface |
Returns a sequence of interface names this object implements.
Returns: | The sequence of interfaces this object implements. |
---|---|
Return type: | sequence<str> |
Returns the set of interfaces this object implements.
Returns: | The set of interfaces this object implements. |
---|---|
Return type: | class:set <sardana.sardanadefs.Interface> |
Return the sardana.Manager which owns this sardana object.
Returns: | the manager which owns this pool object. |
---|---|
Return type: | sardana.Manager |
Returns this sardana object name
Returns: | this sardana object name |
---|---|
Return type: | str |
Returns this pool object parent.
Returns: | this objects parent |
---|---|
Return type: | SardanaBaseObject |
Returns this sardana object parent’s name.
Returns: | this objects parent |
---|---|
Return type: | str |
Returns this sardana object type.
Returns: | this sardana object type |
---|---|
Return type: | ElementType |
Returns True if anybody is listening to events from this object
Returns: | True is at least one listener is listening or False otherwise |
---|
Record an info message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.info().
Parameters: |
|
---|
Class method to initialize the root logger. Do NOT call this method directly in your code
Returns the library :class:~`sardana.sardanameta.SardanaLibrary` for this class.
Returns: | a reference to the library where this class is located |
---|---|
Return type: | :class:~`sardana.sardanameta.SardanaLibrary` |
Record a log message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.log().
Parameters: |
|
---|
reference to the sardana.Manager
Returns the python module for this class.
Returns: | the python module |
---|---|
Return type: | object |
Returns the module name for this class.
Returns: | the module name |
---|---|
Return type: | str |
object name
Returns the absolute path for the library where this class is. On posix systems is something like: /abs/path
Returns: | the absolute path for the library where this class is |
---|---|
Return type: | str |
Removes the given handler from the root logger
Parameters: | h – (logging.Handler) the handler to be removed |
---|
Removes an existing listener for this object.
Parameters: | listener – the listener to be removed |
---|---|
Returns: | True is succeeded or False otherwise |
Resets the log message format (the root log format)
Resets the log level (the root log level)
Returns a serializable object describing this object.
Returns: | a serializable dict |
---|---|
Return type: | dict |
sets the new log message format
Parameters: | level – (str) the new log message format |
---|
sets the new log level (the root log level)
Parameters: | level – (int) the new log level |
---|
Log the usual stack information, followed by a listing of all the local variables in each frame.
Parameters: | target – (int) the log level assigned to the record |
---|---|
Returns: | (str) The stack string representation |
Synchronises the log output
Record a trace message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.log().
Parameters: |
|
---|
Log the usual traceback information, followed by a listing of all the local variables in each frame.
Parameters: |
|
---|---|
Returns: | (str) The traceback string representation |
Record a warning message in this object’s logger. Accepted args and kwargs are the same as logging.Logger.warning().
Parameters: |
|
---|