This windows batch script uses python and py2exe to create a single, distributable .exe of your python code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | @echo off
rem = """
py25 -x "%~f0"
goto endofPython """
from distutils.core import setup
import py2exe
import shutil
import sys, os
sys.argv += ['py2exe', '-b1', '-d./']
setup(
# use "console = " for console-based apps
windows=["cron.py"],
zipfile=None
)
shutil.rmtree('build')
os.remove('w9xpopen.exe')
rem = """
:endofPython """
|
Tags: shortcuts