# -*- coding: utf-8 -*-
"""Utilities for Halo library.
"""
import platform
import six
import codecs

from colorama import init, Fore
from termcolor import colored

init(autoreset=True)

def is_supported():
    """Check whether operating system supports main symbols or not.
    
    Returns
    -------
    boolean
        Whether operating system supports main symbols or not
    """

    os_arch = platform.system()

    if os_arch != 'Windows':
        return True

    return False

def colored_frame(frame, color):
    """Color the frame with given color and returns.
    
    Parameters
    ----------
    frame : str
        Frame to be colored
    color : str
        Color to be applied
    
    Returns
    -------
    str
        Colored frame
    """
    return colored(frame, color, attrs=['bold'])

def is_text_type(text):
    """Check if given parameter is a string or not
    
    Parameters
    ----------
    text : *
        Parameter to be checked for text type
    
    Returns
    -------
    bool
        Whether parameter is a string or not
    """
    if isinstance(text, six.text_type) or isinstance(text, six.string_types):
        return True

    return False

def decode_utf_8_text(text):
    """Decode the text from utf-8 format
    
    Parameters
    ----------
    text : str
        String to be decoded
    
    Returns
    -------
    str
        Decoded string
    """
    try:
        return codecs.decode(text, 'utf-8')
    except:
        return text

@@ -92,16 +92,30 @@
 t codecs
+%0Aimport shutil
 %0A%0Afrom c
@@ -1499,8 +1499,73 @@
 rn text%0A
+%0A%0Adef get_terminal_size():%0A    return shutil.get_terminal_size()%0A

Add shutil dependency to get the terminal size