[Pythonmac-SIG] AppScripting Documentation

John Weeks john.weeks at insead.edu
Tue Jan 13 16:43:44 EST 2004


As I was trying to solve the problem with AppScripting and Safari, I
tried to get the AppScripting doc function to work.  Here is what I
tried:

import AppScripting
fp = open("Safari.html", "w")
fp.write(AppScripting.doc('Safari.app'))
fp.close()

This didn't work, though.  I manually copied the doc directory from the
AppScripting distribution into my site-packages folder; I downloaded the
HTMLTemplate package.  But I am getting an error.

Here is the traceback.  Any ideas what I am missing?

  File "test3.py", line 3, in ?
    fp.write(AppScripting.doc('Safari.app'))
  File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
site-packages/AppScripting/Main.py", line 137, in doc
    return DocGen.renderDoc(appPathOrName, aeteList, aeTable)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
site-packages/AppScripting/Doc/DocGen.py", line 245, in renderDoc
    template = HTMLTemplate.Template(_xhtml)
TypeError: Template() takes at least 2 arguments (1 given)


Thanks,
John



More information about the Pythonmac-SIG mailing list