Пример #1
0
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import sys
import tools

session = (sys.argv)[1]

if (sys.argv)[2] != '-1':
    ctty = (sys.argv)[2]
else:
    ctty = None

try:
    mode = (sys.argv)[3]
except:
    mode = 'TERM'

try:
    win = (sys.argv)[4]
except:
    win = "-1"

if tools.kill_win_last_proc(session, win, mode, ctty):
    sys.exit(0)
else:
    sys.exit(1)
Пример #2
0
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import sys
import tools

session = (sys.argv)[1]

if (sys.argv)[2] != "-1":
    ctty = (sys.argv)[2]
else:
    ctty = None

try:
    mode = (sys.argv)[3]
except:
    mode = "TERM"

try:
    win = (sys.argv)[4]
except:
    win = "-1"

if tools.kill_win_last_proc(session, win, mode, ctty):
    sys.exit(0)
else:
    sys.exit(1)
Пример #3
0
#!/usr/bin/env python
# file: kill.py
# author: Artur Skonecki
# website: http://adb.cba.pl
# description: kill the foremost process in a window

import sys
import tools

session=sys.argv[1]
try:
    mode=sys.argv[2]
except:
    mode='TERM'

try:
    win=sys.argv[3]
except:
    win="-1"


tools.kill_win_last_proc(session,win,mode)