Panda3D
Functions | Variables
direct.showutil.pfreeze Namespace Reference

Functions

def usage (code, msg='')
 

Variables

 args
 
 basename = None
 
 bl = basename.lower()
 
bool compileToExe = False
 
 filename
 
 freezer = FreezeTool.Freezer()
 
 opts
 
string outputType = 'exe'
 
 startfile = args[0]
 
 startmod = startfile
 

Detailed Description

This script can be used to produce a standalone executable from
arbitrary Python code.  You supply the name of the starting Python
file to import, and this script attempts to generate an executable
that will produce the same results as "python startfile.py".

This script is actually a wrapper around Panda's FreezeTool.py, which
is itself a tool to use Python's built-in "freeze" utility to compile
Python code into a standalone executable.  It also uses Python's
built-in modulefinder module, which it uses to find all of the modules
imported directly or indirectly by the original startfile.py.

Usage:

  pfreeze.py [opts] startfile

Options:

  -o output
     Specifies the name of the resulting executable file to produce.
     If this ends in ".mf", a multifile is written instead of a frozen
     binary.  If it ends in ".dll", ".pyd", or ".so", a shared library
     is written.

  -x module[,module...]
     Specifies a comma-separated list of Python modules to exclude from
     the resulting file, even if they appear to be referenced.  You
     may also repeat the -x command for each module.

  -i module[,module...]
     Specifies a comma-separated list of Python modules to include in
     the resulting file, even if they do not appear to be referenced.
     You may also repeat the -i command for each module.

  -p module[,module...]
     Specifies a list of Python modules that do run-time manipulation
     of the __path__ variable, and thus must be actually imported to
     determine the true value of __path__.

Function Documentation

◆ usage()

def direct.showutil.pfreeze.usage (   code,
  msg = '' 
)

Variable Documentation

◆ args

args

◆ basename

basename = None

◆ bl

bl = basename.lower()

◆ compileToExe

bool compileToExe = False

◆ filename

filename

◆ freezer

freezer = FreezeTool.Freezer()

◆ opts

opts

◆ outputType

string outputType = 'exe'

◆ startfile

startfile = args[0]

◆ startmod

startmod = startfile