From 4b084e5632f94cd1341a504bcf61eb4682f08662 Mon Sep 17 00:00:00 2001 From: Luc Papeleux <L.Papeleux@ULiege.be> Date: Wed, 26 Feb 2025 17:49:39 +0100 Subject: [PATCH] clear comments and fix form --- launch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launch.py b/launch.py index 8489a2f..126e45d 100755 --- a/launch.py +++ b/launch.py @@ -348,13 +348,13 @@ class LaunchJob(ParametricJob): pin.write(b'else:\n') pin.write(('\tprint ("metafor dir %s not found!")\n'%mtfdir).encode('utf-8')) pin.write(b'\tsys.exit()\n\n') + # .pythonrc.py # __file__ has to be defined (with absPath) to execute .pythonc.py + # + propre comme ca & donne un traceback quand ca va pas ... (thnks robo) pin.write(('rcfile = r"%s"\n'%os.path.join(mtfdir,'.pythonrc.py')).encode('utf-8')) pin.write(('script = open(rcfile, encoding="utf-8").read()\n').encode('utf-8')) pin.write(('exec(compile(script, rcfile, "exec"),{"__file__":rcfile})\n').encode('utf-8')) - - #pin.write(('__file__ = r"%s"\n'%os.path.join(mtfdir,'.pythonrc.py')).encode('utf-8')) - #pin.write(('exec(open(r"%s").read())\n'%os.path.join(mtfdir,'.pythonrc.py')).encode('utf-8')) + # battery pin.write(b'import toolbox.battery as b\n') pin.write(b'battery = b.Battery() \n') pin.write(b'battery.keepFacs = True\n') -- GitLab