terminal

installing pygame module for python 2.7.5 on terminal

扶醉桌前 提交于 2019-12-11 18:13:48
问题 i have already downloaded 32 bit pygame module on my mac osx 10.9.1 but i have no idea how to install it . I have tried different things but i am not able to get it working in terminal. I was able to easily download PIL package using terminal. Can Someone please give me all the steps for installing pygame? 回答1: Binary packages are available from http://www.pygame.org/download.shtml - just run the downloaded .dmg . If you've downloaded a source package, extract it and run python setup.py

Vim Ex mode loads when opening terminal

妖精的绣舞 提交于 2019-12-11 18:08:46
问题 I know little about Vim in terminal(Mac) and the other day I was working copy and pasting text and i think I accidently did it when in terminal. Now whenever I open terminal it instantly loads on Vim Ex mode. I know how to quit Ex mode once in terminal but is there any way i can get rid of Vim loading when I open Terminal? Thanks Edit: To explain further to what i mean when I open terminal.app from Utilities I get the following and the only way I get back to the command prompt is by typing

Why does the compgen command work in the Linux terminal but not with process::Command?

丶灬走出姿态 提交于 2019-12-11 17:54:00
问题 The command compgen works fine in the Linux Terminal, but causes a panic when using Command::new. My code: use std::process::Command; fn main() { let status = Command::new("compgen") .status() .expect("failed to execute process"); println!("process exited with: {}", status); } The error message: Compiling terminal v0.1.0 (file:///home/user/programmates/RUST/Terminal/terminal) Finished dev [unoptimized + debuginfo] target(s) in 0.66 secs Running `target/debug/terminal` thread 'main' panicked

kill doesn't actually terminate the ghost process

我的未来我决定 提交于 2019-12-11 17:24:38
问题 In order to terminate the ghost process (process which hasn't terminated properly and hence it still pending to be killed) I used the kill -9 <process-id> At times it works perfectly, and when I check the process after killing it, it is gone ps -aux | grep python However, surprisingly, now I am able to see the ghost process even after the kill command. What's the problem? In the image above, I tried to kill the process with id 23756 but it still appears in ps aux Referring to my answer to

Given two directory trees how to find which filenames are the same, considering only filenames satisfying a condition?

試著忘記壹切 提交于 2019-12-11 17:09:34
问题 This answer tells me how to find the files with the same filename in two directories in bash: diff -srq dir1/ dir2/ | grep identical Now I want to consider files which satisfy a condition. If I use ls E* , I get back files starting with E. I want to do the same with the above command: give me the filenames which are different in dir1/ and dir2/ , but consider only those starting with E. I tried the following: diff -srq dir1/E* dir2/E* | grep identical but it did not work, I got this output:

Python argparse seems not to support too long arguments?

我的未来我决定 提交于 2019-12-11 16:47:41
问题 i create an script with the following args: def arguments(): ''' gets arguments ''' parser = argparse.ArgumentParser( description="This scripts start the setup for the project, this setup is defined by the Core \ Module of each Setup, so first it download the scripts from that module and \ proceed to run them from a temporal directory installing the desired \ components and applying the configuration." ) parser.add_argument( "--project_name", help="The name for the project", type=str,

basic unix ./ syntax

可紊 提交于 2019-12-11 16:28:42
问题 I'm compiling c++ programs from the OS X Terminal: > g++ a.cpp I then the run the program from the terminal: > ./a.out What does the ./ syntax mean? Is this somehow related to ./run ? 回答1: . means "the current directory", so ./a.out means "the file named a.out in the current directory". If you were to type simply a.out , without the ./ , then the system would look through the directories on the path ( $PATH ) to find the program, instead of looking in the current directory. 回答2: dot-slash is

npm global install path got totally screwed up

江枫思渺然 提交于 2019-12-11 16:17:10
问题 I tried dealing with the Node.js permission issue for installing new modules and in the process it got totally screwed up so when I install something globally, it just doesn't have a terminal function. For instance, the default path used to be /usr/local/lib/node_modules, but right now whenever I install something with npm -g, it installs it in my OSX home folder (!!) and it is not accessible globally. I tried removing everything, reinstalling Node.js, nothing helps. It all happened after

How to run multiple lines of commands in Terminal from AppleScript?

自闭症网瘾萝莉.ら 提交于 2019-12-11 16:09:29
问题 Please refer to this question first, unable to read opensslv.h:No such file or directory Based on that I need to run the following three line Terminal commands using AppleScript, /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared make -f /tmp/ssl/openssl-1.0.1h/Makefile sudo make -f /tmp/ssl/openssl-1.0.1h/Makefile install I tried two methods I created text files with .command and .sh extensions and added the above three lines. Then tried to run it from