[Pythonmac-SIG] appscript questions

has hengist.podd at virgin.net
Thu Aug 3 19:08:26 CEST 2006


Hi folks,

Getting appscript prepared for the next release (only a couple away  
from beta now), and wondering if anyone has preferences on the  
following:

1. If a local application quits while a script is using it, either  
unexpectedly or because the client script sent a 'quit' command,  
should appscript relaunch that application automatically the next  
time it sends a command to it, or should the application stay quit  
unless the client script deliberately restarts it (by sending a  
'run'/'open'/'activate'/'launch' command)?

(Automatic restarts, which is what AppleScript does, are more  
convenient. However, if an application quit unexpectedly you probably  
want it to stay quit and have the script halt with an error the next  
time it tries to interact. So I'm more inclined towards the latter,  
but would like to know what others think.)


2. I'm looking to downgrade, if not eliminate, the role of ASTS. It's  
no longer needed for remote scripting (good, as there were issues  
when running it on remote machines with multiple active users), and a  
3x speedup in appscript's terminology retrieval and parsing times  
mean it provides less of a performance benefit when scripting local  
apps. Three options I see:

-  Retain ASTS support as it's still the most convenient way to  
provide external caching (users pretty much just need to launch it,  
either manually or as a login item, and can then forget about it).

- Do away with ASTS completely and always retrieve and parse  
terminology on the fly (less efficient, especially when repeatedly  
running short scripts, but completely foolproof).

- Move to some sort of file-based cache, either managed completely  
manually (users can selectively create terminology files for those  
applications they want to avoid a cold start on), or automatically  
(appscript could store all parsed terminologies in, say, /tmp).


3. Should appscript's built-in help() use textwrap to automatically  
wrap long lines to fit in a standard 80-column terminal window? Or is  
it better to leave the terminal window to wrap them naturally (i.e.  
users may prefer to resize terminal windows themselves to make text  
easier to read)?


Thanks,

has

p.s. If anyone'd like to help me out a bit, I'd really like to get  
all the manuals into the standard Python documentation format now. So  
if you're familiar with the tools and would like to have a go then  
let me know - it'd be much appreciated.

-- 
http://freespace.virgin.net/hamish.sanderson/




More information about the Pythonmac-SIG mailing list