I want to run the following command via os.system(command
)
echo '@include("acf/rows.php")' >> ../functions.php
I can't seem to get the escaping of quotes right. How do I do this?
I want to run the following command via os.system(command
)
echo '@include("acf/rows.php")' >> ../functions.php
I can't seem to get the escaping of quotes right. How do I do this?
os.system('echo \'@include(\"acf/rows.php\")\' >> ../functions.php')
Works great thanks to @Tomothy32
Even better:
with open("../functions.php", "a") as functions:
functions.write("@import('acf/rows.php');")
Thanks to @deceze