Skip to content
Myr

Standardized capitalization of Windows and POSIX

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kevin Yap · committed by Armin Ronacher · parent 67523af · Browse files · 6 files+10 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+10 added−10 removed

  • other:+10 added−10 removed

6 files+10 added−10 removed

modified:click/termui.py+4 added-4 removed
56 unmodified lines
57 def prompt_func(text):58 f = hide_input and hidden_prompt_func or visible_prompt_func59 try:60 # Write the prompt separately so that we get nice61 # coloring through colorama on windows61 # coloring through colorama on Windows62 echo(text, nl=False)63 return f('')64 except (KeyboardInterrupt, EOFError):65 raise Abort()
47 unmodified lines
113 default and 'Y/n' or 'y/N')114 while 1:115 try:116 # Write the prompt separately so that we get nice117 # coloring through colorama on windows117 # coloring through colorama on Windows118 echo(prompt, nl=False)119 value = visible_prompt_func('').lower().strip()120 except (KeyboardInterrupt, EOFError):121 raise Abort()
144 unmodified lines
266 .. versionadded:: 2.0267 """268 if not isatty(sys.stdout):269 return270 # If we're on windows and we don't have colorama available, then we270 # If we're on Windows and we don't have colorama available, then we271 # clear the screen by shelling out. Otherwise we can use an escape272 # sequence.273 if sys.platform.startswith('win') and colorama is None:274 os.system('cls')
110 unmodified lines
385386 If the editor cannot be opened a :exc:`UsageError` is raised.387388 Note for Windows: to simplify cross platform usage the newlines are389 automatically converted from posix to windows and reverse. As such the389 automatically converted from POSIX to Windows and reverse. As such the390 message here will have ``\n`` as newline markers.391392 :param text: the text to edit.393 :param editor: optionally the editor to use. Defaults to automatic
94 unmodified lines
modified:click/types.py+1 added-1 removed
27 unmodified lines
28 #: string environment variable, this is what splits it up. `None`29 #: means any whitespace. For all parameters the general rule is that30 #: whitespace splits them up. The exception are paths and files which31 #: are split by ``os.path.pathsep`` by default (":" on unix and ";" on32 #: windows).32 #: Windows).33 envvar_list_splitter = None3435 def __call__(self, value, param=None, ctx=None):36 if value is not None:
395 unmodified lines
modified:click/utils.py+2 added-2 removed
318 unmodified lines
319 the following folders could be returned:320321 Mac OS X:322 ``~/Library/Application Support/Foo Bar``323 Mac OS X (posix):323 Mac OS X (POSIX):324 ``~/.foo-bar``325 Unix:326 ``~/.config/foo-bar``327 Unix (posix):327 Unix (POSIX):328 ``~/.foo-bar``329 Win XP (roaming):330 ``C:\Documents and Settings\<user>\Local Settings\Application Data\Foo Bar``331 Win XP (not roaming):
31 unmodified lines
modified:examples/colors/setup.py+1 added-1 removed
5 unmodified lines
6 py_modules=['colors'],7 include_package_data=True,8 install_requires=[9 'Click',10 # Colorama is only required for windows.10 # Colorama is only required for Windows.11 'colorama',12 ],13 entry_points='''14 [console_scripts]
3 unmodified lines
modified:examples/termui/setup.py+1 added-1 removed
5 unmodified lines
6 py_modules=['termui'],7 include_package_data=True,8 install_requires=[9 'Click',10 # Colorama is only required for windows.10 # Colorama is only required for Windows.11 'colorama',12 ],13 entry_points='''14 [console_scripts]
3 unmodified lines
modified:CHANGES+1 added-1 removed
6 unmodified lines
7-----------89(codename and release date to be decided)1011- added support for opening stdin/stdout on windows in11- added support for opening stdin/stdout on Windows in12 binary mode correctly.13- added support for atomic writes to files by going through14 a temporary file.15- introduced :exc:`BadParameter` which can be used to easily perform
41 unmodified lines