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
25b57413
Kaydet (Commit)
25b57413
authored
Kas 06, 2010
tarafından
Alexander Belopolsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10330: trace module can now be used with python built without threads.
üst
ecd34cbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
trace.py
Lib/trace.py
+18
-5
No files found.
Lib/trace.py
Dosyayı görüntüle @
25b57413
...
@@ -53,7 +53,6 @@ import linecache
...
@@ -53,7 +53,6 @@ import linecache
import
os
import
os
import
re
import
re
import
sys
import
sys
import
threading
import
time
import
time
import
token
import
token
import
tokenize
import
tokenize
...
@@ -62,6 +61,22 @@ import gc
...
@@ -62,6 +61,22 @@ import gc
import
dis
import
dis
import
pickle
import
pickle
try
:
import
threading
except
ImportError
:
_settrace
=
sys
.
settrace
def
_unsettrace
():
sys
.
settrace
(
None
)
else
:
def
_settrace
(
func
):
threading
.
settrace
(
func
)
sys
.
settrace
(
func
)
def
_unsettrace
():
sys
.
settrace
(
None
)
threading
.
settrace
(
None
)
def
usage
(
outfile
):
def
usage
(
outfile
):
outfile
.
write
(
"""Usage:
%
s [OPTIONS] <file> [ARGS]
outfile
.
write
(
"""Usage:
%
s [OPTIONS] <file> [ARGS]
...
@@ -491,14 +506,12 @@ class Trace:
...
@@ -491,14 +506,12 @@ class Trace:
if
globals
is
None
:
globals
=
{}
if
globals
is
None
:
globals
=
{}
if
locals
is
None
:
locals
=
{}
if
locals
is
None
:
locals
=
{}
if
not
self
.
donothing
:
if
not
self
.
donothing
:
threading
.
settrace
(
self
.
globaltrace
)
_settrace
(
self
.
globaltrace
)
sys
.
settrace
(
self
.
globaltrace
)
try
:
try
:
exec
(
cmd
,
globals
,
locals
)
exec
(
cmd
,
globals
,
locals
)
finally
:
finally
:
if
not
self
.
donothing
:
if
not
self
.
donothing
:
sys
.
settrace
(
None
)
_unsettrace
()
threading
.
settrace
(
None
)
def
runfunc
(
self
,
func
,
*
args
,
**
kw
):
def
runfunc
(
self
,
func
,
*
args
,
**
kw
):
result
=
None
result
=
None
...
...
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