Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

work-around unexpected formatting of help text #114

Closed
wants to merge 1 commit into from

Conversation

rjw57
Copy link

@rjw57 rjw57 commented Sep 8, 2014

On my machine (Python 3.3.5), running ``python -m runserver -?` gives the following output:

$ python -m personalsite runserver -?
usage: __main__.py runserver [-?] [-h HOST] [-p PORT] [--threaded]
                             [--processes PROCESSES] [--passthrough-errors]
                             [-d] [-D] [-r] [-R]

Runs the Flask development server i.e. app.run()

optional arguments:
  -?, --help            show this help message and exit
  -h HOST, --host HOST
  -p PORT, --port PORT
  --threaded
  --processes PROCESSES
  --passthrough-errors
  -d, --debug           enable the Werkzeug debugger (DO NOT use in production
                        code)
  -D, --no-debug        disable the Werkzeug debugger
  -r, --reload          monitor Python files for changes (not 100{'container':
                        <argparse._ArgumentGroup object at 0x7f59df8f9190>,
                        'choices': None, 'metavar': None, 'dest':
                        'use_reloader', 'help': 'monitor Python files for
                        changes (not 100% safe for production use)', 'type':
                        None, 'required': False, 'default': None,
                        'option_strings': ['-r', '--reload'], 'const': True,
                        'nargs': 0, 'prog': '__main__.py runserver'}afe for
                        production use)
  -R, --no-reload       do not monitor Python files for changes

I suspect that the % s in 100% safe is being interpreted as a formatting escape sequence. This PR includes a speculative work-around which doesn't fix the root problem but should stop the strange output.

The ``% s`` sequence is sometimes interpreted as an escape sequence for formatting. Work around this as a temporary hack.
@davidism
Copy link

davidism commented Sep 8, 2014

Related to #102.

@VladimirPal VladimirPal closed this Aug 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants