import sys, random
i = 0
print 'Iniciando processamento'
sys.stdout = open ("C:\\Teste\\Teste.txt", "w")
while i < 10:
x = random.random() * -46.0
y = random.random() * -23.0
print "X: ", str(x), "Y: ", str(y)
i += 1
sys.stdout = sys.__stdout__
print 'Encerrado'
i = 0
print 'Iniciando processamento'
sys.stdout = open ("C:\\Teste\\Teste.txt", "w")
while i < 10:
x = random.random() * -46.0
y = random.random() * -23.0
print "X: ", str(x), "Y: ", str(y)
i += 1
sys.stdout = sys.__stdout__
print 'Encerrado'