Adjusting the 1024 byte stdin buffer limit
Are there runtime settings that can be used to adjust the default 1024 byte stdin buffer limit or a buildtime setting in pyconfig.h? I have a need to pump this up to permit input of a large data block via stdin. Tim Jones -- http://mail.python.org/mailman/listinfo/python-list
Re: Adjusting the 1024 byte stdin buffer limit
Currently, when sending a data stream that exceeds 1024 bytes via stdin, the stream blocks at the 1024th byte. This precludes completion of the submission of the data stream. Tim -- http://mail.python.org/mailman/listinfo/python-list
Re: Adjusting the 1024 byte stdin buffer limit
Currently, when sending a data stream that exceeds 1024 bytes via stdin, the stream blocks at the 1024th byte. This precludes completion of the submission of the data stream. Tim -- http://mail.python.org/mailman/listinfo/python-list
Re: Adjusting the 1024 byte stdin buffer limit
Hi All, - Thanks, but it seems I may have been a bit more confused that even I thought. It turns out to be an issue with Apple's OS X pty/tty interface. Even though the mediator tool is set up to read in up to 20K of data, the pty interface blocks at 1024 bytes. When testing this under Linux, I'm fine. And, Solaris 8 weaves an even more diabolical 255 character limit :( . - Looks like I'll need to be a bit more creative than simply spawning a shell. - Tim Fredrik Lundh wrote: > "brucoder" <[EMAIL PROTECTED]> wrote: > > > Currently, when sending a data stream that exceeds 1024 bytes via > > stdin, the stream blocks at the 1024th byte. This precludes completion > > of the submission of the data stream. > > you can pass in a buffer size when you open a file: > > >>> help(open) > > class file(object) > | file(name[, mode[, buffering]]) -> file object > | > | Open a file. The mode can be 'r', 'w' or 'a' for reading (default), > | writing or appending. The file will be created if it doesn't exist > | when opened for writing or appending; it will be truncated when > | opened for writing. Add a 'b' to the mode for binary files. > | Add a '+' to the mode to allow simultaneous reading and writing. > | If the buffering argument is given, 0 means unbuffered, 1 means line > | buffered, and larger numbers specify the buffer size. > | Add a 'U' to mode to open the file for input with universal newline > | support. Any line ending in the input file will be seen as a '\n' > | in Python. Also, a file so opened gains the attribute 'newlines'; > | the value for this attribute is one of None (no newline read yet), > | '\r', '\n', '\r\n' or a tuple containing all the newline types seen. > | > | 'U' cannot be combined with 'w' or '+' mode. > | > | Note: open() is an alias for file(). > > or use os.fdopen() to reopen an existing file handle: > > >>> help(os.fdopen) > > fdopen(fd [, mode='r' [, bufsize]]) -> file_object > > Return an open file object connected to a file descriptor. > > assuming "sending via stdin" means using a pipe, this page explains why all > this probably won't matter: > > http://www.opengroup.org/onlinepubs/7990989799/xsh/write.html > > (see the "Write requests to a pipe or FIFO" section) > > -- http://mail.python.org/mailman/listinfo/python-list
Visual Studio 6 compile of 2.5.2 fails with missing db.h
Hi Folks, Searched the archives, but I can only find mention of db.h problems relating to Linux. I've downloaded the source for 2.5.2 and am trying to compile it in Visual Studio 6 (SP6). The error reports read: Configuration: _bsddb - Win32 Debug Compiling... _bsddb.c C:\Documents and Settings\Tim\My Documents\Python-2.5.2\Modules \_bsddb.c(90) : fatal error C1083: Cannot open include file: 'db.h': No such file or directory Error executing cl.exe. _bsddb_d.pyd - 1 error(s), 0 warning(s) Any pointers? A prerequisite that I might be missing? The source is the Python-2.5.2.tar.gz from the Python.org site. Thanks for any help, Tim -- http://mail.python.org/mailman/listinfo/python-list
Re: Visual Studio 6 compile of 2.5.2 fails with missing db.h
On May 5, 11:43 am, brucoder <[EMAIL PROTECTED]> wrote: > Hi Folks, > > Searched the archives, but I can only find mention of db.h problems relating > to Linux. > > I've downloaded the source for 2.5.2 and am trying to compile it in Visual > Studio 6 (SP6). I've just stepped back to 2.3.7 and receive the same error when compiling bsddb... > The error reports read: > > Configuration: _bsddb - Win32 Debug > Compiling... > _bsddb.c > C:\Documents and Settings\Tim\My Documents\Python-2.5.2\Modules\_bsddb.c(90) > : fatal error C1083: Cannot open include file: 'db.h': > No such file or directory > Error executing cl.exe. > > _bsddb_d.pyd - 1 error(s), 0 warning(s) -- http://mail.python.org/mailman/listinfo/python-list
Re: Visual Studio 6 compile of 2.5.2 fails with missing db.h
On May 5, 1:46 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > brucoder schrieb: > > > Any pointers? A prerequisite that I might be missing? The source is > > the Python-2.5.2.tar.gz from the Python.org site. > > The tar.gz doesn't contain the dependencies like the bsddb files or > sqlite3, bzip2 and more. You have to download and unpack the correct > versions into the correct folder. Please read PCbuild/readme.txt I had read that, but I misunderstood that not all components must be built. Since I don't need that functionality, I now see that I can simply exclude it from my lib and exe builds. Thanks, Tim -- http://mail.python.org/mailman/listinfo/python-list