]> granicus.if.org Git - python/commitdiff
Getting rid of macfs.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 21 Feb 2003 23:18:48 +0000 (23:18 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 21 Feb 2003 23:18:48 +0000 (23:18 +0000)
Lib/plat-mac/EasyDialogs.py
Lib/plat-mac/PixMapWrapper.py
Lib/plat-mac/ic.py

index 777315db83cf6ba01a969a805135950d39cd17d2..d9ebaa98f752c6198433247719dee20b2b84185f 100644 (file)
@@ -768,7 +768,7 @@ def AskFolder(
        
 
 def test():
-       import time, macfs
+       import time
 
        Message("Testing EasyDialogs.")
        optionlist = (('v', 'Verbose'), ('verbose', 'Verbose as long option'), 
@@ -789,9 +789,9 @@ def test():
                        Message("Hello everybody!!\nThe secret nickname of %s is %s!!!"%(s, s2))
        else:
                s = 'Anonymous'
-       rv = AskFileForOpen(message="Gimme a file, %s"%s, wanted=macfs.FSSpec)
+       rv = AskFileForOpen(message="Gimme a file, %s"%s, wanted=Carbon.File.FSSpec)
        Message("rv: %s"%rv)
-       rv = AskFileForSave(wanted=macfs.FSSpec, savedFileName="%s.txt"%s)
+       rv = AskFileForSave(wanted=Carbon.File.FSRef, savedFileName="%s.txt"%s)
        Message("rv.as_pathname: %s"%rv.as_pathname())
        rv = AskFolder()
        Message("Folder name: %s"%rv)
index bcd3e0732337de2a19ecb1eee4b66b576b259c46..01973e8f3a292b7788f21cd400b164d19945d568 100644 (file)
@@ -204,11 +204,10 @@ class PixMapWrapper:
 
 def test():
        import MacOS
-       import macfs
+       import EasyDialogs
        import Image
-       fsspec, ok = macfs.PromptGetFile("Image File:")
-       if not ok: return
-       path = fsspec.as_pathname()
+       path = EasyDialogs.AskFileForOpen("Image File:")
+       if not path: return
        pm = PixMapWrapper()
        pm.fromImage( Image.open(path) )
        pm.blit(20,20)
index ff3c571b461108d8cd834c1d00ac1bb9feb46838..91e14f3ac25466addfdc752ad6e3a87f00e601f2 100644 (file)
@@ -6,7 +6,6 @@ import sys
 import os
 from Carbon import Res
 import Carbon.File
-import macfs
 import macostools
 
 error=icglue.error