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
6b06f29d
Kaydet (Commit)
6b06f29d
authored
Eyl 16, 2002
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge Py Idle changes:
Rev 1.5 doerwalter string methods
üst
01166da8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
IdleHistory.py
Lib/idlelib/IdleHistory.py
+5
-7
No files found.
Lib/idlelib/IdleHistory.py
Dosyayı görüntüle @
6b06f29d
import
string
class
History
:
def
__init__
(
self
,
text
,
output_sep
=
"
\n
"
):
...
...
@@ -22,11 +20,11 @@ class History:
def
_get_source
(
self
,
start
,
end
):
# Get source code from start index to end index. Lines in the
# text control may be separated by sys.ps2 .
lines
=
s
tring
.
split
(
self
.
text
.
get
(
start
,
end
),
self
.
output_sep
)
return
string
.
join
(
lines
,
"
\n
"
)
lines
=
s
elf
.
text
.
get
(
start
,
end
)
.
split
(
self
.
output_sep
)
return
"
\n
"
.
join
(
lines
)
def
_put_source
(
self
,
where
,
source
):
output
=
s
tring
.
join
(
string
.
split
(
source
,
"
\n
"
),
self
.
output_sep
)
output
=
s
elf
.
output_sep
.
join
(
source
.
split
(
"
\n
"
)
)
self
.
text
.
insert
(
where
,
output
)
def
history_do
(
self
,
reverse
):
...
...
@@ -68,7 +66,7 @@ class History:
self
.
history_prefix
=
prefix
def
history_store
(
self
,
source
):
source
=
s
tring
.
strip
(
source
)
source
=
s
ource
.
strip
(
)
if
len
(
source
)
>
2
:
# avoid duplicates
try
:
...
...
@@ -80,7 +78,7 @@ class History:
self
.
history_prefix
=
None
def
recall
(
self
,
s
):
s
=
s
tring
.
strip
(
s
)
s
=
s
.
strip
(
)
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
self
.
text
.
delete
(
"iomark"
,
"end-1c"
)
self
.
text
.
mark_set
(
"insert"
,
"end-1c"
)
...
...
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