Show system notification with duration t (ms)

def notify(msg, msg_type=0, t=None):
    msg = msg.replace('"', '\\"')
    "Show system notification with duration t (ms)"
    if platform.system() == "Darwin":
        command = notify_command_osx(msg, msg_type, t)
    else:
        command = notify_command_linux(msg, t)

    try:
        subprocess.call(command)
        return True
    except OSError as e:
        return False