Skip to content Skip to sidebar Skip to footer
Showing posts with the label C

Clean And Type-safe State Machine Implementation In A Statically Typed Language?

I implemented a simple state machine in Python: import time def a(): print 'a()' r… Read more Clean And Type-safe State Machine Implementation In A Statically Typed Language?

Swig With Python And C: Arguments

I have this function: void func(int* a, int b); Which I want to make available in python like so: … Read more Swig With Python And C: Arguments

Server And Client In Python And C

I've wrote a simple client code in python, and I'm trying to connect to a simple echo serve… Read more Server And Client In Python And C

How To Find The Number Of Parameters To A Python Function From C?

I'm using the Python C API to call Python functions from my application. I'd like to presen… Read more How To Find The Number Of Parameters To A Python Function From C?

C Dll Crack When Called From Python

I've a DLL that embeds Python interpreter using the C/Python API. The DLL works fine if called … Read more C Dll Crack When Called From Python

Python: Improving Sub-string Search By Embedding Sophisticated Algorithms

I am extending my previous question python efficient substring search, I am interested to improve … Read more Python: Improving Sub-string Search By Embedding Sophisticated Algorithms

C-python Asyncio: Running Discord.py In A Thread

I have to launch discord.py in a separate thread since I can't block my main thread. It is a ga… Read more C-python Asyncio: Running Discord.py In A Thread

Pickling A Python Extension Type Defined As A C Struct Having Pyobject* Members

I am running C++ code via Python and would like to pickle an extension type. So I have a C++ struct… Read more Pickling A Python Extension Type Defined As A C Struct Having Pyobject* Members

Passing List Of Numpy Arrays To C Using Cython

I have a list list_of_arrays of 3D numpy arrays that I want to pass to a C function with the templa… Read more Passing List Of Numpy Arrays To C Using Cython

Build Python Package With C Bindings In Windows (vc90) Causes Lnk1181 Fatal Error

I'm trying to build a Python package (pyspotify) with bindings to a C library (libspotify). I&#… Read more Build Python Package With C Bindings In Windows (vc90) Causes Lnk1181 Fatal Error

How To Call A Builtin Function (or Method) From C Code Of A Python Extension Module?

What I currently want to accomplish is to tweak Pythons itertools module function combinations to … Read more How To Call A Builtin Function (or Method) From C Code Of A Python Extension Module?

Pass Argument To Pyrun_file(***)

I am writing some code in C and in Python. I have a python file called sample.py which accepts two … Read more Pass Argument To Pyrun_file(***)

How To Embed C Code In Python Program?

i want to write a program using multi-threading, raw sockets, to scan the ports in python i have a … Read more How To Embed C Code In Python Program?

Python 2d Array I C Using Ctypes

i'm trying to use a self written c lib to proces 2d array from python but with little success. … Read more Python 2d Array I C Using Ctypes

How To Create A Custom Python Exception Type In C Extension?

I'm writing a Python module in C. I need to report errors that can't be described by built-… Read more How To Create A Custom Python Exception Type In C Extension?

Python Ctypes Passing In Pointer And Getting Struct Back

This is a simple example of something I'm trying to get working before tackling an actual usefu… Read more Python Ctypes Passing In Pointer And Getting Struct Back

How To Convert Python Integers Into C Integers?

How tThere are many threads about going from a c language integer to python integer, but none that … Read more How To Convert Python Integers Into C Integers?

How To Get Python Gui To Call A Genetic Algorithm Written In C

I'm new to Stack Overflow. I have a genetic algorithm written in C that accepts user input in … Read more How To Get Python Gui To Call A Genetic Algorithm Written In C

Ctypes: Mapping A Returned Pointer To A Structure

I have tried reading all the questions/answers on this topic but I could not get anything to work. … Read more Ctypes: Mapping A Returned Pointer To A Structure

Confusing Reference Ownership: How To Properly Deallocate (via Py_decref) Objects Of An Object?

I was analysing the following code, which compiles and runs correctly, but generates a memory leak.… Read more Confusing Reference Ownership: How To Properly Deallocate (via Py_decref) Objects Of An Object?