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
374c4357
Kaydet (Commit)
374c4357
authored
Ock 21, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added DepracationWarnings to the old Standard File calls.
üst
e1c4f0b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
macfs.py
Lib/plat-mac/macfs.py
+9
-0
No files found.
Lib/plat-mac/macfs.py
Dosyayı görüntüle @
374c4357
...
...
@@ -6,6 +6,7 @@ import struct
import
Carbon.Res
import
Carbon.File
import
Nav
import
warnings
# First step: ensure we also emulate the MACFS module, which contained
# all the constants
...
...
@@ -143,6 +144,8 @@ def PromptGetFile(prompt, *typelist):
"""Ask for an input file giving the user a prompt message. Optionally you can
specifying 4-char file types that are allowable"""
import
EasyDialogs
warnings
.
warn
(
"macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen"
,
DeprecationWarning
,
stacklevel
=
2
)
if
not
typelist
:
typelist
=
None
fss
=
EasyDialogs
.
AskFileForOpen
(
message
=
prompt
,
wanted
=
FSSpec
,
...
...
@@ -153,12 +156,16 @@ def StandardPutFile(prompt, default=None):
"""Ask the user for an output file, with a prompt. Optionally you cn supply a
default output filename"""
import
EasyDialogs
warnings
.
warn
(
"macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen"
,
DeprecationWarning
,
stacklevel
=
2
)
fss
=
EasyDialogs
.
AskFileForSave
(
wanted
=
FSSpec
,
message
=
prompt
,
savedFileName
=
default
,
defaultLocation
=
_handleSetFolder
())
return
fss
,
not
fss
is
None
def
SetFolder
(
folder
):
global
_curfolder
warnings
.
warn
(
"macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen"
,
DeprecationWarning
,
stacklevel
=
2
)
if
_curfolder
:
rv
=
FSSpec
(
_curfolder
)
else
:
...
...
@@ -175,6 +182,8 @@ def _handleSetFolder():
def
GetDirectory
(
prompt
=
None
):
"""Ask the user to select a folder. Optionally you can give a prompt."""
import
EasyDialogs
warnings
.
warn
(
"macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen"
,
DeprecationWarning
,
stacklevel
=
2
)
fss
=
EasyDialogs
.
AskFolder
(
message
=
prompt
,
wanted
=
FSSpec
,
defaultLocation
=
_handleSetFolder
())
return
fss
,
not
fss
is
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