Fredrik Lundh writes: > > my good friend the mad scientist (the guy who writes code, > not the flaming cult-ridden brainwashed script kiddie) has > considered writing a whole new "abstract file" backend, to > entirely get rid of stdio in the Python core. some potential > advantages: > > -- performance (some stdio implementations are slow) > -- portability (stdio doesn't exist on some platforms!) > -- opens up for cool extensions (memory mapping, > pluggable file handlers, etc). > > should I tell him to start hacking? > I am not in favor of obscuring Python's I/O model too much. When working with C extensions, it is critical to have access to normal I/O mechanisms such as 'FILE *' or integer file descriptors. If you hide all of this behind some sort of abstract I/O layer, it's going to make life hell for extension writers unless you also provide a way to get access to the raw underlying data structures. This is a major gripe I have with the Tcl channel model--namely, there seems to be no easy way to unravel a Tcl channel into a raw file-descriptor for use in C (unless I'm being dense and have missed some simple way to do it). Also, what platforms are we talking about here? I've never come across any normal machine that had a C compiler, but did not have stdio. Is this really a serious problem? Cheers, Dave
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4