|
778 | 778 | frun.write('start /B /D '+containername+" "+MATLABWIN+' -batch "run('+"'"+sourcecode+"'"+')"'+" >"+containername+"\\concoreout.txt\n") |
779 | 779 | fdebug.write('start /D '+containername+" cmd /K " +MATLABWIN+' -batch "run('+"'"+sourcecode+"'"+')"'+"\n") |
780 | 780 | else: |
781 | | - if langext=="py": |
782 | | - frun.write('(cd '+containername+";"+PYTHONEXE+" "+sourcecode+" >concoreout.txt&echo $!>concorepid)&\n") |
783 | | - if ubuntu: |
784 | | - fdebug.write('concorewd=`pwd`\n') |
785 | | - fdebug.write('xterm -e bash -c "cd $concorewd/'+containername+";"+PYTHONEXE+" "+sourcecode+';bash"&\n') |
786 | | - else: |
787 | | - fdebug.write('concorewd=`pwd`\n') |
788 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/'+containername+";"+PYTHONEXE+" "+sourcecode+'\\""\n') |
789 | | - elif langext=="cpp": # 6/22/21 |
790 | | - frun.write('(cd '+containername+";"+CPPEXE+" "+sourcecode+";./a.out >concoreout.txt&echo $!>concorepid)&\n") |
791 | | - if ubuntu: |
792 | | - fdebug.write('concorewd=`pwd`\n') |
793 | | - fdebug.write('xterm -e bash -c "cd $concorewd/'+containername+";"+CPPEXE+" "+sourcecode+';./a.out;bash"&\n') |
794 | | - else: |
795 | | - fdebug.write('concorewd=`pwd`\n') |
796 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/'+containername+";"+CPPEXE+" "+sourcecode+';./a.out\\""\n') |
797 | | - elif langext=="v": # 6/25/21 |
798 | | - frun.write('(cd '+containername+";"+VEXE+" "+sourcecode+";./a.out >concoreout.txt&echo $!>concorepid)&\n") |
799 | | - if ubuntu: |
800 | | - fdebug.write('concorewd=`pwd`\n') |
801 | | - fdebug.write('xterm -e bash -c "cd $concorewd/'+containername+";"+VEXE+" "+sourcecode+';./a.out;bash"&\n') |
802 | | - else: |
803 | | - fdebug.write('concorewd=`pwd`\n') |
804 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/'+containername+";"+VEXE+" "+sourcecode+';vvp a.out\\""\n') |
805 | | - elif langext=="sh": # 5/19/21 |
806 | | - frun.write('(cd '+containername+";./"+sourcecode+" "+ MCRPATH + " >concoreout.txt&echo $!>concorepid)&\n") |
807 | | - if ubuntu: |
808 | | - fdebug.write('concorewd=`pwd`\n') |
809 | | - fdebug.write('xterm -e bash -c "cd $concorewd/'+containername+";./"+sourcecode+' '+MCRPATH+';bash"&\n') |
810 | | - else: # 11/23/21 MCRPATH |
811 | | - fdebug.write('concorewd=`pwd`\n') |
812 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/'+containername+";./"+sourcecode+' '+MCRPATH+'\\""\n') |
813 | | - elif langext=="m": #3/23/21 |
814 | | - if M_IS_OCTAVE: |
815 | | - frun.write('(cd '+containername+";"+ OCTAVEEXE+' -qf --eval run\\(\\'+"'"+sourcecode+"\\'"+'\\)'+" >concoreout.txt&echo $!>concorepid)&\n") |
816 | | - if ubuntu: |
817 | | - fdebug.write('concorewd=`pwd`\n') |
818 | | - fdebug.write('xterm -e bash -c "cd $concorewd/'+containername+";"+OCTAVEEXE+' -qf --eval run\\(\\'+"'"+sourcecode+"\\'"+'\\);bash"&'+"\n") |
819 | | - else: |
820 | | - fdebug.write('concorewd=`pwd`\n') |
821 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/'+containername+";"+OCTAVEEXE+' -qf --eval run\\\\\\(\\\\\\'+"'"+sourcecode+"\\\\\\'"+'\\\\\\)\\""'+"\n") |
822 | | - else: # 4/2/21 |
823 | | - frun.write('(cd ' |
824 | | -+containername+";"+ MATLABEXE+' -batch run\\(\\'+"'"+sourcecode+"\\'"+'\\)'+" >concoreout.txt&echo $!>concorepid)&\n") |
825 | | - if ubuntu: |
826 | | - fdebug.write('concorewd=`pwd`\n') |
827 | | - fdebug.write('xterm -e bash -c "cd $concorewd/' +containername+";"+ MATLABEXE+' -batch run\\(\\'+"'"+sourcecode+"\\'"+'\\);bash"&\n' ) |
828 | | - else: |
829 | | - fdebug.write('concorewd=`pwd`\n') |
830 | | - fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd $concorewd/' +containername+";"+ MATLABEXE+' -batch run\\\\\\(\\\\\\'+"'"+sourcecode+"\\\\\\'"+'\\\\\\)\\""\n' ) |
831 | | - |
| 781 | + if langext == "py": |
| 782 | + frun.write('(cd "' + containername + '"; ' + PYTHONEXE + ' ' + sourcecode + ' >concoreout.txt & echo $! >concorepid) &\n') |
| 783 | + if ubuntu: |
| 784 | + fdebug.write('concorewd="$(pwd)"\n') |
| 785 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ' + PYTHONEXE + ' ' + sourcecode + '; bash" &\n') |
| 786 | + else: |
| 787 | + fdebug.write('concorewd="$(pwd)"\n') |
| 788 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ' + PYTHONEXE + ' ' + sourcecode + '\\"" \n') |
| 789 | + |
| 790 | + elif langext == "cpp": # 6/22/21 |
| 791 | + frun.write('(cd "' + containername + '"; ' + CPPEXE + ' ' + sourcecode + '; ./a.out >concoreout.txt & echo $! >concorepid) &\n') |
| 792 | + if ubuntu: |
| 793 | + fdebug.write('concorewd="$(pwd)"\n') |
| 794 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ' + CPPEXE + ' ' + sourcecode + '; ./a.out; bash" &\n') |
| 795 | + else: |
| 796 | + fdebug.write('concorewd="$(pwd)"\n') |
| 797 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ' + CPPEXE + ' ' + sourcecode + '; ./a.out\\"" \n') |
| 798 | + |
| 799 | + elif langext == "v": # 6/25/21 |
| 800 | + frun.write('(cd "' + containername + '"; ' + VEXE + ' ' + sourcecode + '; ./a.out >concoreout.txt & echo $! >concorepid) &\n') |
| 801 | + if ubuntu: |
| 802 | + fdebug.write('concorewd="$(pwd)"\n') |
| 803 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ' + VEXE + ' ' + sourcecode + '; ./a.out; bash" &\n') |
| 804 | + else: |
| 805 | + fdebug.write('concorewd="$(pwd)"\n') |
| 806 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ' + VEXE + ' ' + sourcecode + '; vvp a.out\\"" \n') |
| 807 | + |
| 808 | + elif langext == "sh": # 5/19/21 |
| 809 | + frun.write('(cd "' + containername + '"; ./' + sourcecode + ' ' + MCRPATH + ' >concoreout.txt & echo $! >concorepid) &\n') |
| 810 | + if ubuntu: |
| 811 | + fdebug.write('concorewd="$(pwd)"\n') |
| 812 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ./' + sourcecode + ' ' + MCRPATH + '; bash" &\n') |
| 813 | + else: |
| 814 | + fdebug.write('concorewd="$(pwd)"\n') |
| 815 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ./' + sourcecode + ' ' + MCRPATH + '\\"" \n') |
| 816 | + |
| 817 | + elif langext == "m": #3/23/21 |
| 818 | + if M_IS_OCTAVE: |
| 819 | + frun.write('(cd "' + containername + '"; ' + OCTAVEEXE + ' -qf --eval run(\\\'' + sourcecode + '\\\') >concoreout.txt & echo $! >concorepid) &\n') |
| 820 | + if ubuntu: |
| 821 | + fdebug.write('concorewd="$(pwd)"\n') |
| 822 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ' + OCTAVEEXE + ' -qf --eval run(\\\'' + sourcecode + '\\\'); bash" &\n') |
| 823 | + else: |
| 824 | + fdebug.write('concorewd="$(pwd)"\n') |
| 825 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ' + OCTAVEEXE + ' -qf --eval run(\\\\\\\'' + sourcecode + '\\\\\\\')\\"" \n') |
| 826 | + else: |
| 827 | + frun.write('(cd "' + containername + '"; ' + MATLABEXE + ' -batch run(\\\'' + sourcecode + '\\\') >concoreout.txt & echo $! >concorepid) &\n') |
| 828 | + if ubuntu: |
| 829 | + fdebug.write('concorewd="$(pwd)"\n') |
| 830 | + fdebug.write('xterm -e bash -c "cd \\"$concorewd/' + containername + '\\"; ' + MATLABEXE + ' -batch run(\\\'' + sourcecode + '\\\'); bash" &\n') |
| 831 | + else: |
| 832 | + fdebug.write('concorewd="$(pwd)"\n') |
| 833 | + fdebug.write('osascript -e "tell application \\"Terminal\\" to do script \\"cd \\\\\\"$concorewd/' + containername + '\\\\\\"; ' + MATLABEXE + ' -batch run(\\\\\\\'' + sourcecode + '\\\\\\\')\\"" \n') |
832 | 834 | if concoretype=="posix": |
833 | 835 | fstop.write('#!/bin/bash' + "\n") |
834 | 836 | i=0 # 3/30/21 |
|
906 | 908 | writeedges = volswr[i] |
907 | 909 | while writeedges.find(":") != -1: |
908 | 910 | if concoretype=="windows": |
909 | | - funlock.write('copy %HOMEDRIVE%%HOMEPATH%\concore.apikey' + writeedges.split(":")[0].split("-v")[1]+ "\\concore.apikey\n") |
| 911 | + funlock.write('copy %HOMEDRIVE%%HOMEPATH%\\concore.apikey' + writeedges.split(":")[0].split("-v")[1]+ "\\concore.apikey\n") |
910 | 912 | else: |
911 | 913 | funlock.write('cp ~/concore.apikey ' + writeedges.split(":")[0].split("-v")[1]+ "/concore.apikey\n") |
912 | 914 | writeedges = writeedges[writeedges.find(":")+1:] |
|
0 commit comments