Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have two files in the same directory:
index.php excel.py
I tried to call excel.py in file index.php like:
excel.py
index.php
$buff = system('python excel.py ' . $handle->file_dst_pathname, $retval);
I use Windows 10
d:\path python excel.py
C:\python27\> python file.py
exec("C:\Python27\python.exe C:\dir...\file.py")
Try it like this,
exec("C:\Python27\python.exe C:\dir...\file.py");
The problem is you must call C:\Python27\python.exe Python exe file before python file.
C:\Python27\python.exe
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
d:\path python excel.pyC:\python27\> python file.pyexec("C:\Python27\python.exe C:\dir...\file.py")have you tried it like this?