functionnal version of travel_ui
This commit is contained in:
parent
5db21d01a6
commit
ed4ff6e064
2 changed files with 4 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ class TransilienUI():
|
|||
self.treestore = gtk.TreeStore(str, str, str, str)
|
||||
self.treeview = gtk.TreeView(self.treestore)
|
||||
|
||||
|
||||
self.treeview.append_column(
|
||||
gtk.TreeViewColumn(
|
||||
'Train',
|
||||
|
|
@ -149,6 +150,7 @@ class TransilienUI():
|
|||
for name, backend, in self.weboob.iter_backends():
|
||||
for departure in backend.iter_station_departures(station.id, arrival.id):
|
||||
print departure.id, departure.type, departure.time, departure.arrival_station, departure.late, departure.information
|
||||
self.treestore.append(None, [departure.type, departure.time, departure.arrival_station, departure.information])
|
||||
|
||||
class Travel(BaseApplication):
|
||||
APPNAME = 'travel'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Copyright(C) 2010 Romain Bignon
|
||||
Copyright(C) 2010 Romain Bignon, Julien Hébert
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -85,6 +85,7 @@ class ConsoleApplication(BaseApplication):
|
|||
nb_args = len(_args) - 1
|
||||
if defaults:
|
||||
nb_args -= len(defaults)
|
||||
|
||||
if len(args) < nb_args or len(args) > nb_args and not varargs:
|
||||
if varargs:
|
||||
sys.stderr.write("Command '%s' takes at least %d arguments.\n" % (command, nb_args))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue