示例#1
0
#!/bin/env python
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from sliderepl import Deck

Deck.run()

### slide::

# the python regex module is available as re
import re

# it provides three (four) essential functions: search, match, findall
# (finditer)

# * search tries to match anywhere in the string
print re.search.__doc__

# * match tries to match at the beginning of the string
print re.match.__doc__

# * findall (finditer) returns a list (iterator) of all matches in the string
print re.findall.__doc__
print re.finditer.__doc__

### slide::

# search and match will return match objects or None
示例#2
0
 def __init__(self, path=None, echo_on=True, **options):
     Deck.__init__(self, path, **options)
     self.start_with_echo = echo_on
示例#3
0
 def __init__(self, path=None, echo_on=True, **options):
     Deck.__init__(self, path, **options)
     self.start_with_echo = echo_on