Skip to main content

Python Wrapper for JoyShockLibrary using ctypes

Project description

python-jsl

Python Wrapper for JoyShockLibrary using ctypes

How to use

Just import JoyShockLibrary in your project or use from JoyShockLibrary import * if you prefer. For API documentation please refer to JoyShockLibrary project page. Since this is pure ctypes wrapper, there is slight usage differences.

  1. To use JslGetConnectedDeviceHandles function you need to pass int array. You can create int array using (ctypes.c_int * arrayLength)()
  2. To use JslGetCalibrationOffset function you need to pass three C float pointers. You can create C floats using variableName = ctypes.c_float(). They can be used directly to pass pointers of them. For example JslGetCalibrationOffset(deviceID, variableName1, variableName2, variableName3)
  3. To create C compatible callback function pointer you need to pass your callback function to JslCallback or JslTouchCallback functions. They will return C compatible pointer of your functions. You can pass them directly to JslSetCallback or JslSetTouchCallback functions.

You can find examples for these differences above in JoyShockLibrary wrapper source.

Requirements

You need to copy JoyShockLibrary.dll (for Windows) to one of your PATH folders or where your script is running.
Both JoyShockLibrary and this python wrapper tested on Windows. They might work on other OSes.

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

python-jsl-NullMember-0.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_jsl_NullMember-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file python-jsl-NullMember-0.0.1.tar.gz.

File metadata

  • Download URL: python-jsl-NullMember-0.0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for python-jsl-NullMember-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8e9d81d2792162ecca9dfabb54897914e70b4437dbf4ee58398bb1cea403224a
MD5 09741871c3bcc77fb9adaf5610d56490
BLAKE2b-256 aa83c9956c994069484ff8afb7b938c7946022d503f77e7fa6da82eb92423857

See more details on using hashes here.

File details

Details for the file python_jsl_NullMember-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_jsl_NullMember-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for python_jsl_NullMember-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12b4c24fd489fa6976216e0f37a004a1c4cb6ec63abc7568da80d9011e1732b1
MD5 7f0e434b157ca4dffad39dd8e159a621
BLAKE2b-256 4dbf596f35476549d67260b8ec773c58d7c043ab2d1553f3ff8b61075e99714e

See more details on using hashes here.

Supported by

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