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
63c9e985
Kaydet (Commit)
63c9e985
authored
Eyl 28, 1998
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rework startup
üst
1ac18cd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
26 deletions
+10
-26
Main.py
Tools/pynche/Main.py
+10
-26
No files found.
Tools/pynche/Main.py
Dosyayı görüntüle @
63c9e985
...
...
@@ -35,17 +35,14 @@ __version__ = '1.0'
import
sys
import
getopt
import
ColorDB
from
Tkinter
import
*
from
PyncheWidget
import
PyncheWidget
from
Switchboard
import
Switchboard
from
StripViewer
import
StripViewer
PROGRAM
=
sys
.
argv
[
0
]
# Milliseconds between interrupt checks
KEEPALIVE_TIMER
=
500
# Default locations of rgb.txt or other textual color database
RGB_TXT
=
[
# Solaris OpenWindows
...
...
@@ -63,21 +60,7 @@ def usage(status, msg=''):
app
=
None
def
keepalive
():
# Exercise the Python interpreter regularly so keyboard interrupts get
# through.
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
def
finished
(
event
=
None
):
sys
.
exit
(
0
)
def
main
():
global
app
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
...
...
@@ -109,11 +92,9 @@ def main():
else
:
raise
IOError
(
'No color database file found'
)
app
=
Tk
(
className
=
'Pynche'
)
app
.
protocol
(
'WM_DELETE_WINDOW'
,
finished
)
app
.
title
(
'Pynche
%
s'
%
__version__
)
app
.
iconname
(
'Pynche'
)
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
# create the application window decorations
app
=
PyncheWidget
(
__version__
)
parent
=
app
.
parent
()
# get triplet for initial color
try
:
...
...
@@ -130,10 +111,13 @@ def main():
except
ColorDB
.
BadColor
:
usage
(
1
,
'Cannot find an initial color to use'
)
s
=
Switchboard
(
app
,
colordb
,
red
,
green
,
blue
)
# create all output widgets
s
=
Switchboard
()
s
.
add_view
(
StripViewer
(
s
,
parent
))
s
.
update_views
(
red
,
green
,
blue
)
try
:
keepalive
()
app
.
mainloop
()
app
.
start
()
except
KeyboardInterrupt
:
pass
...
...
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