summaryrefslogtreecommitdiff
path: root/examples/open-terminal.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/open-terminal.py')
-rw-r--r--examples/open-terminal.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/open-terminal.py b/examples/open-terminal.py
index 935d894..ff0909e 100644
--- a/examples/open-terminal.py
+++ b/examples/open-terminal.py
@@ -1,5 +1,6 @@
# This example is contributed by Martin Enlund
import os
+import subprocess
from gi.repository import Caja, GObject, Gio
@@ -15,7 +16,7 @@ class OpenTerminalExtension(Caja.MenuProvider, GObject.GObject):
terminal = self.gsettings[TERMINAL_KEY]
os.chdir(filename)
- os.system('%s &' % terminal)
+ subprocess.Popen([terminal], cwd=filename)
def menu_activate_cb(self, menu, file):
self._open_terminal(file)