Fixed argument expansion for quoted arguments.
[rox-shell.git] / roxshell / app.py
blob2cad62c7ec7af7483c7960404499322e23f6bfef
1 """
2 @copyright: (C) 2008, Thomas Leonard
3 @see: U{http://roscidus.com}
4 """
5 from zeroinstall.support import tasks # tmp
7 import _gio as gio
9 import shell
11 class ApplicationView:
12 def __init__(self, app):
13 self.app = app
15 @tasks.async
16 def run(self):
17 view_tasks = []
18 for item in self.app.items:
19 cwd = gio.file_new_for_commandline_arg(item)
20 view_tasks.append(shell.ShellView(cwd).run())
22 while view_tasks:
23 yield view_tasks
24 tasks.check(view_tasks)
25 view_tasks = [v for v in view_tasks if not v.happened]
27 class ApplicationController:
28 def __init__(self, items):
29 self.items = items
31 def run(self):
32 view = ApplicationView(self)
33 return view.run()