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
eab81a92
Kaydet (Commit)
eab81a92
authored
Şub 11, 1998
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Better conversion of command line given initial color
üst
55d3ffa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
Main.py
Tools/pynche/Main.py
+18
-3
No files found.
Tools/pynche/Main.py
Dosyayı görüntüle @
eab81a92
...
@@ -14,9 +14,13 @@ This program currently requires Python 1.5 with Tkinter. It also requires at
...
@@ -14,9 +14,13 @@ 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
least Pmw 0.6.1. It has only been tested on Solaris 2.6. Feedback is greatly
appreciated. Send email to bwarsaw@python.org
appreciated. Send email to bwarsaw@python.org
Usage:
%(PROGRAM)
s [-h]
Usage:
%(PROGRAM)
s [-
c color] [-
h]
Where:
Where:
--color color
-c color
initial color, as an X color name or #RRGGBB format
--help
--help
-h
-h
print this message
print this message
...
@@ -71,7 +75,7 @@ def keepalive():
...
@@ -71,7 +75,7 @@ def keepalive():
def
main
():
def
main
():
global
app
global
app
initialcolor
=
'grey50'
initialcolor
=
(
128
,
128
,
128
)
try
:
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hc:'
,
'hc:'
,
...
@@ -101,7 +105,18 @@ def main():
...
@@ -101,7 +105,18 @@ def main():
app
=
Pmw
.
initialise
(
fontScheme
=
'pmw1'
)
app
=
Pmw
.
initialise
(
fontScheme
=
'pmw1'
)
app
.
title
(
'Pynche
%
s'
%
__version__
)
app
.
title
(
'Pynche
%
s'
%
__version__
)
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
app
.
tk
.
createtimerhandler
(
KEEPALIVE_TIMER
,
keepalive
)
p
=
PyncheWidget
(
colordb
,
app
,
color
=
initialcolor
)
# get triplet for initial color
try
:
red
,
green
,
blue
=
colordb
.
find_byname
(
initialcolor
)
except
ColorDB
.
BadColor
:
# must be a #rrggbb style color
try
:
red
,
green
,
blue
=
ColorDB
.
rrggbb_to_triplet
(
initialcolor
)
except
ColorDB
.
BadColor
:
usage
(
1
,
'Bad initial color:
%
s'
%
initialcolor
)
p
=
PyncheWidget
(
colordb
,
app
,
color
=
(
red
,
green
,
blue
))
try
:
try
:
keepalive
()
keepalive
()
app
.
mainloop
()
app
.
mainloop
()
...
...
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