I figured out how to do this with a lot of trial and error. You can use Carbon or AppKit/Foundation.
------------------------------------------------- import Carbon.Scrap, AppKit, Foundation
def clipcopy(arg): Carbon.Scrap.ClearCurrentScrap() scrap = Carbon.Scrap.GetCurrentScrap() scrap.PutScrapFlavor('TEXT', 0, arg)
That worked! Thanks a bunch.
(Now I get to show what kind of a newbie I am.) Why should I put this into a class? Is it just better programming practice? I suppose the answer may depend on what the script does and how complicated it is.
Also, where can I find documentation on this? I tried Python's help, but it offered very little.
Thanks,
Jeremy
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig