Re: Python 0.9.1

2021-02-18 Thread Christian Gollwitzer

Am 16.02.21 um 22:57 schrieb Skip Montanaro:

A note to webmas...@python.org from an astute user named Hiromi in
Japan* referred
us to Guido's shell archives for the 0.9.1 release from 1991.



I then pushed the result to a Github repo:

https://github.com/smontanaro/python-0.9.1



That's a nice find!

Reading the README, it occured to me that it refers to the shell, awk 
and perl as contenders for Python[1], but not to Tcl. I would have 
thought that in 1991, Tcl was one of the obvious choices as an extension 
language. At that time, it had already progressed to version 6 [2]


Was Guido not aware of Tcl, or did he not think that it is a contender 
in the same area?


Christian




[1] "Python, an extensible interpreted programming language [...] can be 
used instead of shell, Awk or Perl scripts, to write prototypes of real 
applications, or as an extension language of large systems, you name it."


[2] https://wiki.tcl-lang.org/page/Tcl+chronology

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


Startup failure

2021-02-18 Thread Smit Patel
I recently downloaded python from your website and when I started using it,
it worked correctly but when I installed the random2 module it showed
startup failure and won't work again.
So, I uninstalled it and downloaded it again but it is showing the same
problem of startup failure.

Let me know if there is a way to resolve the problem.
Thank you
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Re: Python 0.9.1

2021-02-18 Thread Dan Stromberg
On Thu, Feb 18, 2021 at 9:39 PM David Mertz  wrote:

> As Skip pointed out to me privately, there are some minor limitations with
> this version.  E.g.:
>
> % python
> >>> import glob
> >>> import sys
> >>> print 'hello'
> hello
> >>> print 2+2
> 4
> >>> print 2*2
> Unhandled exception: run-time error: integer overflow
> Stack backtrace (innermost last):
>   File "", line 1
>

Huh.  I wonder what's different about my build:
$ /usr/local/cpython-0.9/bin/python
below cmd output started 2021 Thu Feb 18 10:24:00 PM PST
>>> 2*2
4
>>> print 2*2
4
>>>

You can download a script to build it and a bunch of other python versions
at https://stromberg.dnsalias.org/~strombrg/cpythons/
It includes all the tarballs you should need, at least for Debian. I
believe I used it on CentOS recently as well.  I haven't tried it on Ubuntu
in a while.
It depends on https://stromberg.dnsalias.org/~strombrg/cobble.html - and
I'd like to think that's its only external dependency.

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


RE: New Python implementation

2021-02-18 Thread Elliott Roper


Avi and Dennis--

Two thoughtful replies to a deep and interesting question. You have prodded me
to poke my head over the wall to offer a real world point of view.

In the early days before Modula II, I was contracting to a company, quite
large and respected, that had just chucked out Ratfor and adopted Pascal as
their main development tool on VAX-VMS. With long hindsight it was a not
insignificant factor in their going bust.

I was happily developing some of the best code I have ever written using Macro
on a J-11 PDP 11/73, so I was an innocent bystander, with my own OS, with
'borrowed' XDT and CRC table look-up software, courtesy of Dave Cutler and Stu
Wecker respectively. It was a front end for the main project, supporting 1024
terminals feeding 200 transactions a second into the VAX over raw ethernet on
a DEQNA. So I sure learned how to do linked lists, and do them quickly.

The main team was sharing a VAX-750. Watching them trying to use a teaching
language to do real world work was not a joy to behold.

You have both hit on a real-world problem. Script Kiddies and Stack Exchange


A comp sci course must use a real-world language to send confident
practitioners into the real world.

Python is an excellent choice in that regard.

Dennis' point about it being too good is valid. If it were my course (and
there is no chance of that) I'd do an extra credit module where they have to
mine and critique the cPython source etc. for lists and comprehensions and
itertools and all their uncles and aunts. After all c is the nearest they will
get to the metal.

I know this has to work. Two or three of the guys on that project were John
Lion's co-authors of the Red Book on Unix internals. They were awesome! (I
told you this was very long hindsight didn't I?)

On 18 Feb 2021 at 17:26:11 GMT, ""Avi Gross""  wrote:

> Dennis made the interesting comment "... Python has too much built in ..."
> 
> I understand his point. At the same time, I wonder what most people using
> computers today, or in the future, need. Given serious amounts of computer
> power, what many people may want is higher-level ways to get things done
> without worrying how they are done. Python, like many such languages, has a
> very basic core that is augmented by what could be libraries, packages,
> modules and so on but have been chosen to be built-in to one distribution or
> another.
> 
> Some people and organizations use some things so commonly, they want python
> to start up automatically loading say numpy and pandas and other such
> things. They may not care if the programmer knows how to make a linked list
> or binary tree data structure. Many such details are encapsulated within
> objects built and tested already. 
> 
> I have seen subjects taught at various levels and python might qualify too.
> I took a Physics course that required Calculus and used it to derive
> formulas and other things. Others took one that sort of threw equations at
> you without much explanation. I have even seen a course called Physics for
> Poets. But at least the poets taking it  knew science existed and perhaps to
> take it seriously when others who had studied it better shared their
> results, even if they have no interest in the methods.
> 
> We routinely have people learn how to use Word Processors or Spreadsheets
> with no clue on how to build such a thing or anything about the Object
> models used within or even knowing there is such a thing. Do they need to
> know how to use the embedded methods to extend things with Visual Basic or
> Javascript? They like getting closer to a WYSIWYG interface that handles
> most of their usual needs and perhaps farm out harder things to experts when
> needed.
> 
> So what if you teach some aspects of python that are needed all over, like
> how to make things conditional or in a loop, but not how to make every
> possible data structure. What if you deliberately do not teach functional
> aspects of the language at first or ever? For some people that is enough to
> enable them to then use additional instructions on how to find prepared and
> tested chunks to use, even if not always optimally or efficiently. For those
> who really want to be programmers, that still may actually be enough if
> their task is to work using the tools we have developed, not in making new
> tools from scratch. Quite a bit of programming today consists of reading
> manual pages and cobbling together chunks that together do the job.
> 
> But obviously I would choose the classes where I understood more. Many here
> would. But where does it end? Do most of us know how compilers or
> interpreters get built or do we just work on top of existing implementations
> others make available? Can you build an operating system from Scratch or
> make microchips to run them on?
> 
> If the goal is Computer USE literacy, I think python has more than enough if
> you include the modules that make hard things easy.
> 
> Just a thought. Admittedly it is hard these days t

Re: Python 2.7 and 3.9

2021-02-18 Thread Pieter van Oostrum
Ethan Furman  writes:

> On 2/16/21 12:09 PM, Kevin M. Wilson via Python-list wrote:
>
>> My employer has hundreds of scripts in 2.7, but I'm writing new
>> scripts in 3.9! I'm running into 'invalid syntax' errors.I have to
>> maintain the 'Legacy' stuff, and I need to mod the path et al., to
>> execute 3.7 w/o doing damage to the 'Legacy' stuff...IDEA' are
>> Welcome!
>
> My first idea/request: have a blank line, a line with only a '--'
> (without quotes), and then your signature at the bottom of your posts. 
> White space aids readability and readability counts.  :)

The separator line should be '-- ' (without quotes), i.e. with a trailing space.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem when scraping the 100 Movie titles.

2021-02-18 Thread Mats Wichmann

On 2/18/21 10:43 AM, Aakash Jana wrote:

I have done some webscraping before i think you need to get a slightly more
tactical way to get these titles scraped .
Try to see what classes identify the cards (in which movie title is given)
and then try to pull the heading out of those.
Try to get the divs in a list , something like this "" in my case and then try to
pull
the h3 tag out of it . Onething to note is react os single page heavy
webapps have seemed to be difficult to scrape maybe beautiful
isnt made for JSX .

On Thu, Feb 18, 2021 at 9:09 PM Bischoop  wrote:



I'm learning Scraping actually and would like to scrape the movie titles
from https://www.empireonline.com/movies/features/best-movies-2 .
In the course I was learning I was supposed to do it with bs4:


Just in general, most websites don't want you to scrape them, and some 
go to considerable efforts to make it difficult, and some explicitly 
disallow downloading any content except for caching purposes.  If the 
website provides an API, that's how they expect you go consume data that 
isn't render through a web browser.


Just sayin' ...  there's no reason not to learn the concepts of web 
scraping but should ALSO be aware of terms of use.


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


Re: Fw: Scipy installation

2021-02-18 Thread Paul Bryan
Can you describe what you tried, and how it failed? Pasting error
messages and such would be helpful.

On Thu, 2021-02-18 at 17:53 +, Mustafa Althabit via Python-list
wrote:
>  
> 
>    Hi,I am trying to install Scipy but it failed, I have python
> 3.9. I need your assistance with that. 
> Thank you Mustafa Althabit8133825988  

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


Fw: Scipy installation

2021-02-18 Thread Mustafa Althabit via Python-list
 

   Hi,I am trying to install Scipy but it failed, I have python 3.9. I need 
your assistance with that. 
Thank you Mustafa Althabit8133825988  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem when scraping the 100 Movie titles.

2021-02-18 Thread Aakash Jana
I have done some webscraping before i think you need to get a slightly more
tactical way to get these titles scraped .
Try to see what classes identify the cards (in which movie title is given)
and then try to pull the heading out of those.
Try to get the divs in a list , something like this "" in my case and then try to
pull
the h3 tag out of it . Onething to note is react os single page heavy
webapps have seemed to be difficult to scrape maybe beautiful
isnt made for JSX .

On Thu, Feb 18, 2021 at 9:09 PM Bischoop  wrote:

>
> I'm learning Scraping actually and would like to scrape the movie titles
> from https://www.empireonline.com/movies/features/best-movies-2 .
> In the course I was learning I was supposed to do it with bs4:
> titles = soup.find_all(name = 'h3', class_ = 'title')
>
> but after after a while I guess the site has changed and now the class
> is: jsx-2692754980
>
> 100) Stand By Me
>
> but anyway if I do try get those titles by name and class, my list is
> empty:
> titles = soup.find_all(name = 'h3', class_ = 'jsx-2692754980')
>
> I tried also selenium and manage get those titles with:
> driver.get('https://www.empireonline.com/movies/features/best-movies-2')
>
> #driver.find_element_by_xpath('/html/body/div/div[3]/div[5]/button[2]').click()
>
> titles = driver.find_elements_by_css_selector("h3.jsx-2692754980")
>
> tit=[]
> for e in titles:
> tit.append(e.text)
>
> print(tit)
>
> But in Chrome I get a popup asking to accept cookies and I need to
> click to accept them.
>
> Is someone here who knows how can I get those titles with BeautifulSoup
> and how to deal with
> cookies if using Selenium?
>
> --
> Thanks
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: New Python implementation

2021-02-18 Thread Avi Gross via Python-list
Dennis made the interesting comment "... Python has too much built in ..."

I understand his point. At the same time, I wonder what most people using
computers today, or in the future, need. Given serious amounts of computer
power, what many people may want is higher-level ways to get things done
without worrying how they are done. Python, like many such languages, has a
very basic core that is augmented by what could be libraries, packages,
modules and so on but have been chosen to be built-in to one distribution or
another.

Some people and organizations use some things so commonly, they want python
to start up automatically loading say numpy and pandas and other such
things. They may not care if the programmer knows how to make a linked list
or binary tree data structure. Many such details are encapsulated within
objects built and tested already. 

I have seen subjects taught at various levels and python might qualify too.
I took a Physics course that required Calculus and used it to derive
formulas and other things. Others took one that sort of threw equations at
you without much explanation. I have even seen a course called Physics for
Poets. But at least the poets taking it  knew science existed and perhaps to
take it seriously when others who had studied it better shared their
results, even if they have no interest in the methods.

We routinely have people learn how to use Word Processors or Spreadsheets
with no clue on how to build such a thing or anything about the Object
models used within or even knowing there is such a thing. Do they need to
know how to use the embedded methods to extend things with Visual Basic or
Javascript? They like getting closer to a WYSIWYG interface that handles
most of their usual needs and perhaps farm out harder things to experts when
needed.

So what if you teach some aspects of python that are needed all over, like
how to make things conditional or in a loop, but not how to make every
possible data structure. What if you deliberately do not teach functional
aspects of the language at first or ever? For some people that is enough to
enable them to then use additional instructions on how to find prepared and
tested chunks to use, even if not always optimally or efficiently. For those
who really want to be programmers, that still may actually be enough if
their task is to work using the tools we have developed, not in making new
tools from scratch. Quite a bit of programming today consists of reading
manual pages and cobbling together chunks that together do the job.

But obviously I would choose the classes where I understood more. Many here
would. But where does it end? Do most of us know how compilers or
interpreters get built or do we just work on top of existing implementations
others make available? Can you build an operating system from Scratch or
make microchips to run them on?

If the goal is Computer USE literacy, I think python has more than enough if
you include the modules that make hard things easy.

Just a thought. Admittedly it is hard these days to give a homework
assignment when the student can find a trivial way to get the result and not
do the hard work.


-Original Message-
From: Python-list  On
Behalf Of Dennis Lee Bieber
Sent: Thursday, February 18, 2021 12:45 AM
To: python-list@python.org
Subject: Re: New Python implementation

On Tue, 16 Feb 2021 11:03:33 +, Alan Gauld via Python-list
 declaimed the following:

>On 16/02/2021 07:35, Christian Gollwitzer wrote:
>> Am 16.02.21 um 06:36 schrieb dn:
>>> Pascal's value as a teaching language was that it embodied many 
>>> aspects of structured programming, and like Python, consisted of a 
>>> limited range of items which could be learned very quickly
>> 
>> ROFL. Maybe that was true for Python when it was first invented. 
>> Today it is not "a few simple things". Even just the core language,
>
>Python v1 was a good teaching language. v2 complicated it a bit but it 
>was still usable. v3 is no longer a good teaching language (unless 
>maybe you are teaching CompSci at university.)
>
>In fact in v3 things are so complex that I seriously considered 
>dropping Python as the core language for my programming tutorial.
>Until I started looking for an alternative, and there really isn't 
>anything much better. At least not that can also be used for real 
>projects once you've learned it.

Depending upon the course intentions, I'd say Python is useful for
teaching general programming and getting to usable real-world programs.

For CompSci /theory/, OTOH, Python has too much built in, and would
get in the way of having someone implement things like linked-lists, deques,
hashed structures -- ie; the stuff that lies behind all those Python
built-ins. Pascal, Modula-2 (or is it up to 3 now), or one of the other
system programming languages: Edison from
https://www.amazon.com/Programming-personal-computer-Brinch-Hansen/dp/013730
2673
Implement a hashed-head multiple-linked lis

Problem when scraping the 100 Movie titles.

2021-02-18 Thread Bischoop


I'm learning Scraping actually and would like to scrape the movie titles
from https://www.empireonline.com/movies/features/best-movies-2 . 
In the course I was learning I was supposed to do it with bs4:
titles = soup.find_all(name = 'h3', class_ = 'title')

but after after a while I guess the site has changed and now the class
is: jsx-2692754980

100) Stand By Me

but anyway if I do try get those titles by name and class, my list is
empty:
titles = soup.find_all(name = 'h3', class_ = 'jsx-2692754980')

I tried also selenium and manage get those titles with:
driver.get('https://www.empireonline.com/movies/features/best-movies-2')
#driver.find_element_by_xpath('/html/body/div/div[3]/div[5]/button[2]').click()

titles = driver.find_elements_by_css_selector("h3.jsx-2692754980")

tit=[]
for e in titles:
tit.append(e.text)

print(tit)

But in Chrome I get a popup asking to accept cookies and I need to
click to accept them.

Is someone here who knows how can I get those titles with BeautifulSoup and how 
to deal with
cookies if using Selenium?

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


EuroPython 2021: Volunteering

2021-02-18 Thread M.-A. Lemburg
The EuroPython 2021 organization is starting and we're looking for more
help with running the conference.

 * EuroPython 2021 *

   https://ep2021.europython.eu/

For EP2021, we are using a slightly different approach compared to
previous years:

- All new volunteers will first join the Plaza – our central
get-together place for all team members – and only later enter the
various work groups (WGs) we have for running the conference.

- Additionally, we will have on-boarding calls with everyone to get to
know each other and give an overview to the structures, information and
groups we have available, as well as the timeline.

If you are interested in helping, please write to
volunte...@europython.eu. Our team will then answer any questions you
may have and get you signed up for the next on-boarding call.


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/europytho-2021-volunteerng/

Tweet:

https://twitter.com/europython/status/1362416745814888451


Enjoy,
--
EuroPython 2021 Team
https://www.europython-society.org/

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