I'm writing my script in Python, and I want to invoke a Perl script from it.
This is the line I want to call:
perl conv_intel_hex_2_verilog.pl arg1 arg2
while arg1 is the input from the Python script and arg2 is a new file that I'm creating.
So far I have this:
def main(argv):
file = open("test.hex", "w")
input = argv[0];
subprocess.call(["perl", "conv_intel_hex_2_verilog.pl", input]);
file.close();
This runs and does nothing.
And when I'm changing the
subprocess.call(["perl", "conv_intel_hex_2_verilog.pl", input]);
to
subprocess.call(["perl", "conv_intel_hex_2_verilog.pl", input ,file]);
it doesn't compile...
main, or just define it?perlscript just takes an output file name as an argument, you don't need to pre-create the file; just pass"test.hex"as the second argument , notfile.