import psutil
import os
import sys
import signal
def get_pid(name):
pids = psutil.process_iter()
for pid in pids:
if(pid.name() == name):
printf(pid.pid)
get_pid("blueman-tray")
def kill(pid):
try:
a = os.kill(pid, signal.SIGKILL)
print'kill pid' % (pid, a)
except OSError, e:
launch('blueman-tray', icon_name='blueman', sn=False)
import os
import sys
import signal
def get_pid(name):
pids = psutil.process_iter()
for pid in pids:
if(pid.name() == name):
printf(pid.pid)
get_pid("blueman-tray")
def kill(pid):
try:
a = os.kill(pid, signal.SIGKILL)
print'kill pid' % (pid, a)
except OSError, e:
launch('blueman-tray', icon_name='blueman', sn=False)