File: constants.py

package info (click to toggle)
smart-open 7.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 8,054; sh: 90; makefile: 14
file content (26 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Radim Rehurek <me@radimrehurek.com>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#

"""Some universal constants that are common to I/O operations."""


READ_BINARY = 'rb'

WRITE_BINARY = 'wb'

BINARY_MODES = (READ_BINARY, WRITE_BINARY)

BINARY_NEWLINE = b'\n'

WHENCE_START = 0

WHENCE_CURRENT = 1

WHENCE_END = 2

WHENCE_CHOICES = (WHENCE_START, WHENCE_CURRENT, WHENCE_END)