Merge pull request #9 from Leonidas-from-XIV/fix-resource-path

Changed from sys.argv to __file__
This commit is contained in:
Alex Yatskov 2011-11-15 10:21:08 -08:00
commit b15018177a

View File

@ -14,10 +14,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import os.path import os.path
def buildResPath(relative): def buildResPath(relative):
directory = os.path.split(sys.argv[0])[0] directory = os.path.dirname(__file__)
return os.path.join(directory, relative) return os.path.join(directory, relative)