classification
Title: gensuitemodule.processfile fails
Type: behavior Stage: test needed
Components: Macintosh Versions: Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: hhas, jackjansen, jneb, ronaldoussoren (4)
Priority: normal Keywords

Created on 2005-02-16 07:17 by jneb, last changed 2009-02-15 19:42 by ajaksu2.

Messages (5)
msg60661 - (view) Author: Jurjen N.E. Bos (jneb) Date: 2005-02-16 07:17
gensuitemodule.processfile fails for an application as trivial as 
Safari, while the same procedure works OK on version 2.3.

On version 2.3:
>>> from gensuitemodule import processfile; processfile('/
Applications/Safari.app')
[lots of dialogs]

On version 2.4, same machine:
>>> from gensuitemodule import processfile; processfile('/
Applications/Safari.app')
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/plat-mac/gensuitemodule.py", line 222, in processfile
    verbose=verbose)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/plat-mac/gensuitemodule.py", line 436, in compileaete
    creatorsignature, dummy = MacOS.GetCreatorAndType(fname)
Error: (-43, 'File not found')
I'm pretty conviced the application did not move in the 20 seconds 
between those two invocations :-)

Any suggestions?

- Jurjen
msg60662 - (view) Author: (hhas) Date: 2005-02-24 00:53
Logged In: YES 
user_id=996627

I think the MacOS extension is broken. The gensuitemodule error you 
observe on Python 2.4 is probably being masked on Python 2.3 by other 
bugs that have since been cleaned up.

e.g. The following errors OMM (OS10.2.8, Python 2.3.3):

print MacOS.GetCreatorAndType('/Applications/TextEdit.app')
--> MacOS.Error: (-43, 'File not found')

Seems to work on non bundle-based applications, but not bundle-based 
ones. Maybe you could check this and file a new report on the MacOS 
extension if you can confirm it.

has

p.s. Note that gensuitemodule and friends are obsolete. See appscript: 
http://freespace.virgin.net/hamish.sanderson/appscript.html
msg60663 - (view) Author: Jurjen N.E. Bos (jneb) Date: 2005-02-25 11:22
Logged In: YES 
user_id=446428

Yep, you're right. On both 2.3, and 2.4, I get:
>>> import MacOS
>>> print MacOS.GetCreatorAndType('/Applications/TextEdit.app')
Traceback (most recent call last):
  File "<input>", line 1, in ?
Error: (-43, 'File not found')
When will appscript be incorporated into the standard libraries?
- Jurjen
msg60664 - (view) Author: (hhas) Date: 2005-02-25 17:20
Logged In: YES 
user_id=996627

> When will appscript be incorporated into the standard libraries?

Dunno. It should be finished in the next few months. You'd need to ask 
Jack what the next entry point into the standard library would be.

has
msg60665 - (view) Author: Ronald Oussoren (ronaldoussoren) Date: 2005-07-31 13:33
Logged In: YES 
user_id=580910

Integration with the standard library should not be considered to be the holy 
grail. Libraries outside of the standard library can be developed on a faster 
pace than Python itself.

I wouldn't mind if the standard libary docs mentioned appscript as a better 
solution than gensuitemodule :-)
History
Date User Action Args
2009-02-15 19:42:11ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6, - Python 2.4
2005-02-16 07:17:43jnebcreate