tlcore
KLayout core module 'tl'
__all__
module
__all__ = ['__doc__', '__version__', 'EmptyClass', 'Value', 'Interpreter', 'ArgType', 'MethodOverload', 'Method', 'Class', 'Logger', 'Timer', 'Progress', 'AbstractProgress', 'RelativeProgress', 'AbsoluteProgress', 'ExpressionContext', 'Expression', 'GlobPattern', 'ExecutableBase', 'Executable', 'Recipe', 'PythonGetterSetterPair', 'PythonFunction']
Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
__doc__
module
__doc__ = "KLayout core module 'tl'"
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__file__
module
__file__ = '/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/klayout/tlcore.cpython-311-x86_64-linux-gnu.so'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__name__
module
__name__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__package__
module
__package__ = 'klayout'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__version__
module
__version__ = '0.29.8'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
AbsoluteProgress
Bases: klayout.tlcore.Progress
@brief A progress reporter counting progress in absolute units
An absolute progress reporter counts from 0 upwards without a known limit. A unit value is used to convert the value to a bar value. One unit corresponds to 1% on the bar. For formatted output, a format string can be specified as well as a unit value by which the current value is divided before it is formatted.
The progress can be configured to have a description text, a title and a format. The "inc" method increments the value, the "set" or "value=" methods set the value to a specific value.
While one of these three methods is called, they will run the event loop in regular intervals. That makes the application respond to mouse clicks, specifically the Cancel button on the progress bar. If that button is clicked, an exception will be raised by these methods.
The progress object must be destroyed explicitly in order to remove the progress status bar.
The following sample code creates a progress bar which displays the current count as "Megabytes". For the progress bar, one percent corresponds to 16 kByte:
@code p = RBA::AbsoluteProgress::new("test") p.format = "%.2f MBytes" p.unit = 102416 p.format_unit = 10241024 begin 10000000.times { p.inc } ensure p.destroy end @/code
This class has been introduced in version 0.23.
__doc__
class
__doc__ = '@brief A progress reporter counting progress in absolute units\n\nAn absolute progress reporter counts from 0 upwards without a known limit. A unit value is used to convert the value to a bar value. One unit corresponds to 1% on the bar.\nFor formatted output, a format string can be specified as well as a unit value by which the current value is divided before it is formatted.\n\nThe progress can be configured to have a description text, a title and a format.\nThe "inc" method increments the value, the "set" or "value=" methods set the value to a specific value.\n\nWhile one of these three methods is called, they will run the event loop in regular intervals. That makes the application respond to mouse clicks, specifically the Cancel button on the progress bar. If that button is clicked, an exception will be raised by these methods.\n\nThe progress object must be destroyed explicitly in order to remove the progress status bar.\n\nThe following sample code creates a progress bar which displays the current count as "Megabytes".\nFor the progress bar, one percent corresponds to 16 kByte:\n\n@code\np = RBA::AbsoluteProgress::new("test")\np.format = "%.2f MBytes"\np.unit = 1024*16\np.format_unit = 1024*1024\nbegin\n 10000000.times { p.inc }\nensure\n p.destroy\nend\n@/code\n\nThis class has been introduced in version 0.23.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 12
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
format
class
format: None = <attribute 'format' of 'AbsoluteProgress' objects>
@brief sets the output format (sprintf notation) for the progress text
format_unit
class
format_unit: None = <attribute 'format_unit' of 'AbsoluteProgress' objects>
@brief Sets the format unit
This is the unit used for formatted output. The current count is divided by the format unit to render the value passed to the format string.
unit
class
unit: None = <attribute 'unit' of 'AbsoluteProgress' objects>
@brief Sets the unit
Specifies the count value corresponding to 1 percent on the progress bar. By default, the current value divided by the unit is used to create the formatted value from the output string. Another attribute is provided (\format_unit=) to specify a separate unit for that purpose.
value
class
value: None = <attribute 'value' of 'AbsoluteProgress' objects>
@brief Sets the progress value
__copy__
method descriptor
__copy__() -> AbsoluteProgress
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> AbsoluteProgress
@brief Creates a copy of self
__init__
method descriptor
__init__(desc: str) -> None
__init__(desc: str, yield_interval: int) -> None
__init__()
@brief Creates an absolute progress reporter with the given description
The yield interval specifies, how often the event loop will be triggered. When the yield interval is 10 for example, the event loop will be executed every tenth call of \inc or \set.
assign
method descriptor
assign() -> None
@brief Assigns another object to self
dup
method descriptor
dup() -> AbsoluteProgress
@brief Creates a copy of self
inc
method descriptor
inc() -> AbsoluteProgress
@brief Increments the progress value
new
builtin
new(desc: str) -> AbsoluteProgress
new(desc: str, yield_interval: int) -> AbsoluteProgress
new()
@brief Creates an absolute progress reporter with the given description
The yield interval specifies, how often the event loop will be triggered. When the yield interval is 10 for example, the event loop will be executed every tenth call of \inc or \set.
set
method descriptor
set() -> None
@brief Sets the progress value
This method is equivalent to \value=, but it allows forcing the event loop to be triggered. If "force_yield" is true, the event loop will be triggered always, irregardless of the yield interval specified in the constructor.
AbstractProgress
Bases: klayout.tlcore.Progress
@brief The abstract progress reporter
The abstract progress reporter acts as a 'bracket' for a sequence of operations which are connected logically. For example, a DRC script consists of multiple operations. An abstract progress reportert is instantiated during the run time of the DRC script. This way, the application leaves the UI open while the DRC executes and log messages can be collected.
The abstract progress does not have a value.
This class has been introduced in version 0.27.
__doc__
class
__doc__ = "@brief The abstract progress reporter\n\nThe abstract progress reporter acts as a 'bracket' for a sequence of operations which are connected logically. For example, a DRC script consists of multiple operations. An abstract progress reportert is instantiated during the run time of the DRC script. This way, the application leaves the UI open while the DRC executes and log messages can be collected.\n\nThe abstract progress does not have a value.\n\nThis class has been introduced in version 0.27.\n"
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 10
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__copy__
method descriptor
__copy__() -> AbstractProgress
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> AbstractProgress
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates an abstract progress reporter with the given description
assign
method descriptor
assign() -> None
@brief Assigns another object to self
dup
method descriptor
dup() -> AbstractProgress
@brief Creates a copy of self
new
builtin
new() -> AbstractProgress
@brief Creates an abstract progress reporter with the given description
ArgType
@hide
TypeBool
class
TypeBool: int = 1
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeByteArray
class
TypeByteArray: int = 17
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeChar
class
TypeChar: int = 2
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeDouble
class
TypeDouble: int = 13
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeFloat
class
TypeFloat: int = 14
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeInt
class
TypeInt: int = 7
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeLong
class
TypeLong: int = 9
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeLongLong
class
TypeLongLong: int = 11
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeMap
class
TypeMap: int = 22
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeObject
class
TypeObject: int = 20
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeSChar
class
TypeSChar: int = 3
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeShort
class
TypeShort: int = 5
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeString
class
TypeString: int = 16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeUChar
class
TypeUChar: int = 4
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeUInt
class
TypeUInt: int = 8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeULong
class
TypeULong: int = 10
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeULongLong
class
TypeULongLong: int = 12
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeUShort
class
TypeUShort: int = 6
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeVar
class
TypeVar: int = 15
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeVector
class
TypeVector: int = 21
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeVoid
class
TypeVoid: int = 0
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
TypeVoidPtr
class
TypeVoidPtr: int = 19
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 3
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'ArgType' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> ArgType
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> ArgType
@brief Creates a copy of self
__eq__
method descriptor
__eq__() -> bool
@brief Equality of two types
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
__ne__
method descriptor
__ne__() -> bool
@brief Inequality of two types
__repr__
method descriptor
__repr__() -> str
@brief Convert to a string
__str__
method descriptor
__str__() -> str
@brief Convert to a string
assign
method descriptor
assign() -> None
@brief Assigns another object to self
cls
method descriptor
cls() -> Class
@brief Specifies the class for t_object.. types
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
default
method descriptor
default() -> Any
@brief Returns the default value or nil is there is no default value Applies to arguments only. This method has been introduced in version 0.24.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> ArgType
@brief Creates a copy of self
has_default
method descriptor
has_default() -> bool
@brief Returns true, if a default value is specified for this argument Applies to arguments only. This method has been introduced in version 0.24.
inner
method descriptor
inner() -> ArgType
@brief Returns the inner ArgType object (i.e. value of a vector/map) Starting with version 0.22, this method replaces the is_vector method.
inner_k
method descriptor
inner_k() -> ArgType
@brief Returns the inner ArgType object (i.e. key of a map) This method has been introduced in version 0.27.
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
is_cptr
method descriptor
is_cptr() -> bool
@brief True, if the type is a const pointer to the given type This property indicates that the argument is a const pointer (in C++: 'const X *').
is_cref
method descriptor
is_cref() -> bool
@brief True, if the type is a const reference to the given type This property indicates that the argument is a const reference (in C++: 'const X &').
is_iter
method descriptor
is_iter() -> bool
@brief (Return value only) True, if the return value is an iterator rendering the given type
is_ptr
method descriptor
is_ptr() -> bool
@brief True, if the type is a non-const pointer to the given type This property indicates that the argument is a non-const pointer (in C++: 'X *').
is_ref
method descriptor
is_ref() -> bool
@brief True, if the type is a reference to the given type Starting with version 0.22 there are more methods that describe the type of reference and is_ref? only applies to non-const reference (in C++: 'X &').
name
method descriptor
name() -> str
@brief Returns the name for this argument or an empty string if the argument is not named Applies to arguments only. This method has been introduced in version 0.24.
new
builtin
new() -> ArgType
@brief Creates a new object of this class
pass_obj
method descriptor
pass_obj() -> bool
@brief True, if the ownership over an object represented by this type is passed to the receiver In case of the return type, a value of true indicates, that the object is a freshly created one and the receiver has to take ownership of the object.
This method has been introduced in version 0.24.
to_s
method descriptor
to_s() -> str
@brief Convert to a string
type
method descriptor
type() -> int
@brief Return the basic type (see t_.. constants)
Class
@hide
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 6
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Class' objects>
list of weak references to the object
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
base
method descriptor
base() -> Class
@brief The base class or nil if the class does not have a base class
This method has been introduced in version 0.22.
can_copy
method descriptor
can_copy() -> bool
@brief True if the class offers assignment
can_destroy
method descriptor
can_destroy() -> bool
@brief True if the class offers a destroy method
This method has been introduced in version 0.22.
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
doc
method descriptor
doc() -> str
@brief The documentation string for this class
each_child_class
method descriptor
each_child_class() -> Iterator[Class]
@brief Iterate over all child classes defined within this class
each_class
builtin
each_class() -> Iterator[Class]
@brief Iterate over all classes
each_method
method descriptor
each_method() -> Iterator[Method]
@brief Iterate over all methods of this class
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
module
method descriptor
module() -> str
@brief The name of module where the class lives
name
method descriptor
name() -> str
@brief The name of the class
new
builtin
new() -> Class
@brief Creates a new object of this class
parent
method descriptor
parent() -> Class
@brief The parent of the class
python_methods
method descriptor
python_methods() -> List[PythonFunction]
@brief Gets the Python methods (static or non-static)
python_properties
method descriptor
python_properties() -> List[PythonGetterSetterPair]
@brief Gets the Python properties (static or non-static) as a list of getter/setter pairs Note that if a getter or setter is not available the list of Python functions for this part is empty.
EmptyClass
__doc__
class
__doc__ = ''
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 0
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'EmptyClass' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> EmptyClass
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> EmptyClass
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> EmptyClass
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> EmptyClass
@brief Creates a new object of this class
Executable
Bases: klayout.tlcore.ExecutableBase
@brief A generic executable object This object is a delegate for implementing the actual function of some generic executable function. In addition to the plain execution, if offers a post-mortem cleanup callback which is always executed, even if execute's implementation is cancelled in the debugger.
Parameters are kept as a generic key/value map.
This class has been introduced in version 0.27.
__doc__
class
__doc__ = "@brief A generic executable object\nThis object is a delegate for implementing the actual function of some generic executable function. In addition to the plain execution, if offers a post-mortem cleanup callback which is always executed, even if execute's implementation is cancelled in the debugger.\n\nParameters are kept as a generic key/value map.\n\nThis class has been introduced in version 0.27."
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 17
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
ExecutableBase
@hide @alias Executable
__doc__
class
__doc__ = '@hide\n@alias Executable'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 16
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'ExecutableBase' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> ExecutableBase
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> ExecutableBase
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> ExecutableBase
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> ExecutableBase
@brief Creates a new object of this class
Expression
Bases: klayout.tlcore.ExpressionContext
@brief Evaluation of Expressions
This class allows evaluation of expressions. Expressions are used in many places throughout KLayout and provide computation features for various applications. Having a script language, there is no real use for expressions inside a script client. This class is provided mainly for testing purposes.
An expression is 'compiled' into an Expression object and can be evaluated multiple times.
This class has been introduced in version 0.25. In version 0.26 it was separated into execution and context.
__doc__
class
__doc__ = "@brief Evaluation of Expressions\n\nThis class allows evaluation of expressions. Expressions are used in many places throughout KLayout and provide computation features for various applications. Having a script language, there is no real use for expressions inside a script client. This class is provided mainly for testing purposes.\n\nAn expression is 'compiled' into an Expression object and can be evaluated multiple times.\n\nThis class has been introduced in version 0.25. In version 0.26 it was separated into execution and context.\n"
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 14
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
text
class
text: None = <attribute 'text' of 'Expression' objects>
@brief Sets the given text as the expression.
__init__
method descriptor
__init__(expr: str) -> None
__init__(expr: str, variables: Dict[str, Any]) -> None
__init__()
@brief Creates an expression evaluator This version of the constructor takes a hash of variables available to the expressions.
eval
builtin
eval() -> Any
@brief A convience function to evaluate the given expression and directly return the result This is a static method that does not require instantiation of the expression object first.
new
builtin
new(expr: str) -> Expression
new(expr: str, variables: Dict[str, Any]) -> Expression
new()
@brief Creates an expression evaluator This version of the constructor takes a hash of variables available to the expressions.
ExpressionContext
@brief Represents the context of an expression evaluation
The context provides a variable namespace for the expression evaluation.
This class has been introduced in version 0.26 when \Expression was separated into the execution and context part.
__doc__
class
__doc__ = '@brief Represents the context of an expression evaluation\n\nThe context provides a variable namespace for the expression evaluation.\n\nThis class has been introduced in version 0.26 when \\Expression was separated into the execution and context part.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 13
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'ExpressionContext' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> ExpressionContext
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> ExpressionContext
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> ExpressionContext
@brief Creates a copy of self
eval
method descriptor
eval() -> Any
@brief Compiles and evaluates the given expression in this context This method has been introduced in version 0.26.
global_var
builtin
global_var() -> None
@brief Defines a global variable with the given name and value
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> ExpressionContext
@brief Creates a new object of this class
var
method descriptor
var() -> None
@brief Defines a variable with the given name and value
GlobPattern
@brief A glob pattern matcher This class is provided to make KLayout's glob pattern matching available to scripts too. The intention is to provide an implementation which is compatible with KLayout's pattern syntax.
This class has been introduced in version 0.26.
__doc__
class
__doc__ = "@brief A glob pattern matcher\nThis class is provided to make KLayout's glob pattern matching available to scripts too. The intention is to provide an implementation which is compatible with KLayout's pattern syntax.\n\nThis class has been introduced in version 0.26."
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 15
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'GlobPattern' objects>
list of weak references to the object
case_sensitive
class
case_sensitive: bool = <attribute 'case_sensitive' of 'GlobPattern' objects>
@brief Gets a value indicating whether the glob pattern match is case sensitive.
@brief Sets a value indicating whether the glob pattern match is case sensitive.
head_match
class
head_match: bool = <attribute 'head_match' of 'GlobPattern' objects>
@brief Gets a value indicating whether trailing characters are allowed.
@brief Sets a value indicating whether trailing characters are allowed. If this predicate is false, the glob pattern needs to match the full subject string. If true, the match function will ignore trailing characters and return true if the front part of the subject string matches.
__copy__
method descriptor
__copy__() -> GlobPattern
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> GlobPattern
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new glob pattern match object
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> GlobPattern
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
match
method descriptor
match() -> Any
@brief Matches the subject string against the pattern. Returns nil if the subject string does not match the pattern. Otherwise returns a list with the substrings captured in round brackets.
new
builtin
new() -> GlobPattern
@brief Creates a new glob pattern match object
Interpreter
@brief A generalization of script interpreters The main purpose of this class is to provide cross-language call options. Using the Python interpreter, it is possible to execute Python code from Ruby for example.
The following example shows how to use the interpreter class to execute Python code from Ruby and how to pass values from Ruby to Python and back using the \Value wrapper object:
@code pya = RBA::Interpreter::python_interpreter out_param = RBA::Value::new(17) pya.define_variable("out_param", out_param) pya.eval_string(<<END) print("This is Python now!") out_param.value = out_param.value + 25 END puts out_param.value # gives '42'@/code
This class was introduced in version 0.27.5.
__doc__
class
__doc__ = '@brief A generalization of script interpreters\nThe main purpose of this class is to provide cross-language call options. Using the Python interpreter, it is possible to execute Python code from Ruby for example.\n\nThe following example shows how to use the interpreter class to execute Python code from Ruby and how to pass values from Ruby to Python and back using the \\Value wrapper object:\n\n@code\npya = RBA::Interpreter::python_interpreter\nout_param = RBA::Value::new(17)\npya.define_variable("out_param", out_param)\npya.eval_string(<<END)\nprint("This is Python now!")\nout_param.value = out_param.value + 25\nEND\nputs out_param.value # gives \'42\'@/code\n\nThis class was introduced in version 0.27.5.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 2
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Interpreter' objects>
list of weak references to the object
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
define_variable
method descriptor
define_variable() -> None
@brief Defines a (global) variable with the given name and value You can use the \Value class to provide 'out' or 'inout' parameters which can be modified by code executed inside the interpreter and read back by the caller.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
eval_expr
method descriptor
eval_expr() -> Any
@brief Executes the expression inside the given string and returns the result value Use 'filename' and 'line' to indicate the original source for the error messages.
eval_string
method descriptor
eval_string() -> None
@brief Executes the code inside the given string Use 'filename' and 'line' to indicate the original source for the error messages.
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
load_file
method descriptor
load_file() -> None
@brief Loads the given file into the interpreter This will execute the code inside the file.
new
builtin
new() -> Interpreter
@brief Creates a new object of this class
python_interpreter
builtin
python_interpreter() -> Interpreter
@brief Gets the instance of the Python interpreter
ruby_interpreter
builtin
ruby_interpreter() -> Interpreter
@brief Gets the instance of the Ruby interpreter
Logger
@brief A logger
The logger outputs messages to the log channels. If the log viewer is open, the log messages will be shown in the logger view. Otherwise they will be printed to the terminal on Linux for example.
A code example:
@code RBA::Logger::error("An error message") RBA::Logger::warn("A warning") @/code
This class has been introduced in version 0.23.
__doc__
class
__doc__ = '@brief A logger\n\nThe logger outputs messages to the log channels. If the log viewer is open, the log messages will be shown in the logger view. Otherwise they will be printed to the terminal on Linux for example.\n\nA code example:\n\n@code\nRBA::Logger::error("An error message")\nRBA::Logger::warn("A warning")\n@/code\n\nThis class has been introduced in version 0.23.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 7
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Logger' objects>
list of weak references to the object
verbosity
class
verbosity: int = 0
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__copy__
method descriptor
__copy__() -> Logger
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> Logger
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> Logger
@brief Creates a copy of self
error
builtin
error() -> None
@brief Writes the given string to the error channel
The error channel is formatted as an error (i.e. red in the logger window) and output unconditionally.
info
builtin
info() -> None
@brief Writes the given string to the info channel
The info channel is printed as neutral messages unconditionally.
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
log
builtin
log() -> None
@brief Writes the given string to the log channel
Log messages are printed as neutral messages and are output only if the verbosity is above 0.
new
builtin
new() -> Logger
@brief Creates a new object of this class
warn
builtin
warn() -> None
@brief Writes the given string to the warning channel
The warning channel is formatted as a warning (i.e. blue in the logger window) and output unconditionally.
Method
@hide
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 5
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Method' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> Method
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> Method
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
__repr__
method descriptor
__repr__() -> str
@brief Describes the method This attribute returns a string description of the method and its signature.
This method has been introduced in version 0.29.
__str__
method descriptor
__str__() -> str
@brief Describes the method This attribute returns a string description of the method and its signature.
This method has been introduced in version 0.29.
accepts_num_args
method descriptor
accepts_num_args() -> bool
@brief True, if this method is compatible with the given number of arguments
This method has been introduced in version 0.24.
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
doc
method descriptor
doc() -> str
@brief The documentation string for this method
dup
method descriptor
dup() -> Method
@brief Creates a copy of self
each_argument
method descriptor
each_argument() -> Iterator[ArgType]
@brief Iterate over all arguments of this method
each_overload
method descriptor
each_overload() -> Iterator[MethodOverload]
@brief This iterator delivers the synonyms (overloads).
This method has been introduced in version 0.24.
is_const
method descriptor
is_const() -> bool
@brief True, if this method does not alter the object
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
is_constructor
method descriptor
is_constructor() -> bool
@brief True, if this method is a constructor Static methods that return new objects are constructors. This method has been introduced in version 0.25.
is_protected
method descriptor
is_protected() -> bool
@brief True, if this method is protected
This method has been introduced in version 0.24.
is_signal
method descriptor
is_signal() -> bool
@brief True, if this method is a signal
Signals replace events for version 0.25. is_event? is no longer available.
is_static
method descriptor
is_static() -> bool
@brief True, if this method is static (a class method)
name
method descriptor
name() -> str
@brief The name string of the method A method may have multiple names (aliases). The name string delivers all of them in a combined way.
The names are separated by pipe characters (|). A trailing star (*) indicates that the method is protected.
Names may be prefixed by a colon (:) to indicate a property getter. This colon does not appear in the method name.
A hash prefix indicates that a specific alias is deprecated.
Names may be suffixed by a question mark (?) to indicate a predicate or a equal character (=) to indicate a property setter. Depending on the preferences of the language, these characters may appear in the method names of not - in Python they don't, in Ruby they will be part of the method name.
The backslash character is used inside the names to escape these special characters.
The preferred method of deriving the overload is to iterate then using \each_overload.
new
builtin
new() -> Method
@brief Creates a new object of this class
primary_name
method descriptor
primary_name() -> str
@brief The primary name of the method The primary name is the first name of a sequence of aliases.
This method has been introduced in version 0.24.
python_methods
method descriptor
python_methods() -> str
@brief Gets the Python specific documentation
ret_type
method descriptor
ret_type() -> ArgType
@brief The return type of this method
to_s
method descriptor
to_s() -> str
@brief Describes the method This attribute returns a string description of the method and its signature.
This method has been introduced in version 0.29.
MethodOverload
@hide
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 4
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'MethodOverload' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> MethodOverload
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> MethodOverload
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
deprecated
method descriptor
deprecated() -> bool
@brief A value indicating that this overload is deprecated
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> MethodOverload
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
is_getter
method descriptor
is_getter() -> bool
@brief A value indicating that this overload is a property getter
is_predicate
method descriptor
is_predicate() -> bool
@brief A value indicating that this overload is a predicate
is_setter
method descriptor
is_setter() -> bool
@brief A value indicating that this overload is a property setter
name
method descriptor
name() -> str
@brief The name of this overload This is the raw, unadorned name. I.e. no question mark suffix for predicates, no equal character suffix for setters etc.
new
builtin
new() -> MethodOverload
@brief Creates a new object of this class
Progress
@brief A progress reporter
This is the base class for all progress reporter objects. Progress reporter objects are used to report the progress of some operation and to allow aborting an operation. Progress reporter objects must be triggered periodically, i.e. a value must be set. On the display side, a progress bar usually is used to represent the progress of an operation.
Actual implementations of the progress reporter class are \RelativeProgress and \AbsoluteProgress.
This class has been introduced in version 0.23.
__doc__
class
__doc__ = '@brief A progress reporter\n\nThis is the base class for all progress reporter objects. Progress reporter objects are used to report the progress of some operation and to allow aborting an operation. Progress reporter objects must be triggered periodically, i.e. a value must be set. On the display side, a progress bar usually is used to represent the progress of an operation.\n\nActual implementations of the progress reporter class are \\RelativeProgress and \\AbsoluteProgress.\n\nThis class has been introduced in version 0.23.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 9
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Progress' objects>
list of weak references to the object
desc
class
desc: str = <attribute 'desc' of 'Progress' objects>
@brief Gets the description text of the progress object
@brief Sets the description text of the progress object
title
class
title: None = <attribute 'title' of 'Progress' objects>
@brief Sets the title text of the progress object
Initially the title is equal to the description.
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> Progress
@brief Creates a new object of this class
PythonFunction
@hide
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 20
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'PythonFunction' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> PythonFunction
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> PythonFunction
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> PythonFunction
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
is_protected
method descriptor
is_protected() -> bool
@brief Gets a value indicating whether this function is protected
is_static
method descriptor
is_static() -> bool
@brief Gets the value indicating whether this Python function is 'static' (class function)
methods
method descriptor
methods() -> List[Method]
@brief Gets the list of methods bound to this Python function
name
method descriptor
name() -> str
@brief Gets the name of this Python function
new
builtin
new() -> PythonFunction
@brief Creates a new object of this class
PythonGetterSetterPair
@hide
__doc__
class
__doc__ = '@hide'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 19
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'PythonGetterSetterPair' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> PythonGetterSetterPair
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> PythonGetterSetterPair
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> PythonGetterSetterPair
@brief Creates a copy of self
getter
method descriptor
getter() -> PythonFunction
@brief Gets the getter function
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> PythonGetterSetterPair
@brief Creates a new object of this class
setter
method descriptor
setter() -> PythonFunction
@brief Gets the setter function
Recipe
@brief A facility for providing reproducible recipes The idea of this facility is to provide a service by which an object can be reproduced in a parametrized way. The intended use case is a DRC report for example, where the DRC script is the generator.
In this use case, the DRC engine will register a recipe. It will put the serialized version of the recipe into the DRC report. If the user requests a re-run of the DRC, the recipe will be called and the implementation is supposed to deliver a new database.
To register a recipe, reimplement the Recipe class and create an instance. To serialize a recipe, use "generator", to execute the recipe, use "make".
Parameters are kept as a generic key/value map.
This class has been introduced in version 0.26.
__doc__
class
__doc__ = '@brief A facility for providing reproducible recipes\nThe idea of this facility is to provide a service by which an object\ncan be reproduced in a parametrized way. The intended use case is a \nDRC report for example, where the DRC script is the generator.\n\nIn this use case, the DRC engine will register a recipe. It will \nput the serialized version of the recipe into the DRC report. If the \nuser requests a re-run of the DRC, the recipe will be called and \nthe implementation is supposed to deliver a new database.\n\nTo register a recipe, reimplement the Recipe class and create an\ninstance. To serialize a recipe, use "generator", to execute the\nrecipe, use "make".\n\nParameters are kept as a generic key/value map.\n\nThis class has been introduced in version 0.26.'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 18
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Recipe' objects>
list of weak references to the object
__init__
method descriptor
__init__() -> None
@brief Creates a new recipe object with the given name and (optional) description
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
description
method descriptor
description() -> str
@brief Gets the description of the recipe.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
generator
method descriptor
generator() -> str
@brief Delivers the generator string from the given parameters. The generator string can be used with \make to re-run the recipe.
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
make
builtin
make() -> Any
@brief Executes the recipe given by the generator string. The generator string is the one delivered with \generator. Additional parameters can be passed in "add_params". They have lower priority than the parameters kept inside the generator string.
name
method descriptor
name() -> str
@brief Gets the name of the recipe.
new
builtin
new() -> Recipe
@brief Creates a new recipe object with the given name and (optional) description
RelativeProgress
Bases: klayout.tlcore.Progress
@brief A progress reporter counting progress in relative units
A relative progress reporter counts from 0 to some maximum value representing 0 to 100 percent completion of a task. The progress can be configured to have a description text, a title and a format. The "inc" method increments the value, the "set" or "value=" methods set the value to a specific value.
While one of these three methods is called, they will run the event loop in regular intervals. That makes the application respond to mouse clicks, specifically the Cancel button on the progress bar. If that button is clicked, an exception will be raised by these methods.
The progress object must be destroyed explicitly in order to remove the progress status bar.
A code example:
@code p = RBA::RelativeProgress::new("test", 10000000) begin 10000000.times { p.inc } ensure p.destroy end @/code
This class has been introduced in version 0.23.
__doc__
class
__doc__ = '@brief A progress reporter counting progress in relative units\n\nA relative progress reporter counts from 0 to some maximum value representing 0 to 100 percent completion of a task. The progress can be configured to have a description text, a title and a format.\nThe "inc" method increments the value, the "set" or "value=" methods set the value to a specific value.\n\nWhile one of these three methods is called, they will run the event loop in regular intervals. That makes the application respond to mouse clicks, specifically the Cancel button on the progress bar. If that button is clicked, an exception will be raised by these methods.\n\nThe progress object must be destroyed explicitly in order to remove the progress status bar.\n\nA code example:\n\n@code\np = RBA::RelativeProgress::new("test", 10000000)\nbegin\n 10000000.times { p.inc }\nensure\n p.destroy\nend\n@/code\n\nThis class has been introduced in version 0.23.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 11
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
format
class
format: None = <attribute 'format' of 'RelativeProgress' objects>
@brief sets the output format (sprintf notation) for the progress text
value
class
value: None = <attribute 'value' of 'RelativeProgress' objects>
@brief Sets the progress value
__copy__
method descriptor
__copy__() -> RelativeProgress
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> RelativeProgress
@brief Creates a copy of self
__init__
method descriptor
__init__(desc: str, max_value: int) -> None
__init__(desc: str, max_value: int, yield_interval: int) -> None
__init__()
@brief Creates a relative progress reporter with the given description and maximum value
The reported progress will be 0 to 100% for values between 0 and the maximum value. The values are always integers. Double values cannot be used property.
The yield interval specifies, how often the event loop will be triggered. When the yield interval is 10 for example, the event loop will be executed every tenth call of \inc or \set.
assign
method descriptor
assign() -> None
@brief Assigns another object to self
dup
method descriptor
dup() -> RelativeProgress
@brief Creates a copy of self
inc
method descriptor
inc() -> RelativeProgress
@brief Increments the progress value
new
builtin
new(desc: str, max_value: int) -> RelativeProgress
new(desc: str, max_value: int, yield_interval: int) -> RelativeProgress
new()
@brief Creates a relative progress reporter with the given description and maximum value
The reported progress will be 0 to 100% for values between 0 and the maximum value. The values are always integers. Double values cannot be used property.
The yield interval specifies, how often the event loop will be triggered. When the yield interval is 10 for example, the event loop will be executed every tenth call of \inc or \set.
set
method descriptor
set() -> None
@brief Sets the progress value
This method is equivalent to \value=, but it allows forcing the event loop to be triggered. If "force_yield" is true, the event loop will be triggered always, irregardless of the yield interval specified in the constructor.
Timer
@brief A timer (stop watch)
The timer provides a way to measure CPU time. It provides two basic methods: start and stop. After it has been started and stopped again, the time can be retrieved using the user and sys attributes, i.e.:
@code t = RBA::Timer::new t.start
... do something
t.stop puts "it took #{t.sys} seconds (kernel), #{t.user} seconds (user) on the CPU" @/code
The time is reported in seconds.
This class has been introduced in version 0.23.
__doc__
class
__doc__ = '@brief A timer (stop watch)\n\nThe timer provides a way to measure CPU time. It provides two basic methods: start and stop. After it has been started and stopped again, the time can be retrieved using the user and sys attributes, i.e.:\n\n@code\nt = RBA::Timer::new\nt.start\n# ... do something\nt.stop\nputs "it took #{t.sys} seconds (kernel), #{t.user} seconds (user) on the CPU"\n@/code\n\nThe time is reported in seconds.\n\nThis class has been introduced in version 0.23.\n'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 8
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Timer' objects>
list of weak references to the object
__copy__
method descriptor
__copy__() -> Timer
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> Timer
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
@brief Creates a new object of this class
__repr__
method descriptor
__repr__() -> str
@brief Produces a string with the currently elapsed times
__str__
method descriptor
__str__() -> str
@brief Produces a string with the currently elapsed times
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> Timer
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
memory_size
builtin
memory_size() -> int
@brief Gets the current memory usage of the process in Bytes
This method has been introduced in version 0.27.
new
builtin
new() -> Timer
@brief Creates a new object of this class
start
method descriptor
start() -> None
@brief Starts the timer
stop
method descriptor
stop() -> None
@brief Stops the timer
sys
method descriptor
sys() -> float
@brief Returns the elapsed CPU time in kernel mode from start to stop in seconds
to_s
method descriptor
to_s() -> str
@brief Produces a string with the currently elapsed times
user
method descriptor
user() -> float
@brief Returns the elapsed CPU time in user mode from start to stop in seconds
wall
method descriptor
wall() -> float
@brief Returns the elapsed real time from start to stop in seconds This method has been introduced in version 0.26.
Value
@brief Encapsulates a value (preferably a plain data type) in an object This class is provided to 'box' a value (encapsulate the value in an object). This class is required to interface to pointer or reference types in a method call. By using that class, the method can alter the value and thus implement 'out parameter' semantics. The value may be 'nil' which acts as a null pointer in pointer type arguments. This class has been introduced in version 0.22.
__doc__
class
__doc__ = "@brief Encapsulates a value (preferably a plain data type) in an object\nThis class is provided to 'box' a value (encapsulate the value in an object). This class is required to interface to pointer or reference types in a method call. By using that class, the method can alter the value and thus implement 'out parameter' semantics. The value may be 'nil' which acts as a null pointer in pointer type arguments.\nThis class has been introduced in version 0.22."
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__gsi_id__
class
__gsi_id__ = 1
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
__module__
class
__module__ = 'klayout.tlcore'
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
class
__weakref__ = <attribute '__weakref__' of 'Value' objects>
list of weak references to the object
value
class
value: Any = <attribute 'value' of 'Value' objects>
@brief Gets the actual value.
@brief Set the actual value.
__copy__
method descriptor
__copy__() -> Value
@brief Creates a copy of self
__deepcopy__
method descriptor
__deepcopy__() -> Value
@brief Creates a copy of self
__init__
method descriptor
__init__() -> None
__init__(value: Any) -> None
__init__()
@brief Constructs a non-nil object with the given value. This constructor has been introduced in version 0.22.
__repr__
method descriptor
__repr__() -> str
@brief Convert this object to a string
__str__
method descriptor
__str__() -> str
@brief Convert this object to a string
assign
method descriptor
assign() -> None
@brief Assigns another object to self
create
method descriptor
create() -> None
@brief Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.
destroy
method descriptor
destroy() -> None
@brief Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.
destroyed
method descriptor
destroyed() -> bool
@brief Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.
dup
method descriptor
dup() -> Value
@brief Creates a copy of self
is_const_object
method descriptor
is_const_object() -> bool
@brief Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self.
new
builtin
new() -> Value
new(value: Any) -> Value
new()
@brief Constructs a non-nil object with the given value. This constructor has been introduced in version 0.22.
to_s
method descriptor
to_s() -> str
@brief Convert this object to a string