Search for a File Python

I am back at it with Python and have run into a little stupid hurdle. My goal is to simply search for the GeoIP.dat database and add the path to a couple of variables. So for example:

geopath=os.system('find /usr/share -iname GeoIP.dat')
geobase = pygeoip.GeoIP(geopath, pygeoip.MEMORY_CACHE)

which will load the GeoIP database so I can begin adding addition logic to my script. The issue I am having is when I simply execute using ipython:

geopath=os.system('find /usr/share -iname GeoIP.dat')
geopath
Out[15]: 0

it returns "0" in which I assume mean successful. So my stupid question is how do I see what was returned? Why doesnt it return the results instead of a "0"?

Why go outside of Python to perform the file search?

import os
import re

srchFile = 'GeoIP.dat'
srchDir  = '/usr/share'

for root, dirs, files in os.walk(srchDir):
    for file in files:
        if re.match(srchFile, file, re.IGNORECASE):
            geopath = os.path.join(root, file)

5c25eb06d19ae3c2f5f820d0c42bc8db

Awesome

For a more general response to your question, consult the man page for popen(3) and note how a pipe is used for communication (which is absent from system(3)).

Within python, instead of os.system, refer to the subprocess module or os.popen.

Regards,
Alister