minor PEP8 cleanup (" -> ')

This commit is contained in:
Overwatch 2014-08-19 16:29:56 +02:00
parent 6416b66f6e
commit 61fb3b1044
18 changed files with 456 additions and 456 deletions

View file

@ -7,17 +7,17 @@ import os
# --------------------------------------------------
def import_module(path):
"""
'''
Imports a python file as a module. The path can be relative or absolute.
Based on the work of Yuval Greenfield released into the public domain.
"""
'''
# remove the .py suffix
mod_dn = os.path.dirname(path)
mod_fn = os.path.basename(path)
if mod_fn.endswith(".py"):
if mod_fn.endswith('.py'):
mod_name = mod_fn[:-3]
else:
# packages for example
@ -39,9 +39,9 @@ def import_module(path):
# --------------------------------------------------
def batch_gen(data, batch_size):
"""
'''
Split data (a sequence) into sequences batch_size elements long.
"""
'''
for i in range(0, len(data), batch_size):
yield data[i:i+batch_size]
@ -49,17 +49,17 @@ def batch_gen(data, batch_size):
# --------------------------------------------------
def console(environment, tab_completion=False):
"""
'''
Opens up a Python console.
environment is a dictionary typically returned by locals() or similar
tab_completion enables completion of object names using TAB, however note
that this will make pasting formatted snippets of code difficult
"""
'''
import code, readline, rlcompleter
readline.parse_and_bind("tab: complete")
readline.parse_and_bind('tab: complete')
c = code.InteractiveConsole(environment)
c.interact(banner="")
c.interact(banner='')