diff --git a/dash/components.py b/dash/components.py index a7fd7fa31b..263f9df87a 100644 --- a/dash/components.py +++ b/dash/components.py @@ -14,7 +14,7 @@ def element(element='div', attributes={}, content=''): content = content el = '<{}'.format(element) - for attribute, value in attributes.iteritems(): + for attribute, value in attributes.items(): el += ' {}="{}"'.format(attribute, value) el += '>' diff --git a/example-3-click-events.py b/example-3-click-events.py index d75deb158a..b84f76f356 100644 --- a/example-3-click-events.py +++ b/example-3-click-events.py @@ -45,7 +45,7 @@ def onpong(app_state): @socketio.on('replot') def replot(app_state): - print app_state + print(app_state) messages = dash.replot(app_state) emit('postMessage', json.dumps(messages, cls=plotly.utils.PlotlyJSONEncoder)) diff --git a/example-4-tickers.py b/example-4-tickers.py index 7e04ff1206..672b8f18c3 100644 --- a/example-4-tickers.py +++ b/example-4-tickers.py @@ -55,17 +55,17 @@ def replot(app_state): def update_graph(app_state): - print app_state + print(app_state) ticker = app_state['ticker'] if ticker not in tickers: - print ticker, 'not in tickers' + print(ticker, 'not in tickers') return else: try: df = web.DataReader(ticker, 'yahoo', dt.datetime(2014, 1, 1), dt.datetime(2015, 4, 15)) except: - print traceback.format_exc() + print(traceback.format_exc()) return messages = [