Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I want to run 'arp or config' commands on apache using python
from mod_python import apache
I have tested codes but the output is empty or command not found.
I think that i need to give permission to apache to access this command.
Use absolute commands:
/sbin/arp
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm following a Flask tutorial, in which I created a virtual environment to run the application.
To run the file, it asks me to run this command:
./run.py
as opposed to:
python run.py
What does the ./ do exactly and why is it necessary?
It is used because the current directory is not in $PATH. And the reason why it is not in the current directory on that list is security.
So in simple terms you can say that the ./ says 'search in the current directory for my script rather than searching at all the directories specified in $PATH'.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I'm using python to scan a pdf file by online antivirus so I used
import postfile
but there is an error:
ImportError: No module named postfile
could any one help me?
You need to read the VirusTotal docs. It explicitly mentions needing to copy this code into a local file called postfile.py
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
If I use py2exe to convert a .pyw to a .exe, will it run with a console open? I have some Python files I want to run in the background that I'm going to need to have on computers that don't have Python installed.
Use the windows parameter (instead of console) in your py2exe configuration, and no terminal window will appear.
Make a py2exe exe run without a console?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
May someone please tell me how to set up code in Python that will allow me to open an .exe file?
The file location is:
C:\Users\Public\Videos\Sample Videos\New Folder\ksp-win-0-21-1\KSP_win cosmetic mods
and the file is called:
KSP.exe
Shorter code would be preferred, but it does not matter that much.
I don't know if it would make a difference, but I am using a Windows 7 computer.
import subprocess
subprocess.call(["C:\Users\Public\Videos\Sample Videos\New Folder\ksp-win-0-21-1\KSP_win cosmetic mods\KSP.exe"])
Another way to run an exe is through the os.system command:
import os
os.system("Path\\to\\file.exe")
The os.system command will allow you to run commands as if they were in your command prompt.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have tried to search for tutorials nothing exists is it even possible if yes how.
Use the Shell function to execute "python.exe yourscript.py". Note that this assumes python.exe is in your PATH. Otherwise, use the full path to python, usually c:\Python27