Hello folks, I am using Python-2.5.2 on fedora 9 sulphur
-2.6.25-14.fc9.i686.I am creating a temporary file , in which data is
written by another program and then i am using that temporary file to do my
computations.I am new to linux and i am facing two issues
homedir = os.path.expanduser('~')
Pretend that you have a number that is always pointing somewhere in
your temporary file.
It starts a 0.
If you then write "lalalala" (8 characters) it will point after these
at position 8, so that you can write more stuff after your previous
text later by calling write.
The read method reads all t
[EMAIL PROTECTED] wrote:
> On Sep 15, 5:24 pm, buffi <[EMAIL PROTECTED]> wrote:
>> On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>>> Hello everyone,
>>> I'm trying to test the tempfile
On Sep 15, 5:24 pm, buffi <[EMAIL PROTECTED]> wrote:
> On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > Hello everyone,
>
> > I'm trying to test the tempfile module with the following script,
> > whi
On Sep 15, 11:11 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I'm trying to test the tempfile module with the following script,
> which basically creates a temporary file, fills the file with some
> test data and
Hello everyone,
I'm trying to test the tempfile module with the following script,
which basically creates a temporary file, fills the file with some
test data and prints it.
import tempfile
t = tempfile.TemporaryFile()
t.write("lalalala")
t.flush()
print t.read()
Unfortuna
Marc Christiansen <[EMAIL PROTECTED]> wrote:
> James T. Dennis <[EMAIL PROTECTED]> scribis:
>> In fact I realized, after reading through tempfile.py in /usr/lib/...
>> that the following also doesn't "work" like I'd expect:
>># foo.py
>>tst = "foo"
>>def getTst(arg):
> If I
James T. Dennis <[EMAIL PROTECTED]> scribis:
> In fact I realized, after reading through tempfile.py in /usr/lib/...
> that the following also doesn't "work" like I'd expect:
>
># foo.py
>tst = "foo"
>def getTst(arg):
If I change this line:
>return "foo-%s"
ate = 'spam'
>
>> In [16]: tempfile.template
>> Out[16]: 'spam'
>
> I know you can change it. But changing it in your namespace
> doesn't change the results returned by the functions called
> from the module.
I'm not changing
ot;, # low level safe interfaces
>"mktemp", # deprecated unsafe interface
>"TMP_MAX", "gettempprefix",# constants
>"tempdir", "gettempdir"
> ]
> Maybe the doc should be
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Wed, 09 May 2007 06:50:38 -, "James T. Dennis"
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>> In fact I realized, after reading through tempfile.py in /usr/lib/...
>> that the following also doesn't "work" like I'd exp
"NamedTemporaryFile", "TemporaryFile", # high level safe interfaces
"mkstemp", "mkdtemp", # low level safe interfaces
"mktemp", # deprecated unsafe interface
"TMP_MAX", "gett
xcept
to test my hypothesis about why changes to tempfile.template don't
actually affect the values seen by functions in the tempfile namespace.
Secondly, the author(s) of the tempfile module apparently didn't
understand this either. And no one else even noticed that the __doc__
13 matches
Mail list logo