xdev.util module¶
- xdev.util.bubbletext(text, font='cybermedium')[source]¶
Uses pyfiglet to create bubble text.
- Parameters:
font (str) – default=cybermedium, other fonts include: cybersmall and cyberlarge.
References
Example
>>> bubble_text = bubbletext('TESTING BUBBLE TEXT', font='cybermedium') >>> print(bubble_text)
- xdev.util.conj_phrase(list_, cond='or')[source]¶
Joins a list of words using English conjunction rules
- Parameters:
list_ (list) – of strings
cond (str) – a conjunction (or, and, but)
- Returns:
the joined cconjunction phrase
- Return type:
References
http://en.wikipedia.org/wiki/Conjunction_(grammar)
Example
>>> list_ = ['a', 'b', 'c'] >>> result = conj_phrase(list_, 'or') >>> print(result) a, b, or c
- Example1:
>>> list_ = ['a', 'b'] >>> result = conj_phrase(list_, 'and') >>> print(result) a and b