okpy / ok-client

A Python client for the OK autograding system

Home Page:https://okpy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add coloring to error messages

averyyip opened this issue · comments

We have been seeing problems with jupyter notebooks not submitting successfully and students not knowing their submission failed. It would be great if we can add a red coloring to the failure message so they would know about the failure and contact their GSIs.

Coloring Guide: https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python

Line Reference:

print("Could not automatically save \'{}\'".format(ipynbs[0]))

We should probably use https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python/3332860#3332860 since we have to support Windows but this seems like a great idea!

Yeah, just use colorama, it takes care of auto-detecting the terminal and everything.

Resolved by #400