Hi @ypu,
That is a good suggestion. I will just remove the if-statements for the client variable and use the else-clause's values as default, i.e. __init__( ... prompt="^(root@[^:]*[^\#\$]*[\#\$]\s*|\[.*\][\#\$]\s*)$", linesep="\n" ... )