Replacing js by python for /games