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
b340acf9
Kaydet (Commit)
b340acf9
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
d9db3a67
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
72 additions
and
78 deletions
+72
-78
imgbrowse.py
Mac/Demo/imgbrowse/imgbrowse.py
+3
-5
mlted.py
Mac/Demo/mlte/mlted.py
+5
-7
MovieInWindow.py
Mac/Demo/quicktime/MovieInWindow.py
+4
-3
VerySimplePlayer.py
Mac/Demo/quicktime/VerySimplePlayer.py
+4
-3
ped.py
Mac/Demo/textedit/ped.py
+5
-6
htmled.py
Mac/Demo/waste/htmled.py
+11
-14
swed.py
Mac/Demo/waste/swed.py
+6
-8
wed.py
Mac/Demo/waste/wed.py
+6
-7
macgen_bin.py
Mac/Tools/macfreeze/macgen_bin.py
+3
-3
EditPythonPrefs.py
Mac/scripts/EditPythonPrefs.py
+2
-1
findgremlins.py
Mac/scripts/findgremlins.py
+4
-3
fixfiletypes.py
Mac/scripts/fixfiletypes.py
+4
-3
fullbuild.py
Mac/scripts/fullbuild.py
+2
-3
makeclean.py
Mac/scripts/makeclean.py
+4
-3
unshar.py
Mac/scripts/unshar.py
+6
-6
zappycfiles.py
Mac/scripts/zappycfiles.py
+3
-3
No files found.
Mac/Demo/imgbrowse/imgbrowse.py
Dosyayı görüntüle @
b340acf9
GetPortBounds
()
"""imgbrowse - Display pictures using img"""
"""imgbrowse - Display pictures using img"""
import
FrameWork
import
FrameWork
import
EasyDialogs
import
EasyDialogs
...
@@ -11,7 +11,6 @@ import sys
...
@@ -11,7 +11,6 @@ import sys
import
struct
import
struct
import
img
import
img
import
imgformat
import
imgformat
import
macfs
import
struct
import
struct
import
mac_image
import
mac_image
...
@@ -47,11 +46,10 @@ class imgbrowse(FrameWork.Application):
...
@@ -47,11 +46,10 @@ class imgbrowse(FrameWork.Application):
self
.
_quit
()
self
.
_quit
()
def
opendoc
(
self
,
*
args
):
def
opendoc
(
self
,
*
args
):
fss
,
ok
=
macfs
.
StandardGetFile
()
# Any file type
pathname
=
EasyDialogs
.
AskFileForOpen
()
# Any file type
if
not
ok
:
if
not
pathname
:
return
return
bar
=
EasyDialogs
.
ProgressBar
(
'Reading and converting...'
)
bar
=
EasyDialogs
.
ProgressBar
(
'Reading and converting...'
)
pathname
=
fss
.
as_pathname
()
try
:
try
:
rdr
=
img
.
reader
(
imgformat
.
macrgb16
,
pathname
)
rdr
=
img
.
reader
(
imgformat
.
macrgb16
,
pathname
)
except
img
.
error
,
arg
:
except
img
.
error
,
arg
:
...
...
Mac/Demo/mlte/mlted.py
Dosyayı görüntüle @
b340acf9
...
@@ -11,7 +11,6 @@ from Carbon import Qd
...
@@ -11,7 +11,6 @@ from Carbon import Qd
from
Carbon
import
Res
from
Carbon
import
Res
from
Carbon
import
Scrap
from
Carbon
import
Scrap
import
os
import
os
import
macfs
from
Carbon
import
MacTextEditor
from
Carbon
import
MacTextEditor
from
Carbon
import
Mlte
from
Carbon
import
Mlte
...
@@ -92,9 +91,9 @@ class MlteWindow(Window):
...
@@ -92,9 +91,9 @@ class MlteWindow(Window):
self
.
changed
=
0
self
.
changed
=
0
def
menu_save_as
(
self
):
def
menu_save_as
(
self
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
)
if
not
ok
:
return
if
not
path
:
return
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
menu_save
()
self
.
menu_save
()
...
@@ -268,10 +267,9 @@ class Mlted(Application):
...
@@ -268,10 +267,9 @@ class Mlted(Application):
def
_open
(
self
,
askfile
):
def
_open
(
self
,
askfile
):
if
askfile
:
if
askfile
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
name
=
os
.
path
.
split
(
path
)[
-
1
]
name
=
os
.
path
.
split
(
path
)[
-
1
]
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
...
...
Mac/Demo/quicktime/MovieInWindow.py
Dosyayı görüntüle @
b340acf9
...
@@ -11,7 +11,8 @@ from Carbon import Evt
...
@@ -11,7 +11,8 @@ from Carbon import Evt
from
Carbon
import
Events
from
Carbon
import
Events
from
Carbon
import
Win
from
Carbon
import
Win
from
Carbon
import
Windows
from
Carbon
import
Windows
import
macfs
from
Carbon
import
File
import
EasyDialogs
import
sys
import
sys
...
@@ -21,8 +22,8 @@ def main():
...
@@ -21,8 +22,8 @@ def main():
Qt
.
EnterMovies
()
Qt
.
EnterMovies
()
# Get the movie file
# Get the movie file
fss
,
ok
=
macfs
.
StandardGetFile
(
)
# Was: QuickTime.MovieFileType
fss
=
EasyDialogs
.
AskFileForOpen
(
wanted
=
File
.
FSSpec
)
# Was: QuickTime.MovieFileType
if
not
ok
:
if
not
fss
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
# Open the window
# Open the window
...
...
Mac/Demo/quicktime/VerySimplePlayer.py
Dosyayı görüntüle @
b340acf9
...
@@ -11,7 +11,8 @@ from Carbon import Evt
...
@@ -11,7 +11,8 @@ from Carbon import Evt
from
Carbon
import
Events
from
Carbon
import
Events
from
Carbon
import
Win
from
Carbon
import
Win
from
Carbon
import
Windows
from
Carbon
import
Windows
import
macfs
from
Carbon
import
File
import
EasyDialogs
import
sys
import
sys
# XXXX maxbounds = (40, 40, 1000, 1000)
# XXXX maxbounds = (40, 40, 1000, 1000)
...
@@ -23,8 +24,8 @@ def main():
...
@@ -23,8 +24,8 @@ def main():
Qt
.
EnterMovies
()
Qt
.
EnterMovies
()
# Get the movie file
# Get the movie file
fss
,
ok
=
macfs
.
StandardGetFile
(
QuickTime
.
MovieFileType
)
fss
=
EasyDialogs
.
AskFileForOpen
(
wanted
=
File
.
FSSpec
)
# Was: QuickTime.MovieFileType
if
not
ok
:
if
not
fss
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
# Open the window
# Open the window
...
...
Mac/Demo/textedit/ped.py
Dosyayı görüntüle @
b340acf9
...
@@ -131,9 +131,9 @@ class TEWindow(ScrolledWindow):
...
@@ -131,9 +131,9 @@ class TEWindow(ScrolledWindow):
self
.
changed
=
0
self
.
changed
=
0
def
menu_save_as
(
self
):
def
menu_save_as
(
self
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
)
if
not
ok
:
return
if
not
path
:
return
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
menu_save
()
self
.
menu_save
()
...
@@ -265,10 +265,9 @@ class Ped(Application):
...
@@ -265,10 +265,9 @@ class Ped(Application):
def
_open
(
self
,
askfile
):
def
_open
(
self
,
askfile
):
if
askfile
:
if
askfile
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
name
=
os
.
path
.
split
(
path
)[
-
1
]
name
=
os
.
path
.
split
(
path
)[
-
1
]
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
...
...
Mac/Demo/waste/htmled.py
Dosyayı görüntüle @
b340acf9
...
@@ -13,8 +13,8 @@ import waste
...
@@ -13,8 +13,8 @@ import waste
import
WASTEconst
import
WASTEconst
from
Carbon
import
Scrap
from
Carbon
import
Scrap
import
os
import
os
import
EasyDialogs
import
macfs
import
macfs
import
MACFS
import
string
import
string
import
htmllib
import
htmllib
...
@@ -243,7 +243,7 @@ class WasteWindow(ScrolledWindow):
...
@@ -243,7 +243,7 @@ class WasteWindow(ScrolledWindow):
try
:
try
:
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
except
Res
.
Error
:
except
Res
.
Error
:
Res
.
FSpCreateResFile
(
self
.
path
,
'????'
,
'TEXT'
,
MACFS
.
smAllScripts
)
Res
.
FSpCreateResFile
(
self
.
path
,
'????'
,
'TEXT'
,
macfs
.
smAllScripts
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
styles
=
Res
.
Resource
(
''
)
styles
=
Res
.
Resource
(
''
)
soup
=
Res
.
Resource
(
''
)
soup
=
Res
.
Resource
(
''
)
...
@@ -256,9 +256,9 @@ class WasteWindow(ScrolledWindow):
...
@@ -256,9 +256,9 @@ class WasteWindow(ScrolledWindow):
self
.
ted
.
WEResetModCount
()
self
.
ted
.
WEResetModCount
()
def
menu_save_as
(
self
):
def
menu_save_as
(
self
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
)
if
not
ok
:
return
if
not
path
:
return
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
menu_save
()
self
.
menu_save
()
...
@@ -661,10 +661,9 @@ class Wed(Application):
...
@@ -661,10 +661,9 @@ class Wed(Application):
def
_open
(
self
,
askfile
):
def
_open
(
self
,
askfile
):
if
askfile
:
if
askfile
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
name
=
os
.
path
.
split
(
path
)[
-
1
]
name
=
os
.
path
.
split
(
path
)[
-
1
]
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
...
@@ -683,10 +682,9 @@ class Wed(Application):
...
@@ -683,10 +682,9 @@ class Wed(Application):
def
insertfile
(
self
,
*
args
):
def
insertfile
(
self
,
*
args
):
if
self
.
active
:
if
self
.
active
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
except
IOError
,
arg
:
except
IOError
,
arg
:
...
@@ -698,10 +696,9 @@ class Wed(Application):
...
@@ -698,10 +696,9 @@ class Wed(Application):
def
inserthtml
(
self
,
*
args
):
def
inserthtml
(
self
,
*
args
):
if
self
.
active
:
if
self
.
active
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
try
:
try
:
fp
=
open
(
path
,
'r'
)
fp
=
open
(
path
,
'r'
)
except
IOError
,
arg
:
except
IOError
,
arg
:
...
...
Mac/Demo/waste/swed.py
Dosyayı görüntüle @
b340acf9
...
@@ -14,7 +14,6 @@ import WASTEconst
...
@@ -14,7 +14,6 @@ import WASTEconst
from
Carbon
import
Scrap
from
Carbon
import
Scrap
import
os
import
os
import
macfs
import
macfs
import
MACFS
UNDOLABELS
=
[
# Indexed by WEGetUndoInfo() value
UNDOLABELS
=
[
# Indexed by WEGetUndoInfo() value
None
,
""
,
"typing"
,
"Cut"
,
"Paste"
,
"Clear"
,
"Drag"
,
"Style"
]
None
,
""
,
"typing"
,
"Cut"
,
"Paste"
,
"Clear"
,
"Drag"
,
"Style"
]
...
@@ -213,7 +212,7 @@ class WasteWindow(ScrolledWindow):
...
@@ -213,7 +212,7 @@ class WasteWindow(ScrolledWindow):
try
:
try
:
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
except
Res
.
Error
:
except
Res
.
Error
:
Res
.
FSpCreateResFile
(
self
.
path
,
'????'
,
'TEXT'
,
MACFS
.
smAllScripts
)
Res
.
FSpCreateResFile
(
self
.
path
,
'????'
,
'TEXT'
,
macfs
.
smAllScripts
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
rf
=
Res
.
FSpOpenResFile
(
self
.
path
,
3
)
styles
=
Res
.
Resource
(
''
)
styles
=
Res
.
Resource
(
''
)
soup
=
Res
.
Resource
(
''
)
soup
=
Res
.
Resource
(
''
)
...
@@ -226,9 +225,9 @@ class WasteWindow(ScrolledWindow):
...
@@ -226,9 +225,9 @@ class WasteWindow(ScrolledWindow):
self
.
ted
.
WEResetModCount
()
self
.
ted
.
WEResetModCount
()
def
menu_save_as
(
self
):
def
menu_save_as
(
self
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
)
if
not
ok
:
return
if
not
path
:
return
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
menu_save
()
self
.
menu_save
()
...
@@ -521,10 +520,9 @@ class Wed(Application):
...
@@ -521,10 +520,9 @@ class Wed(Application):
def
_open
(
self
,
askfile
):
def
_open
(
self
,
askfile
):
if
askfile
:
if
askfile
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
name
=
os
.
path
.
split
(
path
)[
-
1
]
name
=
os
.
path
.
split
(
path
)[
-
1
]
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
...
...
Mac/Demo/waste/wed.py
Dosyayı görüntüle @
b340acf9
...
@@ -12,7 +12,7 @@ import waste
...
@@ -12,7 +12,7 @@ import waste
import
WASTEconst
import
WASTEconst
from
Carbon
import
Scrap
from
Carbon
import
Scrap
import
os
import
os
import
macf
s
import
EasyDialog
s
UNDOLABELS
=
[
# Indexed by WEGetUndoInfo() value
UNDOLABELS
=
[
# Indexed by WEGetUndoInfo() value
None
,
""
,
"typing"
,
"Cut"
,
"Paste"
,
"Clear"
,
"Drag"
,
"Style"
]
None
,
""
,
"typing"
,
"Cut"
,
"Paste"
,
"Clear"
,
"Drag"
,
"Style"
]
...
@@ -181,9 +181,9 @@ class WasteWindow(ScrolledWindow):
...
@@ -181,9 +181,9 @@ class WasteWindow(ScrolledWindow):
self
.
changed
=
0
self
.
changed
=
0
def
menu_save_as
(
self
):
def
menu_save_as
(
self
):
fss
,
ok
=
macfs
.
StandardPutFile
(
'Save as:'
)
path
=
EasyDialogs
.
AskFileForSave
(
message
=
'Save as:'
)
if
not
ok
:
return
if
not
path
:
return
self
.
path
=
fss
.
as_pathname
()
self
.
path
=
path
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
name
=
os
.
path
.
split
(
self
.
path
)[
-
1
]
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
wid
.
SetWTitle
(
self
.
name
)
self
.
menu_save
()
self
.
menu_save
()
...
@@ -329,10 +329,9 @@ class Wed(Application):
...
@@ -329,10 +329,9 @@ class Wed(Application):
def
_open
(
self
,
askfile
):
def
_open
(
self
,
askfile
):
if
askfile
:
if
askfile
:
fss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
path
=
EasyDialogs
.
AskFileForOpen
(
typeList
=
(
'TEXT'
,)
)
if
not
ok
:
if
not
path
:
return
return
path
=
fss
.
as_pathname
()
name
=
os
.
path
.
split
(
path
)[
-
1
]
name
=
os
.
path
.
split
(
path
)[
-
1
]
try
:
try
:
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
fp
=
open
(
path
,
'rb'
)
# NOTE binary, we need cr as end-of-line
...
...
Mac/Tools/macfreeze/macgen_bin.py
Dosyayı görüntüle @
b340acf9
...
@@ -205,10 +205,10 @@ def findpythoncore():
...
@@ -205,10 +205,10 @@ def findpythoncore():
raise
"Unknown MacOS.runtimemodel"
,
MacOS
.
runtimemodel
raise
"Unknown MacOS.runtimemodel"
,
MacOS
.
runtimemodel
corepath
=
os
.
path
.
join
(
extpath
,
corename
)
corepath
=
os
.
path
.
join
(
extpath
,
corename
)
if
not
os
.
path
.
exists
(
corepath
):
if
not
os
.
path
.
exists
(
corepath
):
fss
,
ok
=
macfs
.
PromptGetFile
(
"Please locate PythonCore:"
,
"shlb"
)
corepath
=
EasyDialogs
.
AskFileForOpen
(
message
=
"Please locate PythonCore:"
,
if
not
ok
:
typeList
=
(
"shlb"
,))
if
not
corepath
:
raise
KeyboardInterrupt
,
"cancelled"
raise
KeyboardInterrupt
,
"cancelled"
corepath
=
fss
.
as_pathname
()
return
resolvealiasfile
(
corepath
)
return
resolvealiasfile
(
corepath
)
def
resolvealiasfile
(
path
):
def
resolvealiasfile
(
path
):
...
...
Mac/scripts/EditPythonPrefs.py
Dosyayı görüntüle @
b340acf9
...
@@ -159,7 +159,8 @@ def interact(options, title):
...
@@ -159,7 +159,8 @@ def interact(options, title):
## if n == REVERT_ITEM:
## if n == REVERT_ITEM:
## return [], pythondir
## return [], pythondir
if
n
==
DIR_ITEM
:
if
n
==
DIR_ITEM
:
fss
,
ok
=
macfs
.
GetDirectory
(
'Select python home folder:'
)
fss
=
EasyDialogs
.
AskFolder
(
message
=
'Select python home folder:'
,
wanted
=
macfs
.
FSSpec
)
if
ok
:
if
ok
:
options
[
'dir'
]
=
fss
options
[
'dir'
]
=
fss
elif
n
==
HELP_ITEM
and
Help
:
elif
n
==
HELP_ITEM
and
Help
:
...
...
Mac/scripts/findgremlins.py
Dosyayı görüntüle @
b340acf9
...
@@ -4,6 +4,7 @@ the filename and a bit of context.
...
@@ -4,6 +4,7 @@ the filename and a bit of context.
By Just, with a little glue by Jack"""
By Just, with a little glue by Jack"""
import
EasyDialogs
import
macfs
import
macfs
import
re
import
re
import
os
import
os
...
@@ -43,9 +44,9 @@ def walk(top, recurse=1):
...
@@ -43,9 +44,9 @@ def walk(top, recurse=1):
pos
=
j
pos
=
j
def
main
():
def
main
():
fss
,
ok
=
macfs
.
GetDirectory
()
pathname
=
EasyDialogs
.
AskFolder
()
if
ok
:
if
pathname
:
walk
(
fss
.
as_pathname
()
)
walk
(
pathname
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
...
...
Mac/scripts/fixfiletypes.py
Dosyayı görüntüle @
b340acf9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#
#
import
os
import
os
import
macfs
import
macfs
import
EasyDialogs
import
sys
import
sys
import
macostools
import
macostools
...
@@ -45,10 +46,10 @@ def walktree(name, change):
...
@@ -45,10 +46,10 @@ def walktree(name, change):
walktree
(
os
.
path
.
join
(
name
,
f
),
change
)
walktree
(
os
.
path
.
join
(
name
,
f
),
change
)
def
run
(
change
):
def
run
(
change
):
fss
,
ok
=
macfs
.
GetDirectory
(
'Folder to search:'
)
pathname
=
EasyDialogs
.
AskFolder
(
message
=
'Folder to search:'
)
if
not
ok
:
if
not
pathname
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
walktree
(
fss
.
as_pathname
()
,
change
)
walktree
(
pathname
,
change
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
run
(
1
)
run
(
1
)
...
...
Mac/scripts/fullbuild.py
Dosyayı görüntüle @
b340acf9
...
@@ -410,10 +410,9 @@ def incbuildno(filename):
...
@@ -410,10 +410,9 @@ def incbuildno(filename):
def
main
():
def
main
():
macresource
.
need
(
'DLOG'
,
DIALOG_ID
,
'fullbuild.rsrc'
)
macresource
.
need
(
'DLOG'
,
DIALOG_ID
,
'fullbuild.rsrc'
)
dir
,
ok
=
macfs
.
GetDirectory
(
'Python source folder:'
)
dir
=
EasyDialogs
.
AskFolder
(
message
=
'Python source folder:'
)
if
not
ok
:
if
not
dir
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
dir
=
dir
.
as_pathname
()
# Set genpluginprojects to use this folder (slight hack)
# Set genpluginprojects to use this folder (slight hack)
genpluginprojects
.
PYTHONDIR
=
dir
genpluginprojects
.
PYTHONDIR
=
dir
...
...
Mac/scripts/makeclean.py
Dosyayı görüntüle @
b340acf9
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
"""
"""
import
macfs
import
macfs
import
EasyDialogs
import
os
import
os
import
sys
import
sys
import
re
import
re
...
@@ -53,7 +54,7 @@ def walk(top):
...
@@ -53,7 +54,7 @@ def walk(top):
remove
(
top
)
remove
(
top
)
fss
,
ok
=
macfs
.
GetDirectory
(
"Please locate the Python home directory"
)
pathname
=
EasyDialogs
.
AskFolder
(
message
=
"Please locate the Python home directory"
)
if
ok
:
if
pathname
:
walk
(
fss
.
as_pathname
()
)
walk
(
pathname
)
sys
.
exit
(
1
)
# so we see the results
sys
.
exit
(
1
)
# so we see the results
Mac/scripts/unshar.py
Dosyayı görüntüle @
b340acf9
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
# >>> unshar.unshar(f)
# >>> unshar.unshar(f)
import
string
import
string
import
EasyDialogs
def
unshar
(
fp
,
verbose
=
0
,
overwrite
=
0
):
def
unshar
(
fp
,
verbose
=
0
,
overwrite
=
0
):
ofp
=
None
ofp
=
None
...
@@ -82,15 +83,14 @@ def main():
...
@@ -82,15 +83,14 @@ def main():
unshar
(
fp
)
unshar
(
fp
)
else
:
else
:
import
macfs
import
macfs
f
ss
,
ok
=
macfs
.
StandardGetFile
(
'TEXT'
)
f
name
=
EasyDialogs
.
AskFileForOpen
(
)
if
not
ok
:
if
not
fname
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
fname
=
fss
.
as_pathname
()
fp
=
open
(
fname
,
'r'
)
fp
=
open
(
fname
,
'r'
)
fss
,
ok
=
macfs
.
GetDirectory
(
'Folder to save files in:'
)
dirname
=
EasyDialogs
.
AskFolder
(
message
=
'Folder to save files in:'
)
if
not
ok
:
if
not
dirname
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
os
.
chdir
(
fss
.
as_pathname
()
)
os
.
chdir
(
dirname
)
unshar
(
fp
)
unshar
(
fp
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
Mac/scripts/zappycfiles.py
Dosyayı görüntüle @
b340acf9
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"""Recursively zap all .pyc and .pyo files"""
"""Recursively zap all .pyc and .pyo files"""
import
os
import
os
import
sys
import
sys
import
EasyDialogs
# set doit true to actually delete files
# set doit true to actually delete files
# set doit false to just print what would be deleted
# set doit false to just print what would be deleted
...
@@ -11,10 +12,9 @@ def main():
...
@@ -11,10 +12,9 @@ def main():
if
not
sys
.
argv
[
1
:]:
if
not
sys
.
argv
[
1
:]:
if
os
.
name
==
'mac'
:
if
os
.
name
==
'mac'
:
import
macfs
import
macfs
fss
,
ok
=
macfs
.
GetDirectory
(
'Directory to zap pyc files in'
)
dir
=
EasyDialogs
.
AskFolder
(
message
=
'Directory to zap pyc files in'
)
if
not
ok
:
if
not
dir
:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
dir
=
fss
.
as_pathname
()
zappyc
(
dir
)
zappyc
(
dir
)
else
:
else
:
print
'Usage: zappyc dir ...'
print
'Usage: zappyc dir ...'
...
...
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