mirror of
https://github.com/KevinMidboe/knowit_julekalender-2017.git
synced 2025-10-29 01:30:19 +00:00
When importing file we now use the relative path. Removed prints for now.
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env python3.6
|
#!/usr/bin/env python3.6
|
||||||
|
|
||||||
|
import os
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
def readFile():
|
def readFile():
|
||||||
with open('./verda.txt', 'r') as f:
|
with open(os.path.dirname(__file__) + '/verda.txt', 'r') as f:
|
||||||
read_data = f.read().splitlines()
|
read_data = f.read().splitlines()
|
||||||
f.close()
|
f.close()
|
||||||
return read_data
|
return read_data
|
||||||
@@ -15,8 +16,8 @@ def main():
|
|||||||
city = listview[3]
|
city = listview[3]
|
||||||
country = listview[10]
|
country = listview[10]
|
||||||
cord = [listview[12], listview[13]]
|
cord = [listview[12], listview[13]]
|
||||||
print('place: {}', city, 'in', country)
|
# print('place: {}', city, 'in', country)
|
||||||
print('cord:', cord)
|
# print('cord:', cord)
|
||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user