os.tmpfile()

Erik Max Francis max at alcyone.com
Wed Jan 2 14:28:12 EST 2008


jyoung79 at kc.rr.com wrote:

> Erik, I am going to be displaying sections of text in the Terminal Window on OS X.  
> I wanted to format the text in a specific way and thought it might be quicker to 
> output all the text to a temporary file that I could quickly read sections from instead 
> of storing in memory.  Not sure if this is the most efficient way to do this or not but 
> thought at least it'd be a good way to learn something new in Python.  I was 
> assuming tmpfile() would automatically create some sort of temporary file that 
> would automatically delete itself when the code was finished.

It is more likely that keeping it in a list will be more efficient, and 
easier to handle anyway.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
   When angry, count four; when very angry, swear.
    -- Mark Twain



More information about the Python-list mailing list