diff --git a/README.md b/README.md index 3fc41db..96cc007 100644 --- a/README.md +++ b/README.md @@ -309,7 +309,7 @@ String ```python = .split() # Splits on one or more whitespace characters. = .split(sep=None, maxsplit=-1) # Splits on 'sep' str at most 'maxsplit' times. - = .splitlines(keepends=False) # Splits on line breaks. Keeps them if 'keepends'. + = .splitlines(keepends=False) # Splits on \n,\r,\r\n. Keeps them if 'keepends'. = .join() # Joins elements using string as separator. ``` @@ -1676,19 +1676,19 @@ os.mkdir(, mode=0o777) # Creates a directory. Mode is in octal. ``` ```python -shutil.copy(from, to) # Copies the file. -shutil.copytree(from, to) # Copies the directory. +shutil.copy(from, to) # Copies the file. 'to' can be a directory. +shutil.copytree(from, to) # Copies the directory. 'to' must not exist. ``` ```python -os.rename(from, to) # Renames or moves the file or directory. +os.rename(from, to) # Renames/moves the file or directory. os.replace(from, to) # Same, but overwrites 'to' if it exists. ``` ```python os.remove() # Deletes the file. os.rmdir() # Deletes the empty directory. -shutil.rmtree() # Deletes the non-empty directory. +shutil.rmtree() # Deletes the directory. ``` ### Shell Commands diff --git a/index.html b/index.html index 3472698..67d9b70 100644 --- a/index.html +++ b/index.html @@ -426,7 +426,7 @@ to_exclusive = <range>.stop
<list> = <str>.split()                       # Splits on one or more whitespace characters.
 <list> = <str>.split(sep=None, maxsplit=-1)  # Splits on 'sep' str at most 'maxsplit' times.
-<list> = <str>.splitlines(keepends=False)    # Splits on line breaks. Keeps them if 'keepends'.
+<list> = <str>.splitlines(keepends=False)    # Splits on \n,\r,\r\n. Keeps them if 'keepends'.
 <str>  = <str>.join(<coll_of_strings>)       # Joins elements using string as separator.
 
<bool> = <sub_str> in <str>                  # Checks if string contains a substring.
@@ -1526,15 +1526,15 @@ value = args.<name>
 
os.chdir(<path>)                    # Changes current working directory.
 os.mkdir(<path>, mode=0o777)        # Creates a directory. Mode is in octal.
 
-
shutil.copy(from, to)               # Copies the file.
-shutil.copytree(from, to)           # Copies the directory.
+
shutil.copy(from, to)               # Copies the file. 'to' can be a directory.
+shutil.copytree(from, to)           # Copies the directory. 'to' must not exist.
 
-
os.rename(from, to)                 # Renames or moves the file or directory.
+
os.rename(from, to)                 # Renames/moves the file or directory.
 os.replace(from, to)                # Same, but overwrites 'to' if it exists.
 
os.remove(<path>)                   # Deletes the file.
 os.rmdir(<path>)                    # Deletes the empty directory.
-shutil.rmtree(<path>)               # Deletes the non-empty directory.
+shutil.rmtree(<path>)               # Deletes the directory.
 

Shell Commands

import os
 <str> = os.popen('<shell_command>').read()
diff --git a/parse.js b/parse.js
index d2667af..579ff13 100755
--- a/parse.js
+++ b/parse.js
@@ -34,12 +34,12 @@ const TOC =
   '
\n'; const OS_RENAME = - 'os.rename(from, to) # Renames or moves the file or directory.\n' + + 'os.rename(from, to) # Renames/moves the file or directory.\n' + 'os.replace(from, to) # Same, but overwrites \'to\' if it exists.\n'; const SHUTIL_COPY = - 'shutil.copy(from, to) # Copies the file.\n' + - 'shutil.copytree(from, to) # Copies the directory.\n'; + 'shutil.copy(from, to) # Copies the file. \'to\' can be a directory.\n' + + 'shutil.copytree(from, to) # Copies the directory. \'to\' must not exist.\n'; const EVAL = '>>> from ast import literal_eval\n' +