# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # This file handles argument parsing. Argument parsing takes place in # two phases. In the first phase, we only parse the arguments that are # necessary to load the game, and run the init phase. The init phase # can register commands and arguments. These arguments are parsed at # the end of the init phase, before the game begins running, and can # decide if the game runs or some other action occurs. import argparse import renpy try: import site site._renpy_argv_emulation() # @UndefinedVariable except: pass # A map from command name to a (function, flag) tuple. The flag is true if the # function will parse command line arguments, and false otherwise. commands = { } # Commands that force compile to be set. compile_commands = { "compile", "add_from" } class ArgumentParser(argparse.ArgumentParser): """ Creates an argument parser that is capable of parsing the standard Ren'Py arguments, as well as arguments that are specific to a sub-command.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # This file handles argument parsing. Argument parsing takes place in # two phases. In the first phase, we only parse the arguments that are # necessary to load the game, and run the init phase. The init phase # can register commands and arguments. These arguments are parsed at # the end of the init phase, before the game begins running, and can # decide if the game runs or some other action occurs. import argparse import renpy try: import site site._renpy_argv_emulation() # @UndefinedVariable except: pass # A map from command name to a (function, flag) tuple. The flag is true if the # function will parse command line arguments, and false otherwise. commands = {} # Commands that force compile to be set. compile_commands = {"compile", "add_from", "merge_strings"} class ArgumentParser(argparse.ArgumentParser): """ Creates an argument parser that is capable of parsing the standard Ren'Py arguments, as well as arguments that are specific to a sub-command.
# two phases. In the first phase, we only parse the arguments that are # necessary to load the game, and run the init phase. The init phase # can register commands and arguments. These arguments are parsed at # the end of the init phase, before the game begins running, and can # decide if the game runs or some other action occurs. from __future__ import division, absolute_import, with_statement, print_function, unicode_literals from renpy.compat import PY2, basestring, bchr, bord, chr, open, pystr, range, str, tobytes, unicode # * import argparse import os import renpy try: import site site._renpy_argv_emulation() # type: ignore except Exception: pass # A map from command name to a (function, flag) tuple. The flag is true if the # function will parse command line arguments, and false otherwise. commands = {} # True if the command requires the display, false if it doesn't. display = {} # Commands that force compile to be set. compile_commands = {"compile", "add_from", "merge_strings"} class ArgumentParser(argparse.ArgumentParser):