From 53e0ccbd5207038eace7463fea8c05176dea53da Mon Sep 17 00:00:00 2001 From: Marcus Gartner Date: Thu, 8 Oct 2015 13:51:11 -0700 Subject: [PATCH] fixes example for Windows --- .../create_postcards_from_csv/create_postcards_from_csv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/create_postcards_from_csv/create_postcards_from_csv.py b/examples/create_postcards_from_csv/create_postcards_from_csv.py index 5de46d2..2792864 100644 --- a/examples/create_postcards_from_csv/create_postcards_from_csv.py +++ b/examples/create_postcards_from_csv/create_postcards_from_csv.py @@ -13,9 +13,9 @@ print "Please provide an input CSV file as an argument." sys.exit() -with open(os.path.dirname(os.path.abspath(__file__)) + '/postcard_front.html', 'r') as frontHtmlFile: +with open(os.path.dirname(os.path.abspath(__file__)) + '/postcard_front.html', 'rb') as frontHtmlFile: frontHtml = frontHtmlFile.read() - with open(os.path.dirname(os.path.abspath(__file__)) + '/postcard_back.html', 'r') as backHtmlFile: + with open(os.path.dirname(os.path.abspath(__file__)) + '/postcard_back.html', 'rb') as backHtmlFile: backHtml = backHtmlFile.read() with open(sys.argv[1]) as f: for row in csv.reader(f):