View Single Post
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#10
Hey this is a small thing that made up. jedi was right. It's a great way to learn programming.
The attached zip file includes a .py file and a .csv file. The Data.csv file has the details in the following order: Origin, Destination, Time. This file can be edited in any text editor or spreadsheet program like gnumeric, excel, etc. Data can be added in any order.

Both files should be in the same folder.

To run from n900, open terminal, cd to the directory where these files are stored, then use the command:
Code:
python NextBus.py <origin> <destination>
where origin and destination is to be from the Data.csv file.
For eg, based on my data file, I can run
Code:
python NextBus.py kochi aroor
and get the next available bus.

NOTE: Currently, the destination and origin names are case sensitive.

One way we can use it is to make a queen beacon widget to display the next available bus between two points. But I haven't figured out how to do it...

EDIT: Figured out hoe to use Queen Desktop Widget with NextBus.py
Just use enter the following commands in the Advanced Section:

Code:
cd /home/user/where/ever/your/file/is/
python NextBus.py  <origin> <destination>
Attached Files
File Type: zip NextBus.zip (903 Bytes, 112 views)

Last edited by ejasmudar; 2010-11-26 at 09:12.
 

The Following 2 Users Say Thank You to ejasmudar For This Useful Post: