Skip to content

Tag: command-line

Secrets pip not downloading MacOS

the secrets library is not downloading when I try to install the pip. My python is updated to 3.11.0. Wondering if that may be the issue? The last note leads me to believe that it is to do with the library itself. Answer A the error mentions: ImportError: Installing this module requires OpenSSL python binding…

How to use python -c “code here” with newlines?

The command runs the code inside the quotes successfully, both in Linux (bash) and Windows (cmd.exe). But how to pass code with newlines, with python -c? Example: both fail. Example use case: I need to send a SSH command (with paramiko) to execute a short Python code on a remote server, so I need to pass one …

How to output above the last printed line?

Is there a way in python to print something in the command line above the last line printed? Or, similarly to what I want to achieve, remain the last line intact, that is, not overwrite it. The goal of this is to let the last line in the command line a status/precentage bar. Output example: Next refresh: Next…