reading a python file object in c extension crashes python

travis ray travis.ray at gmail.com
Mon Jun 13 19:26:51 EDT 2005


Hi,

I have an extension in which a file object is created in python and
passed down to a c extension which attempts to read from it or write
to it.  Writing to the file pointer seems to work okay, but reading
from it results in EBADF and causes python to crash on exit.

I've attached the minimal (I think) c code, python code, build script,
build log, and run log.  Any and all help is greatly appreciated.

Thanks.

System: Win-XP Professional
Compiler: Vc7 (MSVS 2003)
Python: Python 2.4.1
Builder: SCons 0.96.1
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: my_module.c
URL: <http://mail.python.org/pipermail/python-list/attachments/20050613/d0966805/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: my_module.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20050613/d0966805/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConstruct
Type: application/octet-stream
Size: 541 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050613/d0966805/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 384 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050613/d0966805/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.log
Type: application/octet-stream
Size: 199 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050613/d0966805/attachment-0002.obj>


More information about the Python-list mailing list