supybot.registry¶
-
class
supybot.registry.
Boolean
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Value
Value must be either True or False (or On or Off).
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
CommaSeparatedListOfStrings
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.SeparatedListOf
-
List
¶ alias of
builtins.list
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
joiner
()¶ Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
CommaSeparatedSetOfStrings
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.SeparatedListOf
-
List
¶ alias of
builtins.set
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
joiner
()¶ Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
Float
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Value
Value must be a floating-point number.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
Group
(help='', orderAlphabetically=True, private=False)[source]¶ Bases:
object
A group; it doesn’t hold a value unless handled by a subclass.
-
class
supybot.registry.
Integer
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Value
Value must be an integer.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
exception
supybot.registry.
InvalidRegistryFile
[source]¶ Bases:
supybot.registry.RegistryException
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
supybot.registry.
InvalidRegistryName
[source]¶ Bases:
supybot.registry.RegistryException
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
supybot.registry.
InvalidRegistryValue
[source]¶ Bases:
supybot.registry.RegistryException
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
supybot.registry.
Json
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
editable
()[source]¶ Return an editable dict usable within a ‘with’ statement and committed to the configuration variable at the end.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(v)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
exception
supybot.registry.
NonExistentRegistryEntry
[source]¶ Bases:
supybot.registry.RegistryException
,AttributeError
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
supybot.registry.
NonNegativeInteger
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Integer
Value must be a non-negative integer.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
NormalizedString
(default, *args, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(s)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
OnlySomeStrings
(*args, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(s)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
PositiveFloat
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Float
Value must be a floating-point number greater than zero.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
PositiveInteger
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.NonNegativeInteger
Value must be positive (non-zero) integer.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
Probability
(*args, **kwargs)[source]¶ Bases:
supybot.registry.Float
Value must be a floating point number in the range [0, 1].
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
Regexp
(default, *args, **kwargs)[source]¶ Bases:
supybot.registry.Value
Value must be a valid regular expression.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
-
exception
supybot.registry.
RegistryException
[source]¶ Bases:
Exception
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
supybot.registry.
SeparatedListOf
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Value
-
List
¶ alias of
builtins.list
-
class
Value
(default, help, setDefault=True, showDefault=True, **kwargs)¶ Bases:
supybot.registry.Group
Invalid registry value. If you’re getting this message, report it, because we forgot to put a proper help string here.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
SpaceSeparatedListOf
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.SeparatedListOf
-
List
¶ alias of
builtins.list
-
class
Value
(default, help, setDefault=True, showDefault=True, **kwargs)¶ Bases:
supybot.registry.Group
Invalid registry value. If you’re getting this message, report it, because we forgot to put a proper help string here.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
joiner
()¶ Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
SpaceSeparatedListOfStrings
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.SpaceSeparatedListOf
-
List
¶ alias of
builtins.list
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
joiner
()¶ Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
splitter
(s)¶ Override this with a function that takes a string and returns a list of strings.
-
-
class
supybot.registry.
SpaceSeparatedSetOfStrings
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.SpaceSeparatedListOfStrings
-
List
¶ alias of
builtins.set
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
joiner
()¶ Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
splitter
(s)¶ Override this with a function that takes a string and returns a list of strings.
-
-
class
supybot.registry.
String
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Value
Value is not a valid Python string.
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
StringSurroundedBySpaces
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
StringWithSpaceOnRight
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
TemplatedString
(*args, **kwargs)[source]¶ Bases:
supybot.registry.String
-
addCallback
(callback, *args, **kwargs)¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
removeCallback
(callback)¶ Remove all occurences of this callbacks from the callback list.
-
set
(s)¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-
-
class
supybot.registry.
Value
(default, help, setDefault=True, showDefault=True, **kwargs)[source]¶ Bases:
supybot.registry.Group
Invalid registry value. If you’re getting this message, report it, because we forgot to put a proper help string here.
-
addCallback
(callback, *args, **kwargs)[source]¶ Add a callback to the list. A callback is a function that will be called when the value is changed. You can give this function as many extra arguments as you wish, they will be passed to the callback.
-
context
(value)[source]¶ Return a context manager object, which sets this variable to a temporary value, and set the previous value back when exiting the context.
-
getSpecific
(network=None, channel=None, check=True)[source]¶ Gets the network-specific and/or channel-specific value of this Value. If check=True (the default), this will raise an error if network (resp. channel) is provided but this Value is not network-specific (resp. channel-specific). If check=False, then network and/or channel may be silently ignored.
-
set
(s)[source]¶ Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.
-
setValue
(v)[source]¶ Check conditions on the actual value type here. I.e., if you’re a IntegerLessThanOneHundred (all your values must be integers less than 100) convert to an integer in set() and check that the integer is less than 100 in this method. You must call this parent method in your own setValue.
-