Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix Run option in File and Project explorers #4864

Merged
merged 4 commits into from
Aug 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions spyder/plugins/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ def register_plugin(self):
self.renamed.connect(self.main.editor.renamed)
self.main.editor.open_dir.connect(self.chdir)
self.create_module.connect(self.main.editor.new)
self.run.connect(
lambda fname:
self.main.open_external_console(to_text_string(fname),
osp.dirname(to_text_string(fname)),
'', False, False, True, '', False))
# Signal "set_explorer_cwd(QString)" will refresh only the
# contents of path passed by the signal in explorer:
self.main.workingdirectory.set_explorer_cwd.connect(
Expand Down
4 changes: 4 additions & 0 deletions spyder/plugins/ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,11 @@ def register_plugin(self):
self.tabwidget.currentChanged.connect(self.update_working_directory)

self.explorer.open_interpreter.connect(self.create_client_from_path)
self.explorer.run.connect(lambda fname: self.run_script(
fname, osp.dirname(fname), '', False, False, False, True))
self.projects.open_interpreter.connect(self.create_client_from_path)
self.projects.run.connect(lambda fname: self.run_script(
fname, osp.dirname(fname), '', False, False, False, True))

#------ Public API (for clients) ------------------------------------------
def get_clients(self):
Expand Down
1 change: 1 addition & 0 deletions spyder/plugins/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Projects(ProjectExplorerWidget, SpyderPluginMixin):
removed_tree = Signal(str)
renamed = Signal(str, str)
redirect_stdio = Signal(bool)
run = Signal(str)

# Project handling
sig_project_created = Signal(object, object, object)
Expand Down
1 change: 0 additions & 1 deletion spyder/utils/programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def run_python_script_in_terminal(fname, wdir, args, interact,

:str wdir: working directory, may be empty.
"""

# If fname has spaces on it it can't be ran on Windows, so we have to
# enclose it in quotes. Also wdir can come with / as os.sep, so we
# need to take care of it
Expand Down