Skip to content

Commit

Permalink
Update mainWindow.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkFieseln authored Aug 29, 2021
1 parent d493deb commit b0232ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
root = tkinter.Tk()
root.withdraw()

# different relative paths depending if we run the script or the executable file
runningScript = os.path.basename(__file__)
if (runningScript=="mainWindow.py"):
# .py script
# go to current file path
os.chdir(os.path.dirname(__file__))
# now go one level up so configuration.PATH_PREFIX is correct again (we are now in folder /ui)
os.chdir("../")

# defines for chat state machine
CHAT_STATE_OFF = "off"
Expand Down

0 comments on commit b0232ea

Please sign in to comment.