-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Copyright (c) 2015-2017 Fabian Affolter <[email protected]> | ||
Licensed under MIT. All rights reserved. | ||
""" | ||
from opendata_transport import OpendataTransport | ||
|
||
data = OpendataTransport('Bern', 'Biel') | ||
|
||
# Get the data | ||
data.get_data() | ||
|
||
# Print the start and the destination name | ||
print("Train connections:", data.from_name, "->", data.to_name) | ||
|
||
# Print the next three connections | ||
print(data.connections) | ||
|
||
# Print the details of the next connection | ||
print(data.connections[0]) |