[Pythonmac-SIG] StuffIt 10 can corrupt applications packaged with py2app

Daniel Lord daniellord at mac.com
Thu Apr 26 01:14:40 CEST 2007


Shell script, Schmell script...do it in Python:

I got this from someone somewhere long ago...

import sys, os, os.path
import commands

if len(sys.argv)  == 2:
     dir = sys.argv[1]
     print "Creating disk image %s.dmg" % (dir)
     status, output = commands.getstatusoutput("hdiutil create - 
volname %s -fs HFS+ -srcfolder %s %s.dmg" % (dir,dir, dir))
else:
     sys.stderr.write("***ERROR: must provide folder to source.\n")


More information about the Pythonmac-SIG mailing list