Re: Why exception from os.path.exists()?

2018-06-09 Thread Chris Angelico
On Sun, Jun 10, 2018 at 5:53 AM, Ed Kellett wrote: > On 2018-06-08 03:42, Chris Angelico wrote: >> Apart from the one odd bug with SimpleHTTPServer not properly sending >> back 500s, I very much doubt that the original concern - namely that >> os.path.exists() and os.stat() raise ValueError if the

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Gene Heskett
On Saturday 09 June 2018 20:33:06 Steven D'Aprano wrote: > On Sat, 09 Jun 2018 13:48:17 +0300, Marko Rauhamaa wrote: > > Richard Damon : > >> Copyright law is not what makes something 'closed source' in the > >> eyes of the Open Source community. For example, Microsoft doesn't > >> use Copyright t

Re: FULLSCREEN and DOUBLEBUF

2018-06-09 Thread Mark Lawrence
On 09/06/18 20:31, Paul St George wrote:     print pygame.display.get_surface() gives and     print screen.get_flags() gives -2147483648 The lists of flags at and

Re: Why exception from os.path.exists()?

2018-06-09 Thread Ed Kellett
On 2018-06-08 03:42, Chris Angelico wrote: > Apart from the one odd bug with SimpleHTTPServer not properly sending > back 500s, I very much doubt that the original concern - namely that > os.path.exists() and os.stat() raise ValueError if therels a %00 in > the URL - can be abused effectively. Dism

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Marko Rauhamaa
Richard Damon : > On 6/9/18 6:48 AM, Marko Rauhamaa wrote: >> It would leak out with developers who move to new jobs. And that would >> be good. > > If you plan on eliminating not only copyright, but trade secret and > non-disclosure laws, sure, maybe. Yes probably some limited stuff > would leak.

Re: Problem finding my folder via terminal

2018-06-09 Thread Lee Congdon
On Sat, Jun 9, 2018 at 4:45 PM T Berger wrote: > [snip] > Sorry. That's terrible. But I did run the code a number of times > correctly. I just did it again and got the same key icon: > > Last login: Sat Jun 9 13:26:14 on ttys000 > 192:~ TamaraB$ cd Desktop/mymodules/dist > 192:dist TamaraB$ d

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Chris Angelico
On Sun, Jun 10, 2018 at 1:07 PM, Gregory Ewing wrote: > Richard Damon wrote: >> >> Our current computing environment grew out of the ability for companies >> to make a profit out of the sales of software. Without the base of >> commercial software, the demand for inexpensive hardware to run it on

Re: Problem finding my folder via terminal

2018-06-09 Thread Cameron Simpson
On 09Jun2018 22:57, Tamara Berger wrote: Thanks for the help. I was just following the coding in the workbook when I inserted sudo. Fair enough too. But generally, in future, consider any command prefixed with sudo with some suspicion. Sometimes it is the sensible thing to do, but many many

Re: Problem finding my folder via terminal

2018-06-09 Thread Cameron Simpson
On 09Jun2018 22:50, Tamara Berger wrote: On Sat, Jun 9, 2018 at 5:05 AM Cameron Simpson wrote: A third possibility is that you made a mymodules somewhere else (such as in your top level home directory), and later decided to put it on your Desktop to make it easy to find/access. I did save it

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Gregory Ewing
Richard Damon wrote: Our current computing environment grew out of the ability for companies to make a profit out of the sales of software. Without the base of commercial software, the demand for inexpensive hardware to run it on wouldn't be there, and computers then would be expensive, and a lim

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Gregory Ewing
Richard Damon wrote: If software providers could no longer depend on Copyright law, then you would see much more use of the hobbling copy protection technologies, Maybe so, but that has nothing to do with open source, since, as you say, the sort of people that don't want their binaries copied d

Re: Problem finding my folder via terminal

2018-06-09 Thread Tamara Berger
Hi Cameron, Thanks for the help. I was just following the coding in the workbook when I inserted sudo. What you said about it makes a lot of sense. Again, thanks for all your help. Tamara On Sat, Jun 9, 2018 at 5:49 PM Cameron Simpson wrote: > > On 09Jun2018 10:48, Tamara Berger wrote: > >I wa

Re: Problem finding my folder via terminal

2018-06-09 Thread Tamara Berger
On Sat, Jun 9, 2018 at 5:05 AM Cameron Simpson wrote: > > A third possibility is that you made a mymodules somewhere else (such as in > your top level home directory), and later decided to put it on your Desktop to > make it easy to find/access. I did save it in My Documents first and then moved

Re: user defined modules

2018-06-09 Thread Albert-Jan Roskam
On 5 Jun 2018 09:32, Steven D'Aprano wrote: On Mon, 04 Jun 2018 20:13:32 -0700, Sharan Basappa wrote: > Is there a specific location where user defined modules need to be kept? > If not, do we need to specify search location so that Python interpreter > can find it? Python modules used as s

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Chris Angelico
On Sun, Jun 10, 2018 at 11:52 AM, Steven D'Aprano wrote: > I think the wise thing is to have *just enough* copyright but not too > much. Zero is not enough, but what we have now is too much. > Agreed. If copyright lapsed by default after ten years but could be extended through paid registration t

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Steven D'Aprano
On Sat, 09 Jun 2018 13:02:30 -0400, Richard Damon wrote: > On 6/9/18 6:48 AM, Marko Rauhamaa wrote: >> Richard Damon : >>> Copyright law is not what makes something 'closed source' in the eyes >>> of the Open Source community. For example, Microsoft doesn't use >>> Copyright to keep the source cod

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Steven D'Aprano
On Sat, 09 Jun 2018 13:48:17 +0300, Marko Rauhamaa wrote: > Richard Damon : >> Copyright law is not what makes something 'closed source' in the eyes >> of the Open Source community. For example, Microsoft doesn't use >> Copyright to keep the source code for Windows secret, they just don't >> provi

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Marko Rauhamaa
Richard Damon : > In the comparison to science, I would say that my guess is that a LOT > more science is being done by private companies being encouraged by > the promise of Patent protection than by the support of the general > public. Admittedly, there are likely significant differences in focus

Re: Problem finding my folder via terminal

2018-06-09 Thread Cameron Simpson
On 09Jun2018 10:48, Tamara Berger wrote: I want to read your last two emails in the evening when I have more time to digest the information, but I have a quick question now. I made the correction you suggested to mymodule and went on to create a source distribution file. Then I got stuck again

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Richard Damon
On 6/9/18 3:06 PM, Marko Rauhamaa wrote: > Richard Damon : > >> On 6/9/18 6:48 AM, Marko Rauhamaa wrote: >>> It would leak out with developers who move to new jobs. And that would >>> be good. >> >> If you plan on eliminating not only copyright, but trade secret and >> non-disclosure laws, sure, m

Re: Problem finding my folder via terminal

2018-06-09 Thread T Berger
On Saturday, June 9, 2018 at 3:30:39 PM UTC-4, MRAB wrote: > On 2018-06-09 18:48, T Berger wrote: > [snip] > > > I want to read your last two emails in the evening when I have more time to > > digest the information, but I have a quick question now. I made the > > correction you suggested to mym

Re: FULLSCREEN and DOUBLEBUF

2018-06-09 Thread Richard Damon
On 6/9/18 3:31 PM, Paul St George wrote: > So... > >     print pygame.display.get_surface() > gives > > > and >     print screen.get_flags() > gives > -2147483648 > > The lists of flags at > > and >

Re: Problem finding my folder via terminal

2018-06-09 Thread MRAB
On 2018-06-09 18:48, T Berger wrote: [snip] I want to read your last two emails in the evening when I have more time to digest the information, but I have a quick question now. I made the correction you suggested to mymodule and went on to create a source distribution file. Then I got stuck a

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-09 Thread Paul St George
On 08/06/18 09:00, Paul St George wrote: Excellent. Now I know what to do in this instance and I understand the principle. I hesitantly tried this: screen = pygame.display.set_mode((720,480), pygame.FULLSCREEN | pygame.DOUBLEBUF) Hesitantly because I expected the *bitwise or operator

In Pandas, can you do groupby in on two different datasets?

2018-06-09 Thread C W
Dear all, I want find the average ratings of movies by movieId. Below is ratings.head() of the dataset. > ratings.head() userId movieId rating timestamp parsed_time 0 12 3.5 1112486027 2005-04-02 23:53:47 1 1 29 3.5 1112484676 2005-04-02 23:31:16 2

Re: Problem finding my folder via terminal

2018-06-09 Thread T Berger
On Saturday, June 9, 2018 at 5:05:25 AM UTC-4, Cameron Simpson wrote: > On 09Jun2018 02:37, Gene Heskett wrote: > >On Saturday 09 June 2018 01:36:17 Tamara Berger wrote: > >> Re inline style: When I hit reply, this is the window I get. > > The python-list server strips attachments, so I didn't ge

Re: Python System Error

2018-06-09 Thread Mark Lawrence
On 09/06/18 17:12, deon gordon wrote: Greetings, confirm 1b131414ca21eea0843469f76454389f1e9ceebe I am using Window 7 Professional (32bit). I downloaded and installed python-3.6.5.exe and have an error after several attempts to install and repair. Python-system error api-mis-win-crt-runtime

Python System Error

2018-06-09 Thread deon gordon
Greetings, confirm 1b131414ca21eea0843469f76454389f1e9ceebe I am using Window 7 Professional (32bit). I downloaded and installed python-3.6.5.exe and have an error after several attempts to install and repair. Python-system error api-mis-win-crt-runtime-l1-1-0.dll is missing from your computer

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Richard Damon
On 6/9/18 6:48 AM, Marko Rauhamaa wrote: > Richard Damon : >> Copyright law is not what makes something 'closed source' in the eyes >> of the Open Source community. For example, Microsoft doesn't use >> Copyright to keep the source code for Windows secret, they just don't >> provide it. > It would

Re: Obsolete method in the html module

2018-06-09 Thread Terry Reedy
On 6/9/2018 4:07 AM, Vincent Vande Vyvre wrote: In Python-3.7.0b5 we can find at the end of html/parser.py:     def unescape(self, s):     warnings.warn('The unescape method is deprecated and will be removed '   'in 3.5, use html.unescape() instead.',   

Re: Inverting a conditional function

2018-06-09 Thread Terry Reedy
On 6/9/2018 5:54 AM, Steven D'Aprano wrote: I frequently have a function which tests some condition, returning True or False, and want a function which reverses the condition. If all I wanted was the result of calling the function, I could say not condition(x) and be done with it, but I w

plotly / dash export data

2018-06-09 Thread duncan smith
Hello, I have been trying to work out how to export data from a dash application. I know little about html or javascript. I can upload data into a table as per the example at https://github.com/plotly/dash-core-components/pull/73. I can edit the data in the table. But I can't find a way of ex

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Marko Rauhamaa
Richard Damon : > Copyright law is not what makes something 'closed source' in the eyes > of the Open Source community. For example, Microsoft doesn't use > Copyright to keep the source code for Windows secret, they just don't > provide it. It would leak out with developers who move to new jobs. A

Obsolete method in the html module

2018-06-09 Thread Vincent Vande Vyvre
Not really important, just a comment. In Python-3.7.0b5 we can find at the end of html/parser.py:     def unescape(self, s):     warnings.warn('The unescape method is deprecated and will be removed '   'in 3.5, use html.unescape() instead.',   Deprec

Re: Stefan's headers [was:Names and identifiers]

2018-06-09 Thread Richard Damon
On 6/9/18 1:07 AM, Gregory Ewing wrote: > Chris Angelico wrote: >> Open source would not exist without copyright,because it is >> copyright law that gives license terms their meaning. > > That statement doesn't make any sense. If there were no > copyright laws, there would be no need for licences t

Inverting a conditional function

2018-06-09 Thread Steven D'Aprano
I frequently have a function which tests some condition, returning True or False, and want a function which reverses the condition. If all I wanted was the result of calling the function, I could say not condition(x) and be done with it, but I want a new function. I've been doing this:

Re: Problem finding my folder via terminal

2018-06-09 Thread Cameron Simpson
On 09Jun2018 02:37, Gene Heskett wrote: On Saturday 09 June 2018 01:36:17 Tamara Berger wrote: Re inline style: When I hit reply, this is the window I get. The python-list server strips attachments, so I didn't get the screenshot you may have attached. However... I don't get my previous e

Re: Problem finding my folder via terminal

2018-06-09 Thread Gregory Ewing
Gene Heskett wrote: Finder, if thats what you are using, I am not familiar with it, is probably showing you that which it has cached, before that folder was created. The Finder is usually pretty good at noticing things like that. I just tried creating a directory using a shell command while t