terminal

output of [31m text instead of color

a 夏天 提交于 2020-07-06 07:43:24
问题 I am trying to print coloured text with colorama but when I compile an exe and run following... from colorama import Fore, Back, Style print(Fore.RED + 'text') print(Back.GREEN + 'and with a green background') print(Style.DIM + 'and in dim text') print(Style.RESET_ALL) print('back to normal now') I get output of:: Output: [31mtext [0m back to normal now Is it possible to print colors when compiling to pyinstaller exe or is this simply not possible? 回答1: On Windows, you have to initialize

How can I get nasm to work as a command in terminal in MacOS?

丶灬走出姿态 提交于 2020-07-05 03:32:05
问题 I have been trying to get nasm to work as a command in terminal, but nothing seems to be working. I just keep getting the error: nasm: error: unable to find utility "nasm", not a developer tool or in PATH So, first, I tried updating my PATH variable. I tried editing the PATH variable: safecrackers-MacBook-Pro-2:Library safecracker$ export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Libraries/nasm-2.14/ safecrackers-MacBook-Pro-2:Library safecracker$ nasm nasm: error: unable to

See what storage engine MySQL database uses via terminal

三世轮回 提交于 2020-07-04 08:47:11
问题 Is there a command in terminal for finding out what storage engine my MySQL database is using? 回答1: This is available in a few places. From the SHOW CREATE TABLE output. mysql> SHOW CREATE TABLE guestbook.Guestbook; +-----------+-------------------------------------------+ | Table | Create Table | +-----------+-------------------------------------------+ | Guestbook | CREATE TABLE `Guestbook` ( `NAME` varchar(128) NOT NULL DEFAULT '', `MESSAGE` text NOT NULL, `TIMESTAMP` varchar(24) DEFAULT

Visual Studio Code - Terminal Blank Screen

若如初见. 提交于 2020-07-02 06:01:52
问题 I've been using Visual Studio Code since it was in beta and one of the features I like best about it is the integrated terminal for using the Angular CLI in app. I've had it working fine since I had the laptop, but I re-installed Windows 10 over the Xmas break and obviously as a result had to re-install Visual Studio Code. Since then I've had issues with the Terminal, it's blank until you hit return, at which point you see the path, but not the usual copyright notice you should get from the

Visual Studio Code - Terminal Blank Screen

余生长醉 提交于 2020-07-02 06:00:07
问题 I've been using Visual Studio Code since it was in beta and one of the features I like best about it is the integrated terminal for using the Angular CLI in app. I've had it working fine since I had the laptop, but I re-installed Windows 10 over the Xmas break and obviously as a result had to re-install Visual Studio Code. Since then I've had issues with the Terminal, it's blank until you hit return, at which point you see the path, but not the usual copyright notice you should get from the

How do I exit or cancel inline commands in the terminal?

蹲街弑〆低调 提交于 2020-06-29 09:52:50
问题 If I'm in the Terminal and I want to exit or cancel a command how would I do so? Escape does nothing and hitting the up arrow copies the command. 回答1: Ctrl + C is used to kill a process with the signal SIGINT , and can be intercepted by a program so it can clean its self up before exiting, or not exit at all. Ctrl + Z is used for suspending a process by sending it the signal SIGSTOP , which cannot be intercepted by the program. Random fact: If you were writing a long command such as $ cd

Problem in ubuntu 16.04 :A problem occured while checking for updates

给你一囗甜甜゛ 提交于 2020-06-27 19:55:48
问题 Problem: I am currently facing a problem about the update checking error in Ubuntu 16.04. I have also included a photo. Also after this problem terminal is not working or not opening. So I can't open the terminal as well as software updater was not working currently. I also tried through system setting for update but still in system setting software and updates are not opening and working. What is solution for this? 回答1: try this sudo apt-get --reinstall install python3-minimal I too tried

terminal command to change Security and Privacy Advanced Setting

爱⌒轻易说出口 提交于 2020-06-26 14:36:35
问题 http://cdn.osxdaily.com/wp-content/uploads/2013/03/automatic-log-out-mac.jpg (picture of the setting I am trying to check) I am trying to figure out how to use a terminal command to check that setting and time limit. I have to use the terminal because I am trying to get it into my image so I can deploy it. Mac El Capitan System Preferences > Security & Privacy > Advanced > "Log out after 90 minutes of inactivity. Question: How do I change that setting from Terminal. Thanks in advance 回答1: The

How do I run a script on Linux just by double clicking it

孤者浪人 提交于 2020-06-25 21:06:42
问题 I have a script written (which are basically the commands for the terminal for Ubuntu) on a file. Yes, the code starts with #!/bin/bash How do I run this script just by double clicking it? It can be run using the terminal but I want to make it more accessible through my desktop. I was just trying to mimic a *.bat file on windows. A *.bat file on windows contains series of scripts operable on command prompt and executable just by double clicking on it. 回答1: Follow these steps: Hit Alt+F2 ,

xsel -o equivalent for OS X

為{幸葍}努か 提交于 2020-06-25 05:36:18
问题 Is there an equivalent solution to grab selected text in OS X as 'xsel -o' works for Linux? Just need the current selection so I can use the text in shell script. Cheers, Erik 回答1: You can probably install xsel on MacOS. (UPDATE: According to Arkku's comment, that will only work if you have the X11 server running and synchronized to the OS X pasteboard.) If not, a quick Google search turns up pbcopy / pbpaste , which apparently is pre-installed. Link: https://github.com/raymontag/keepassc