Package pythonids

Package pythonids

source code

pythonids provides common information about the Python syntax.

Version: 0.1.31

Author: Arno-Can Uestuensoez

Copyright: Copyright (C) 2010-2018 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez

License: Artistic-License-2.0 + Forced-Fairplay-Constraints

Submodules

Functions
 
decode_pysyntax_16bit_to_str(xyz, form='b'%d.%d.%d'')
Decodes the compressed version 16bit integer bitmask into the corresponding string.
source code
 
decode_pysyntax_16bit_to_tuple(xyz)
Decodes the compressed version 16bit integer bitmask into the corresponding tuple of integer values.
source code
 
decode_pysyntax_16bit_to_tuple_str(xyz)
Decodes the compressed version 16bit integer bitmask into the corresponding tuple of integer values.
source code
 
decode_pysyntax_str_to_num(v)
Split a version string separated by '.' into an integer tuple.
source code
 
encode_pysyntax_to_16bit(x=0, y=0, z=0)
Encodes the version by calculating the 16bit integer bitmask for the provided Python release values.
source code
Variables
  ISSTR = (<class 'str'>, <class 'bytes'>)
  ISSTRBASE = (<class 'str'>)
  PYV2 = 16384
  PYV27 = 18176
  PYV2715 = 18191
  PYV2716 = 18192
  PYV27X = False
  PYV3 = 24576
  PYV31 = 24832
  PYV32 = 25088
  PYV33 = 25344
  PYV34 = 25600
  PYV35 = 25856
  PYV35Less = False
  PYV35Plus = True
  PYV36 = 26112
  PYV362 = 26114
  PYV365 = 26117
  PYV366 = 26118
  PYV367 = 26119
  PYV368 = 26120
  PYV369 = 26121
  PYV37 = 26368
  PYV371 = 26369
  PYV372 = 26370
  PYV373 = 26371
  PYV374 = 26372
  PYV375 = 26373
  PYV376 = 26374
  PYV38 = 26624
  PYV381 = 26625
  PYV39 = 26880
  PYV3X = True
  PYV3X3 = False
  PYVxyz = 26624
  PythonIDsError = <class 'pythonids.PythonIDsError'>
  PythonIDsImplementationError = <class 'pythonids.PythonIDsImpl...
  __cached__ = 'b'/local/hd1/home1/data/acue/rd/p-open-deploy/py...
  __loader__ = <_frozen_importlib_external.SourceFileLoader obje...
  __package__ = 'b'pythonids''
  __spec__ = ModuleSpec(name='pythonids', loader=<_frozen_import...
  __uuid__ = 'b'5624dc41-775a-4d17-ac42-14a0d5c41d1a''
  unicode = <class 'str'>
Function Details

decode_pysyntax_16bit_to_str(xyz, form='b'%d.%d.%d'')

source code 

Decodes the compressed version 16bit integer bitmask into the corresponding string.

The optional format string form provides the formatting of a 3-value interger tuple. E.g. form="%02d.%02d.%03d".

Due to the spared error checks the string has to be correct!

decode_pysyntax_str_to_num(v)

source code 

Split a version string separated by '.' into an integer tuple.

decode_pysyntax_str_to_num('1.22.17')  =>  (1, 22, 17)

A tiny utility - frequently required.

Args:

Version string 'x.y.z'.

Returns:

Integer tuple (x, y, z)

Raises:

ValueError

encode_pysyntax_to_16bit(x=0, y=0, z=0)

source code 

Encodes the version by calculating the 16bit integer bitmask for the provided Python release values.

Args:
x:

The major version number.

0 <= x

0 <= x0 < 8  # internal low-level 16-bit optimization threshold
y:

The minor version number.

0 <= y < 32
z:

The numeric relase-build tag.

0 <= z < 256

Returns:

The bitmask.

Raises:

pass-through

Variables Details

PythonIDsImplementationError

Value:
<class 'pythonids.PythonIDsImplementationError'>

__cached__

Value:
'b'/local/hd1/home1/data/acue/rd/p-open-deploy/pythonids/repos/sourcef\
orge.net/pythonids/pythonids/__pycache__/__init__.cpython-38.pyc''

__loader__

Value:
<_frozen_importlib_external.SourceFileLoader object at 0x7f51adda7310>

__spec__

Value:
ModuleSpec(name='pythonids', loader=<_frozen_importlib_external.Source\
FileLoader object at 0x7f51adda7310>, origin='/local/hd1/home1/data/ac\
ue/rd/p-open-deploy/pythonids/repos/sourceforge.net/pythonids/pythonid\
s/__init__.py', submodule_search_locations=['/local/hd1/home1/data/acu\
e/rd/p-open-deploy/pythonids/repos/sourceforge.net/pythonids/pythonids\
'])