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
d1252395
Kaydet (Commit)
d1252395
authored
Eyl 05, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add new builtin commands "copyright", "license", "credits" which
display the information you would expect them to display.
üst
f2ffce05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
site.py
Lib/site.py
+52
-1
No files found.
Lib/site.py
Dosyayı görüntüle @
d1252395
...
...
@@ -119,7 +119,58 @@ import __builtin__
__builtin__
.
quit
=
__builtin__
.
exit
=
exit
del
exit
#
# interactive prompt objects for printing the license text, a list of
# contributors and the copyright notice.
class
_Printer
:
MAXLINES
=
23
def
__init__
(
self
,
s
):
self
.
__lines
=
s
.
split
(
'
\n
'
)
self
.
__linecnt
=
len
(
self
.
__lines
)
def
__repr__
(
self
):
prompt
=
'Hit Return for more, or q (and Return) to quit: '
lineno
=
0
while
1
:
try
:
for
i
in
range
(
lineno
,
lineno
+
self
.
MAXLINES
):
print
self
.
__lines
[
i
]
except
IndexError
:
break
else
:
lineno
+=
self
.
MAXLINES
key
=
None
while
key
is
None
:
key
=
raw_input
(
prompt
)
if
key
not
in
(
''
,
'q'
):
key
=
None
if
key
==
'q'
:
break
return
''
__builtin__
.
copyright
=
_Printer
(
sys
.
copyright
)
__builtin__
.
credits
=
_Printer
(
'''Python development is led by BeOpen PythonLabs (www.pythonlabs.com).'''
)
def
make_license
(
filename
):
try
:
return
_Printer
(
open
(
filename
)
.
read
())
except
IOError
:
return
None
here
=
os
.
path
.
dirname
(
os
.
__file__
)
for
dir
in
here
,
os
.
path
.
join
(
here
,
os
.
pardir
),
os
.
curdir
:
for
file
in
"LICENSE.txt"
,
"LICENSE"
:
lic
=
make_license
(
os
.
path
.
join
(
dir
,
file
))
if
lic
:
break
if
lic
:
__builtin__
.
license
=
lic
break
else
:
__builtin__
.
license
=
_Printer
(
'See http://hdl.handle.net/1895.22/1012'
)
# Set the string encoding used by the Unicode implementation. The
# default is 'ascii', but if you're willing to experiment, you can
# change this.
...
...
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