Re: Identifying tkinter version

2020-04-01 Thread Tony van der Hoff
t tkinter >>> tkinter.TkVersion 8.6 -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: can't install http module

2019-11-08 Thread Tony van der Hoff
On 07/11/2019 19:39, Chris Angelico wrote: On Fri, Nov 8, 2019 at 6:34 AM Tony van der Hoff wrote: On 07/11/2019 19:00, Chris Angelico wrote: On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff wrote: Hi, I'm attempting to install (among other things) the "http" module on m

Re: can't install http module

2019-11-07 Thread Tony van der Hoff
On 07/11/2019 19:00, Chris Angelico wrote: On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff wrote: Hi, I'm attempting to install (among other things) the "http" module on my debian10 box, and am encountering the following problem: Can you link to the documentation for the pack

can't install http module

2019-11-07 Thread tony van der Hoff
info" failed with error code 1 in /tmp/pip-install-zwguez5m/http/ ## So now I seem to have broken it. I'm not very savvy with the python packaging system, so perhaps someone here can help me as a numpty. Thanks in advance. -- Tony van der Hoff | mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: my python is not working

2019-10-14 Thread Tony van der Hoff
On 14/10/2019 09:52, KAMALDEEP GUPTA wrote: > Mine is! -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: Jinja and non-ASCII characters (was Re: Prepare accented characters for HTML)

2019-03-29 Thread Tony van der Hoff
On 29/03/2019 11:08, Chris Angelico wrote: > On Fri, Mar 29, 2019 at 9:12 PM Tony van der Hoff > wrote: >> >> Hello Chris. >> Thanks for your interest. >> >> On 28/03/2019 18:04, Chris Angelico wrote: >>> On Fri, Mar 29, 2019 at 4:10 AM Tony van der

Re: Jinja and non-ASCII characters (was Re: Prepare accented characters for HTML)

2019-03-29 Thread Tony van der Hoff
Hello Chris. Thanks for your interest. On 28/03/2019 18:04, Chris Angelico wrote: > On Fri, Mar 29, 2019 at 4:10 AM Tony van der Hoff > wrote: >> >> This'll probably work: > > You have a python3 shebang, but are you definitely running this under Python > 3? >

Re: Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
On 28/03/2019 16:58, Chris Angelico wrote: > On Fri, Mar 29, 2019 at 3:47 AM Tony van der Hoff > wrote: >> >> On 28/03/2019 15:09, Peter Otten wrote: >>> Tony van der Hoff wrote: >>> >>>> On 28/03/2019 12:46, Jon Ribbens wrote: >>>>>

Re: Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
On 28/03/2019 15:09, Peter Otten wrote: > Tony van der Hoff wrote: > >> On 28/03/2019 12:46, Jon Ribbens wrote: >>> On 2019-03-28, Tony van der Hoff wrote: >>>> Thanks, Chris. The problem is not with the browser, but Jinja crashes. >>>> Probably a bug

Re: Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
On 28/03/2019 12:46, Jon Ribbens wrote: > On 2019-03-28, Tony van der Hoff wrote: >> Thanks, Chris. The problem is not with the browser, but Jinja crashes. >> Probably a bug, but I'm too wedded to that engine to change now. I'll >> raise it on the Jinja bug site. >

Re: Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
On 28/03/2019 11:02, Chris Angelico wrote: > On Thu, Mar 28, 2019 at 8:58 PM Tony van der Hoff > wrote: >> >> Hi, >> >> I have a MariaDB database, which contains accented (mostly French) >> characters. I need to display these on an HTML page. I'm using the

Re: Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
On 28/03/2019 10:19, Antoon Pardon wrote: > On 28/03/19 10:38, Tony van der Hoff wrote: >> Hi, >> >> I have a MariaDB database, which contains accented (mostly French) >> characters. I need to display these on an HTML page. I'm using the Jinja >> templating engine

Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
for every case. Ideally there would be a library function to handle this, either in Python, or Jinja, but Googling around has not revealed such. Does anyone know of such a function, and where I might find it? Cheers, Tony -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-04 Thread Tony van der Hoff
small numbers & then use your real data once you have > something that works > > as a starter a simple loop in python could be as follows > > for x in xrange(10): > print x > > once you have an outline of a program post it back here if things dont > work as expected > Two lines, two errors! To save the noob a lot of head-scratching, that should be: for x in range(10): If you're running python 3, as you should do for any new project: print( x ) -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

[SOLVED] Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 17:13, Larry Martell wrote: > On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff > wrote: >> >> On 02/10/18 16:47, Ervin Hegedüs wrote: >>> hi, >>> >>> now rows will looks like this: >>> ({'id':...,...},{'id':...,}...)

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
which seems to be the "official" python interface. I hadn't spotted the pymysql module. Is the consensus here that pymysql is the preferred connector? Cheers, -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 16:37, Larry Martell wrote: > On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff > wrote: >>I would have expected the connector to be able to return a >> dictionary. >> >> Can anyone suggest a better way of doing this? > > https://pymysql.readthedo

Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
rks OK, but looks inelegant. Having to iterate through the returned data to get it into a dictionary is error-prone if the query changes. I would have expected the connector to be able to return a dictionary. Can anyone suggest a better way of doing this?   -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: New PyPI launched, legacy PyPI shutting down April 30

2018-04-18 Thread Tony van der Hoff
On 18/04/18 13:15, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, Apr 16, 2018 at 01:21:50PM -0400, Laura Hampton wrote: >> New PyPI launched, legacy PyPI shutting down April 30[1] >> >> Starting today, the canonical Python Package Index is at https://pypi.org >> and uses the new Warehouse

Re: we want python software

2017-12-08 Thread Tony van der Hoff
On 05/12/17 16:55, Igor Korot wrote: > Hi, > > On Tue, Dec 5, 2017 at 9:10 AM, Jyothiswaroop Reddy > wrote: >> Sir, >> I am b.tech student I would like to learn python. So please send the python software. > Sorry, we don't send anything. You will have to

Re: we want python software

2017-12-05 Thread Tony van der Hoff
On 05/12/17 16:55, Igor Korot wrote: > Hi, > > On Tue, Dec 5, 2017 at 9:10 AM, Jyothiswaroop Reddy > wrote: >> Sir, >> I am b.tech student I would like to learn python. So please send the >> python software. > Sorry, we don't send anything. You will have

Re: Dynamically replacing an objects __class__; is it safe?

2017-03-17 Thread Tony van der Hoff
o anything that is moving while not contacting the ground. Yep, like a Ferrari on a motorway -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: Dynamically replacing an objects __class__; is it safe?

2017-03-16 Thread Tony van der Hoff
It didn't so much fly, as plummet. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

HTML templating tools

2016-10-20 Thread Tony van der Hoff
, Tony -- Tony van der Hoff | mailto:t...@vanderhoff.org Ariège, France | -- https://mail.python.org/mailman/listinfo/python-list

Re: manually sorting images?

2016-09-05 Thread Tony van der Hoff
on-opencv/ -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: sum accuracy

2016-04-15 Thread Tony van der Hoff
r conversion errors. The uninitiated might expect exact_sum([0.3, 0.7]) to be 1. So I'm uninitiated: NameError: name 'exact_sum' is not defined I appreciate the word of warning, but, in my case, it's not helpful. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamsh

Re: Import error

2016-04-05 Thread Tony van der Hoff
On 05/04/16 10:53, Nicolae Morkov wrote: What can I do I've tried everything Just hang your head and cry... -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: importing

2016-03-07 Thread Tony van der Hoff
m I supposed to know that a module is part of a package, and needs a "magic" stanza to get a module loaded? Cheers, -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

importing

2016-03-07 Thread Tony van der Hoff
() still errors. 3. in either of the above cases, if I add "from tkinter import messagebox, the attribute resolves correctly. I imagined that the "*" form implied "load the lot". Evidently, my understanding is lacking. Will somebody please put me straight, or give me a reference t

Re: Pyhon 2.x or 3.x, which is faster?

2016-03-07 Thread Tony van der Hoff
On 06/03/16 14:41, Steven D'Aprano wrote: On Sun, 6 Mar 2016 10:34 pm, Tony van der Hoff wrote: Hi, I've been experimenting with a short test program under python 2.7 and python 3.4.2. It's a simple read from file, and locate a word therein. I get the (subjective) impression that python2

Pyhon 2.x or 3.x, which is faster?

2016-03-06 Thread Tony van der Hoff
this? Thanks, -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Tony van der Hoff
python.org/pypi/regex. Am I alone in thinking that this wrongaddress character is trolling? How much effort can it be to just install python, and try out these simple things *before* asking trivia here? -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England

Re: Reg: Data frame conversion

2016-02-17 Thread Tony van der Hoff
On 17/02/16 18:00, Sushanth wrote: ​i need to convert r data fr​ame to pandas dataframe and vise versa Wow! How do you plan to do that? -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the fastest way to do 400 HTTP requests using requests library?

2016-01-05 Thread Tony van der Hoff
> makes this sort of setup very simple to implement. > Why would someone want to make 400 HTTP requests in a short time? -- Tony van der Hoff | mailto:t...@vanderhoff.org Ariège, France | -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-03 Thread Tony van der Hoff
On 02/01/16 17:56, Robin Koch wrote: > Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: >> On 02/01/16 16:57, Robin Koch wrote: >>> sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) >> >> But did you actually test it? > > Yes, should work for n >

Re: Trailing zeros of 100!

2016-01-02 Thread Tony van der Hoff
On 02/01/16 16:57, Robin Koch wrote: > sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) But did you actually test it? -- Tony van der Hoff | mailto:t...@vanderhoff.org Ariège, France | -- https://mail.python.org/mailman/listinfo/python-list

2to3 translation problem

2015-12-12 Thread Tony van der Hoff
Debian Jessie, python 2.7; python 3.4 I have an application, using pygame for graphics, that works fine under python2.7. I have run it through 2to3, but when running the result under python 3.4, I get the error : Traceback (most recent call last): File "ppm304.py", line 9, in import

Re: 2to3 translation problem

2015-12-12 Thread Tony van der Hoff
On 12/12/15 15:09, Mark Lawrence wrote: On 12/12/2015 14:42, Tony van der Hoff wrote: Debian Jessie, python 2.7; python 3.4 I have an application, using pygame for graphics, that works fine under python2.7. I have run it through 2to3, but when running the result under python 3.4, I get

Re: 2to3 translation problem

2015-12-12 Thread Tony van der Hoff
On 12/12/15 17:09, Laura Creighton wrote: In a message of Sat, 12 Dec 2015 17:59:52 +0100, Peter Otten writes: Tony van der Hoff wrote: On 12/12/15 15:09, Mark Lawrence wrote: On 12/12/2015 14:42, Tony van der Hoff wrote: Debian Jessie, python 2.7; python 3.4 I have an application, using

Re: 2to3 translation problem

2015-12-12 Thread Tony van der Hoff
On 12/12/15 17:54, Laura Creighton wrote: In a message of Sun, 13 Dec 2015 04:50:43 +1100, Chris Angelico writes: On Sun, Dec 13, 2015 at 4:30 AM, Tony van der Hoff <t...@vanderhoff.org> wrote: Thanks, Laura, and others who have replied. You're right; python-3-pygame exists in un

Re: Accessing container's methods

2015-12-08 Thread Tony van der Hoff
On 07/12/15 23:47, Erik wrote: Hi Tony, On 07/12/15 18:10, Tony van der Hoff wrote: A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to access a method of the outer class; here the method get_name

Re: Accessing container's methods [solved]

2015-12-08 Thread Tony van der Hoff
Hum, sorry about the empty reply; just finger trouble! Anyway I wasn't expecting such a great response; thanks to all. On 07/12/15 23:47, Erik wrote: [snip] As you can't sensibly put the object into more than one container at a time anyway, then you can pass the container object to the Actor

Accessing container's methods

2015-12-07 Thread Tony van der Hoff
Hi, I have a class A, containing embedded embedded classes, which need to access methods from A. . A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to access a method of the outer class; here the

Re: increment/decrement operators

2015-12-05 Thread Tony van der Hoff
On 05/12/15 12:56, Robin Koch wrote: Am 05.12.2015 um 13:40 schrieb Tony van der Hoff: Hi, I'm a relative newbie to python, and this NG, but it's certainly growing on me. One thing I'm missing is the increment/decrement operator from C, ie x++, and its ilk. Likewise x += y. is there any way

increment/decrement operators

2015-12-05 Thread Tony van der Hoff
Hi, I'm a relative newbie to python, and this NG, but it's certainly growing on me. One thing I'm missing is the increment/decrement operator from C, ie x++, and its ilk. Likewise x += y. is there any way of doing this in Python? TIA, Tony --