Show
Ignore:
Timestamp:
11/25/08 00:39:15 (15 years ago)
Author:
jerome
Message:

Fixes #31 (will require a fix in PyKota as well, which references #32)
Added some stuff so we can be sure if the temporary files where created
by pkpgcounter and when/where.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/analyzer.py

    r3456 r3457  
    8484            try : 
    8585                pdlhandler = self.detectPDLHandler() 
    86                 dummyfile = tempfile.NamedTemporaryFile(mode="w+b") 
     86                dummyfile = tempfile.NamedTemporaryFile(mode="w+b", 
     87                                                        prefix="pkpgcounter_", 
     88                                                        suffix=".tiff", 
     89                                                        dir=os.environ.get("PYKOTADIRECTORY") or tempfile.gettempdir()) 
    8790                filename = dummyfile.name 
    8891                try : 
     
    113116 
    114117        # Use a temporary file, always seekable contrary to standard input. 
    115         self.workfile = tempfile.NamedTemporaryFile(mode="w+b") 
     118        self.workfile = tempfile.NamedTemporaryFile(mode="w+b", 
     119                                                    prefix="pkpgcounter_", 
     120                                                    suffix=".prn", 
     121                                                    dir=os.environ.get("PYKOTADIRECTORY") or tempfile.gettempdir()) 
    116122        self.filename = self.workfile.name 
    117123        while True :