Skip to content
Snippets Groups Projects
Commit 706f3eb2 authored by Papeleux Luc's avatar Papeleux Luc
Browse files

fix launchgui since .pythonrc.py has been rewritten

parent 4297731e
No related branches found
No related tags found
No related merge requests found
......@@ -340,7 +340,7 @@ class LaunchJob(ParametricJob):
# filling command to battery
pin.write(b'import sys, os, os.path\n')
if self.debug:
if 1 : #self.debug:
pin.write(b'print ("sys.path = ", sys.path)\n')
pin.write(b'print ("os.getcwd() = ", os.getcwd())\n')
pin.write(('if os.path.isdir(r"%s"):\n'%mtfdir).encode('utf-8'))
......@@ -348,6 +348,8 @@ 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')
print(('__file__ = r"%s"\n'%os.path.join(mtfdir,'.pythonrc.py')).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'))
pin.write(b'import toolbox.battery as b\n')
pin.write(b'battery = b.Battery() \n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment