Launching shell command with subprocess python (using ima)

Viewed 17

I am triing to launch a python file to pick every executable assembler file in my repo and launch them. For example this command launched with ima :

ima src/test/deca/codegen/valid/ReadFloat.ass < src/test/deca/codegen/valid/test.deca

Shell output : ok

But when i try to do this with subprocess :

subprocess.Popen(['ima','src/test/deca/codegen/valid/ReadFloat.ass','<','src/test/deca/codegen/valid/test.deca'], stdin=subprocess.PIPE)

I get an error :

Expected an option here, found src/test/deca/codegen/valid/ReadFloat.ass
Usage : /home/antoine/ensimag/GL/global/bin/ima-x86_64-Linux [options] fichier_assembleur

I don't know how to use subprocess Popen to get the right output (ok)

Regards,

0 Answers
Related