Yes, I knew this.  Good call, it was just a bad copy and paste example
of lines that showed up close together in a file.  My apologies.

>> import tempfile
>> tmp = tempfile.mktemp()
>>
>> import os
>> os.remove(tmp)
>>     
>
> Not only does that not answer the Original Poster's question, but I don't 
> think it does what you seem to think it does.
>
>
>   
>>>> tmp = tempfile.mktemp()
>>>> tmp
>>>>         
> '/tmp/tmpZkS0Gj'
>   
>>>> type(tmp)
>>>>         
> <type 'str'>
>   
>>>> import os
>>>> os.remove(tmp)
>>>>         
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> OSError: [Errno 2] No such file or directory: '/tmp/tmpZkS0Gj'
>
>
>
>
> You might like to read help(tempfile.mktemp).
>
> (By the way... the whole point of using tempfile is to avoid needing to 
> delete the file by hand afterwards.)
>
>
>
>   


-- 
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED]  |  402-438-8958  |  http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to