alvarezcl
alvarezcl

Reputation: 579

Reading and Writing in Python Specific Issue

Something is wrong with my code but I'm not sure why it's wrong!

import os

os.system('cp $HOME/Documents/MATLAB/processFates.m $HOME/Documents/Outputs/test2')

write = open('matlabEx.submit','w+')

write.write("""
#$ -N matlab_example
#$ -o job.out
#$ -e job.error
#$ -cwd
#$ -S /bin/bash
#$ -pe orte 2
#$ -V

matlab -nodesktop -nosplash -r \"fwhm = processFates('FWHM',200)\"
"""

write.close()

os.system('qsub matlabEx.submit')

It's not writing the file. What is wrong?

Upvotes: 0

Views: 49

Answers (1)

user2357112
user2357112

Reputation: 281998

You forgot a closing parenthesis on the write.write call.

Upvotes: 4

Related Questions