Unfortunately the Python HTTPServer and WSGI work in different ways, so you'd need to port your code over from one to the other.
The HTTPServer runs as a process, which opens a server socket to handle incoming connections, and then delegates the handling of the requests that come in on those connections to your code. Your Python code starts the HTTPServer (and thus, indirectly creates the server socket) itself. So your web server program is completely self-contained.
A WSGI server is a separate process (often written in a different language, eg. C) that handles all incoming connections itself, and then calls Python code to handle the requests. In effect, what you're doing when writing a WSGI-based web app is writing a "plug-in" that the WSGI server will use to handle requests.
The reason most Python websites use WSGI these days is that safely handling incoming HTTP connections is surprisingly hard when it's on the public internet, due to security and scaling concerns. The Python HTTPServer library isn't really written to address all of that. Better to hand it off to a specialised bit of code so that you can focus on the logic that makes your website special.
PythonAnywhere works by providing a WSGI server (specifically, we use uWSGI) -- so you just provide a Python module that exports a WSGI application, which uWSGI can then use as the "plug-in". This is really pretty easy if you're using a Python web framework like Flask, Django, web2py or Bottle, as they abstract all the details of WSGI away and provide you with a simple way to define URLs and views to handle them. But converting your HTTPServer over to raw WSGI would take a while.