Proxx gave you the correct answer, not sure why you couldn't have figured that one out?
That aside, you have a lot of cruft in your python code, and simply is quite unpythonic. You're reversing strings for no reason, using while loops when theres no need to, and going out of your way to preform output. Hell your non-file one doesn't even run sys.stdout() isn't a function, sys.stdout is a file object...
heres a slightly better reworked version:
#!/usr/bin/env python
import os,string,random
length = 8
#might not always want 100000 results, keep it in a variable for easy changing
results = 100000
chars = string.ascii_letters.upper()+string.digits
random.seed = (os.urandom(1024))
keep = []
#I prefer xrange, cause it returns results as requested, instead of the
#upfront memory and computation costs. Not required here, but just personal
#preference
for i in xrange(results):
#we don't even need a keep[] if we wanted to simply print to stdout
#this simply lets us work with a list if we wanted to add functionality
#but be careful cause this can eat up a large amount of memory to store it
#all at once. Better way memory wise would be process each result as it is built
string = ''.join(random.choice(chars) for i in xrange(length))
#need to check for any unlikely duplicates ;)
if string not in keep:
keep[i] = string
#output easy as:
for i in keep:
print i