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
cb5c80f6
Kaydet (Commit)
cb5c80f6
authored
Ara 07, 2007
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rename markupbase to _markupbase
üst
15c32549
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
HTMLParser.py
Lib/HTMLParser.py
+3
-3
_markupbase.py
Lib/_markupbase.py
+1
-1
sgmllib.py
Lib/sgmllib.py
+3
-3
No files found.
Lib/HTMLParser.py
Dosyayı görüntüle @
cb5c80f6
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
# and CDATA (character data -- only end tags are special).
# and CDATA (character data -- only end tags are special).
import
markupbase
import
_
markupbase
import
re
import
re
# Regular expressions used for parsing
# Regular expressions used for parsing
...
@@ -64,7 +64,7 @@ class HTMLParseError(Exception):
...
@@ -64,7 +64,7 @@ class HTMLParseError(Exception):
return
result
return
result
class
HTMLParser
(
markupbase
.
ParserBase
):
class
HTMLParser
(
_
markupbase
.
ParserBase
):
"""Find tags and other markup and call handler functions.
"""Find tags and other markup and call handler functions.
Usage:
Usage:
...
@@ -96,7 +96,7 @@ class HTMLParser(markupbase.ParserBase):
...
@@ -96,7 +96,7 @@ class HTMLParser(markupbase.ParserBase):
self
.
rawdata
=
''
self
.
rawdata
=
''
self
.
lasttag
=
'???'
self
.
lasttag
=
'???'
self
.
interesting
=
interesting_normal
self
.
interesting
=
interesting_normal
markupbase
.
ParserBase
.
reset
(
self
)
_
markupbase
.
ParserBase
.
reset
(
self
)
def
feed
(
self
,
data
):
def
feed
(
self
,
data
):
"""Feed data to the parser.
"""Feed data to the parser.
...
...
Lib/markupbase.py
→
Lib/
_
markupbase.py
Dosyayı görüntüle @
cb5c80f6
...
@@ -28,7 +28,7 @@ class ParserBase:
...
@@ -28,7 +28,7 @@ class ParserBase:
def
__init__
(
self
):
def
__init__
(
self
):
if
self
.
__class__
is
ParserBase
:
if
self
.
__class__
is
ParserBase
:
raise
RuntimeError
(
raise
RuntimeError
(
"markupbase.ParserBase must be subclassed"
)
"
_
markupbase.ParserBase must be subclassed"
)
def
error
(
self
,
message
):
def
error
(
self
,
message
):
raise
NotImplementedError
(
raise
NotImplementedError
(
...
...
Lib/sgmllib.py
Dosyayı görüntüle @
cb5c80f6
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# not supported at all.
# not supported at all.
import
markupbase
import
_
markupbase
import
re
import
re
__all__
=
[
"SGMLParser"
,
"SGMLParseError"
]
__all__
=
[
"SGMLParser"
,
"SGMLParseError"
]
...
@@ -52,7 +52,7 @@ class SGMLParseError(RuntimeError):
...
@@ -52,7 +52,7 @@ class SGMLParseError(RuntimeError):
# chunks). Entity references are passed by calling
# chunks). Entity references are passed by calling
# self.handle_entityref() with the entity reference as argument.
# self.handle_entityref() with the entity reference as argument.
class
SGMLParser
(
markupbase
.
ParserBase
):
class
SGMLParser
(
_
markupbase
.
ParserBase
):
# Definition of entities -- derived classes may override
# Definition of entities -- derived classes may override
entity_or_charref
=
re
.
compile
(
'&(?:'
entity_or_charref
=
re
.
compile
(
'&(?:'
'([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)'
'([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)'
...
@@ -71,7 +71,7 @@ class SGMLParser(markupbase.ParserBase):
...
@@ -71,7 +71,7 @@ class SGMLParser(markupbase.ParserBase):
self
.
lasttag
=
'???'
self
.
lasttag
=
'???'
self
.
nomoretags
=
0
self
.
nomoretags
=
0
self
.
literal
=
0
self
.
literal
=
0
markupbase
.
ParserBase
.
reset
(
self
)
_
markupbase
.
ParserBase
.
reset
(
self
)
def
setnomoretags
(
self
):
def
setnomoretags
(
self
):
"""Enter literal mode (CDATA) till EOF.
"""Enter literal mode (CDATA) till EOF.
...
...
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