What does the Pydoc module do?

New to programming and python altogether. In the book I’m learning from, the author suggested I find out the purpose of Pydoc. I did a google search on it, and found a match (from Gnome Terminal) but it didn’t make much sense to me. Anyone mind simplifying a bit?

What does export PS1=”\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ ” mean in MacOS’ bash Terminal?

export is used to set environment variable in operating system. This variable will be available to all child processes created by current Bash process ever after. PS1 is the primary prompt which is displayed before each command, thus it is the one most people customize. read more: https://wiki.archlinux.org/index.php/Bash/Prompt_customization#Prompts And the statement: \[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$dictates how the prompt is going to look … Read more

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

The problem is that Xcode Command-line Tools needs to be updated. Solution #1 Go back to your terminal and enter: You’ll then receive the following output: You will then be prompted in a window to update Xcode Command Line tools. (which may take a while) Open a new terminal window and your development tools should … Read more

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

The problem is that Xcode Command-line Tools needs to be updated. Solution #1 Go back to your terminal and enter: You’ll then receive the following output: You will then be prompted in a window to update Xcode Command Line tools. (which may take a while) Open a new terminal window and your development tools should … Read more

How to execute a program or call a system command?

Use the subprocess module in the standard library: The advantage of subprocess.run over os.system is that it is more flexible (you can get the stdout, stderr, the “real” status code, better error handling, etc…). Even the documentation for os.system recommends using subprocess instead: The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. See the Replacing Older Functions with … Read more

How to open a “-” dashed filename using terminal?

This type of approach has a lot of misunderstanding because using – as an argument refers to STDIN/STDOUT i.e dev/stdin or dev/stdout .So if you want to open this type of file you have to specify the full location of the file such as ./- .For eg. , if you want to see what is in that file use cat ./-