Skip to content

Commit

Permalink
dsf
Browse files Browse the repository at this point in the history
  • Loading branch information
swissme8888 committed May 2, 2017
1 parent 9188721 commit 3ed12c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from werkzeug.utils import secure_filename
from flipFlop import *
import json
import codecs


from urllib.request import urlopen
Expand Down Expand Up @@ -47,7 +48,7 @@ def upload_file():
if file and allowed_file(file.filename):#triggered if the allowed file is uploaded
filename = secure_filename(file.filename)
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
with open(os.path.join(UPLOAD_FOLDER, filename), 'r') as myfile:
with codecs.open(os.path.join(UPLOAD_FOLDER, filename), 'r',encoding='utf-8', errors='ignore') as myfile:
data=str(myfile.read()).replace("\n", "").replace("/", "").replace(",", "").replace("(", "").replace(")", "").replace("-", "").replace("\"", "").replace("'", "")
filedata1= str(data).split('.')
#print(filedata1)
Expand All @@ -58,7 +59,7 @@ def upload_file():
if twofile and allowed_file(twofile.filename):#triggered if the allowed file is uploaded
filename = secure_filename(twofile.filename)
twofile.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
with open(os.path.join(UPLOAD_FOLDER, filename), 'r') as myfile:
with codecs.open(os.path.join(UPLOAD_FOLDER, filename), 'r',encoding='utf-8', errors='ignore') as myfile:
twodata=str(myfile.read()).replace("\n", "").replace("/", "").replace(",", "").replace("(", "").replace(")", "").replace("-", "").replace("\"", "").replace("'", "")
filedata2= str(twodata).split('.')
#print(filedata2)
Expand Down

0 comments on commit 3ed12c8

Please # to comment.