command-prompt

Incomprehensible output of the python program in the Windows Terminal

Incomprehensible output of the python program in the Windows Terminal Question: I wrote a very ordinary python program. Print numbers from 0 to 50. But the work of the program in the Windows Terminal was absolutely incomprehensible to me. Although in the settings there is "Command Prompt" as the default terminal application, at startup .py …

Total answers: 1

Tensor flow won't install using PIP? "No matching distribution found for tensorflow"

Tensor flow won't install using PIP? "No matching distribution found for tensorflow" Question: Command Prompt screenshot of the error Pip won’t install Tensorflow, I am using 64bit Python 3.11.1. I have download the Cuda toolkit. Using a 1050ti as the GPU. How do i get this to install? Downloaded Anaconda but that doesnt seem to …

Total answers: 1

Open any program from cmd in python

Open any program from cmd in python Question: I want to open a program in Python in a path error in cmd: The system cannot find the file steam.exe. import os os.system(‘start steam.exe "D:Program Files (x86)Steam"’)“` Asked By: Mohammad Garousi || Source Answers: use subprocess: import subprocess subprocess.call([‘D:Program Files (x86)Steam\steam.exe’]) Answered By: Zack Walton

Total answers: 1

pygame.error "couldn't open image.png" only in command prompt

pygame.error "couldn't open image.png" only in command prompt Question: I’ve got a very simple python program I wrote to learn pygame, and among other things I use an image. When I run the program with PyCharm, or when I run it by double-clicking on the file, it works fine. However, if I try to run …

Total answers: 3

What do the three arrow (">>>") signs mean?

What do the three arrow (">>>") signs mean? Question: I haven’t been able to figure out what the >>> does, even though I often see it often in source code. Asked By: Dumle29 || Source Answers: You won’t see it in source code, it’s probably documentation. It indicates an interactive session, and things typed into …

Total answers: 6

remove last STDOUT line in Python

remove last STDOUT line in Python Question: I am trying to figure out how to suppress the display of user input on stdout. raw_input() followed by any print statement preserves what the user typed in. getpass() does not show what the user typed, but it does preserve the “Password:” prompt. To fix this, I would …

Total answers: 5

How to answer to prompts automatically with python fabric?

How to answer to prompts automatically with python fabric? Question: I want to run a command which prompts me to enter yes/no or y/n or whatever. If I just run the command local(“my_command”) then it stops and asks me for input. When I type what is needed, script continues to work. How can I automatically …

Total answers: 6

How do I change the default virtualenv prompt?

How do I change the default virtualenv prompt? Question: How do you change the default Virtualenvwrapper prompt? By default, working on a particular virtual environment with a command like workon <_name_of_env_> prepends the name of the virtualenv to your prompt. This may work poorly if you’re not using a default command prompt. Asked By: kevin …

Total answers: 5