Python REPL tab completion on MacOS

Apple does not ship GNU readline with OS X. It does ship BSD libedit which includes a readline compatibility interface. The system Pythons shipped by Apple and the 64-bit/32-bit Pythons from python.org installers are built with libedit. The problem is that the commands supported by libedit are completely different from those of readline (see for … Read more

Problems with the rails console, RVM and readline

I had a similar problem it was with 1.9.2 on Ubuntu 10.04, but the symptoms were identical. In order to get it to work: rvm pkg install readline or prior to RVM version 1.6.32, you need the following command rvm package install readline Then: apt-get install ncurses-dev And then taking from their instructions at http://rvm.beginrescueend.com/packages/readline/ … Read more

How to get synchronous readline, or “simulate” it using async, in nodejs?

Just in case someone stumbles upon here in future Node 11.7 added support for this using async await const readline = require(‘readline’); //const fileStream = fs.createReadStream(‘input.txt’); const rl = readline.createInterface({ input: process.stdin, //or fileStream output: process.stdout }); for await (const line of rl) { console.log(line) } Remember to wrap it in async function(){} otherwise you … Read more

What is the difference between File.ReadLines() and File.ReadAllLines()? [duplicate]

is there any performance difference related to these methods? YES there is a difference File.ReadAllLines() method reads the whole file at a time and returns the string[] array, so it takes time while working with large size of files and not recommended as user has to wait untill the whole array is returned. File.ReadLines() returns … Read more

How do I use vi keys in ipython under *nix?

In case someone’s wandering in here recently, IPython 5.0 switched from readline to prompt_toolkit, so an updated answer to this question is to pass an option: $ ipython –TerminalInteractiveShell.editing_mode=vi … or to set it globally in the profile configuration (~/.ipython/profile_default/ipython_config.py; create it with ipython profile create if you don’t have it) with: c.TerminalInteractiveShell.editing_mode=”vi”

Press alt + numeric in bash and you get (arg [numeric]) what is that?

The term you want to google for is: “readline arguments” This will lead to, for example, this chapter from the bash reference manual: You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the sign of the argument that is significant. If you pass a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)