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
96b608cf
Kaydet (Commit)
96b608cf
authored
Ara 17, 1993
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
*** empty log message ***
üst
1b789f9f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
17 deletions
+21
-17
test_cb.py
Demo/sgi/flp/test_cb.py
+5
-6
test_nocb.py
Demo/sgi/flp/test_nocb.py
+1
-1
kunst.py
Demo/sgi/gl/kunst.py
+1
-1
mclock.py
Demo/sgi/gl/mclock.py
+14
-9
No files found.
Demo/sgi/flp/test_cb.py
Dosyayı görüntüle @
96b608cf
...
@@ -14,11 +14,11 @@ import sys
...
@@ -14,11 +14,11 @@ import sys
# The following struct is created to hold the instance variables
# The following struct is created to hold the instance variables
# main_form, button1, button2 and exitbutton.
# main_form, button1, button2 and exitbutton.
class
myform
()
:
class
myform
:
#
#
# The
init function
parses and creates the form, but doesn't
# The
constructor
parses and creates the form, but doesn't
# display it (yet).
# display it (yet).
def
init
(
self
,
number
):
def
__init__
(
self
,
number
):
#
#
# First we parse the form
# First we parse the form
parsetree
=
flp
.
parse_form
(
'test_cb'
,
'main_form'
)
parsetree
=
flp
.
parse_form
(
'test_cb'
,
'main_form'
)
...
@@ -29,7 +29,6 @@ class myform():
...
@@ -29,7 +29,6 @@ class myform():
# And keep our number
# And keep our number
self
.
number
=
number
self
.
number
=
number
return
self
#
#
# The show function displays the form. It doesn't do any interaction,
# The show function displays the form. It doesn't do any interaction,
...
@@ -52,8 +51,8 @@ class myform():
...
@@ -52,8 +51,8 @@ class myform():
# The main program. Instantiate two variables of the forms class
# The main program. Instantiate two variables of the forms class
# and interact with them.
# and interact with them.
form1
=
myform
(
)
.
init
(
1
)
form1
=
myform
(
1
)
form2
=
myform
(
)
.
init
(
2
)
form2
=
myform
(
2
)
form1
.
show
()
form1
.
show
()
form2
.
show
()
form2
.
show
()
...
...
Demo/sgi/flp/test_nocb.py
Dosyayı görüntüle @
96b608cf
...
@@ -12,7 +12,7 @@ import sys
...
@@ -12,7 +12,7 @@ import sys
# The following struct is created to hold the instance variables
# The following struct is created to hold the instance variables
# main_form, button1, button2 and exitbutton.
# main_form, button1, button2 and exitbutton.
class
struct
()
:
pass
class
struct
:
pass
container
=
struct
()
container
=
struct
()
#
#
...
...
Demo/sgi/gl/kunst.py
Dosyayı görüntüle @
96b608cf
...
@@ -51,7 +51,7 @@ def mkslice(z1, z2, nparts, docircle):
...
@@ -51,7 +51,7 @@ def mkslice(z1, z2, nparts, docircle):
#
#
# Drawcylinder : draw the cylinder
# Drawcylinder : draw the cylinder
#
#
class
struct
()
:
pass
class
struct
:
pass
curobj
=
struct
()
curobj
=
struct
()
curobj
.
curobj
=
1
curobj
.
curobj
=
1
def
drawcylinder
(
cyl
):
def
drawcylinder
(
cyl
):
...
...
Demo/sgi/gl/mclock.py
Dosyayı görüntüle @
96b608cf
...
@@ -41,10 +41,10 @@ SCREENBG = 127, 156, 191
...
@@ -41,10 +41,10 @@ SCREENBG = 127, 156, 191
NPARTS
=
9
NPARTS
=
9
TITLE
=
'M Clock'
TITLE
=
'M Clock'
import
tzpars
e
# Set timezone, check for daylight saving tim
e
TZDIFF
=
t
zpars
e
.
timezone
TZDIFF
=
t
im
e
.
timezone
if
t
zparse
.
isdst
(
time
.
time
())
:
if
t
ime
.
localtime
(
time
.
time
())[
-
1
]
:
TZDIFF
=
t
zpars
e
.
altzone
TZDIFF
=
t
im
e
.
altzone
# Default parameters
# Default parameters
...
@@ -145,7 +145,7 @@ def main():
...
@@ -145,7 +145,7 @@ def main():
Gl
.
change
=
1
Gl
.
change
=
1
while
1
:
while
1
:
if
realtime
:
if
realtime
:
localtime
=
time
.
time
()
-
Gl
.
tzdiff
localtime
=
int
(
time
.
time
()
-
Gl
.
tzdiff
)
if
Gl
.
alarm_set
:
if
Gl
.
alarm_set
:
if
localtime
%
(
24
*
HOUR
)
==
Gl
.
alarm_time
:
if
localtime
%
(
24
*
HOUR
)
==
Gl
.
alarm_time
:
# Ring the alarm!
# Ring the alarm!
...
@@ -313,7 +313,7 @@ def usage(exc, msg):
...
@@ -313,7 +313,7 @@ def usage(exc, msg):
print
'-u update : update interval [60]'
print
'-u update : update interval [60]'
print
'-CMYK : Cyan, Magenta, Yellow or blacK overlay only'
print
'-CMYK : Cyan, Magenta, Yellow or blacK overlay only'
print
'if hh [mm [ss]] is specified, display that time statically'
print
'if hh [mm [ss]] is specified, display that time statically'
print
'on machines with < 12 bitplanes, -
c and -s are
forced on'
print
'on machines with < 12 bitplanes, -
s is
forced on'
#
#
sys
.
exit
(
2
)
sys
.
exit
(
2
)
...
@@ -329,7 +329,8 @@ def makehands(localtime):
...
@@ -329,7 +329,8 @@ def makehands(localtime):
little_hand
=
(
MIDN
+
FULLC
-
((
localtime
/
12
)
%
HOUR
))
%
FULLC
little_hand
=
(
MIDN
+
FULLC
-
((
localtime
/
12
)
%
HOUR
))
%
FULLC
return
little_hand
,
big_hand
,
seconds_hand
return
little_hand
,
big_hand
,
seconds_hand
def
makelist
(
little_hand
,
big_hand
,
seconds_hand
):
def
makelist
(
hands
):
little_hand
,
big_hand
,
seconds_hand
=
hands
total
=
[]
total
=
[]
if
Gl
.
cyan
or
not
Gl
.
colorsubset
:
if
Gl
.
cyan
or
not
Gl
.
colorsubset
:
total
=
total
+
makesublist
(
big_hand
,
Gl
.
indices
[
0
])
total
=
total
+
makesublist
(
big_hand
,
Gl
.
indices
[
0
])
...
@@ -476,7 +477,7 @@ def makewindow():
...
@@ -476,7 +477,7 @@ def makewindow():
prefposition
(
0
,
scrwidth
-
1
,
0
,
scrheight
-
1
)
prefposition
(
0
,
scrwidth
-
1
,
0
,
scrheight
-
1
)
else
:
else
:
keepaspect
(
1
,
1
)
keepaspect
(
1
,
1
)
prefsize
(
100
,
10
0
)
prefsize
(
80
,
8
0
)
#
#
if
not
Gl
.
border
:
if
not
Gl
.
border
:
noborder
()
noborder
()
...
@@ -495,7 +496,11 @@ def makewindow():
...
@@ -495,7 +496,11 @@ def makewindow():
if
Gl
.
warnings
:
if
Gl
.
warnings
:
print
nplanes
,
'color planes,'
,
nmaps
,
'color maps'
print
nplanes
,
'color planes,'
,
nmaps
,
'color maps'
#
#
if
nplanes
<
12
or
Gl
.
colormap
:
if
Gl
.
doublebuffer
and
not
Gl
.
colormap
and
nplanes
<
12
:
if
Gl
.
warnings
:
print
'forcing single buffer mode'
Gl
.
doublebuffer
=
0
#
if
Gl
.
colormap
:
if
not
Gl
.
colormap
:
if
not
Gl
.
colormap
:
Gl
.
colormap
=
nmaps
-
1
Gl
.
colormap
=
nmaps
-
1
if
Gl
.
warnings
:
if
Gl
.
warnings
:
...
...
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