Use native path as example

This commit is contained in:
Kovid Goyal 2017-04-29 13:51:01 +05:30
parent 7fda148e31
commit 97e544dd0a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -11,7 +11,7 @@ from copy import deepcopy
import optparse import optparse
from calibre.constants import (config_dir, CONFIG_DIR_MODE, __appname__, from calibre.constants import (config_dir, CONFIG_DIR_MODE, __appname__,
get_version, __author__, DEBUG) get_version, __author__, DEBUG, iswindows)
from calibre.utils.lock import ExclusiveFile from calibre.utils.lock import ExclusiveFile
from calibre.utils.config_base import (make_config_dir, Option, OptionValues, from calibre.utils.config_base import (make_config_dir, Option, OptionValues,
OptionSet, ConfigInterface, Config, prefs, StringConfig, ConfigProxy, OptionSet, ConfigInterface, Config, prefs, StringConfig, ConfigProxy,
@ -93,7 +93,8 @@ class OptionParser(optparse.OptionParser):
if epilog is None: if epilog is None:
epilog = _('Created by ')+colored(__author__, fg='cyan') epilog = _('Created by ')+colored(__author__, fg='cyan')
usage += '\n\n'+_('''Whenever you pass arguments to %prog that have spaces in them, ''' usage += '\n\n'+_('''Whenever you pass arguments to %prog that have spaces in them, '''
'''enclose the arguments in quotation marks. For example "C:\\some path with spaces"''')+'\n' '''enclose the arguments in quotation marks. For example: "{}"''').format(
"C:\\some path with spaces" if iswindows else '/some path/with spaces') +'\n'
if version is None: if version is None:
version = '%%prog (%s %s)'%(__appname__, get_version()) version = '%%prog (%s %s)'%(__appname__, get_version())
optparse.OptionParser.__init__(self, usage=usage, version=version, epilog=epilog, optparse.OptionParser.__init__(self, usage=usage, version=version, epilog=epilog,