Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
added tempfile to get temp directory in example
  • Loading branch information
markschnitzer committed Jan 22, 2019
1 parent 4b342ef commit 28a4593c634af40bf0385a8ae209ac0afa609d69
Showing 1 changed file with 4 additions and 2 deletions.
@@ -55,6 +55,7 @@
import ocw.evaluation as evaluation
import ocw.metrics as metrics
import ocw.plotter as plotter
import tempfile

if sys.version_info[0] >= 3:
from urllib.request import urlretrieve
@@ -72,8 +73,9 @@
# Filename for the output image/plot (without file extension)
OUTPUT_PLOT = "wrf_bias_compared_to_knmi"

FILE_1_PATH = path.join('/tmp', FILE_1)
FILE_2_PATH = path.join('/tmp', FILE_2)
tempdir = tempfile.gettempdir()
FILE_1_PATH = path.join(tempdir, FILE_1)
FILE_2_PATH = path.join(tempdir, FILE_2)

if not path.exists(FILE_1_PATH):
urlretrieve(FILE_LEADER + FILE_1, FILE_1_PATH)

0 comments on commit 28a4593

Please sign in to comment.