User can pass files to open

If the user passes text as argv to the program, we will call
universal_open with each string in argv.
This commit is contained in:
Bryan Schumaker 2010-11-27 22:22:44 -05:00
parent dc776ac267
commit 3831eb6e2a
1 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ def init():
import audio
import controls
from path import lastfm
event.invite("POSTLIBLOAD", parse_user_input)
controls.init()
event.start("POSTINIT")
@ -63,4 +64,10 @@ def shutdown():
event.start("POSTQUIT")
def parse_user_input():
import sys
for item in sys.argv[1:]:
path.files.universal_open(item)
init()