Re: Running Python from the source repo

2016-08-07 Thread Chris Angelico
On Mon, Aug 8, 2016 at 12:11 PM, Steven D'Aprano wrote: > I have cloned the Python source repo, and build CPython, as described here: > > https://docs.python.org/devguide/ > > > Now a little bit later, I want to update the repo, so I run: > > hg fetch > > to get and apply any changes. How do I kno

Running Python from the source repo

2016-08-07 Thread Steven D'Aprano
I have cloned the Python source repo, and build CPython, as described here: https://docs.python.org/devguide/ Now a little bit later, I want to update the repo, so I run: hg fetch to get and apply any changes. How do I know if I need to rebuild Python? I don't want to have to rebuild after eve

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Steven D'Aprano
On Mon, 8 Aug 2016 09:19 am, Rick Johnson wrote: > On Saturday, August 6, 2016 at 10:43:01 PM UTC-5, Steven D'Aprano wrote: > >> Yes. The two ways of ending the loop are distinct and different: >> >> - reach the end, and stop; >> - bail out early. >> >> >> When you read a book, there are two w

Re: Awful code of the week

2016-08-07 Thread Steven D'Aprano
On Mon, 8 Aug 2016 08:03 am, Tim Delaney wrote: > On 7 August 2016 at 16:54, Steven D'Aprano < > steve+comp.lang.pyt...@pearwood.info> wrote: > >> Seen in the office IRC channel: >> >> >> (13:23:07) fred: near_limit = [] >> (13:23:07) fred: near_limit.append(1) >> (13:23:07) fred: nea

Re: Win32 API in pywin32

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 6:50:28 PM UTC-5, jj0ge...@gmail.com wrote: > According to Python.org Mark Hammond has an Add-on > (pywin32) that supports Win32 and COM. Does anyone know if > the Add-on covers all Win32 API functions, and if not is > there a list of the subset of Win32 API function

Re: Win32 API in pywin32

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 6:58:05 PM UTC-5, Lawrence D’Oliveiro wrote: > On Friday, August 5, 2016 at 11:50:28 AM UTC+12, jj0ge...@gmail.com wrote: > > According to Python.org Mark Hammond has an Add-on (pywin32) that supports > > Win32 and COM. > > Are people still using Win32? I thought Win

Re: make an object read only

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 7:03:32 PM UTC-5, Lawrence D’Oliveiro wrote: > As GvR has said: “we’re all consenting adults here”. But as we've learned from animal farm, some are more consenting than others. -- https://mail.python.org/mailman/listinfo/python-list

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Rick Johnson
On Saturday, August 6, 2016 at 10:43:01 PM UTC-5, Steven D'Aprano wrote: > Yes. The two ways of ending the loop are distinct and different: > > - reach the end, and stop; > - bail out early. > > > When you read a book, there are two ways of stopping: > > - reach the end, and run out of pages t

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Ned Batchelder
On Sunday, August 7, 2016 at 6:52:45 PM UTC-4, Lawrence D’Oliveiro wrote: > On Sunday, August 7, 2016 at 1:26:48 PM UTC+12, Ned Batchelder wrote: > > I'm merely pointing out that your concern about multiple ways to exit loops > > sounds like exactly what was discussed here two months ago. > > And

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Lawrence D’Oliveiro
On Sunday, August 7, 2016 at 1:26:48 PM UTC+12, Ned Batchelder wrote: > I'm merely pointing out that your concern about multiple ways to exit loops > sounds like exactly what was discussed here two months ago. And one could point out that your presentation on Python loops sounds exactly like ever

Re: Win32 API in pywin32

2016-08-07 Thread Lawrence D’Oliveiro
On Sunday, August 7, 2016 at 4:59:39 PM UTC+12, Rustom Mody wrote: > To be fair my head spins in Linux-land trying to work out what all these > 32's and 64's mean: mingw-w64-x86-64 The package descriptions tell you: mingw-w64 - Development environment targeting 32- and 64-bit Windows mingw-w64-c

Re: Awful code of the week

2016-08-07 Thread Tim Delaney
On 7 August 2016 at 16:54, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Seen in the office IRC channel: > > > (13:23:07) fred: near_limit = [] > (13:23:07) fred: near_limit.append(1) > (13:23:07) fred: near_limit = len(near_limit) > (13:23:09) fred: WTF > Assuming

Re: How do I make a game in Python ?

2016-08-07 Thread Michael Torrie
On 08/07/2016 08:47 AM, Cai Gengyang wrote: > Games are great. I guess I would like to invent animated games that > can teach students how to solve mathematical, physics, engineering , > Go and programming puzzles, basic financial literacy and investing > techniques through interesting and enrichin

Re: Python slang

2016-08-07 Thread Bernd Nawothnig
On 2016-08-06, Chris Angelico wrote: > On Sun, Aug 7, 2016 at 5:37 AM, Bernd Nawothnig > wrote: >>> But SQL's NULL is a cross between C's NULL, IEEE's NaN, Cthulhu, and >>> Emrakul. >> >> SQL NULL has the semantic of "unknown". So if one or both operands of >> a comparison (or any other operation)

Error running the exe file in Windows "Failed to execute script pyi_rth_pkgres"

2016-08-07 Thread Ernest Bonat, Ph.D.
Hi, I have created a simple Python program including the following packages: import numpy as np import matplotlib.pyplot as plt import pandas as pd if __name__ == '__main__': print("Hi!") I have created the installation package using PyInstaller with the following command line: pyin

Re: How do I make a game in Python ?

2016-08-07 Thread Cai Gengyang
Games are great. I guess I would like to invent animated games that can teach students how to solve mathematical, physics, engineering , Go and programming puzzles, basic financial literacy and investing techniques through interesting and enriching games and puzzles and university admissions int

Re: Python slang

2016-08-07 Thread Anders J. Munch via Python-list
Marco Sulla via Python-list: > Well, they are the most used languages. They weren't when Python was created. Python's terms raise/except and self were normal for the time. C++ was the odd one out. throw/catch and this are Stroustrup's inventions, no other language used those terms. It was only

Re: Awful code of the week

2016-08-07 Thread Chris Angelico
On Sun, Aug 7, 2016 at 4:54 PM, Steven D'Aprano wrote: > Seen in the office IRC channel: > > > (13:23:07) fred: near_limit = [] > (13:23:07) fred: near_limit.append(1) > (13:23:07) fred: near_limit = len(near_limit) > (13:23:09) fred: WTF > > > > Speaks for itself. The Real WTF is tha