mirror of
https://github.com/LazoCoder/Pokemon-Terminal
synced 2024-11-27 14:21:06 +00:00
Fixed issue with relative path
This commit is contained in:
parent
cdff8bd418
commit
392d4a119b
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
tell application "iTerm"
|
||||
tell current session of current window
|
||||
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation IV - Sinnoh/390.png"
|
||||
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation I - Kanto/004.png"
|
||||
end tell
|
||||
end tell
|
|
@ -170,8 +170,8 @@ class Database:
|
|||
|
||||
def __load_data(self):
|
||||
# Load all the Pokemon data. This does not include the 'Extra' Pokemon.
|
||||
path = self.directory + "/./Data/pokemon.txt"
|
||||
data_file = open(path, "r+")
|
||||
path = "/./Data/pokemon.txt"
|
||||
data_file = open(os.get_exec_path()[0] + path, 'r')
|
||||
for line in data_file: # Load everything but the Pokemon from the 'Extra' folder.
|
||||
identifier = line.split(' ')[0] # First part of the line is the id.
|
||||
name = line[len(identifier)+1:-1].lower() # The rest is the name (minus the new line at the end).
|
||||
|
|
Loading…
Reference in a new issue