Skip to content

Instantly share code, notes, and snippets.

View nickelpro's full-sized avatar
suzmarin

Vito Gamberini nickelpro

suzmarin
View GitHub Profile
import ctypes
import time
from mem_edit import Process
from controller import refreshShop, getFocus, refreshMaronaCreate, buyPhantom, buyWeapon
import psutil
def findProcessIdByName(processName):
'''
@mattpitkin
mattpitkin / swigtesting.md
Last active March 15, 2023 10:55
Adding python functionality to a SWIG wrapped structure

Adding python functionality to a SWIG-wrapped structure

This is a little example of adding some python-object-like functionality to a C structure that is SWIG-wrapped for use in python. What I've done mainly comes from this StackOverflow question, and the very useful answer, but is written here to remind me.

Say you have some C code containing a structure like this:

/* testswig.h file */
#include <stdlib.h>
#include <stdio.h>