Code:
temp = 0
def rand7():
global temp
temp += rand5()
return temp % 7

at a first glance joey's last one looks like the most elegant solution so far.