I am trying to untar a tar file via popen (from platform import popen) and am running into problems. The command runs if I use the interactive script, but does not if I put it in a .py file and run it.
Basically, I change to to that directory and run popen("tar xvf the_tar.tar")
Why would these be different? How come it does not run in the script? Identical code between the interactive session and the script!
Edit:
The exact script is as follows
import os, time
from platform import popen
os.chdir("C:/testing/")
popen("tar -xvf the_tar.tar")
You should use the
tarfilelibrary: