Re: test-ignore

2024-02-15 Thread Tony Oliver via Python-list
On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: > Test - ignore February 15, 2024 > > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. -- https://mail.python.org/mailman/listinfo/python-list

Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Tony Flury via Python-list
I know that mappings by default support the ** operator, to unpack the mapping into key word arguments. Has it been considered implementing a dunder method for the ** operator so you could unpack an object into a key word argument, and the developer could choose which keywords would be generat

Re: Python-pickle error

2023-05-09 Thread Tony Flury via Python-list
Charles, by your own admission, you deleted your pkl file, And your code doesn't write that pkl file (pickle.dumps(...) doesn't write a file it creates a new string and at no point will it write to the file : What you need is this : import pickle number=2 my_pickled_

Re: Single line if statement with a continue

2022-12-18 Thread Tony Oliver
On Saturday, 17 December 2022 at 23:58:11 UTC, avi.e...@gmail.com wrote: > Is something sort of taboo when using something like a computer language to > write a program? With what else would you write a program? -- https://mail.python.org/mailman/listinfo/python-list

Re: Starting using Python

2022-01-27 Thread Tony Flury via Python-list
On 03/01/2022 12:45, Joao Marques wrote: Good morning: I have a very simple question: I want to start writing programs in Python so I went to the Microsoft Store and installed Python3.9. No problem so far. I would prefer to have a gui interface, an interface that I can use file-->Open and File-

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
On 26/01/2022 22:41, Barry wrote: Run python and your code under a debugger and check the ref count of the object as you step through the code. Don’t just step through your code but also step through the C python code. That will allow you to see how this works at a low level. Setting a watc

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
On 26/01/2022 08:20, Chris Angelico wrote: On Wed, 26 Jan 2022 at 19:04, Tony Flury via Python-list wrote: So according to that I should increment twice if and only if the calling code is using the result - which you can't tell in the C code - which is very odd behaviour. No, the r

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
On 26/01/2022 01:29, MRAB wrote: On 2022-01-25 23:50, Tony Flury via Python-list wrote: On 25/01/2022 22:28, Barry wrote: On 25 Jan 2022, at 14:50, Tony Flury via Python-list  wrote:  On 20/01/2022 23:12, Chris Angelico wrote: On Fri, 21 Jan 2022 at 10:10, Greg Ewing  wrote: On 20/01

Re: Puzzling behaviour of Py_IncRef

2022-01-25 Thread Tony Flury via Python-list
On 25/01/2022 22:28, Barry wrote: On 25 Jan 2022, at 14:50, Tony Flury via Python-list wrote:  On 20/01/2022 23:12, Chris Angelico wrote: On Fri, 21 Jan 2022 at 10:10, Greg Ewing wrote: On 20/01/22 12:09 am, Chris Angelico wrote: At this point, the refcount has indeed been increased

Re: Puzzling behaviour of Py_IncRef

2022-01-25 Thread Tony Flury via Python-list
On 20/01/2022 23:12, Chris Angelico wrote: On Fri, 21 Jan 2022 at 10:10, Greg Ewing wrote: On 20/01/22 12:09 am, Chris Angelico wrote: At this point, the refcount has indeed been increased. return self; } And then you say "my return value is this object". So you're incre

Re: Puzzling behaviour of Py_IncRef

2022-01-19 Thread Tony Flury via Python-list
On 19/01/2022 11:09, Chris Angelico wrote: On Wed, Jan 19, 2022 at 10:00 PM Tony Flury via Python-list wrote: Extension function : static PyObject *_Node_test_ref_count(PyObject *self) { printf("\nIncrementing ref count for self - just for the hell of

Puzzling behaviour of Py_IncRef

2022-01-19 Thread Tony Flury via Python-list
IL: test_000_009_test_ref_count (__main__.TestNode) -- Traceback (most recent call last):   File "/home/tony/Development/python/orderedtree/tests/test_orderedtree.py", line 62, in test_000_009_test_ref_count     self.assertEqual(sys.getrefcount(nod

Re: pyinstaller wrong classified as Windows virus

2021-11-28 Thread Tony Flury via Python-list
Have you tried using Nuitka - rather than pyInstalller - it means you distribute a single executable and the Python run time library (which they probably have already), and it has the advantage that it is a bit quicker than standard python. Rather than bundle the source code and interpreter in

Re: Selenium py3.8+ DepreciationWarnings - where to find doc to update code?

2021-10-13 Thread Tony Oliver
On Wednesday, 13 October 2021 at 16:16:46 UTC+1, jkk wrote: > Selenium 3.141+ > python 3.8+ > ubuntu 20.04 or windows 10 > > I'm trying to upgrade code from py3.6+ to py3.8+ and I'm getting several > DepreciationWarnings. > > Can someone point me to where I can find the documentation that

Re: Understanding the working mechanis of python unary arithmetic operators.

2021-10-02 Thread Tony Oliver
On Saturday, 2 October 2021 at 13:48:39 UTC+1, hongy...@gmail.com wrote: > On Saturday, October 2, 2021 at 4:59:54 PM UTC+8, ju...@diegidio.name wrote: > > On Saturday, 2 October 2021 at 10:34:27 UTC+2, hongy...@gmail.com wrote: > > > See the following testings: > > > > > > In [24]: a=3.1415926

tkinter

2021-08-21 Thread Tony Genter
Tkinter stopped working overnight from 8/20/2021 to 8/21/2021. Last night I was working on tutorials to work on a GUI and this morning every file that uses tkinter is broken stating that no module `tkinter' exists. Please let me know if there is some sort of problem. I am removing

RE: PSYCOPG2

2021-02-13 Thread Tony Ogilvie
Thank you I have tried Sublime 3 and the same thing happens. I do not think I have another version of Python on my PC. I am trying to look through my files to find out. Regards Tony -Original Message- From: Mladen Gogala Sent: 13 February 2021 05:35 To: python-list@python.org

PSYCOPG2

2021-02-12 Thread Tony Ogilvie
ry and get this to work. Regards Tony -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedding version in command-line program

2020-10-17 Thread Tony Flury via Python-list
On 07/10/2020 12:06, Loris Bennett wrote: Hi, I have written a program, which I can run on the command-line thus mypyprog --version and the get the version, which is currently derived from a variable in the main module file. However, I also have the version in an __init__.py file and in

Simple question - end a raw string with a single backslash ?

2020-10-13 Thread Tony Flury via Python-list
I am trying to write a simple expression to build a raw string that ends in a single backslash. My understanding is that a raw string should ignore attempts at escaping characters but I get this : >>> a = r'end\'   File "", line 1     a = r'end\'   ^ SyntaxError:

Re: Any ideas for a new language inspired to Python?

2020-09-05 Thread Tony Flury via Python-list
C/machine code. -- Tony Flury -- https://mail.python.org/mailman/listinfo/python-list

Re: Solved: Re: Missing python curses functions?

2020-06-29 Thread Tony Flury via Python-list
Maybe you should raise a bug (bugs.python.org) and flag that this function is missing. It could be that it can be introduced by whoever is maintaining the existing code. On 20/05/2020 08:31, Alan Gauld via Python-list wrote: On 19/05/2020 20:53, Alan Gauld via Python-list wrote: One of the

Re: Pycharm Won't Do Long Underscore

2020-06-24 Thread Tony Kaloki
MRAB Sent: Wednesday, June 24, 2020 7:28:52 PM To: python-list@python.org Subject: Re: Pycharm Won't Do Long Underscore On 2020-06-24 18:59, Chris Angelico wrote: > On Thu, Jun 25, 2020 at 3:51 AM Dennis Lee Bieber > wrote: >> >> On Tue, 23 Jun 2020 20:49:36 +, Tony

Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Tony Kaloki
case, thanks again for your quick and easy to follow - even for me - reply. Tony Get Outlook for Android<https://aka.ms/ghei36> From: Alexander Neilson Sent: Tuesday, June 23, 2020 9:28:37 PM To: Tony Kaloki Cc: python-list@python.org Subject: Re: Pycharm Wo

FW: Pycharm Won't Do Long Underscore

2020-06-23 Thread Tony Kaloki
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Tony Kaloki<mailto:tkal...@live.co.uk> Sent: 23 June 2020 19:45 To: python-list@python.org<mailto:python-list@python.org> Subject: Pycharm Won't Do Long Underscore Hi Guys,

Re: Floating point problem

2020-06-23 Thread Tony Flury via Python-list
On 18/04/2020 15:29, Grant Edwards wrote: On 2020-04-18, Souvik Dutta wrote: I literally tried it!!! And it did not stop because I did not get any 1.0 rather I got 0.999 But why does this happen. This is a simple math which according to normal human logic should give perfect numbers w

Re: How to test?

2020-06-19 Thread Tony Flury via Python-list
On 24/04/2020 19:40, Manfred Lotz wrote: I have a command like application which checks a directory tree for certain things. If there are errors then messages will be written to stdout. How to test this in the best way? One idea was for the error situations to write messages to files and then

Re: Function to avoid a global variable

2020-04-29 Thread Tony Flury via Python-list
def foo(i): foo.bar += i foo.bar = 5 --Jach And as you have shown - foo.bar is effectively a global variable - just one with a qualified name :-) -- Tony Flury -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: For Loop Invariants

2020-04-20 Thread Tony Flury via Python-list
On 10/04/2020 21:44, Elliott Dehnbostel wrote: *We could do this:* chars = "abcaaabkjzhbjacvb" seek = {'a','b','c'} count = sum([1 for a in chars if a in seek]) However, this changes important semantics by creating an entire new list before summing. Creating the list is pointless in this ca

Re: Identifying tkinter version

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

Re: on sorting things

2020-01-28 Thread Tony Flury via Python-list
On 20/12/2019 18:59, Peter Otten wrote: Chris Angelico wrote: On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote: PS: If you are sorting files by size and checksum as part of a deduplication effort consider using dict-s instead: Yeah, I'd agree if that's the purpose. But l

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

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

can't install http module

2019-11-07 Thread tony van der Hoff
Hi, I'm attempting to install (among other things) the "http" module on my debian10 box, and am encountering the following problem: ## tony@tony-lx:~/_pycharm/pygallery$ python3 -m pip install http Collecting http   Using cached https://files.p

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

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 e

Prepare accented characters for HTML

2019-03-28 Thread Tony van der Hoff
t to cater 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 Bucki

Re: ConfigParser: use newline in INI file

2019-03-07 Thread tony
On 07/03/2019 16:58, jim.womeld...@gmail.com wrote: > On Thursday, March 7, 2019 at 8:55:31 AM UTC-6, tony wrote: >> On 07/03/2019 14:16, jim.womeld...@gmail.com wrote: >>> On Saturday, October 1, 2016 at 7:41:40 PM UTC-5, Ned Batchelder wrote: >>>> On Saturday, Octob

Re: ConfigParser: use newline in INI file

2019-03-07 Thread tony
On 07/03/2019 14:16, jim.womeld...@gmail.com wrote: > On Saturday, October 1, 2016 at 7:41:40 PM UTC-5, Ned Batchelder wrote: >> On Saturday, October 1, 2016 at 6:25:16 PM UTC-4, Thorsten Kampe wrote: >>> * Ben Finney (Sun, 02 Oct 2016 07:12:46 +1100) Thorsten Kampe writes: > Co

Re: how to match list members in py3.x

2018-11-25 Thread tony
On 25/11/2018 17:30, Muhammad Rizwan wrote: > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. > > Why would anyone want to help you? -- https://mail.python.org/mailman/listinfo/python-list

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
> start by testing 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':...,...},{

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
ql.connector module, 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
    }     )     return result This works 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 codebas

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 go get it yourself. -) > Well, at l

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 to go get it yourself. -) > Well,

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-06 Thread Tony van der Hoff
On 06/09/17 16:31, Ian Kelly wrote: > On Wed, Sep 6, 2017 at 1:37 AM, Marko Rauhamaa wrote: >> Which reminds me of this puzzle I saw a couple of days ago: >> >>1 + 4 = 5 >>2 + 5 = 12 >>3 + 6 = 21 >>8 + 11 = ? >> >> A mathematician immediately comes up with a "wrong" answer. > There

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

2017-03-17 Thread Tony van der Hoff
ied to 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
s or wings 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

Re: any one used moviepy please come in!!! I need help, thanks!

2017-01-25 Thread Tony Chen
On Wednesday, January 25, 2017 at 8:34:01 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 25, 2017 at 6:22 PM, Tony Chen wrote: > > This error can be due to the fact that ImageMagick is not installed on your > > computer, or (for Windows users) that you didn't spe

any one used moviepy please come in!!! I need help, thanks!

2017-01-24 Thread Tony Chen
I have to use moviepy in one of my project. So I downloaded it, and tried the example code on the website. It gives me this error. Anyone can give me some help? Thank you very much! it gives this error: [MoviePy] This command returned an error !Traceback (most recent call last): File "tst.py",

HTML templating tools

2016-10-20 Thread Tony van der Hoff
heers, 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
ght 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 Buckinghamshire, England | -- https://mail.pyth

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
ing() 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 r

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 t

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

2016-03-06 Thread Tony van der Hoff
pport 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
4 or 8, >> and let each thread pop a request from the queue as needed. >> >> Are you experienced with threads? Do you need further information about >> using threads and queues? > > Also see the concurrent.futures module in the standard library, which > makes this sort o

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

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 wrote: Thanks, Laura, and others who have replied. You're right; python-3-pygame exists in unstable, but has not yet made

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 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 the

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 py

Re: Accessing container's methods [solved]

2015-12-08 Thread Tony van der Hoff
perhaps even faster > return self.actors[:] That doesn't seem to work: <__main__.Actor instance at 0x7fc7478ba560> <__main__.Actor instance at 0x7fc7478ba5a8> <__main__.Actor instance at 0x7fc7478ba5f0> Anyway, I'm no longer in a hole; thanks for all the excellent help. I'll certainly review the design of my current project, to see if it can be improved. Cheers, Tony -- https://mail.python.org/mailman/listinfo/python-list

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

Accessing container's methods

2015-12-07 Thread Tony van der Hoff
urn txt if __name__ == '__main__': o = Monty( ["Cleese", "Idle", "Palin" ] ) print "number: ",o.count_actors() a = o.list_actors() for l in a: print l Thanks, Tony -- https://mail.python.org/mailman/listinfo/python-list

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. i

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 -- https://mail.python.org/m

Survey - how much do you rely on Free/Open Source Software?

2013-06-28 Thread Tony
Hi, I'm conducting a survey that aims to measure the importance that Open Source/Free Software has to people and organizations around the world. Answering is very quick (mostly one click per answer) Please answer it by clicking the link below: https://docs.google.com/forms/d/1bY5KQgsuPeGMwRoTY2DW

Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error.

2013-04-30 Thread Tony Romeo
Updating to 2.5+ resolved the error. Thank you --- Here is the old info : [mongrel@crms-demo ~]$ rpm -qi python Name: python Relocations: (not relocatable) Version : 2.4.3 Vendor: CentOS Release : 56.el5

Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error.

2013-04-30 Thread Tony Romeo
Thank you for the response. Results after using 0666: Traceback (most recent call last): File "dump_cdorked_config.py", line 15, in ? from ctypes import * ImportError: No module named ctypes -- http://mail.python.org/mailman/listinfo/python-list

cunfused why gevent block redis' socket request?

2012-12-28 Thread Tony Shao
GOAL:spawn a few greenlet worker deal with the data pop from redis (pop from redis and then put into queue) RUNNING ENV: ubuntu 12.04 PYTHON VER: 2.7 GEVENT VER: 1.0 RC2 REDIS VER:2.6.5 REDIS-PY VER:2.7.1 from gevent import monkey; monkey.patch_all() import gevent from gevent.pool import Group f

Re: Spamming PyPI with stupid packages

2012-01-04 Thread Tony Pelletier
u and this list that pollutes my inbox with globs of worthlessness... On Wed, Jan 4, 2012 at 2:28 PM, Ian Kelly wrote: > On Wed, Jan 4, 2012 at 11:45 AM, Tony Pelletier > wrote: > > That's a rather ironic comment. Idiot. > > Really? Which part was ironic? > >

Re: Spamming PyPI with stupid packages

2012-01-04 Thread Tony Pelletier
Honestly, is this list really what this is all about? I'm bored already... Enough? On Tue, Jan 3, 2012 at 9:42 PM, Ben Finney wrote: > Steven D'Aprano writes: > > > On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote: > > > It objectifies women. > > > > So you claim. > > I'm sure you have a h

Re: python reading file memory cost

2011-08-01 Thread Tony Zhang
lmost 2GB RAM, I cannot figure it out, somebody help! Thanks very much! --Tony -- http://mail.python.org/mailman/listinfo/python-list

Re: Zope with mySQL

2011-04-30 Thread Tony
Could you provide more details of what you are trying to do and what help you need? On 28/04/11 20:19, harryjatt wrote: > > Hi, i am doing web development with Zope. My connected database is mySQL. I > am new to this combination.I have to upload the files to mySQL with > programming in zope and t

--------------> Web design in Chennai <--------------

2011-03-03 Thread tony player
Web Design in Chennai ** http://webdesignchennai.co.in/ ** Web Design Chennai offers Web Design in Chennai,website designing,maintenance in chennai,Web Designing and development Companies Chennai,web hosting in c

python/c api

2010-10-14 Thread Tony
hi, is the python/c api extensively used? and what world-famous software use it? thanks! tony -- http://mail.python.org/mailman/listinfo/python-list

Boolean value of generators

2010-10-14 Thread Tony
returns True. Is there anyway I can enhance my generator or iterator to have the desired effect? Regards Tony Middleton. -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing gmail

2009-12-17 Thread Tony
stupid - I'd wasted so much time and it was so simple. I will remember it though. Now to figure out the rest of it. Tony -- http://mail.python.org/mailman/listinfo/python-list

accessing gmail

2009-12-17 Thread Tony
.com and I can't see how to get at it. mail = imaplib.IMAP4_SSL('imap.gmail.com, 993) mail.login(username, password) logs me in to my googlemail account and lets me collect mail in that one, but how do I get to the gmail one? Tony -- http://mail.python.org/mailman/listinfo/python-list

Re: open source linux -> windows database connectivity?

2009-11-18 Thread Tony Schmidt
Woo-hoo! Forget ODBC. Got this working with Jython and JDBC drivers! On Nov 13, 1:03 am, "M.-A. Lemburg" wrote: > TonySchmidtwrote: > >> Note: The client part of this product is free. You only need to > >> get a license for the server part. > > > Yeah, but don't I need the server part to make t

Re: open source linux -> windows database connectivity?

2009-11-12 Thread Tony Schmidt
>Note: The client part of this product is free. You only need to >get a license for the server part. Yeah, but don't I need the server part to make the connection? Would it be possible to use Jython and the Pervasive JDBC driver for this? On Nov 12, 2:56 pm, "M.-A. Lemburg

open source linux -> windows database connectivity?

2009-11-12 Thread Tony Schmidt
I am trying to read a Pervasive database on a Windows machine from a Python script on a Linux machine. I understand that this can be done with a proprietary ODBC-to-ODBC bridge called mxODBC or Easysoft OOB. Is there anyway to do this with existing free/ open source tools? Thanks in advance for

Re: custom data warehouse in python vs. out-of-the-box ETL tool

2009-09-24 Thread Tony Schmidt
Hi, Marc-Andre - well, so far you seem to be the only one suggesting that cross-database joins is the way to go - everyone else has been telling me to build a warehouse. I initially was trying to avoid the warehouse idea to "avoid going through the external temporary resource", as you say. But th

Re: custom data warehouse in python vs. out-of-the-box ETL tool

2009-09-24 Thread Tony Schmidt
@Martin: Thanks for your great feedback. So do you think it would be very beneficial for me to start with an Inman or Kimball book? Or do you think it would be just leisure reading and not very practical at best - fill my head with needless jargon and inflexible dogmas, at worst? I took a datab

Re: ImportError: No module named _functools

2009-07-16 Thread Tony Lay
On Jul 16, 10:14 am, a...@pythoncraft.com (Aahz) wrote: > In article > <45228cf4-0b37-4c52-bf6f-d7bd124b0...@l32g2000vbp.googlegroups.com>, > Tony  Lay   wrote: > > > > >Traceback (most recent call last): > >  File "/usr/local/bin/meld", line 35, i

  1   2   3   4   >