File: compat.py

package info (click to toggle)
python-mysqldb 1.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 512 kB
  • sloc: python: 3,295; ansic: 2,467; makefile: 6
file content (14 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys

if sys.version_info[0] == 2:
    PY2 = True
    unicode = unicode
    unichr = unichr
    long = long
    StandardError = StandardError
else:
    PY2 = False
    unicode = str
    unichr = chr
    long = int
    StandardError = Exception