如何正确格式化vCalendar输出到Outlook,以在一个事件下保存多个日期?
import socket
from time import sleep
import os
host = 'localhost'
port = 17020
os.chdir(os.getcwd()+'/Data')
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(1)
while True:
print("Listening for a client at",host , port)
conn, addr = s.accept()
print("Connected by", addr)
try:
print("Reading file...")
with open('cdr_data.csv') as f:
for line in f:
out = line.encode('utf-8')
print('Sending line',line)
conn.send(out)
# sleep(10)
print('End Of Stream.')
except socket.error:
print ("Error Occured. Client disconnected.")
conn.close()