Skip to content

Instantly share code, notes, and snippets.

@leapar
Last active November 23, 2016 05:59
Show Gist options
  • Save leapar/f2726752f6f8b8b4323e9de708fe85fb to your computer and use it in GitHub Desktop.
Save leapar/f2726752f6f8b8b4323e9de708fe85fb to your computer and use it in GitHub Desktop.
py2exe service

py2exe打包dd-agent时候,ddagent.exe一直报不支持--multiingprocess-fork,最后发现需要修改 D:\Python27\Lib\site-packages\win32\lib\win32serviceutil.py行526

def HandleCommandLine(cls, serviceClassString = None, argv = None, customInstallOptions = "", customOptionHandler = None):
    """Utility function allowing services to process the command line.

    Allows standard commands such as 'start', 'stop', 'debug', 'install' etc.

    Install supports 'standard' command line options prefixed with '--', such as
    --username, --password, etc.  In addition,
    the function allows custom command line options to be handled by the calling function.
    """
    err = 0
    multiprocessing.freeze_support()
    if argv is None: argv = sys.argv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment