Changeset ac49d23c in mainline
- Timestamp:
- 2019-06-21T12:12:20Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fd244cd
- Parents:
- 3498bd5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/ew.py
r3498bd5 rac49d23c 57 57 58 58 def termemu_detect(): 59 for termemu in ['xfce4-terminal', 'xterm']: 59 emus = ['gnome-terminal', 'xfce4-terminal', 'xterm'] 60 for termemu in emus: 60 61 try: 61 62 subprocess.check_output('which ' + termemu, shell = True) … … 64 65 pass 65 66 67 print('Could not find any of the terminal emulators %s.'%(emus)) 68 sys.exit(1) 69 66 70 def run_in_console(cmd, title): 67 71 ecmd = cmd.replace('"', '\\"') 68 cmdline = termemu_detect() + ' -T ' + '"' + title + '"' + ' -e "' + ecmd + '"' 72 temu = termemu_detect() 73 if temu == 'gnome-terminal': 74 cmdline = temu + ' -- ' + ecmd 75 else: 76 cmdline = temu + ' -T ' + '"' + title + '"' + ' -e "' + ecmd + '"' 77 69 78 print(cmdline) 70 79 if not is_override('dryrun'):
Note:
See TracChangeset
for help on using the changeset viewer.