direct.directnotify.Notifier

from direct.directnotify.Notifier import Notifier

Notifier module: contains methods for handling information output for the programmer/user

Inheritance diagram

Inheritance diagram of direct.directnotify.Notifier

class Notifier(name, logger=None)[source]

Bases: object

__init__(self, name, logger=None)[source]
Parameters
  • name (str) – a string name given to this Notifier instance.

  • logger (Logger, optional) – an optional Logger object for piping output to. If none is specified, the global defaultLogger is used.

debug(self, debugString)[source]

Issue the debug message if debug flag is on

debugCall(self, debugString='')[source]

If this notify is in debug mode, print the time of the call followed by the notifier category and the function call (with parameters).

debugStateCall(self, obj=None, fsmMemberName='fsm', secondaryFsm='secondaryFSM')[source]

If this notify is in debug mode, print the time of the call followed by the [fsm state] notifier category and the function call (with parameters).

error(self, errorString, exception=<class 'Exception'>)[source]

Raise an exception with given string and optional type: Exception: error

getDebug(self)[source]

Return whether the printing of debug messages is on or off

getInfo(self)[source]

Return whether the printing of info messages is on or off

getLogging(self)[source]

Return 1 if logging enabled, 0 otherwise

getOnlyTime(self)[source]

Return the time as a string. The Only in the name is referring to not showing the date.

getSeverity(self)[source]
getTime(self)[source]

Return the time as a string suitable for printing at the head of any notify message

getWarning(self)[source]

Return whether the printing of warning messages is on or off

info(self, infoString)[source]

Print the given informational string, if info flag is on

serverDelta = 0
setDebug(self, enable)[source]

Enable/Disable the printing of debug messages

setInfo(self, enable)[source]

Enable/Disable informational message printing

setLogging(self, enable)[source]

Set the logging flag to int (1=on, 0=off)

setServerDelta(self, delta, timezone)[source]

Call this method on any Notify object to globally change the timestamp printed for each line of all Notify objects.

This synchronizes the timestamp with the server’s known time of day, and also switches into the server’s timezone.

setSeverity(self, severity)[source]
setWarning(self, enable)[source]

Enable/Disable the printing of warning messages

showTime = 0
streamWriter = <panda3d.core.StreamWriter object>
warning(self, warningString)[source]

Issue the warning message if warn flag is on