For testing purposes, I removed the option to pass arguments to my Python script and I tried using the tutorial for py2app to create a standalone app.
The Python script looks like the below, but when I build the standalone app and try to run it, I get the error: ImportError: No module named libxmp How do I go about getting the libxmp which is part of the python-xmp-toolkit¹ that I compiled to be part of my standalone app? Thanks. Jim import sys from libxmp import * path_to_file = "/Users/jim/Desktop/021521A.pdf" vertical_shrink = ".5" horizontal_shrink = ".5" # Read file xmpfile = XMPFiles( file_path=path_to_file, open_forupdate=files.XMP_OPEN_FORUPDATE) # Get XMP from file. xmp = xmpfile.get_xmp() # Change the XMP property xmp.set_property( "http://ns.esko-graphics.com/grinfo/1.0/", 'vshrink', vertical_shrink ) xmp.set_property( "http://ns.esko-graphics.com/grinfo/1.0/", 'hshrink', horizontal_shrink ) # Check if XMP document can be written to file and write it. if xmpfile.can_put_xmp(xmp): xmpfile.put_xmp(xmp) xmpfile.close_file()
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig