当前位置: 首页>>代码示例>>Python>>正文


Python Utils.mkdir方法代码示例

本文整理汇总了Python中Mailman.Utils.mkdir方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.mkdir方法的具体用法?Python Utils.mkdir怎么用?Python Utils.mkdir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mailman.Utils的用法示例。


在下文中一共展示了Utils.mkdir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: InitVars

# 需要导入模块: from Mailman import Utils [as 别名]
# 或者: from Mailman.Utils import mkdir [as 别名]
    def InitVars(self):
	# Configurable
	self.archive = mm_cfg.DEFAULT_ARCHIVE
	# 0=public, 1=private:
	self.archive_private = mm_cfg.DEFAULT_ARCHIVE_PRIVATE
 	self.archive_volume_frequency = \
 		mm_cfg.DEFAULT_ARCHIVE_VOLUME_FREQUENCY

	# Not configurable
	self.clobber_date = 0
	# Though the archive file dirs are list-specific, they are not
	# settable from the web interface.  If you REALLY want to redirect
	# something to a different dir, you can set the member vars by
	# hand, from the Python interpreter!
        #
        # The archive file structure by default is:
        #
        # archives/
        #     private/
        #         listname.mbox/
        #             listname
        #         listname/
        #             lots-of-pipermail-stuff
        #     public/
        #         [email protected] -> ../private/listname.mbox
        #         [email protected] -> ../private/listname
        #
        # IOW, the mbox and pipermail archives are always stored in the
        # private archive for the list.  This is safe because archives/private 
        # is always set to o-rx.  Public archives have a symlink to get around 
        # the private directory, pointing directly to the private/listname
        # which has o+rx permissions.  Private archives do not have the
        # symbolic links.

	self.public_archive_file_dir = mm_cfg.PUBLIC_ARCHIVE_FILE_DIR
	self.private_archive_file_dir = os.path.join(
            mm_cfg.PRIVATE_ARCHIVE_FILE_DIR,
            self._internal_name + '.mbox')
	self.archive_directory = os.path.join(
            mm_cfg.PRIVATE_ARCHIVE_FILE_DIR,
            self._internal_name)
        try:
            Utils.mkdir(self.private_archive_file_dir)
        except os.error, e:
            code, msg = e
            if code <> errno.EEXIST:
                raise
开发者ID:OS2World,项目名称:APP-SERVER-MailMan,代码行数:49,代码来源:Archiver.py


注:本文中的Mailman.Utils.mkdir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。