2009-07-13から1日間の記事一覧

ctypesを使ってみる

ctypesを使うとPythonからDLLや、Shared libraryを呼び出すことが出来る。 ctypes_test.py from ctypes import * msvcrt = cdll.msvcrt message = "Python ctypes test\n" msvcrt.printf(message) ポインタや構造体、ユニオンもちゃんと定義できる。 以下は…