Foundry.PtyDiagnostics¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8), Gio.ListModel (4)
- Structs:
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
GObject.Object (7), Json.Serializable (5), Gio.ListModel (3)
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Foundry.PtyDiagnostics(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Custom PTY intermediate that can extract diagnostics.
- classmethod new(context, pty_fd)¶
- Parameters:
context (
Foundry.Context) – a [class`Foundry`.Context]pty_fd (
int) – a file-descriptor for PTY consumer
- Return type:
pty_fd should be a valid file-descriptor for the consumer side of the PTY device. This is sometimes, historically, called the “master” side of a PTY device.
pty_fd will be ``dup()``d.
You can use [method`Foundry`.PtyDiagnostics.get_fd] to get a new synthetic PTY consumer for which you can create a producer for and attach to child processes.
The resulting [class`Foundry`.PtyDiagnostics] is also a [iface`Gio`.ListModel] of [class`Foundry`.Diagnostic] so you may use the list model API to access diagnostics as they are discovered.
- classmethod register(regex)¶
- Parameters:
regex (
GLib.Regex) –
Registers regex for use when extracting diagnostics from a PTY stream.
The regex should capture values into named groups that the [class`Foundry`.PtyDiagnostics] can turn into [class`Foundry`.Diagnostic].
Named groups supported are:
message
filename
line
column
level
- create_producer()¶
- Raises:
- Return type:
- reset()¶