summary refs log tree commit diff stats
path: root/lib/deprecated/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-10-25 07:42:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-25 07:42:45 +0200
commit223e92b83a42b3963b74a49bae6d571f00bf32f8 (patch)
treeb0413ed44642ed6a60900e7e13bd272e2e4a0987 /lib/deprecated/pure
parentf5a2c6e19d8c789ad1211264bac89bce7e569e54 (diff)
downloadNim-223e92b83a42b3963b74a49bae6d571f00bf32f8.tar.gz
stdlib: documenation updates, the exception names have been changed
Diffstat (limited to 'lib/deprecated/pure')
-rw-r--r--lib/deprecated/pure/asyncio.nim6
-rw-r--r--lib/deprecated/pure/sockets.nim32
2 files changed, 19 insertions, 19 deletions
diff --git a/lib/deprecated/pure/asyncio.nim b/lib/deprecated/pure/asyncio.nim
index 161941e53..39d77230a 100644
--- a/lib/deprecated/pure/asyncio.nim
+++ b/lib/deprecated/pure/asyncio.nim
@@ -180,7 +180,7 @@ proc asyncSocket*(domain: Domain = AF_INET, typ: SockType = SOCK_STREAM,
                   protocol: Protocol = IPPROTO_TCP,
                   buffered = true): AsyncSocket =
   ## Initialises an AsyncSocket object. If a socket cannot be initialised
-  ## EOS is raised.
+  ## OSError is raised.
   result = newAsyncSocket()
   result.socket = socket(domain, typ, protocol, buffered)
   result.proto = protocol
@@ -476,7 +476,7 @@ proc recvLine*(s: AsyncSocket, line: var TaintedString): bool {.deprecated.} =
   ## if this function can only retrieve some data; it will save this data and
   ## add it to the result when a full line is retrieved.
   ##
-  ## Unlike ``sockets.recvLine`` this function will raise an EOS or ESSL
+  ## Unlike ``sockets.recvLine`` this function will raise an OSError or SslError
   ## exception if an error occurs.
   ##
   ## **Deprecated since version 0.9.2**: This function has been deprecated in
@@ -512,7 +512,7 @@ proc readLine*(s: AsyncSocket, line: var TaintedString): bool =
   ## retrieved or the socket has been disconnected in which case ``line`` will
   ## be set to "".
   ##
-  ## This function will raise an EOS exception when a socket error occurs.
+  ## This function will raise an OSError exception when a socket error occurs.
   setLen(line.string, 0)
   var dataReceived = "".TaintedString
   var ret = s.socket.readLineAsync(dataReceived)
diff --git a/lib/deprecated/pure/sockets.nim b/lib/deprecated/pure/sockets.nim
index ed15f67e2..34881607f 100644
--- a/lib/deprecated/pure/sockets.nim
+++ b/lib/deprecated/pure/sockets.nim
@@ -23,7 +23,7 @@
 ##
 ## SSL is supported through the OpenSSL library. This support can be activated
 ## by compiling with the ``-d:ssl`` switch. When an SSL socket is used it will
-## raise ESSL exceptions when SSL errors occur.
+## raise SslError exceptions when SSL errors occur.
 ##
 ## Asynchronous sockets are supported, however a better alternative is to use
 ## the `asyncio <asyncio.html>`_ module.
@@ -262,7 +262,7 @@ proc socket*(domain: Domain = AF_INET, typ: SockType = SOCK_STREAM,
              protocol: Protocol = IPPROTO_TCP, buffered = true): Socket =
   ## Creates a new socket; returns `InvalidSocket` if an error occurs.
 
-  # TODO: Perhaps this should just raise EOS when an error occurs.
+  # TODO: Perhaps this should just raise OSError when an error occurs.
   when defined(Windows):
     result = newTSocket(winlean.socket(cint(domain), cint(typ), cint(protocol)), buffered)
   else:
@@ -422,7 +422,7 @@ proc parseIp4*(s: string): BiggestInt =
   ##
   ## This is equivalent to `inet_ntoa`:idx:.
   ##
-  ## Raises EInvalidValue in case of an error.
+  ## Raises ValueError in case of an error.
   var a, b, c, d: int
   var i = 0
   var j = parseInt(s, a, i)
@@ -543,7 +543,7 @@ pG.md for development specific
information.  For configuration, check the files in ranger/config/ or copy the
default config to ~/.config/ranger with ranger's --copy-config option.  The
examples/ directory contains several scripts and plugins that demonstrate how
ranger can be extended or combined with other programs.  These files can be
found in the git repository or in /usr/share/doc/ranger.

A note to packagers:  Versions meant for packaging are listed in the changelog
on the website.


About
-----
* Authors:     see "AUTHORS" file
* License:     GNU General Public License Version 3
* Website:     http://ranger.nongnu.org/
* Download:    http://ranger.nongnu.org/ranger-stable.tar.gz
* Bug reports: https://github.com/hut/ranger/issues
* git clone    http://git.sv.gnu.org/r/ranger.git


Design Goals
------------
* An easily maintainable file manager in a high level language
* A quick way to switch directories and browse the file system
* Keep it small but useful, do one thing and do it well
* Console based, with smooth integration into the unix shell


Features
--------
* UTF-8 Support  (if your python copy supports it)
* Multi-column display
* Preview of the selected file/directory
* Common file operations (create/chmod/copy/delete/...)
* Renaming multiple files at once
* VIM-like console and hotkeys
* Automatically determine file types and run them with correct programs
* Change the directory of your shell after exiting ranger
* Tabs, Bookmarks, Mouse support


Dependencies
------------
* Python (tested with version 2.6, 2.7, 3.1-3.5) with the "curses" module
  and (optionally) wide-unicode support.
* A pager ("less" by default)

Optional:

* The "file" program for determining file types
* The python module "chardet", in case of encoding detection problems
* "sudo" to use the "run as root"-feature
* w3m for the "w3mimgdisplay" program to preview images

Optional, for enhanced file previews (with "scope.sh"):

* img2txt (from caca-utils) for ASCII-art image previews
* highlight for syntax highlighting of code
* atool for previews of archives
* lynx, w3m or elinks for previews of html pages
* pdftotext for pdf previews
* transmission-show for viewing bit-torrent information
* mediainfo or exiftool for viewing information about media files


Installing
----------
Use the package manager of your operating system to install ranger.
Note that ranger can be started without installing by simply running ranger.py.

To install ranger manually:

    sudo make install

This translates roughly to:

    sudo python setup.py install --optimize=1 --record=install_log.txt

This also saves a list of all installed files to install_log.txt, which you can
use to uninstall ranger.


Getting Started
---------------
After starting ranger, you can use the Arrow Keys (or hjkl) to navigate, Enter
to open a file or type Q to quit.  The third column shows a preview of the
current file.  The second is the main column and the first shows the parent
directory.

Ranger can automatically copy default configuration files to ~/.config/ranger
if you run it with the switch --copy-config. (see ranger --help for a
description of that switch.)  Also check ranger/config/ for the default
configuration.
v`` failed; **an EOS exception is raised.** + ## * If call to ``recv`` failed; **an OSError exception is raised.** setLen(line.string, 0) template errorOrNone = @@ -1421,7 +1421,7 @@ proc readLineAsync*(socket: Socket, proc recv*(socket: Socket): TaintedString {.tags: [ReadIOEffect], deprecated.} = ## receives all the available data from the socket. - ## Socket errors will result in an ``EOS`` error. + ## Socket errors will result in an ``OSError`` error. ## If socket is not a connectionless socket and socket is not connected ## ``""`` will be returned. ## @@ -1470,7 +1470,7 @@ proc recvAsync*(socket: Socket, s: var TaintedString): bool {. tags: [ReadIOEffect], deprecated.} = ## receives all the data from a non-blocking socket. If socket is non-blocking ## and there are no messages available, `False` will be returned. - ## Other socket errors will result in an ``EOS`` error. + ## Other socket errors will result in an ``OSError`` error. ## If socket is not a connectionless socket and socket is not connected ## ``s`` will be set to ``""``. ## @@ -1547,7 +1547,7 @@ proc recvFromAsync*(socket: Socket, data: var string, length: int, address: var string, port: var Port, flags = 0'i32): bool {.tags: [ReadIOEffect].} = ## Variant of ``recvFrom`` for non-blocking sockets. Unlike ``recvFrom``, - ## this function will raise an EOS error whenever a socket error occurs. + ## this function will raise an OSError error whenever a socket error occurs. ## ## If there is no data to be read from the socket ``False`` will be returned. result = true @@ -1622,7 +1622,7 @@ proc sendAsync*(socket: Socket, data: string): int {.tags: [WriteIOEffect].} = ## returns the amount of bytes of ``data`` that was successfully sent. This ## number may not always be the length of ``data`` but typically is. ## - ## An EOS (or ESSL if socket is an SSL socket) exception is raised if an error + ## An OSError (or SslError if socket is an SSL socket) exception is raised if an error ## occurs. result = send(socket, cstring(data), data.len) when defined(ssl): @@ -1656,7 +1656,7 @@ proc sendAsync*(socket: Socket, data: string): int {.tags: [WriteIOEffect].} = proc trySend*(socket: Socket, data: string): bool {.tags: [WriteIOEffect].} = - ## safe alternative to ``send``. Does not raise an EOS when an error occurs, + ## safe alternative to ``send``. Does not raise an OSError when an error occurs, ## and instead returns ``false`` on failure. result = send(socket, cstring(data), data.len) == data.len