[Pythonmac-SIG] Problems with Findertools in OS x v.10.1.1? (Move)
Schollnick, Benjamin
Benjamin.Schollnick@usa.xerox.com
Tue, 11 Dec 2001 10:37:19 -0500
I haven't heard anything back regarding this?
Traceback (most recent call last):
File "OS v9.1:Desktop Folder:python work:re-dup-file.py", line 104, in ?
move_file ( pathname, new_dir, filename )
File "OS v9.1:Desktop Folder:python work:re-dup-file.py", line 53, in
move_file
findertools.move (old_path + filename, new_path)
File "OS v9.1:Applications (Mac OS 9):Python2.1.1:Mac:Lib:findertools.py",
line 74, in move
return finder.move(src_fss, to=dst_fss)
File "OS v9.1:Applications (Mac OS
9):Python2.1.1:Mac:Lib:lib-scriptpackages:Finder:Standard_Suite.py", line
293, in move
raise aetools.Error, aetools.decodeerror(_arguments)
aetools.Error: (0, 'component result = no error', None)
This is in MacPython in "Classic" mode running in a classic window from Mac
Os v10.1.1.
I'm trying to switch Macpython to "Carbon" mode, but it's taking forever (30
minutes +)
to run all the reconfigures.... (It hasn't finished yet).
So I'm not sure if there's a work around...
- Benjamin
(See below for more details).
-----Original Message-----
From: Schollnick, Benjamin [mailto:Benjamin.Schollnick@usa.xerox.com]
Sent: Wednesday, November 21, 2001 11:27 AM
To: pythonmac-sig@python.org
Subject: [Pythonmac-SIG] Problems with Findertools in OS x v.10.1.1?
(Move)
I'm using a file copy routine that I just finished, and
started to notice some oddities...
Namely the findertools.move () command appears to work,
but is returning an exception.......
This may have just started with OS X v10.1.1, but I'm
not positive... I just booted back to OS v9.21 and do
*NOT* see this problem occuring there... So it's certainly
an Mac OS X issue...
Since the file copy does appear to work, I may have missed
it when I added the exception coding.... (It appears to work
so maybe I just wasn't observant enough).
Anyone else notice this?
- Benjamin
def move_file ( old_path, new_path, filename ):
try:
if os.path.exists (new_path + os.sep + filename):
Ask = EasyDialogs.AskYesNoCancel("Duplicate File
Detected (%s), Overwrite?" % filename, default = 1, yes=None, no=None,
cancel=None, id=262)
if Ask == 1:
if mac_mode:
# Overwrite, by removing the old
file
#
os.remove(new_path + os.sep +
filename)
elif Ask == 0:
#
# Do not overwrite, end
routine, by returning
#
return 0
elif Ask == -1:
#
# Abort program, return error
code
#
return -1
if mac_mode:
findertools.move (old_path +
filename, new_path)
print old_path + filename, " -->
Moved.."
except:
print "error"
return None
# of Files found : 6
filename : WAITING.JPG
filename : WALL
filename : WALL_1.JPG
-------------------------------------
old: OS v9.1:Desktop Folder:python work:test:
new: OS v9.1:Desktop Folder:python work:test:Wall
filename: WALL_1.JPG
old + file: OS v9.1:Desktop Folder:python work:test:WALL_1.JPG
Traceback (most recent call last):
File "OS v9.1:Desktop Folder:python work:re-dup-file.py", line 104, in ?
move_file ( pathname, new_dir, filename )
File "OS v9.1:Desktop Folder:python work:re-dup-file.py", line 53, in
move_file
findertools.move (old_path + filename, new_path)
File "OS v9.1:Applications (Mac OS 9):Python
2.1.1:Mac:Lib:findertools.py", line 74, in move
return finder.move(src_fss, to=dst_fss)
File "OS v9.1:Applications (Mac OS 9):Python
2.1.1:Mac:Lib:lib-scriptpackages:Finder:Standard_Suite.py", line 293, in
move
raise aetools.Error, aetools.decodeerror(_arguments)
aetools.Error: (0, 'component result = no error', None)
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig