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
4888c7ec
Kaydet (Commit)
4888c7ec
authored
May 23, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added section titles (for now, hardcoded in the file).
üst
549e0ff7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
faqmain.py
Tools/faqwiz/faqmain.py
+22
-5
No files found.
Tools/faqwiz/faqmain.py
Dosyayı görüntüle @
4888c7ec
...
...
@@ -7,7 +7,6 @@ this file as a string constant.
XXX TO DO
- next/prev/index links in do_show?
- should have files containing section headers
- customize rcs command pathnames
- explanation of editing somewhere
- various embellishments, GIFs, crosslinks, hints, etc.
...
...
@@ -28,6 +27,16 @@ XXX TO DO
NAMEPAT
=
"faq??.???.htp"
NAMEREG
=
"^faq
\
([0-9][0-9]
\
)
\
.
\
([0-9][0-9][0-9]
\
)
\
.htp$"
SECTIONS
=
{
"1"
:
"General information and availability"
,
"2"
:
"Python in the real world"
,
"3"
:
"Building Python and Other Known Bugs"
,
"4"
:
"Programming in Python"
,
"5"
:
"Extending Python"
,
"6"
:
"Python's design"
,
"7"
:
"Using Python on non-UNIX platforms"
,
}
class
FAQServer
:
def
__init__
(
self
):
...
...
@@ -46,7 +55,7 @@ class FAQServer:
KEYS
=
[
'req'
,
'query'
,
'name'
,
'text'
,
'commit'
,
'title'
,
'author'
,
'email'
,
'log'
,
'section'
,
'number'
,
'add'
,
'version'
]
'version'
,
'edit'
]
def
__getattr__
(
self
,
key
):
if
key
not
in
self
.
KEYS
:
...
...
@@ -108,7 +117,11 @@ class FAQServer:
</UL>
"""
%
section
section
=
nsec
print
"<H2>Section
%
s</H2>"
%
section
if
SECTIONS
.
has_key
(
section
):
stitle
=
SECTIONS
[
section
]
else
:
stitle
=
""
print
"<H2>Section
%
s.
%
s</H2>"
%
(
section
,
stitle
)
print
"<UL>"
print
'<LI><A HREF="faq.py?req=show&name=
%
s">
%
s</A>'
%
(
name
,
cgi
.
escape
(
title
))
...
...
@@ -146,9 +159,13 @@ class FAQServer:
nsec
=
title
[:
i
]
if
nsec
!=
section
:
section
=
nsec
print
"<H1>Section
%
s</H1>"
%
section
if
SECTIONS
.
has_key
(
section
):
stitle
=
SECTIONS
[
section
]
else
:
stitle
=
""
print
"<H1>Section
%
s.
%
s</H1>"
%
(
section
,
stitle
)
print
"<HR>"
self
.
show
(
name
,
title
,
text
)
self
.
show
(
name
,
title
,
text
,
edit
=
(
self
.
edit
!=
'no'
)
)
if
not
section
:
print
"No FAQ entries?!?!"
...
...
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