terminal

Is there a single python module for colored text output in idle, Powershell and terminal?

狂风中的少年 提交于 2021-01-29 20:59:37
问题 I need a python module that prints a colored output text for input() and print() functions which works on idle, Powershell, and Linux consols. I am just expecting few colors (no extra background features required) and the same functions should work equally on python idle, PowerShell, terminal, and cmd with full flexibility of code. 回答1: You can use 'clrprint' module which works for idle, terminal and PowerShell too pip install clrprint from clrprint import * clrhelp() # print's available

Ubuntu: setting environment variables

微笑、不失礼 提交于 2021-01-29 20:51:13
问题 I need set environment variables for Android Studio project EVERY TIME when reboot or close terminal. (Ubuntu 14.04) For setting variables I use: export KEYSTORE_NAME=/home/anna/Documents/keys/NAME.keystore export KEYSTORE_NAME_PASSWORD=PASSWORD export KEY_NAME_ALIAS=NAME export KEY_NAME_PASSWORD=PASSWORD How can I set there variables forever? 回答1: Put those lines in /home/anna/.bashrc or in /home/anna/.bash_profile depending on which file you use. I think it is .bashrc in Ubuntu by default.

Error: EACCES: permission denied, unlink '/usr/local/bin/npx'

只谈情不闲聊 提交于 2021-01-29 19:57:05
问题 I tried to install npm install -g npm to update and I don't know if it was necessary but it failed. How do I give it permission to unlink? 回答1: try using sudo prefix and try run it again 来源: https://stackoverflow.com/questions/57814364/error-eacces-permission-denied-unlink-usr-local-bin-npx

Ubuntu: setting environment variables

≡放荡痞女 提交于 2021-01-29 18:30:40
问题 I need set environment variables for Android Studio project EVERY TIME when reboot or close terminal. (Ubuntu 14.04) For setting variables I use: export KEYSTORE_NAME=/home/anna/Documents/keys/NAME.keystore export KEYSTORE_NAME_PASSWORD=PASSWORD export KEY_NAME_ALIAS=NAME export KEY_NAME_PASSWORD=PASSWORD How can I set there variables forever? 回答1: Put those lines in /home/anna/.bashrc or in /home/anna/.bash_profile depending on which file you use. I think it is .bashrc in Ubuntu by default.

Is there a single python module for colored text output in idle, Powershell and terminal?

笑着哭i 提交于 2021-01-29 18:29:45
问题 I need a python module that prints a colored output text for input() and print() functions which works on idle, Powershell, and Linux consols. I am just expecting few colors (no extra background features required) and the same functions should work equally on python idle, PowerShell, terminal, and cmd with full flexibility of code. 来源: https://stackoverflow.com/questions/62933340/is-there-a-single-python-module-for-colored-text-output-in-idle-powershell-and

Reduce size of an image when it is fusioned with other using ImageMagick from terminal in Linux

和自甴很熟 提交于 2021-01-29 11:45:46
问题 I am having these two pictures, labeled 1.png and 2.png , respectively: When I run this code from ImageMagick in my Linux terminal: composite -blend 75 -gravity West 2.png 1.png prueba.png I get this result: However, I would like the logo ( 2.png ) to be half or one-third size reduced and placed in the bottom left corner. How can I do it from the terminal? 回答1: You can do that in ImageMagick by using the convert syntax. It is more flexible than the composite syntax. convert 1.png \( 2.png

Console does not show the entire answar from serial port

纵然是瞬间 提交于 2021-01-29 11:17:04
问题 I am working with BC66 modem from Quectel. On my program when I type some AT commands to the modem it can not show the entire response from the modem, but instead the reply of the AT command. see figur below: Instead using an terminal program and type the AT commands i got the status of my request. See figure below: This is what I am expecting in my program, but unfortunately not happened. The code snip: static void Main(string[] args) { if (InitPort() == true) { Console.WriteLine("Port

Vscode terminal doesnt display folder and branch

前提是你 提交于 2021-01-29 10:52:29
问题 Following is how I see the termial: Vscode for some reason does not display the folder name and git branch by default. I have vscode on another system with no custom settings made and it displays them plus the colours as well. vscode settings: { "workbench.colorTheme": "Monokai Dimmed", "workbench.iconTheme": "material-icon-theme", "terminal.integrated.copyOnSelection": true, "terminal.integrated.cursorBlinking": true, } 回答1: The folder name and branch in the terminal prompt come from the

How to dynamically update terminal output on multiple lines in python3?

余生长醉 提交于 2021-01-29 10:02:23
问题 I am trying to write a program that will emulated a 20x4 character LCD screen by printing data dynamically to a terminal. Currently I am just trying to get the output to the terminal to work but I can't figure out how to print on multiple lines concurrently without using new line characters. import time i = 0 for i in range(0, 9): print(str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i) + str(i

VS Code terminal history search, Windows, Powershell

人走茶凉 提交于 2021-01-29 09:29:38
问题 since version 1.43 the ctrl+r r keyboard shortcut has stopped working for powershell history searches. Is there another way to search in recently used commands? 回答1: I can't reproduce your issue. But you could try this keybinding in the meantime: { "key": "alt+r", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\u0012" } }, That sends a Ctrl + R to the terminal. Focus can be anywhere. That should trigger the reverse search of previous terminal commands. Does it do that