File: RunInTerminal.py

package info (click to toggle)
drpython 161-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,588 kB
  • ctags: 1,470
  • sloc: python: 15,817; sh: 358; makefile: 43
file content (18 lines) | stat: -rw-r--r-- 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#drscript
#This currently only works on linux (if you have rxvt installed).
#You will need to modify it otherwise.

#By Daniel Pozmanter
#Released under the GPL

import os

pathtoterminal = "/usr/bin/X11/rxvt"
termarg = "-e"
withargs = ""
if DrScript.VariableExists("RunInTerminalArgs"):
	withargs = " " + DrScript.RunInTerminalArgs		
	
pyexec = "/usr/bin/python " + DrFrame.GetFileName() + withargs

os.spawnl(os.P_NOWAIT, pathtoterminal, pathtoterminal, termarg, pyexec)