Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.06; "subject:' ": 0.07; 'parameter': 0.09; 'subject:using': 0.09; 'python': 0.11; 'fits': 0.16; 'subject:library': 0.16; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'lines': 0.31; 'ctypes': 0.31; 'types.': 0.31; 'url:python': 0.33; 'subject:with': 0.35; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:one': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'url:library': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'needs,': 0.65; 'charset:windows-1252': 0.65; 'subject:hello': 0.83 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=yS3qLgqE5KXdWokakG0WnSgnbbdQFZa30vjHXoE1RBQ=; b=bbpYIJhnJcilphbQzOwM12wo9RIvBPfdCbTeVV+zVSS8PUvJvVzpLBurzL+0esC46r /jFvOuhJvtdxqZ8GxZsDgoGDfUGQ2Tnbr0GahO4QIBG4mm9yIbsDrDbG+BczN8h9pBzf P6j04ZqSpy+XqJ6q/6QBKmfXka43i4XGVtpoDkUEPnbcrYw8oa+CXr1bMFaf3OwMccd9 mcxFZmGKsAn22poTI238igYmFw/1pMgiXaFYCRpXUYKuHE81VgFLUEbkK+DFnwNhpyeA pI46GuKsR17KGs0GpSjgYrR0bg1xmFfnmNwNwgF8iA+kzrDD4fZt4L1/mioOGgn0di4+ K90Q== X-Gm-Message-State: ALoCoQm/0BEcr7sKFHKOLBir8jtrC5+J4FwrwvKeD/OT4bYMU6Xm8uKHsExDyZKBJXhqhFgaX6Fa X-Received: by 10.152.87.171 with SMTP id az11mr57735092lab.37.1415103078982; Tue, 04 Nov 2014 04:11:18 -0800 (PST) Date: Tue, 04 Nov 2014 13:11:15 +0100 From: =?windows-1252?Q?S=F8ren?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python extension using a C library with one 'hello' function References: <5458C1DF.9010802@syntonetic.com> In-Reply-To: <5458C1DF.9010802@syntonetic.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 141103-9, 03-11-2014), Outbound message X-Antivirus-Status: Clean X-Mailman-Approved-At: Tue, 04 Nov 2014 16:30:14 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1415115015 news.xs4all.nl 2974 [2001:888:2000:d::a6]:39834 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3703 X-Received-Body-CRC: 3717890207 Xref: csiph.com comp.lang.python:80194 I'm not sure if it fits your needs, but we are very happy with calling c libs directly from python using ctypes: https://docs.python.org/2/library/ctypes.html It requires a few extra lines in Python to handle the parameter and return types. import ctypes result = ctypes.windll.Hello.hello()