Any reason to try and replace it with something else? I'm a beginner to python, but have encountered problems with C and importing CGI. List of instance where import cgi would not be the best option would be great for further understanding of language use.
You should choose WSGI instead of CGI. CGI applications are generally slow as they need re- invocation of interpreter for every request, WSGI on the other hand pools them and is much more efficient. WSGI is also more mainstream. Do a little research on web and you will get better and more detailed answers.
In the past I have used CGI with python but generally the usage has been for image/chart generation,where the core lib was implemented in c/c++.
Any reason not to just import CGI in Python?