May-06-2019, 01:57 PM
Dear Python forum members,
I am trying to write and launch a python script through terminal at Mac OS Mojave, however I am getting this error:
The code I have is this:
Thank you very much fo your assistance.
Sincerely,
Aurimas
I am trying to write and launch a python script through terminal at Mac OS Mojave, however I am getting this error:
Error:$ python bandom_voronota_paleisti.py
> 3dvo.pdb1
sh: input_file: No such file or directory
The 3dvo.pdb1 file is in the exact location where I run the program from but it cannot be loaded through os.system, so I am puzzledThe code I have is this:
import sys, os input_file_v2 = raw_input('> ') input_file_v1 = open(input_file_v2, 'r+') input_file = input_file_v1.read() os.system("voronota get-balls-from-atoms-file --annotated < input_file") # doesn't work with input_fileShouldn't it be possible to run my external program (voronota) that is run through terminal simply with raw_input? I have tried it but received the same error when not setting the input file to be readable. However, after setting it I still get this error. What could be the problem?
Thank you very much fo your assistance.
Sincerely,
Aurimas