From: Goutam P. <gpa...@on...> - 2006-01-27 18:52:30
|
Image save script does not work with py2exe. =20 The script works with python exe but not after py2exe, Please help !! It looks like its a PIL Error. Any clues how to resolve ? =20 #!/usr/bin/env python =20 import os, os.path, string, sys, shutil from Tkinter import * import Image =20 infile =3D 'c:\\testing\\Input\\562.tif' outfile =3D 'c:\\testing\\Intermediate\\562.bmp' =20 def save(): global infile,outfile print "Infile is " + infile print "Outfile is " + outfile if infile !=3D outfile: try: Image.open(infile).save(outfile) except IOError: print "Error Cannot convert", infile =20 =20 # Divide GUI into 3 frames: top, mid, bot root =3D Tk() topframe =3D Frame(root, borderwidth=3D2, relief=3DGROOVE) topframe.pack(padx=3D80, pady=3D10) =20 Button(topframe, text=3D'Convert', command=3Dsave).pack(side=3DLEFT, padx=3D5, pady=3D5) =20 root.title('Image Converter') root.mainloop() =20 =20 ********************************************************************** Confidentiality Notice The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited. ********************************************************************** |