def load_event_seq_file():
global FILE_NAME, EVENT_SEQ
import tkFileDialog
FILE_NAME = tkFileDialog.askopenfilename(
filetypes=[("Event sequence file", ".txt")])
try:
file = open(FILE_NAME, "r")
contents = file.read()
file.close()
print "Here are the contents of the event sequence file as read in: "
print contents
lines = contents.split("\n")
except:
print "Could not load new data from file: ", FILE_NAME
return
# Parse the contents:
EVENT_SEQ = lines
#print "EVENT_SEQ = "+str(EVENT_SEQ)
评论列表
文章目录