| 1 |
ninoborges |
8 |
# My attempt at making a filter program that will take exported SMS computer
|
| 2 |
|
|
# names and make an importable list for Outlook or anyother csv format.
|
| 3 |
|
|
# First i want to exctract the
|
| 4 |
|
|
# first 8 caracters in the first list item in every list. Then i want to write
|
| 5 |
|
|
# this list to a file replaceing the commas with semi-colons.
|
| 6 |
|
|
# 10.01.2001
|
| 7 |
|
|
|
| 8 |
|
|
import sys
|
| 9 |
|
|
f=open('ninocode/smsdump2.txt', 'r')
|
| 10 |
|
|
#contents = []
|
| 11 |
|
|
contents = f.readlines()
|
| 12 |
|
|
f.close()
|
| 13 |
|
|
|
| 14 |
|
|
print contents
|
| 15 |
|
|
count = 1
|
| 16 |
|
|
newfile = open('newsms.txt', 'w')
|
| 17 |
|
|
while count < 8:
|
| 18 |
|
|
print contents [count][0:8]
|
| 19 |
|
|
newfile.write (contents [count][0:8])
|
| 20 |
|
|
newfile.write ('\n;')
|
| 21 |
|
|
count = count + 1
|
| 22 |
|
|
|
| 23 |
|
|
newfile.close()
|
| 24 |
|
|
print "That's it!"
|