Support selftest.py --installed, fixes #263

Courtesy of @Arfrever
This commit is contained in:
Alex Clark 2013-06-30 19:16:27 -04:00
parent 172dae9e35
commit 26995d7b02

View File

@ -4,8 +4,15 @@ from __future__ import print_function
import sys
import os
if "--installed" in sys.argv:
sys_path_0 = sys.path[0]
del sys.path[0]
from PIL import Image, ImageDraw, ImageFilter, ImageMath
if "--installed" in sys.argv:
sys.path.insert(0, sys_path_0)
ROOT = "."
try: