本文整理汇总了Python中SkunkWeb.Configuration._mergeDefaultsKw方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration._mergeDefaultsKw方法的具体用法?Python Configuration._mergeDefaultsKw怎么用?Python Configuration._mergeDefaultsKw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkunkWeb.Configuration
的用法示例。
在下文中一共展示了Configuration._mergeDefaultsKw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MailError
# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import _mergeDefaultsKw [as 别名]
from SkunkExcept import *
from SkunkWeb.LogObj import *
from SkunkWeb import Configuration
# The mail error we're raising
class MailError ( SkunkRuntimeError ):
"""
Error we raise when sendmail fails
"""
pass
# Init some variables
Configuration._mergeDefaultsKw(
MailMethod = 'sendmail',
MailHost = 'localhost',
SendmailCommand = 'sendmail -t',
FromAddress = "[email protected]"
)
# shows the mail method: 'sendmail' (default) or 'relay'
_method = Configuration.MailMethod
if _method not in ('sendmail', 'relay'): _method = 'sendmail'
# mailhost for relaying SMTP server (default localhost)
_mailhost = Configuration.MailHost
# sendmail command for utility (default '/usr/lib/sendmail -t')
_sendmail_cmd = Configuration.SendmailCommand
# The general-purpose sendmail function, which is called