Filenames for gnuplot via env-vars

To not have hardcoded filenames in gnuplot script

https://wiki.ubuntuusers.de/Gnuplot/#Stapelverarbeitung-Zugriff-auf-Umgebungsvariablen
This commit is contained in:
2018-09-21 18:04:19 +02:00
parent 5e7f718b45
commit 111fc38881
2 changed files with 11 additions and 5 deletions

View File

@@ -213,7 +213,11 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
os.path.join( type(self).gnuplot_script_dir,
job.script + ".plt" ) ) )
subprocess.call( cmd, cwd=self.wdir )
plt_env = os.environ.copy()
plt_env["INFILE"] = type(self).csv_file
plt_env["OUTFILE"] = job.image
subprocess.call( cmd, cwd=self.wdir, env=plt_env )
def main(*args):