Skip to content

Commit

Permalink
Merge pull request #7597 from bcolsen/semicolon_starup
Browse files Browse the repository at this point in the history
PR: Separate startup run_lines with semicolon instead of comma
  • Loading branch information
ccordoba12 authored Aug 12, 2018
2 parents 0799f2e + 388b436 commit f83f817
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spyder/config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
# or if you want to *rename* options, then you need to do a MAJOR update in
# version, e.g. from 3.0.0 to 4.0.0
# 3. You don't need to touch this value if you're just adding a new option
CONF_VERSION = '44.0.0'
CONF_VERSION = '44.1.0'

# Main configuration instance
try:
Expand Down
7 changes: 7 additions & 0 deletions spyder/config/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ def __init__(self, name, defaults=None, load=True, version=None,
self.reset_to_defaults(save=False)
else:
self._update_defaults(defaults, old_ver)
if check_version(old_ver, '44.1.0', '<'):
run_lines = to_text_string(self.get('ipython_console',
'startup/run_lines'))
if run_lines is not NoDefault:
run_lines = run_lines.replace(',', '; ')
self.set('ipython_console',
'startup/run_lines', run_lines)
# Remove deprecated options if major version has changed
if remove_obsolete or _major(version) != _major(old_ver):
self._remove_deprecated_options(old_ver)
Expand Down
6 changes: 3 additions & 3 deletions spyder/plugins/ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ def setup_page(self):
run_lines_group = QGroupBox(_("Run code"))
run_lines_label = QLabel(_("You can run several lines of code when "
"a console is started. Please introduce "
"each one separated by commas, for "
"example:<br>"
"<i>import os, import sys</i>"))
"each one separated by semicolons and a "
"space, for example:<br>"
"<i>import os; import sys</i>"))
run_lines_label.setWordWrap(True)
run_lines_edit = self.create_lineedit(_("Lines:"), 'startup/run_lines',
'', alignment=Qt.Horizontal)
Expand Down

0 comments on commit f83f817

Please sign in to comment.