python - rc: Fix localfile's f.read() and override __builtins__.file to - Mailing list pgsql-committers

From jwp@pgfoundry.org (James William Pye)
Subject python - rc: Fix localfile's f.read() and override __builtins__.file to
Date
Msg-id 20070225212352.43CD6217294@pgfoundry.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix localfile's f.read() and override __builtins__.file to allow local access.

renv was not properly handling zero data arguments indicating that all of the
file was desired to be read.

Override the builtin file() object to first use localfile and then use
hostfile(the real file). This provides the necessary abstraction to run local
scripts and reference local files transparently. If something specific is
desired, the exact types are available through 'hostfile' and 'localfile'
builtins. Some more, perhaps strange, transparencies to come(chdir affects local
PWD as opposed to remote?).

Modified Files:
--------------
    rc/src:
        python.py (r1.1 -> r1.2)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/rc/src/python.py.diff?r1=1.1&r2=1.2)
        renv.py (r1.1 -> r1.2)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/rc/src/renv.py.diff?r1=1.1&r2=1.2)
        teop.py (r1.1 -> r1.2)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/rc/src/teop.py.diff?r1=1.1&r2=1.2)

pgsql-committers by date:

Previous
From: jwp@pgfoundry.org (James William Pye)
Date:
Subject: python - ip: Add 'parameters' arguments(default SETs) and correct
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Update 7.x variant horology files to match the new US DST rules.