Replace windows path sep with unix sep

It seems python in msys2 has some weird behavior. For __file__, it
returns a string which uses windows-style separator '\', however,
os.path.dirname only recognizes the unix-style separator '/', and
consequently, the path of Mako is not added properly.
This commit is contained in:
Xidorn Quan 2016-07-08 17:15:54 +10:00
parent 064f1adb78
commit 6519d06b23

View file

@ -6,7 +6,7 @@ import json
import os.path
import sys
BASE = os.path.dirname(__file__)
BASE = os.path.dirname(__file__.replace('\\', '/'))
sys.path.insert(0, os.path.join(BASE, "Mako-0.9.1.zip"))
sys.path.insert(0, BASE) # For importing `data.py`