Re: unable to resolve readline issues

2022-12-05 Thread Mats Wichmann

On 12/4/22 13:08, Eryk Sun wrote:

On 12/2/22, biglee12...@gmail.com  wrote:


 From this point on Python became unusable as I uninstalled rebooted then
reinstalled to find I have the same issues as stated.  Finally uninstalled
Python as it doesn't perform as usual especially trying to understand the
use of pyreadline, gnureadline and or just readline.


When Python runs interactively, it implicitly tries to import the
readline module. On POSIX, Python has a builtin readline module that
usually uses the GNU Readline library.

On Windows, Python does not include a readline module. Instead, if
standard I/O is a console, the high-level WinAPI ReadConsoleW()
function is used, which implements its own line editor and
command-line history. It's not as general, flexible, or capable as the
readline interface, so a third-party pyreadline package was
implemented for Windows. However, as far as I know, pyreadline is no
longer actively developed. Thus it has out-of-date code, which may be
broken in newer releases of Python, such as isinstance(x,
collections.Callable).

Your choice is to either patch pyreadline to fix the bug or uninstall it.


there is a pyreadline3

I tried it for a particular case and didn't have a whole lot of luck 
with it, so YMMV, but somebody has done the porting work to keep it more 
current.




--
https://mail.python.org/mailman/listinfo/python-list


on the python paradox

2022-12-05 Thread Sabrina Almodóvar
  The Python Paradox
 Paul Graham
 August 2004

In a recent talk [1] I said something that upset a lot of people: that
you could get smarter programmers to work on a Python project than you
could to work on a Java project.

I didn't mean by this that Java programmers are dumb. I meant that
Python programmers are smart. It's a lot of work to learn a new
programming language. And people don't learn Python because it will
get them a job; they learn it because they genuinely like to program
and aren't satisfied with the languages they already know.

Which makes them exactly the kind of programmers companies should want
to hire. Hence what, for lack of a better name, I'll call the Python
paradox: if a company chooses to write its software in a comparatively
esoteric language, they'll be able to hire better programmers, because
they'll attract only those who cared enough to learn it. And for
programmers the paradox is even more pronounced: the language to
learn, if you want to get a good job, is a language that people don't
learn merely to get a job.

Only a few companies have been smart enough to realize this so
far. But there is a kind of selection going on here too: they're
exactly the companies programmers would most like to work for. Google,
for example. When they advertise Java programming jobs, they also want
Python experience.

A friend of mine who knows nearly all the widely used languages uses
Python for most of his projects. He says the main reason is that he
likes the way source code looks. That may seem a frivolous reason to
choose one language over another. But it is not so frivolous as it
sounds: when you program, you spend more time reading code than
writing it. You push blobs of source code around the way a sculptor
does blobs of clay. So a language that makes source code ugly is
maddening to an exacting programmer, as clay full of lumps would be to
a sculptor.

At the mention of ugly source code, people will of course think of
Perl. But the superficial ugliness of Perl is not the sort I
mean. Real ugliness is not harsh-looking syntax, but having to build
programs out of the wrong concepts. Perl may look like a cartoon
character swearing, but there are cases where it surpasses Python
conceptually.

So far, anyway. Both languages are of course moving targets. But they
share, along with Ruby (and Icon, and Joy, and J, and Lisp, and
Smalltalk) the fact that they're created by, and used by, people who
really care about programming. And those tend to be the ones who do it
well.

(*) Footnotes

[1] Audio of the talk, also attached to this post
http://origin.conversationsnetwork.org/Paul%20Graham%20-%20Great%20Hackers.mp3
-- 
https://mail.python.org/mailman/listinfo/python-list