migrate workspace.py and utils.py to python3