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


Python mailpile.Mailpile类代码示例

本文整理汇总了Python中mailpile.Mailpile的典型用法代码示例。如果您正苦于以下问题:Python Mailpile类的具体用法?Python Mailpile怎么用?Python Mailpile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Mailpile

# Set up some paths
mailpile_root = os.path.join(os.path.dirname(__file__), '..')
mailpile_test = os.path.join(mailpile_root, 'testing')
mailpile_home = os.path.join(mailpile_test, 'tmp')

# Add the root to our import path, import API and standard plugins
sys.path.append(mailpile_root)
from mailpile.plugins import *
from mailpile import Mailpile


##[ Black-box test script ]###################################################
try:
    # First, we set up a pristine Mailpile
    os.system('rm -rf %s' % mailpile_home)
    mp = Mailpile(workdir=mailpile_home)

    def say(stuff):
        mp._session.ui.mark(stuff)
        mp._session.ui.reset_marks()

    # Set up initial tags and such
    mp.setup()

    # Add the mailboxes, scan them
    for mailbox in ('tests.mbx', 'Maildir'):
        mp.add(os.path.join(mailpile_test, mailbox))
    mp.rescan()

    # Save and load the index, just for kicks
    mp._config.index.save()
开发者ID:raulelrey86,项目名称:Mailpile,代码行数:31,代码来源:mailpile-test.py

示例2: Mailpile

from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
ICELANDIC = u'r\xfanar'
IS_CHARS = (u'\xe1\xe9\xed\xf3\xfa\xfd\xfe\xe6\xf6\xf0\xc1\xc9\xcd\xd3'
            u'\xda\xdd\xde\xc6\xd6\xd0')
MY_FROM = '[email protected]'
MY_NAME = 'Mailpile Team'
MY_KEYID = '0x7848252F'

# First, we set up a pristine Mailpile
os.system('rm -rf %s' % mailpile_home)
mp = Mailpile(workdir=mailpile_home)
cfg = config = mp._session.config
ui = mp._session.ui

if '-v' not in sys.argv:
    from mailpile.ui import SilentInteraction
    mp._session.ui = SilentInteraction(config)

cfg.plugins.load('demos', process_manifest=True)
cfg.plugins.load('hacks', process_manifest=True)
cfg.plugins.load('smtp_server', process_manifest=True)


def contents(fn):
    return open(fn, 'r').read()
开发者ID:paulfurley,项目名称:Mailpile,代码行数:30,代码来源:mailpile-test.py

示例3: Mailpile

from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
ICELANDIC = u'r\xfanar'
IS_CHARS = (u'\xe1\xe9\xed\xf3\xfa\xfd\xfe\xe6\xf6\xf0\xc1\xc9\xcd\xd3'
            u'\xda\xdd\xde\xc6\xd6\xd0')
MY_FROM = '[email protected]'
MY_NAME = 'Mailpile Team'
MY_KEYID = '0x7848252F'

# First, we set up a pristine Mailpile
os.system('rm -rf %s' % mailpile_home)
mp = Mailpile(workdir=mailpile_home)
cfg = config = mp._session.config
ui = mp._session.ui

if '-v' not in sys.argv:
    from mailpile.ui import SilentInteraction
    mp._session.ui = SilentInteraction(config)

cfg.plugins.load('demos', process_manifest=True)
cfg.plugins.load('hacks', process_manifest=True)
cfg.plugins.load('experiments', process_manifest=True)
cfg.plugins.load('smtp_server', process_manifest=True)


def contents(fn):
    return open(fn, 'r').read()
开发者ID:DoubleMalt,项目名称:Mailpile,代码行数:31,代码来源:mailpile-test.py

示例4: Mailpile

mailpile_sent = os.path.join(mailpile_home, 'sent.mbx')

# Add the root to our import path, import API and standard plugins
sys.path.append(mailpile_root)
from mailpile.plugins import *
from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
MY_FROM = '[email protected]'
try:
    # First, we set up a pristine Mailpile
    os.system('rm -rf %s' % mailpile_home)
    mp = Mailpile(workdir=mailpile_home)

    def contents(fn):
        return open(fn, 'r').read()

    def grep(w, fn):
        return '\n'.join([l for l in open(fn, 'r').readlines() if w in l])

    def grepv(w, fn):
        return '\n'.join([l for l in open(fn, 'r').readlines() if w not in l])

    def say(stuff):
        mp._session.ui.mark(stuff)
        mp._session.ui.reset_marks()

    # Set up initial tags and such
开发者ID:arttarawork,项目名称:Mailpile-1,代码行数:31,代码来源:mailpile-test.py

示例5: Mailpile

os.environ['GNUPGHOME'] = mailpile_gpgh

# Add the root to our import path, import API and demo plugins
sys.path.append(mailpile_root)
import mailpile.plugins.demos
from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
MY_FROM = '[email protected]'

# First, we set up a pristine Mailpile
os.system('rm -rf %s' % mailpile_home)
mp = Mailpile(workdir=mailpile_home)
cfg = config = mp._session.config


def contents(fn):
    return open(fn, 'r').read()


def grep(w, fn):
    return '\n'.join([l for l in open(fn, 'r').readlines() if w in l])


def grepv(w, fn):
    return '\n'.join([l for l in open(fn, 'r').readlines() if w not in l])

开发者ID:crameth,项目名称:Mailpile,代码行数:29,代码来源:mailpile-test.py

示例6: Mailpile

from mailpile.mail_source.local import LocalMailSource
from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u"from:r\xfanar", u"from:bjarni"]
ICELANDIC = u"r\xfanar"
IS_CHARS = u"\xe1\xe9\xed\xf3\xfa\xfd\xfe\xe6\xf6\xf0\xc1\xc9\xcd\xd3" u"\xda\xdd\xde\xc6\xd6\xd0"
MY_FROM = "[email protected]"
MY_NAME = "Mailpile Team"
MY_KEYID = "0x7848252F"

# First, we set up a pristine Mailpile
os.system("rm -rf %s" % mailpile_home)
mp = Mailpile(workdir=mailpile_home)
cfg = config = mp._session.config
ui = mp._session.ui

if "-v" not in sys.argv:
    from mailpile.ui import SilentInteraction

    mp._session.ui = SilentInteraction(config)

cfg.plugins.load("demos", process_manifest=True)
cfg.plugins.load("hacks", process_manifest=True)
cfg.plugins.load("experiments", process_manifest=True)
cfg.plugins.load("smtp_server", process_manifest=True)


def contents(fn):
开发者ID:cybercameron,项目名称:Mailpile,代码行数:31,代码来源:mailpile-test.py

示例7: Mailpile

mailpile_test = os.path.join(mailpile_root, 'testing')
mailpile_home = os.path.join(mailpile_test, 'tmp')

# Add the root to our import path, import API and standard plugins
sys.path.append(mailpile_root)
from mailpile.plugins import *
from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
try:
    # First, we set up a pristine Mailpile
    os.system('rm -rf %s' % mailpile_home)
    mp = Mailpile(workdir=mailpile_home)

    def say(stuff):
        mp._session.ui.mark(stuff)
        mp._session.ui.reset_marks()

    # Set up initial tags and such
    mp.setup()

    # Add the mailboxes, scan them
    for mailbox in ('tests.mbx', 'Maildir'):
        mp.add(os.path.join(mailpile_test, mailbox))
    mp.rescan()

    # Save and load the index, just for kicks
    mp._config.index.save()
开发者ID:Biobeyoung,项目名称:Mailpile,代码行数:31,代码来源:mailpile-test.py

示例8: Mailpile

from mailpile import Mailpile


##[ Black-box test script ]###################################################

FROM_BRE = [u'from:r\xfanar', u'from:bjarni']
ICELANDIC = u'r\xfanar'
IS_CHARS = (u'\xe1\xe9\xed\xf3\xfa\xfd\xfe\xe6\xf6\xf0\xc1\xc9\xcd\xd3'
            u'\xda\xdd\xde\xc6\xd6\xd0')
MY_FROM = '[email protected]'
MY_NAME = 'Mailpile Team'
MY_KEYID = '0x7848252F'

# First, we set up a pristine Mailpile
os.system('rm -rf {0!s}'.format(mailpile_home))
mp = Mailpile(workdir=mailpile_home)
cfg = config = mp._session.config
ui = mp._session.ui

if '-v' not in sys.argv:
    from mailpile.ui import SilentInteraction
    mp._session.ui = SilentInteraction(config)

cfg.plugins.load('demos', process_manifest=True)
cfg.plugins.load('hacks', process_manifest=True)
cfg.plugins.load('experiments', process_manifest=True)
cfg.plugins.load('smtp_server', process_manifest=True)


def contents(fn):
    return open(fn, 'r').read()
开发者ID:runt18,项目名称:Mailpile,代码行数:31,代码来源:mailpile-test.py


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