Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; "subject:' ": 0.07; 'subject:using': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.11; 'easier.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:library': 0.16; 'wrote:': 0.18; 'have:': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; 'url:python': 0.33; 'subject:with': 0.35; 'received:google.com': 0.35; 'subject:one': 0.36; 'method': 0.36; 'nov': 0.38; 'pm,': 0.38; 'up,': 0.60; 'subject:hello': 0.83; 'url:master': 0.84; 'do:': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=OO6wMIdwstxU45OeY5l0MzpXM+C6RxehacwSPgbZ78w=; b=MGtm4docbLES9R6fKDeVKkLFTZTWoJM6iOwSJ7Jrdf4guUVVlAeXtVJEmFafBqOSJZ 6yKevWAKNe2xs1WFDrmd2m2cSZxNfcf8vmmQUTTfkZT5DXn7ndj8qXAhPjycBnOeeiqq O7mhM6XgWptpB/ehc9jJ6hdy2O1porEuAT5P5z7TtbiLmCw3NqpYJbeHOWbDWAxfKdVB H47ZIemGa/Y5iUd1EOxid5wmslGVdQ7eodypp0uL+pNwVgyQfxQuJYvMb13xWNwS7viw SZeLiG9C/1KVo2TLsUSHBBGWSaDc92sO7wG4SH/hlsZ95Cr7zgf6AG3wu8Tzge+lIdr8 tJGA== MIME-Version: 1.0 X-Received: by 10.42.110.195 with SMTP id r3mr47112554icp.12.1415113031535; Tue, 04 Nov 2014 06:57:11 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Nov 2014 01:57:11 +1100 Subject: Re: Python extension using a C library with one 'hello' function From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1415113040 news.xs4all.nl 2940 [2001:888:2000:d::a6]:51900 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80189 On Tue, Nov 4, 2014 at 8:52 PM, Veek M wrote: > https://github.com/Veek/Python/tree/master/junk/hello > doesn't work. > I have: > hello.c which contains: int hello(void); > hello.h > > To wrap that up, i have: > hello.py -> _hello (c extension) -> pyhello.c -> method py_hello() > > People using this will do: > python3.2>> import hello > python3.2>> hello.hello() > > It doesn't compile/work. > [details chomped] Have you considered using Cython? It'll likely make your job a LOT easier. ChrisA