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
fd0b00e0
Kaydet (Commit)
fd0b00e0
authored
Ock 26, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use new file dialogs.
üst
2373ff4e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
29 deletions
+30
-29
ProfileBrowser.py
Mac/Tools/IDE/ProfileBrowser.py
+4
-3
PyConsole.py
Mac/Tools/IDE/PyConsole.py
+9
-6
PyDocSearch.py
Mac/Tools/IDE/PyDocSearch.py
+3
-3
PyEdit.py
Mac/Tools/IDE/PyEdit.py
+7
-11
PythonIDEMain.py
Mac/Tools/IDE/PythonIDEMain.py
+7
-6
No files found.
Mac/Tools/IDE/ProfileBrowser.py
Dosyayı görüntüle @
fd0b00e0
import
W
import
W
from
Carbon
import
Evt
from
Carbon
import
Evt
import
EasyDialogs
import
sys
import
sys
import
StringIO
import
StringIO
...
@@ -83,9 +84,9 @@ def main():
...
@@ -83,9 +84,9 @@ def main():
browser
=
ProfileBrowser
(
stats
)
browser
=
ProfileBrowser
(
stats
)
else
:
else
:
import
macfs
import
macfs
f
ss
,
ok
=
macfs
.
PromptGetFile
(
'Profiler data'
)
f
ilename
=
EasyDialogs
.
AskFileForOpen
(
message
=
'Profiler data'
)
if
not
ok
:
sys
.
exit
(
0
)
if
not
filename
:
sys
.
exit
(
0
)
stats
=
pstats
.
Stats
(
f
ss
.
as_pathname
()
)
stats
=
pstats
.
Stats
(
f
ilename
)
browser
=
ProfileBrowser
(
stats
)
browser
=
ProfileBrowser
(
stats
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
Mac/Tools/IDE/PyConsole.py
Dosyayı görüntüle @
fd0b00e0
...
@@ -10,6 +10,7 @@ import traceback
...
@@ -10,6 +10,7 @@ import traceback
import
MacOS
import
MacOS
import
MacPrefs
import
MacPrefs
from
Carbon
import
Qd
from
Carbon
import
Qd
import
EasyDialogs
import
PyInteractive
import
PyInteractive
if
not
hasattr
(
sys
,
'ps1'
):
if
not
hasattr
(
sys
,
'ps1'
):
...
@@ -85,10 +86,11 @@ class ConsoleTextWidget(W.EditText):
...
@@ -85,10 +86,11 @@ class ConsoleTextWidget(W.EditText):
def
domenu_save_as
(
self
,
*
args
):
def
domenu_save_as
(
self
,
*
args
):
import
macfs
import
macfs
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save console text as:'
,
'console.txt'
)
filename
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save console text as:'
,
if
not
ok
:
savedFileName
=
'console.txt'
)
if
not
filename
:
return
return
f
=
open
(
f
ss
.
as_pathname
()
,
'wb'
)
f
=
open
(
f
ilename
,
'wb'
)
f
.
write
(
self
.
get
())
f
.
write
(
self
.
get
())
f
.
close
()
f
.
close
()
fss
.
SetCreatorType
(
W
.
_signature
,
'TEXT'
)
fss
.
SetCreatorType
(
W
.
_signature
,
'TEXT'
)
...
@@ -241,10 +243,11 @@ class OutputTextWidget(W.EditText):
...
@@ -241,10 +243,11 @@ class OutputTextWidget(W.EditText):
def
domenu_save_as
(
self
,
*
args
):
def
domenu_save_as
(
self
,
*
args
):
title
=
self
.
_parentwindow
.
gettitle
()
title
=
self
.
_parentwindow
.
gettitle
()
import
macfs
import
macfs
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save
%
s text as:'
%
title
,
title
+
'.txt'
)
filename
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save
%
s text as:'
%
title
,
if
not
ok
:
savedFileName
=
title
+
'.txt'
)
if
not
filename
:
return
return
f
=
open
(
f
ss
.
as_pathname
()
,
'wb'
)
f
=
open
(
f
ilename
,
'wb'
)
f
.
write
(
self
.
get
())
f
.
write
(
self
.
get
())
f
.
close
()
f
.
close
()
fss
.
SetCreatorType
(
W
.
_signature
,
'TEXT'
)
fss
.
SetCreatorType
(
W
.
_signature
,
'TEXT'
)
...
...
Mac/Tools/IDE/PyDocSearch.py
Dosyayı görüntüle @
fd0b00e0
...
@@ -6,6 +6,7 @@ import MacPrefs
...
@@ -6,6 +6,7 @@ import MacPrefs
import
MacOS
import
MacOS
import
string
import
string
import
webbrowser
import
webbrowser
import
EasyDialogs
app
=
W
.
getapplication
()
app
=
W
.
getapplication
()
...
@@ -223,9 +224,8 @@ class PyDocSearch:
...
@@ -223,9 +224,8 @@ class PyDocSearch:
MacOS
.
SysBeep
(
0
)
MacOS
.
SysBeep
(
0
)
def
setdocpath
(
self
):
def
setdocpath
(
self
):
fss
,
ok
=
macfs
.
GetDirectory
()
docpath
=
EasyDialogs
.
AskFolder
()
if
ok
:
if
docpath
:
docpath
=
fss
.
as_pathname
()
if
not
verifydocpath
(
docpath
):
if
not
verifydocpath
(
docpath
):
W
.
Message
(
"This does not seem to be a Python documentation folder..."
)
W
.
Message
(
"This does not seem to be a Python documentation folder..."
)
else
:
else
:
...
...
Mac/Tools/IDE/PyEdit.py
Dosyayı görüntüle @
fd0b00e0
...
@@ -7,6 +7,7 @@ from Wkeys import *
...
@@ -7,6 +7,7 @@ from Wkeys import *
import
macfs
import
macfs
import
MACFS
import
MACFS
import
MacOS
import
MacOS
import
EasyDialogs
from
Carbon
import
Win
from
Carbon
import
Win
from
Carbon
import
Res
from
Carbon
import
Res
from
Carbon
import
Evt
from
Carbon
import
Evt
...
@@ -67,7 +68,6 @@ class Editor(W.Window):
...
@@ -67,7 +68,6 @@ class Editor(W.Window):
self
.
path
=
path
self
.
path
=
path
if
'
\n
'
in
text
:
if
'
\n
'
in
text
:
import
EasyDialogs
if
string
.
find
(
text
,
'
\r\n
'
)
>=
0
:
if
string
.
find
(
text
,
'
\r\n
'
)
>=
0
:
self
.
_eoln
=
'
\r\n
'
self
.
_eoln
=
'
\r\n
'
else
:
else
:
...
@@ -365,7 +365,6 @@ class Editor(W.Window):
...
@@ -365,7 +365,6 @@ class Editor(W.Window):
def
close
(
self
):
def
close
(
self
):
if
self
.
editgroup
.
editor
.
changed
:
if
self
.
editgroup
.
editor
.
changed
:
import
EasyDialogs
Qd
.
InitCursor
()
Qd
.
InitCursor
()
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save window "
%
s" before closing?'
%
self
.
title
,
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save window "
%
s" before closing?'
%
self
.
title
,
default
=
1
,
no
=
"Don
\xd5
t save"
)
default
=
1
,
no
=
"Don
\xd5
t save"
)
...
@@ -406,11 +405,11 @@ class Editor(W.Window):
...
@@ -406,11 +405,11 @@ class Editor(W.Window):
return
self
.
editgroup
.
editor
.
changed
or
self
.
editgroup
.
editor
.
selchanged
return
self
.
editgroup
.
editor
.
changed
or
self
.
editgroup
.
editor
.
selchanged
def
domenu_save_as
(
self
,
*
args
):
def
domenu_save_as
(
self
,
*
args
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
,
self
.
title
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
,
savedFileName
=
self
.
title
)
if
not
ok
:
if
not
path
:
return
1
return
1
self
.
showbreakpoints
(
0
)
self
.
showbreakpoints
(
0
)
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
setinfotext
()
self
.
setinfotext
()
self
.
title
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
title
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
title
)
self
.
wid
.
SetWTitle
(
self
.
title
)
...
@@ -434,11 +433,11 @@ class Editor(W.Window):
...
@@ -434,11 +433,11 @@ class Editor(W.Window):
destname
=
self
.
title
[:
-
3
]
destname
=
self
.
title
[:
-
3
]
else
:
else
:
destname
=
self
.
title
+
".applet"
destname
=
self
.
title
+
".applet"
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as Applet:'
,
destname
)
destname
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as Applet:'
,
if
not
ok
:
savedFileName
=
destname
)
if
not
destname
:
return
1
return
1
W
.
SetCursor
(
"watch"
)
W
.
SetCursor
(
"watch"
)
destname
=
fss
.
as_pathname
()
if
self
.
path
:
if
self
.
path
:
filename
=
self
.
path
filename
=
self
.
path
if
filename
[
-
3
:]
==
".py"
:
if
filename
[
-
3
:]
==
".py"
:
...
@@ -508,7 +507,6 @@ class Editor(W.Window):
...
@@ -508,7 +507,6 @@ class Editor(W.Window):
def
_run
(
self
):
def
_run
(
self
):
if
self
.
run_with_interpreter
:
if
self
.
run_with_interpreter
:
if
self
.
editgroup
.
editor
.
changed
:
if
self
.
editgroup
.
editor
.
changed
:
import
EasyDialogs
Qd
.
InitCursor
()
Qd
.
InitCursor
()
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save "
%
s" before running?'
%
self
.
title
,
1
)
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save "
%
s" before running?'
%
self
.
title
,
1
)
if
save
>
0
:
if
save
>
0
:
...
@@ -521,7 +519,6 @@ class Editor(W.Window):
...
@@ -521,7 +519,6 @@ class Editor(W.Window):
self
.
_run_with_interpreter
()
self
.
_run_with_interpreter
()
elif
self
.
run_with_cl_interpreter
:
elif
self
.
run_with_cl_interpreter
:
if
self
.
editgroup
.
editor
.
changed
:
if
self
.
editgroup
.
editor
.
changed
:
import
EasyDialogs
Qd
.
InitCursor
()
Qd
.
InitCursor
()
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save "
%
s" before running?'
%
self
.
title
,
1
)
save
=
EasyDialogs
.
AskYesNoCancel
(
'Save "
%
s" before running?'
%
self
.
title
,
1
)
if
save
>
0
:
if
save
>
0
:
...
@@ -1025,7 +1022,6 @@ class SearchEngine:
...
@@ -1025,7 +1022,6 @@ class SearchEngine:
W
.
SetCursor
(
"arrow"
)
W
.
SetCursor
(
"arrow"
)
if
counter
:
if
counter
:
self
.
hide
()
self
.
hide
()
import
EasyDialogs
from
Carbon
import
Res
from
Carbon
import
Res
editor
.
textchanged
()
editor
.
textchanged
()
editor
.
selectionchanged
()
editor
.
selectionchanged
()
...
...
Mac/Tools/IDE/PythonIDEMain.py
Dosyayı görüntüle @
fd0b00e0
...
@@ -9,6 +9,7 @@ import os
...
@@ -9,6 +9,7 @@ import os
import
sys
import
sys
import
macfs
import
macfs
import
MacOS
import
MacOS
import
EasyDialogs
if
MacOS
.
runtimemodel
==
'macho'
:
if
MacOS
.
runtimemodel
==
'macho'
:
ELIPSES
=
'...'
ELIPSES
=
'...'
...
@@ -189,8 +190,9 @@ class PythonIDE(Wapplication.Application):
...
@@ -189,8 +190,9 @@ class PythonIDE(Wapplication.Application):
Splash
.
about
()
Splash
.
about
()
def
do_setscriptsfolder
(
self
,
*
args
):
def
do_setscriptsfolder
(
self
,
*
args
):
fss
,
ok
=
macfs
.
GetDirectory
(
"Select Scripts Folder"
)
fss
=
EasyDialogs
.
AskFolder
(
message
=
"Select Scripts Folder"
,
if
ok
:
wanted
=
macfs
.
FSSpec
)
if
fss
:
prefs
=
self
.
getprefs
()
prefs
=
self
.
getprefs
()
alis
=
fss
.
NewAlias
()
alis
=
fss
.
NewAlias
()
prefs
.
scriptsfolder
=
alis
.
data
prefs
.
scriptsfolder
=
alis
.
data
...
@@ -204,9 +206,9 @@ class PythonIDE(Wapplication.Application):
...
@@ -204,9 +206,9 @@ class PythonIDE(Wapplication.Application):
ModuleBrowser
.
ModuleBrowser
()
ModuleBrowser
.
ModuleBrowser
()
def
domenu_open
(
self
,
*
args
):
def
domenu_open
(
self
,
*
args
):
f
ss
,
ok
=
macfs
.
StandardGetFile
(
"TEXT"
)
f
ilename
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
"TEXT"
,)
)
if
ok
:
if
filename
:
self
.
openscript
(
f
ss
.
as_pathname
()
)
self
.
openscript
(
f
ilename
)
def
domenu_new
(
self
,
*
args
):
def
domenu_new
(
self
,
*
args
):
W
.
SetCursor
(
'watch'
)
W
.
SetCursor
(
'watch'
)
...
@@ -344,7 +346,6 @@ class PythonIDE(Wapplication.Application):
...
@@ -344,7 +346,6 @@ class PythonIDE(Wapplication.Application):
# This is a cop-out. We should have disabled the menus
# This is a cop-out. We should have disabled the menus
# if there is no selection, but the can_ methods only seem
# if there is no selection, but the can_ methods only seem
# to work for Windows. Or not for the Help menu, maybe?
# to work for Windows. Or not for the Help menu, maybe?
import
EasyDialogs
text
=
EasyDialogs
.
AskString
(
"Search documentation for"
,
ok
=
"Search"
)
text
=
EasyDialogs
.
AskString
(
"Search documentation for"
,
ok
=
"Search"
)
return
text
return
text
...
...
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