Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
502d9602
Kaydet (Commit)
502d9602
authored
Eyl 07, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
incompletely converted to Tk 4.0
üst
c27e0422
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
svkill.py
Demo/tkinter/guido/svkill.py
+12
-8
No files found.
Demo/tkinter/guido/svkill.py
Dosyayı görüntüle @
502d9602
#! /usr/local/bin/python
# Tkinter interface to SYSV `
kill' command
.
# Tkinter interface to SYSV `
ps' and `kill' commands
.
from
Tkinter
import
*
if
TkVersion
<
4.0
:
raise
ImportError
,
"This version of svkill requires Tk 4.0 or later"
from
string
import
splitfields
from
string
import
split
import
commands
...
...
@@ -11,9 +15,9 @@ import os
user
=
os
.
environ
[
'LOGNAME'
]
class
BarButton
(
Menubutton
):
_CNF
=
{
Pack
:
{
'side'
:
'left'
}}
def
__init__
(
self
,
master
=
None
,
cnf
=
{}):
Menubutton
.
__init__
(
self
,
master
,
(
self
.
_CNF
,
cnf
))
Menubutton
.
__init__
(
self
,
master
,
cnf
)
self
.
pack
(
side
=
'left'
)
self
.
menu
=
Menu
(
self
,
{
'name'
:
'menu'
})
self
[
'menu'
]
=
self
.
menu
...
...
@@ -46,15 +50,14 @@ class Kill(Frame):
list
=
splitfields
(
s
,
'
\n
'
)
self
.
header
.
set
(
list
[
0
]
+
' '
)
del
list
[
0
]
y
=
self
.
frame
.
vscroll
.
get
()[
2
]
self
.
frame
.
list
.
delete
(
0
,
AtEnd
())
for
line
in
list
:
self
.
frame
.
list
.
insert
(
0
,
line
)
self
.
frame
.
list
.
yview
(
y
)
def
do_motion
(
self
,
e
):
e
.
widget
.
select_from
(
e
.
widget
.
nearest
(
e
.
y
))
e
.
widget
.
select_clear
(
'0'
,
'end'
)
e
.
widget
.
select_set
(
e
.
widget
.
nearest
(
e
.
y
))
def
do_leave
(
self
,
e
):
e
.
widget
.
select_clear
()
e
.
widget
.
select_clear
(
'0'
,
'end'
)
def
do_1
(
self
,
e
):
self
.
kill
(
e
.
widget
.
get
(
e
.
widget
.
nearest
(
e
.
y
)))
def
__init__
(
self
,
master
=
None
,
cnf
=
{}):
...
...
@@ -117,9 +120,10 @@ class Kill(Frame):
self
.
frame
,
{
'relief'
:
'sunken'
,
'font'
:
'*-Courier-Medium-R-Normal-*-120-*'
,
'
geometry'
:
'40x10'
,
'
width'
:
40
,
'height'
:
10
,
'selectbackground'
:
'#eed5b7'
,
'selectborderwidth'
:
0
,
'selectmode'
:
'browse'
,
'yscroll'
:
self
.
frame
.
vscroll
.
set
})
self
.
frame
.
vscroll
[
'command'
]
=
self
.
frame
.
list
.
yview
self
.
frame
.
vscroll
.
pack
({
'side'
:
'right'
,
'fill'
:
'y'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment