[Pyobjc-dev] quick command-line browser utility
Brought to you by:
ronaldoussoren
From: David E. <epp...@ic...> - 2003-09-16 22:18:54
|
Maybe someone other than me will find this useful. I got frustrated with the inability to drag typeless and creatorless files onto my browser; this command line utility was the result. PyObjC makes this sort of thing almost trivial to implement. Of course it would be nicer if it didn't delay 3 seconds before taking effect... #! /usr/bin/env python # browse file*: open file(s) in browser # D. Eppstein, UC Irvine, 9/16/2003 # # Browser hardcoded to Camino because many others can't open files... import AppKit import sys w = AppKit.NSWorkspace.sharedWorkspace() for file in sys.argv[1:]: w.openFile_withApplication_(file, "Camino") -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science |