PEP8'd helpers, history, page.py

This commit is contained in:
Lawrence Vanderpool
2015-06-08 06:46:27 -04:00
parent 4cd5bc0ef9
commit 764684eb53
3 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ from .exceptions import ProgramError
__all__ = ['open_browser', 'clean', 'wrap_text', 'strip_textpad',
'strip_subreddit_url', 'humanize_timestamp', 'open_editor']
def clean(string, n_cols=None):
"""
Required reading!
@@ -49,6 +50,7 @@ def clean(string, n_cols=None):
string = string.encode('utf-8')
return string
def open_editor(data=''):
"""
Open a temporary file using the system's default editor.
@@ -124,6 +126,7 @@ def open_browser(url):
webbrowser.open_new_tab(url)
curses.doupdate()
def wrap_text(text, width):
"""
Wrap text paragraphs to the given character width while preserving newlines.