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
f7c1e5a6
Kaydet (Commit)
f7c1e5a6
authored
Ock 31, 1998
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved toplevel widget to PyncheWidget.py
üst
fefbf79e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
1 deletion
+92
-1
Main.py
Tools/pynche/Main.py
+92
-1
No files found.
Tools/pynche/Main.py
Dosyayı görüntüle @
f7c1e5a6
...
...
@@ -10,7 +10,11 @@ Tkinter + Pmw provides such a nice programming environment, with enough
power, that I finally buckled down and implemented it. I changed the name
because these days, too many other systems have the acronym `ICE'.
Usage:
%(PROGRAM)
[-h]
This program currently requires Python 1.5 with Tkinter. It also requires at
least Pmw 0.6.1. It has only been tested on Solaris 2.6. Feedback is greatly
appreciated. Send email to bwarsaw@python.org
Usage:
%(PROGRAM)
s [-h]
Where:
--help
...
...
@@ -21,3 +25,90 @@ Where:
__version__
=
'1.0'
import
sys
import
getopt
import
Pmw
import
ColorDB
from
Tkinter
import
*
from
PyncheWidget
import
PyncheWidget
PROGRAM
=
sys
.
argv
[
0
]
# Milliseconds between interrupt checks
KEEPALIVE_TIMER
=
500
RGBCOLOR
=
1
HSICOLOR
=
2
NAMEDCOLOR
=
3
# Default locations of rgb.txt or other textual color database
RGB_TXT
=
[
# Solaris OpenWindows
'/usr/openwin/lib/rgb.txt'
,
# add more here
]
def
usage
(
status
,
msg
=
''
):
if
msg
:
print
msg
print
__doc__
%
globals
()
sys
.
exit
(
status
)
app
=
None
def
keepalive
():
# Exercise the Python interpreter regularly so keybard interrupts get
# through.
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
def
main
():
global
app
initialcolor
=
'grey50'
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hc:'
,
[
'color='
,
'help'
])
except
getopt
.
error
,
msg
:
usage
(
1
,
msg
)
if
args
:
usage
(
1
)
for
opt
,
arg
in
opts
:
if
opt
in
(
'-h'
,
'--help'
):
usage
(
0
)
elif
opt
in
(
'-c'
,
'--color'
):
initialcolor
=
arg
# create the windows and go
for
f
in
RGB_TXT
:
try
:
colordb
=
ColorDB
.
get_colordb
(
f
)
break
except
IOError
:
pass
else
:
raise
IOError
(
'No color database file found'
)
app
=
Pmw
.
initialise
(
fontScheme
=
'pmw1'
)
app
.
title
(
'Pynche
%
s'
%
__version__
)
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
p
=
PyncheWidget
(
colordb
,
app
,
color
=
initialcolor
)
try
:
keepalive
()
app
.
mainloop
()
except
KeyboardInterrupt
:
pass
if
__name__
==
'__main__'
:
main
()
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