i use ipython notebook and I want to call a terminal command: fft <in> <out>
my "fft" is in my $PATH so using a terminal, this would work.
How can I run this command in my ipython notebook?
the problem is that my fft executable is in my $PATH folder, and python won't recognize this
Found the solution:
import os
os.system("xterm -e 'bash -c \"fft -i 3 AddedK AddedK_ifft; exit -f exec bash\"' ")
xterm
opens a new terminal
fft ...;
calls the function fft
exit -f
closes the terminal
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments