Did some additions to the MSDP implementation. Added a first test for implementing MSDP commands, but it is not working yet.

This commit is contained in:
Griatch 2012-02-25 21:14:48 +01:00
parent 9935bff36e
commit a0a205c945
3 changed files with 78 additions and 4 deletions

View file

@ -24,6 +24,12 @@ def is_iter(iterable):
"""
return hasattr(iterable, '__iter__')
def make_iter(obj):
"Makes sure that the object is always iterable."
if not hasattr(iterable, '__iter__'):
return [obj]
return obj
def fill(text, width=78, indent=0):
"""
Safely wrap text to a certain number of characters.