summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/guido/kill.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tkinter/guido/kill.py')
-rwxr-xr-xDemo/tkinter/guido/kill.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Demo/tkinter/guido/kill.py b/Demo/tkinter/guido/kill.py
index dd01a2d..44a6b9b 100755
--- a/Demo/tkinter/guido/kill.py
+++ b/Demo/tkinter/guido/kill.py
@@ -2,8 +2,6 @@
# Tkinter interface to Linux `kill' command.
from tkinter import *
-from string import splitfields
-from string import split
import subprocess
import os
@@ -26,13 +24,13 @@ class Kill(Frame):
('Hex', '-X', 0)]
def kill(self, selected):
c = self.format_list[self.format.get()][2]
- pid = split(selected)[c]
+ pid = selected.split()[c]
os.system('kill -9 ' + pid)
self.do_update()
def do_update(self):
name, option, column = self.format_list[self.format.get()]
s = subprocess.getoutput('ps -w ' + option)
- list = splitfields(s, '\n')
+ list = s.split('\n')
self.header.set(list[0])
del list[0]
y = self.frame.vscroll.get()[0]