Updated pycode.core.

This commit is contained in:
Jeremy Wright 2014-12-22 00:19:06 -05:00
parent 0823499975
commit ccaf07c396
2 changed files with 8 additions and 2 deletions

View File

@ -56,6 +56,9 @@ class BackendManager(Manager):
The script can be run with a custom interpreter. The default is to use
sys.executable.
.. note:: This restart the backend process if it was previously
running.
:param script: Path to the backend script.
:param interpreter: The python interpreter to use to run the backend
script. If None, sys.executable is used unless we are in a frozen
@ -64,8 +67,7 @@ class BackendManager(Manager):
the backend process.
"""
if self.running:
# already started
return
self.stop()
self.server_script = script
self.interpreter = interpreter
self.args = args

View File

@ -18,6 +18,9 @@ class FileWatcherMode(Mode, QtCore.QObject):
#: the editor.
file_deleted = QtCore.Signal(object)
#: Signal emitted when the file has been reloaded in the editor.
file_reloaded = QtCore.Signal()
@property
def auto_reload(self):
"""
@ -145,6 +148,7 @@ class FileWatcherMode(Mode, QtCore.QObject):
def inner_action(*args):
""" Inner action: open file """
self.editor.file.open(self.editor.file.path)
self.file_reloaded.emit()
args = ("File changed",
"The file <i>%s</i> has changed externally.\nDo you want to "