Check whether pil or convert exist

svn: r1548
This commit is contained in:
Alex Roitman
2003-05-20 17:55:52 +00:00
parent 697e5cb456
commit 85cf4b342f
3 changed files with 49 additions and 31 deletions

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
# Copyright (C) 2000-2003 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -178,3 +178,23 @@ def check_thumb(source,dest,size):
return 1
#-------------------------------------------------------------------------
#
# Test if there's PIL available
#
#-------------------------------------------------------------------------
def is_pil():
try:
from PIL import __name__ as pilname
return 1
except:
return 0
#-------------------------------------------------------------------------
#
# Test if there's convert available
#
#-------------------------------------------------------------------------
def is_cnv():
return not os.system('which convert>/dev/null')