Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!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.115 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.00; 'subject:How': 0.09; 'ctypes.': 0.16; 'googling': 0.16; 'skip:> 20': 0.16; 'subject:pass': 0.16; 'wrote:': 0.17; 'alex': 0.17; 'suggested': 0.20; 'bit': 0.21; 'posted': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'post': 0.28; 'up.': 0.31; 'file': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; "didn't": 0.36; 'method': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'content-disposition:inline': 0.60; 'header:Message-Id:1': 0.62; 'show': 0.63; 'joy': 0.65; 'reply': 0.66; 'response.': 0.67; 'friday': 0.71; 'subject: *': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id; bh=AoohhvE0HjU5UrletyU7C0TW60zv6zSgtSjpY2Nfmzw=; b=QXPJHXlrpPgnO3Iw/dqZLgwD/7uQfyxp8fMF+lRm92uHhAJ7pIoeKvnKIn5NTifFYa R7i9GZw4VfCetDYiZxAO5tFvIOR16N0XL1UYSKOljzW2/liafQ7f5iqD72kxVQCHLJmc XLIViiNyfenRAl+y26xJ+cCBTq/hWVrF2muhNUZb0vXM9IQbAWIcYS8vcBgcQzi0Myh8 qy2kXybavH25Nue6zcH5V1SuqF3A6/FMtYzIjf4oDL7APYQsxlmLCQChpCIC2FWSC51y I/roIpgHC0rWlw0kQ/Xpma6pbJ2Xiw1iOxJlFK0B3L2NdeI0Sjunzfozcw1LKTS7CBmT dDVQ== From: xDog Walker To: python-list@python.org Subject: Re: How to pass FILE * Date: Sat, 29 Sep 2012 01:45:19 -0700 User-Agent: KMail/1.9.5 References: <201209281455.07702.thudfoo@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348908360 news.xs4all.nl 6879 [2001:888:2000:d::a6]:57798 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30469 On Friday 2012 September 28 21:27, you wrote: > A tiny bit of googling suggests the following approach: > http://stackoverflow.com/questions/3794309/python-ctypes-python-file-object >-c-file/3794401#3794401 Thanks for your response. My "tiny bit of Googling" brought no joy but I did try successfully the same method suggested by Alex Martelli: use libc's fdopen to get a FILE * for ctypes. I would have posted a reply to my own post but it didn't show up. -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet strainers.