cmd

Run CMD command in python script in ANOTHER Shell

Run CMD command in python script in ANOTHER Shell Question: I am running a pogram "xxx" in the windows cmd shell. With a python script I want to check whether this specific process "xxx" is frozen or not. If so, it should reopen the process with os.system(r’xxx.bat’) but then the python script does no check …

Total answers: 2

Python output don't show in CMD

Python output don't show in CMD Question: If I run this script in CMD (or Git Bash – doesn’t matter) using python name.py, output will show only hello and not the return value. Why is that? I tried to reinstall python, add PATH, uninstall Anaconda and install only python from official website. Code is working …

Total answers: 1

How to run scripts in python?

How to run scripts in python without using subprocess module? (I don’t have that module) Question: How to run cmd codes like pip install matplotlib in python? I tried to use Stash, but it costs too much time and it cannot be run if I have a UIView. So, can someone help me? Asked By: …

Total answers: 1

Python script – API call fails due to JSON arguments

Python script – API call fails due to JSON arguments Question: I am trying to pull reports through a (shadowserver) API – doc here: The python script is written by ShadowServer and I have tested it with the simple usage example they are providing: $ ./call-api.py test/ping ‘{}’ {"pong":"2020-10-26 23:06:37"} Thus far, everything works fine. …

Total answers: 1

OSError: no library called "cairo-2" was found (from Custom_Widgets import ProjectMaker)

OSError: no library called "cairo-2" was found (from Custom_Widgets import ProjectMaker) Question: How to fix this error? C:UsersvanvlOneDriveBureaubladProgammerenProject 1.02.2>python Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from Custom_Widgets import ProjectMaker Traceback (most recent call last): File "<stdin>", line …

Total answers: 1

Python script pausing in cmd

Python script pausing in cmd Question: I am running a few Python scripts at the same time. They are running in windows CMD. I never knew that you can externally pause a Python script running in CMD. If I hold the mouse button for a few seconds the script pauses and not just the output …

Total answers: 2

My program freezes until the CMD command finishes ( Python 3 )

My program freezes until the CMD command finishes ( Python 3 ) Question: when I run my program and press a button, the function it has to do is performed, but the problem is that I cannot use the program until the function of the button I press has finished, it stays in "program does …

Total answers: 2

Python sendgrid library error when run from command line

Python sendgrid library error when run from command line Question: I have a sendgrid account set up and I can use it to send emails through python. When I run it in my spyder IDE it works great, but when run through the windows CMD i get <urlopen error unknown url type: https>. I tried …

Total answers: 1

How can I run several test files with Pytest?

How can I run several test files with Pytest? Question: I have a pytest project and a want to run tests from TWO python files. The project structure looks like this: at the root of the project there is a "tests" folder, it contains several folders "test_api1", "test_api2", "test_api3", each of them contains conftest.py and …

Total answers: 1

How to get the terminal full history

How to get the terminal full history Question: I am trying to save everything my python app printed in the cmd, every solution I found was to get the response of a command line using Popen from Subprocess; what I want is to get everything. Is there a built-in function for this purpose? or should …

Total answers: 3