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
1f733baa
Kaydet (Commit)
1f733baa
authored
Eki 07, 2001
tarafından
Steven M. Gava
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
merged port binding error message patch
üst
4eb28687
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
14 deletions
+33
-14
PyShell.py
Lib/idlelib/PyShell.py
+33
-14
No files found.
Lib/idlelib/PyShell.py
Dosyayı görüntüle @
1f733baa
...
...
@@ -730,6 +730,18 @@ class usageError:
class
main
:
def
__init__
(
self
,
noshell
=
1
):
global
flist
,
root
root
=
Tk
(
className
=
"Idle"
)
fixwordbreaks
(
root
)
root
.
withdraw
()
flist
=
PyShellFileList
(
root
)
dbg
=
OnDemandOutputWindow
(
flist
)
dbg
.
set_title
(
'IDLE Debugging Messages'
)
sys
.
stdout
=
PseudoFile
(
dbg
,[
'stdout'
])
sys
.
stderr
=
PseudoFile
(
dbg
,[
'stderr'
])
try
:
self
.
server
=
protocol
.
Server
(
connection_hook
=
self
.
address_ok
)
protocol
.
publish
(
'IDLE'
,
self
.
connect
)
...
...
@@ -749,9 +761,27 @@ class main:
except
protocol
.
connectionLost
:
pass
# xxx Should scream via Tk()
print
"Something already has our socket, but it won't open a window for me!"
print
"Unable to proceed."
#maybe the following should be handled by a tkmessagebox for
#users who don't start idle from a console??
print
"""
\
IDLE cannot run.
IDLE needs to use a specific TCP/IP port (7454) in order to execute and
debug programs. IDLE is unable to bind to this port, and so cannot
start. Here are some possible causes of this problem:
1. TCP/IP networking is not installed or not working on this computer
2. Another program is running that uses this port
3. Another copy of IDLE stopped responding but is still bound to the port
4. Personal firewall software is preventing IDLE from using this port
IDLE makes and accepts connections only with this computer, and does not
communicate over the internet in any way. It's use of port 7454 should not
be a security risk on a single-user machine.
"""
dbg
.
owin
.
gotoline
(
1
)
dbg
.
owin
.
remove_selection
()
root
.
mainloop
()
# wait for user to read message
def
idle
(
self
):
spawn
.
kill_zombies
()
...
...
@@ -828,12 +858,6 @@ class main:
if
not
dir
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
dir
)
global
flist
,
root
root
=
Tk
(
className
=
"Idle"
)
fixwordbreaks
(
root
)
root
.
withdraw
()
flist
=
PyShellFileList
(
root
)
if
edit
:
for
filename
in
args
:
flist
.
open
(
filename
)
...
...
@@ -845,11 +869,6 @@ class main:
else
:
sys
.
argv
=
args
or
[
""
]
#dbg=OnDemandOutputWindow(flist)
#dbg.set_title('Internal IDLE Problem')
#sys.stdout = PseudoFile(dbg,['stdout'])
#sys.stderr = PseudoFile(dbg,['stderr'])
if
noshell
:
flist
.
pyshell
=
None
else
:
...
...
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