Neal Becker wrote:
> OK, does python have a C API that would allow me to create a python file
> object from my C (C++) code? Then instead of using python's fdopen I could
> just do it myself.
I don't know - you will have to read the python source to find out
(this is actually not a pythondev ques
Bob Ippolito wrote:
>
> On Oct 27, 2005, at 4:58 PM, Neal Becker wrote:
>
>> Bob Ippolito wrote:
>>
>>
>>>
>>> On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
>>>
>>>
"Martin v. Löwis" wrote:
> I see. Python is making up the EISDIR, looking at the stat result.
> In Objects
"Martin v. Löwis" wrote:
> I see. Python is making up the EISDIR, looking at the stat result.
> In Objects/fileobject.c:dircheck generates the EISDIR error, which
> apparently comes from posix_fdopen, PyFile_FromFile,
> fill_file_fields.
>
> Python simply does not support file objects which stat
On Oct 27, 2005, at 4:58 PM, Neal Becker wrote:
> Bob Ippolito wrote:
>
>
>>
>> On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
>>
>>
>>> "Martin v. Löwis" wrote:
>>>
>>>
I see. Python is making up the EISDIR, looking at the stat result.
In Objects/fileobject.c:dircheck generates the EI
Bob Ippolito wrote:
>
> On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
>
>> "Martin v. Löwis" wrote:
>>
>>> I see. Python is making up the EISDIR, looking at the stat result.
>>> In Objects/fileobject.c:dircheck generates the EISDIR error, which
>>> apparently comes from posix_fdopen, PyFile_Fr
On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
> "Martin v. Löwis" wrote:
>
>> I see. Python is making up the EISDIR, looking at the stat result.
>> In Objects/fileobject.c:dircheck generates the EISDIR error, which
>> apparently comes from posix_fdopen, PyFile_FromFile,
>> fill_file_fields.
>>
Neal Becker wrote:
> SYS_253(0, 0x7f88f0f0, 0x2dda3f00, 0x2ab4611b, 0x7) = 4
> close(3)= 0
> futex(0x502530, FUTEX_WAKE, 1) = 0
> futex(0x502530, FUTEX_WAKE, 1) = 0
> fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
> m
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> Yes, tried that- learned nothing.
>
> Please go back further in the trace file. There must be a return
> value of -1 (EISDIR) somewhere in the file, try to locate that.
>
>> Here's strace. The write of '4' is where my code writes the value of
>>
Neal Becker wrote:
> Yes, tried that- learned nothing.
Please go back further in the trace file. There must be a return
value of -1 (EISDIR) somewhere in the file, try to locate that.
> Here's strace. The write of '4' is where my code writes the value of
> fileno() to stdout, which is '4', which
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> Any ideas? I'd rather not have to trace through python if I could avoid
>> it (I don't even have source installed here).
>
> Use strace, then. Find out what precise system call gives you this
> error. If this is not enough clue, post the relevant
Neal Becker wrote:
> Any ideas? I'd rather not have to trace through python if I could avoid it
> (I don't even have source installed here).
Use strace, then. Find out what precise system call gives you this
error. If this is not enough clue, post the relevant fragment of the
trace output. Usage
I'm trying to make a module to support inotify (linux). I put together a
module using boost::python. Problem is, inotify uses a file descriptor.
If I call python os.fdopen on it, I get an error:
Python 2.4.1 (#1, May 16 2005, 15:15:14)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help"
12 matches
Mail list logo