Lists: | pgsql-committers |
---|
From: | jwp(at)pgfoundry(dot)org (James William Pye) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | python - rc: Fix localfile's f.read() and override __builtins__.file to |
Date: | 2007-02-25 21:23:52 |
Message-ID: | 20070225212352.43CD6217294@pgfoundry.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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)