View Single Post
Old 01-13-2016, 06:42 PM   #53
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Quote:
Originally Posted by alutian View Post
Something in Library Codes writes to the Windows Temp directory, then reads from C:\Temp. Fine if the Temp directory is C:\Temp, but not if Windows Temp -> A:\Temp.

Alutian

@Alutian:

Yes, Library Codes does its magic by downloading data from multiple places on the internet to get different data to use to derive various Library Codes. It stores downloaded data temporarily in a temporary file, processes it, deletes it, and uses the processed results to update metadata.db table identifiers and custom columns for DDC and LCC.

Standard, generic Python functionality for OS temporary files is used.

In short, yes, Library Codes creates a generic OS (very) temporary file for each book it is processing.

Quote:
The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables
Quote:
Python searches a standard list of directories to find one which the calling user can create files in. The list is:
  1. The directory named by the TMPDIR environment variable.
  2. The directory named by the TEMP environment variable.
  3. The directory named by the TMP environment variable.
  4. A platform-specific location:
    • On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
    • On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
  5. As a last resort, the current working directory.


DaltonST

Last edited by DaltonST; 01-13-2016 at 06:50 PM. Reason: Added quote from Python documentation
DaltonST is offline   Reply With Quote