Skip to content

Commit

Permalink
Merge from 3.x: PR #4583
Browse files Browse the repository at this point in the history
Fixes #4581
  • Loading branch information
ccordoba12 committed Jun 11, 2017
2 parents 55e46d8 + 89603c9 commit 6a1d2c6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spyder/widgets/variableexplorer/importwizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def __init__(self, parent, text):
self.tab_btn = QRadioButton(_("Tab"))
self.tab_btn.setChecked(False)
col_btn_layout.addWidget(self.tab_btn)
self.ws_btn = QRadioButton(_("Whitespace"))
self.ws_btn.setChecked(False)
col_btn_layout.addWidget(self.ws_btn)
other_btn_col = QRadioButton(_("other"))
other_btn_col.setChecked(True)
col_btn_layout.addWidget(other_btn_col)
Expand Down Expand Up @@ -231,6 +234,8 @@ def get_col_sep(self):
"""Return the column separator"""
if self.tab_btn.isChecked():
return u"\t"
elif self.ws_btn.isChecked():
return None
return to_text_string(self.line_edt.text())

def get_row_sep(self):
Expand Down Expand Up @@ -462,7 +467,10 @@ def open_data(self, text, colsep=u"\t", rowsep=u"\n",
if pd:
self.pd_text = text
self.pd_info = dict(sep=colsep, lineterminator=rowsep,
skiprows=skiprows,comment=comments)
skiprows=skiprows, comment=comments)
if colsep is None:
self.pd_info = dict(lineterminator=rowsep, skiprows=skiprows,
comment=comments, delim_whitespace=True)
self._table_view.process_data(text, colsep, rowsep, transpose,
skiprows, comments)

Expand Down

0 comments on commit 6a1d2c6

Please sign in to comment.