Skip to main content

Implements ``callable`` using ctypes (useful on CPython 3.0 and 3.1).

Project description

Implements callable using ctypes (useful on CPython 3.0 and 3.1, which is missing the callable function).

Versioning

This library’s version numbers follow the SemVer 2.0.0 specification.

Installation

pip install ctypes-callable

Usage

The use-case for using this module is if:

  1. You are using an early CPython 3 release missing callable.

  2. You cannot upgrade to a newer CPython 3 for some reason.

  3. You want to use code which uses the callable builtin.

To do this, run this before any code that uses callable (for example, usercustomize or sitecustomize might be good places):

import ctypes_callable
import builtins
builtins.callable = ctypes_callable.callable

Portability

This module will fail on import on Jython, IronPython, PyPy, MicroPython, PyPy.js, Brython, Transcrypt, and probably any other implementation besides CPython, because it relies on accessing the Python C API through ctypes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctypes-callable-1.0.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

ctypes_callable-1.0.4-py2.py3-none-any.whl (2.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ctypes-callable-1.0.4.tar.gz.

File metadata

  • Download URL: ctypes-callable-1.0.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.6

File hashes

Hashes for ctypes-callable-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8f66049386ab80e50aeb804bf3c01245e0923fd7545c18f8ef2736b22365e6d8
MD5 da59fc31685527cf8ff2b70dbe9be192
BLAKE2b-256 1b999643c2d964bb38ceade0f2e226e382e6adcdb26e169c5ff39da184c3d7df

See more details on using hashes here.

File details

Details for the file ctypes_callable-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: ctypes_callable-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.6

File hashes

Hashes for ctypes_callable-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ce259c3a980e0cd772bbe74bfb70a005f83ab223f3fdad1a7ab0216bb44bf0ce
MD5 19be5fcb2fcfd93f6d1b5d14cc6685a5
BLAKE2b-256 6e1c24d90fb5f8ca010209dca0dc9e9fd818fb74f8056dd4c4559604e69ce17a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page