Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(25) | Call(19) | Derive(0) | Import(6)
src/f/e/FeedNotifier-HEAD/patch/build_exe.py FeedNotifier(Download)
def build_executable(self, target, template, arcname, script, vars={}): # Build an executable for the target # template is the exe-stub to use, and arcname is the zipfile # containing the python modules. from py2exe_util import add_resource, add_icon
self.announce("add script resource, %d bytes" % len(script_bytes)) if not self.dry_run: add_resource(ensure_unicode(exe_path), script_bytes, u"PYTHONSCRIPT", 1, True) # add the pythondll as resource, and delete in self.exe_dir
print "Adding %s as resource to %s" % (python_dll, exe_path) add_resource(ensure_unicode(exe_path), bytes, # for some reason, the 3. argument MUST BE UPPER CASE, # otherwise the resource will not be found.
print "Adding zlib.pyd as resource to %s" % exe_path zlib_bytes = zlib_file.read() add_resource(ensure_unicode(exe_path), zlib_bytes, # for some reason, the 3. argument MUST BE UPPER CASE, # otherwise the resource will not be found.
# skip the 14 byte bitmap header. if not self.dry_run: add_resource(ensure_unicode(exe_path), bmp_data[14:], RT_BITMAP, bmp_id, False) icon_resources = getattr(target, "icon_resources", []) for ico_id, ico_filename in icon_resources:
src/d/i/digsby-HEAD/installer/py2exe/py2exe/build_exe.py digsby(Download)
def build_executable(self, target, template, arcname, script, vars={}): # Build an executable for the target # template is the exe-stub to use, and arcname is the zipfile # containing the python modules. from py2exe_util import add_resource, add_icon
self.announce("add script resource, %d bytes" % len(script_bytes)) if not self.dry_run: add_resource(ensure_unicode(exe_path), script_bytes, u"PYTHONSCRIPT", 1, True) # add the pythondll as resource, and delete in self.exe_dir
print "Adding %s as resource to %s" % (python_dll, exe_path) add_resource(ensure_unicode(exe_path), bytes, # for some reason, the 3. argument MUST BE UPPER CASE, # otherwise the resource will not be found.
print "Adding zlib.pyd as resource to %s" % exe_path zlib_bytes = zlib_file.read() add_resource(ensure_unicode(exe_path), zlib_bytes, # for some reason, the 3. argument MUST BE UPPER CASE, # otherwise the resource will not be found.
# skip the 14 byte bitmap header. if not self.dry_run: add_resource(ensure_unicode(exe_path), bmp_data[14:], RT_BITMAP, bmp_id, False) icon_resources = getattr(target, "icon_resources", []) for ico_id, ico_filename in icon_resources: