Pythia

If you liked this item, please rate it up on Steam Workshop page.

Authors: Adanteh, Stack

Last revision: 27 Sep, 2022 at 21:47 UTC

File size: 260.03 MB

On Steam Workshop

Description:
Pythia

An Arma 3 extension that lets you write python extensions for Arma 3. And it’s really simple and straightforward to use!

Discord: https://discord.gg/Pp6ac56
More information: https://github.com/overfl0/Pythia

TL;DR

Create a function:

def my_function(some_string, number, the_truth): return ["awesome", 42, True, (1, 3.5)]

Call it from Arma:

["MyAwesomeModule.my_function", ["arg1", 3.14256, False]] call py3_fnc_callExtension

This will return this to your SQF code:

["awesome", 42, True, [1, 3.5]]

See the examples of mods performing simple functions here: https://github.com/overfl0/Pythia/tree/next/examples

Features
  • Works on Windows 32/64bit and on Linux 64bit
  • Full type conversion both ways: pass in an SQF array of ints, get a python array of ints. Return a tuple of a float, a bool and a string, get an SQF array containing the float, bool and the string
  • Embedded python installation (you don’t have to install anything; just run the mod)
  • Python code stored inside @YourOwnMod directory
  • Python modules can call and reuse each other, even between separate Arma mods
  • Background Python threads
  • Cython and other compiled python extensions "just work" (C-like speed for performance-critical modules)
  • Extendable python environment through pip
  • Proven to work with libraries such as numpy, scipy, matplotlib, PyQt5, etc…
  • Automatic python code reloader for easier development
  • Allows returning more than 10240 characters from the extension transparently
  • Annoys sloppy SQF developers with correct code indentation since Day One 😉

More information

For more information, go to the github page and read the readme: https://github.com/overfl0/Pythia