Closed 8e5e46ec-69cf-4b4b-abb5-1119de60ab55 closed 14 years ago
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?
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
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
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
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 :-)
This issue is for deprecated Carbon module that has a well-maintained alternative outside of the stdlib.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = 'https://github.com/jackjansen' closed_at =
created_at =
labels = ['OS-mac', 'type-bug']
title = 'gensuitemodule.processfile fails'
updated_at =
user = 'https://github.com/jneb'
```
bugs.python.org fields:
```python
activity =
actor = 'ronaldoussoren'
assignee = 'jackjansen'
closed = True
closed_date =
closer = 'ronaldoussoren'
components = ['macOS']
creation =
creator = 'jneb'
dependencies = []
files = []
hgrepos = []
issue_num = 1123727
keywords = []
message_count = 6.0
messages = ['60661', '60662', '60663', '60664', '60665', '96328']
nosy_count = 4.0
nosy_names = ['jackjansen', 'jneb', 'ronaldoussoren', 'hhas']
pr_nums = []
priority = 'low'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1123727'
versions = ['Python 2.6']
```