vapirix
unread,May 26, 2011, 6:50:31 PM5/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
I read in the docs about request.folder and not changing directory
with os.path. Since I have literally no idea how and what in python is
(and is not) thread safe, is the following thread safe? Do I need to
be using os.path.join anywhere in there?
if not os.path.exists(images+directory+resource): # <-- obviously this
being my question
image = Image.open(images+resource)
imgScaled = ImageOps.fit(image, (w,
h,),method=Image.ANTIALIAS)
imgScaled.save(images+directory+resource, 'jpeg')
If it isn't, kindly point me in the right direction. =D Thanks, guys.