Linked Questions
14 questions linked to/from Using a Python subprocess call to invoke a Python script
2
votes
2
answers
775
views
how to execute a python script from within a python script [duplicate]
I need to call the pdfminer top level python script from my python code:
Here is the link to pdfminer documentation:
https://github.com/pdfminer/pdfminer.six
The readme file shows how to call it ...
0
votes
1
answer
504
views
How to run a new terminal from a python script with an argument? [duplicate]
I'd like to call a python script (processing.py) within another python script (main.py). The processing.py enters a loop (realtime-processing some audiochannels from an interface) so that the main.py ...
677
votes
3
answers
562k
views
Find full path of the Python interpreter (Python executable)?
How do I find the full path of the currently running Python interpreter from within the currently executing Python script?
See How do I check which version of Python is running my script? if you are ...
vy32's user avatar
- 30.1k
60
votes
3
answers
37k
views
How to get the current Python interpreter path from inside a Python script? [duplicate]
I want to run a Python script from a Python script with subprocess, and I wish to do it using the same interpreter for each of them.
I'm using virtualenv, so I'd like to do something like:
...
3
votes
3
answers
18k
views
calling python script from another script
i'm trying to get simple python script to call another script, just in order to understand better how it's working. The 'main' code goes like this:
#!/usr/bin/python
import subprocess
subprocess.call(...
-1
votes
3
answers
780
views
DJANGO: executing other .py program from views.py
I've xmlparser.py. This .py parses a local XML file and then create/update objects from models SQLITE3 database.
This xmlparser.py file is in the same folder as views.py. Well, I wanna "execute" ...
0
votes
3
answers
484
views
How do you run a python file from another python file?
Im trying to run another file from my tkinter login system but i cant find the way to do it
Ive tried import file
if (p == '123') and (u == 'test'):
import correct
Im trying to run the file when ...
0
votes
2
answers
271
views
Running two different python script with different path using batch script
I need to execute two python script script1.py (path: dir1) and script2.py(path:dir2) in loop.In order to run this two script I need to give the python path. Earlier I used to manually set path and ...
0
votes
2
answers
157
views
How run python script with arguments via Python?
I have simple command and it's perfect work from cmd. But me need that I can run this using subprocess.call or subprocess.Popen function.
cmd command:
python3 <some directory>/tools/upload.py --...
1
vote
1
answer
175
views
Is it possible to run a python script from within another python script? [duplicate]
I have two python scripts, one moves video files from my downloads folder to a folder in my videos folder, the second is carykh's jumpcutter program https://github.com/carykh/jumpcutter . cary's ...
0
votes
1
answer
182
views
How to run a python file while one python file is running
I have two files main.py& test.py
Suppose the main file main.py is running and after a point of time I want to run test.py
I cannot use:
import test or os.system("python test.py") ...
0
votes
1
answer
140
views
Windows Environment Variables - Troubling accessing updated environment variables in program
I have wrote an initialization script that sets user environment variables which are keys that have been hashed and encrypted...Once the keys have been created the key encryption exe is no longer ...
1
vote
1
answer
88
views
What is the listing format of Popen and call in python subprcoess?
I was recently introduced to the useful subprocess library and its Popen and call methods to fork out processes from the python process. However, I am somewhat confused by the general rules of how to ...
0
votes
0
answers
22
views
Redirect to another .py with subprocess.popen & quit() the process, possible to open back previous .py?
For example:
If login result is success, redirect to main.py from login.py.
However, the problem is unable to use the subprocess.popen to open back login.py in main.py.
(Trying to logout to login.py)...