Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
BenyaminZojaji committed May 25, 2024
1 parent d20ed54 commit 487254f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2,012 deletions.
12 changes: 3 additions & 9 deletions Iran_cities_info/Iran_cities_info.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import pathlib
# import check


Expand All @@ -8,15 +9,8 @@ def get_completeData(lang: str='en'):
Get complete json data.
lang = en | fa
'''
file_path = os.path.join('Iran_cities_info', 'assets', f'iran_cities_en.json') # need fix
print(os.path.isfile(file_path))
print(os.path.isfile(os.path.join('assets', 'iran_cities_en.json')))
print(os.path.isfile(os.path.join('iran_cities_en.json')))
print(os.path.isfile('Iran_cities_info/assets/iran_cities_en.json'))
print(os.path.isfile('assets/iran_cities_en.json'))
print(os.path.isfile('iran_cities_en.json'))
print(os.path.isfile('Iran_cities_info/iran_cities_en.json'))
print(os.path.isfile('iran_cities_en.json'))
absPath = pathlib.Path(__file__).parent.resolve()
file_path = os.path.join(f'{absPath}', 'assets', 'iran_cities_en.json')

with open(file_path) as f:
return json.load(f)
Expand Down
Loading

0 comments on commit 487254f

Please sign in to comment.