Re: Pan/Zoom Line Plot in Coyote Graphics

2012-05-17 Thread David Fanning
David Fanning writes: > At my new job, we had a need to be able to zoom into a > lot of data very quickly and then pan around the data > to see what points are in the immediate vicinity. Aahhh! Darn it. I keep sending this to the wrong news group! Old fingers are hard to train, I gue

Looking for Python script for Vector Map simplification, preserving shape and topology

2012-05-17 Thread David Shi
Dear All, I am looking for Python script for Vector Map simplification, preserving shape and topology. Please get in touch with davidg...@yahoo.co.uk    Regards. David -- http://mail.python.org/mailman/listinfo/python-list

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread David Lambert
One suggestion is to construct the dictionary first: CHOICES = dict( NONE = 'No experience required', SAIL = 'Sailing experience, new to racing', RACE = 'General racing experience', GOOD = 'Experienced racer', ROCK = 'Rock star' ) def experience_text(self): try:

Re: usenet reading

2012-05-26 Thread David Robinow
On Sat, May 26, 2012 at 11:43 AM, Roy Smith wrote: > I use panix.com.  For $100/year, I get mail, news, and unix shell > access.  By some measures, it's an expensive way to get mail access, but > I'd much rather give Panix $100 than take advantage of any of the free > mail services who does who-kn

Install lxml package on Windows 7

2012-05-29 Thread David Fanning
\Python27\site_packages and there is no lxml-2.3.4 folder. Any idea what I might be doing wrong? Thanks, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thui. ("Perhaps thou speakest truth.&quo

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > > Folks, > > I need some help. I need the lxml package to run a particular > Python program. > >http://lxml.de/ > > I downloaded the appropriate binary egg package for lxml, and > I found easy_install.exe in my Python 2.7 distributio

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > I need some help. I need the lxml package to run a particular > Python program. > >http://lxml.de/ OK, maybe I am getting somewhere now. I am now running my command window as an Administrator. So, the command window stays open so I can see what is ha

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > > I need some help. I need the lxml package to run a particular > > Python program. > > > >http://lxml.de/ OK, to answer my own question and help someone else out, I eventually found an lxml-2.3.4.exe file on this page: http://code.go

Re: installing modules in Enthought Python

2012-05-30 Thread David Fanning
r of these sites: http://code.google.com/p/pythonxy/wiki/AdditionalPlugins#Installation_no tes http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Cheers David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Sepore ma de ni thui. ("Perhaps thou speakest truth.") -- http://mail.python.org/mailman/listinfo/python-list

While stack:

2012-06-01 Thread David Shi
Can any one clarify what "while stack:" mean? Regards, David -- http://mail.python.org/mailman/listinfo/python-list

Where is the latest step by step guide to use Jython to compile Python into Java?

2012-06-04 Thread David Shi
Hello, Where is the latest step by step guide to use Jython to compile Python into Java? I found that it was very confusing by reading not updated text. Please help. Regards. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is the latest step by step guide to use Jython to compilePython into Java?

2012-06-04 Thread David Shi
software or instructions. Please provide assistance, by providing the tested software and instructions. Regards. David From: "Narayanaswamy, Mohan" To: David Shi Cc: python-list@python.org Sent: Monday, 4 June 2012, 15:56 Subject: RE: Where is

Re: Where is the latest step by step guide to use Jython to compilePython into Java?

2012-06-04 Thread David Shi
Hello, Mohan, Did you test it?  I am using Windows.  Where are the exact steps for compiling in DOS? Once .class or jar files created, how to use these files? Could you enlighten me with tested/proven step by step instructions? Regards. David From

Has theHas Python community got Alan Saalfeld et al's algorithm and source code implementation

2012-06-05 Thread David Shi
Wide Web site http://ra.cfm.ohio-state.edu/grad/zhao/algorithms/linesimp.html."; However, this site is no longer alive. If anyone knows, please let me know.   davidg...@yahoo.co.uk Regards. David-- http://mail.python.org/mailman/listinfo/python-list

Where is the lastest step by step guide to compile Python into an executable?

2012-06-07 Thread David Shi
Hi, folks. Where is the lastest step by step guide to compile Python into an executable? Regards. David -- http://mail.python.org/mailman/listinfo/python-list

Permission denied and lock issue with multiprocess logging

2011-06-12 Thread david dani
When i am running the implementation of multiprocess logging through queue handler, i get this error. It is the same with sockethandler as well as with pipe handler if multiprocesses are involved. I am not getting any hint to solve this problem. Please help to solve the problem. Platform: AIX Pyth

Missing python27.dll on Win 7 64-bit

2011-06-16 Thread David Aldrich
in neither C:\Windows\System32 nor C:\Windows\SysWOW64. Please will someone suggest what I am doing wrong? Best regards David -- http://mail.python.org/mailman/listinfo/python-list

Missing python27.dll on Win 7 64-bit

2011-06-17 Thread David Aldrich
in neither C:\Windows\System32 nor C:\Windows\SysWOW64. Please will someone suggest what I am doing wrong? Best regards David -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling Python 3.2 on Cygwin fails

2011-07-05 Thread David Robinow
On Mon, Jul 4, 2011 at 3:49 PM, Aly Tawfik wrote: > On Jun 20, 12:44 pm, sewpafly wrote: >> I was able to a little further by changing 2 lines in Makefile.pre.in. >> >> On line 170, changed: >>     DLLLIBRARY= @DLLLIBRARY@ >> to: >>     DLLLIBRARY= libpython$(VERSION).dll >> >> On line 509 it had

Re: python.org is down?

2011-07-24 Thread David Zerrenner
Same here for me. My traceroute seems to hang somewhere in the Netherlands. -- http://mail.python.org/mailman/listinfo/python-list

Aw: python.org back up ?(was Re: python.org is down?)

2011-07-24 Thread David Zerrenner
*pew* I can't live without the docs, that really made my day now. -- http://mail.python.org/mailman/listinfo/python-list

Aw: Re: Aw: python.org back up ?(was Re: python.org is down?)

2011-07-25 Thread David Zerrenner
Carl Banks wrote: > If you can't live without the docs, you should consider downloading them and > accessing them locally. That'll let you work whenever python.org goes down, > and will help keep the load off the server when it's up. Thanks for the pointer, i did not realize that until now... T

Re: Inconsistent SMTP/Gmail connection drop

2011-08-03 Thread David Stanek
On Wed, Aug 3, 2011 at 5:46 PM, Astley Le Jasper wrote: > > Any ideas? > Is it possible that the first email is sent before the network connection has been properly established? -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com

Re: how to separate a list into two lists?

2011-08-06 Thread David Robinow
On Sat, Aug 6, 2011 at 1:23 PM, Kabie wrote: > No. > L1, L2 = zip(*L) Not quite. That makes L1 & L2 tuples. L1, L2 = zip(*L) L1 = list(L1) L2 = list(L2) ??? -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'module' object is not callable

2011-08-11 Thread David Robinow
On Thu, Aug 11, 2011 at 6:43 PM, Forafo San wrote: > I wrote a class, Univariate, that resides in a directory that is in my > PYTHONPATH. I'm able to >import that class into a *.py file. However when I > try to instantiate an object with that class like: What makes you think you're able to im

Re: Ten rules to becoming a Python community member.

2011-08-16 Thread David Monaghan
On Tue, 16 Aug 2011 13:13:10 -0700 (PDT), rantingrick wrote: >If conciseness is all you seek then perhaps you prefer the following? > >ORIGINAL: "I used to wear wooden shoes" >CONCISE: "I wore wooden shoes" >ORIGINAL: "I have become used to wearing wooden shoes" >CONCISE: "I like wearing woode

Re: Ten rules to becoming a Python community member.

2011-08-16 Thread David Monaghan
On Tue, 16 Aug 2011 16:12:53 -0700 (PDT), rantingrick wrote: >On Aug 16, 4:55 pm, David Monaghan wrote: >> On Tue, 16 Aug 2011 13:13:10 -0700 (PDT), rantingrick >> >> wrote: >> >If conciseness is all you seek then perhaps you prefer the following? >> >&g

Re: How to convert a list of strings into a list of variables

2011-08-18 Thread David Robinow
On Thu, Aug 18, 2011 at 10:57 AM, noydb wrote: > How would you convert a list of strings into a list of variables using > the same name of the strings? > > So, ["red", "one", "maple"] into [red, one, maple] Why would you want to? -- http://mail.python.org/mailman/listinfo/python-list

Re: Stop quoting spam [was Re: Hot Girls ...]

2011-08-20 Thread David Robinow
On Sat, Aug 20, 2011 at 4:16 AM, Alec Taylor wrote: >> ... > I found said joke rather funny :P Perhaps, as a retired amateur comedian, my standards are too high, but I don't think adding a smilie to a stupid post suddenly turns it into a joke. Nevertheless, the quality of the attempt is not reall

Re: PEP for module naming conventions

2011-03-11 Thread David Marek
Hi, Have you read PEP 8? http://python.org/dev/peps/pep-0008/ I don't think it's possible to be sure that the name of your module won't conflict with system module name (if you'll follow conventions). You can find the list of all PEPs at http://python.org/dev/peps/

Re: A Question on URLLIB

2011-03-15 Thread David Marek
You are doing fine so far :-) However, urllib is quite low level module. Do you know mechanize http://wwwsearch.sourceforge.net/mechanize/ ? I have used it in my crawler. If you want to crawl a specific site for known data then Scrapy http://scrapy.org/ could be useful too. David Marek dav

Re: possible to run a python script without installing python?

2011-03-16 Thread David Jackson
i need to run a python script on any arbitrary server and don't want to do an actual installation. i figured i could do a clean install on my machine and install whatever libraries would be needed, then zip them all up for remote deployment. to avoid bloating, i am wondering which files i can safel

urllib2 - not returning page expected after post

2011-03-23 Thread David Feyo
I'm trying to automate reverse-ip lookups on domaintools.com. Everything is fine, except that I don't exactly get the data I want after I submit a post to the site. I know the post is correct, the return data just doesn't appear on the post. Not sure what to do at this point. Here is the code: #!/

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread David Bernier
Joe Snodgrass wrote: FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes discovered on the body of a murdered man in 1999. The FBI says that officers in St. Louis, M

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread David Bernier
Stretto wrote: "Joe Snodgrass" wrote in message news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in

Re: FBI wants public help solving encrypted notes from murder mystery

2011-04-01 Thread David Bernier
0017a4a78c22.html > . An officer with the local Major Case Squad unit is quoted there. I quote from the 1999 story: << "We cannot find any motive for his death, " he said. "We're not absolutely sure that this is a homicide." >> . David Bernier -- http://mail.python.org/mailman/listinfo/python-list

Re: FBI wants public help solving encrypted notes from murder mystery

2011-04-02 Thread David Bernier
Joe Snodgrass wrote: On Apr 1, 10:54 am, David Bernier wrote: haha doh wrote: On Mar 31, 3:15 pm, Joe Snodgrasswrote: [...] As to which crime was being committed, I'm going with numbers running or loan sharking. There's no reason for any crook to keep any record of any o

Re: Python users in Stavanger, Norway?

2011-04-03 Thread David Boddie
now if you're interested. If you manage to get something started, please update the list on the Python Wiki: http://wiki.python.org/moin/LocalUserGroups#Norway David (not in Stavanger) -- http://mail.python.org/mailman/listinfo/python-list

Re: Sandboxed Python: memory limits?

2011-04-07 Thread David Bolen
ame order of magnitude of tweaking Python to limit memory internally. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread David Cournapeau
more stable can can be installed without being compiled first (I wrote those notes almost 2 years ago IIRC), cheers, David -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread David Cournapeau
ore stable in my experience (even in 32 bits). In any case, note the -DMS_WIN64 which is mandatory if you want to make it work (without this define, mingw will use the python headers for 32 bits, with pointers typedef defined for 32 bits pointers instead of 64 bits, which will not work v

Re: Questions about GIL and web services from a n00b

2011-04-15 Thread David Cournapeau
async in each process. This has its own issues, though (e.g. in terms of administration and monitoring). Chris, the tornado documention mentions a simple way to get multiple processes on one box: http://www.tornadoweb.org/documentation (section mentiong nginx for load balancing). The principle i

oauth 2 libraries.

2011-04-26 Thread David Vicente
Hi, I´m looking for a library to use oauth 2. I have found several libraries very similar among them. I´d like to know if someone use another one or some of these libraries and what do you advise me. - https://github.com/simplegeo/python-

Re: Terrible FPU performance

2011-04-26 Thread David Cournapeau
ference between cython/python and C, it will be easier to debug. cheers, David -- http://mail.python.org/mailman/listinfo/python-list

Re: Terrible FPU performance

2011-04-27 Thread David Cournapeau
to be > slow but it's not, I get a 2 (FP_ZERO) Ok, so this is indeed a denormal issue. Could you post the exact code (and compilation steps) you used in both cases ? cheers, David -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 Tkinter and TTK

2011-04-28 Thread David Phillips
rmation pane, a toolbar, and a pane for the text being edited (implemented with a Text widget). Admittedly it took a little trial and error to perfect the layout of the various frames, but when it was done, I was pleased with the appearance, functionality, and performance. David Phillips -- h

Re: Installing programs that depend on, or are, python extensions.

2011-04-30 Thread David Cournapeau
you package those files into a nice installer. I like nsis, which is open source and relatively well documented, but there are other solutions as well. cheers, David -- http://mail.python.org/mailman/listinfo/python-list

Re: Development tools and practices for Pythonistas

2011-05-01 Thread David Boddie
use, though a bit different to the Mercurial one: http://www.samba.org/~jelmer/dulwich/ I've used both with some success. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Coolest Python recipe of all time

2011-05-02 Thread David Monaghan
On Mon, 2 May 2011 10:33:31 -0700 (PDT), Raymond Hettinger wrote: >I think it is time to give some visibility to some of the instructive >and very cool recipes in ActiveState's python cookbook. > >My vote for the coolest recipe of all time is: > > > http://code.activestate.com/recipes/365013-

Re: Coolest Python recipe of all time

2011-05-02 Thread David Monaghan
On Mon, 2 May 2011 14:58:50 -0600, Ian Kelly wrote: >On Mon, May 2, 2011 at 2:48 PM, David Monaghan > wrote: >> On Mon, 2 May 2011 10:33:31 -0700 (PDT), Raymond Hettinger >> wrote: >> >>>I think it is time to give some visibility to some of the instru

Re: setuptools for 64-bit 2.7.1 on 64-bit Windows 7?

2011-05-06 Thread David Robinow
On Fri, May 6, 2011 at 1:43 PM, Dick Bridges wrote: > Simple question: Is it true that no setuptools (or any other module > installer) exists for 64-bit python 2.7.1? If there is an installer that > works, what terms might I use to Google for information on how to acquire > and install it? Doesn't

Re: checking if a list is empty

2011-05-14 Thread David Robinow
On Fri, May 13, 2011 at 10:34 PM, Gregory Ewing wrote: > rusi wrote: > >> Dijkstra's problem (paraphrased) is that python, by choosing the >> FORTRAN alternative of having a non-first-class boolean type, hinders >> scientific/mathematical thinking/progress. > > Python doesn't have the flaw that Di

Re: Trying to understand html.parser.HTMLParser

2011-05-15 Thread David Robinow
On Sun, May 15, 2011 at 4:45 PM, Andrew Berg wrote: > I'm trying to understand why HMTLParser.feed() isn't returning the whole > page. My test script is this: > > import urllib.request > import html.parser > class MyHTMLParser(html.parser.HTMLParser): >    def handle_starttag(self, tag, attrs): >

Re: Is there a better way to solve this?

2011-05-23 Thread David Robinow
On Mon, May 23, 2011 at 2:55 PM, kracekumar ramaraju wrote: > You can use sizeof function, a=12234 b=23456.8 a.__sizeof__() > 12 b.__sizeof__() > 16 > So sizeof int is 12 bytes and float is 16 bytes I'm not sure what you're trying to show here, but try the following in Python

Re: English Idiom in Unix: Directory Recursively

2011-05-27 Thread David Schwartz
On May 20, 12:00 am, Jonathan de Boyne Pollard wrote: > Indeed. And the algorithms that are employed to perform the operations > so described are recursive. Actually, they almost never are. Iterative algorithms are almost always used to avoid a stack explosion. However, the terminology is still

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread David Palao
Hi, It looks to me like an OSError, can it be? Best 2017-09-05 10:50 GMT+02:00 Antoon Pardon : > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: > do_stuff > except Exception: >

Re: Application and package of the same name

2017-10-21 Thread David Stanek
pattern I've seen commonly used. > This is actually a common pattern I see when teaching the language. For example, when a student wants to test out a package like requests many seem to initially want to create a requests.py module. Then they become very confused when they get an Att

from packaging import version as pack_version ImportError: No module named packaging

2017-10-27 Thread David Gabriel
Dears, I am running a python code that generates for me this error : from packaging import version as pack_version ImportError: No module named packaging I googled it and I have found so many suggestions regarding updating 'pip' and installing python-setuptools but all of these did not fix this

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-28 Thread David Gabriel
Thanks so Lutz much for your reply. I am using python2.7 and I am running this code in an Openstack instance. I will apply your recommandation and let you know about the result ... Kind regards. 2017-10-27 16:13 GMT+02:00 Lutz Horn : > On Fri, Oct 27, 2017 at 03:56:39PM +0200, David Gabr

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-28 Thread David Gabriel
I forget to precise that I am using pycharm. And this issue is reproducible also using command line to run the code. Best regards 2017-10-28 14:31 GMT+02:00 David Gabriel : > Thanks so Lutz much for your reply. > I am using python2.7 and I am running this code in an Openstack instance. &g

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-30 Thread David Gabriel
, line 1327, in _execute_child raise child_exception OSError: [Errno 13] Permission denied This error is also reproducible using sudo. Please advise how to fix it. Thanks in advance. Best regards 2017-10-28 14:33 GMT+02:00 David Gabriel : > I forget to precise that I am using pycharm.

Re: String changing size on failure?

2017-11-01 Thread David Beazley
o ask the tough questions other people won't. :-) > > Skip > > > On Wed, Nov 1, 2017 at 2:26 PM, Ned Batchelder wrote: >> From David Beazley (https://twitter.com/dabeaz/status/925787482515533830): >> >>>>> a = 'n' >>>>> b

Re: Tips or strategies to understanding how CPython works under the hood

2018-01-09 Thread David Stanek
here was still a lot of new stuff. -- david stanek web: https://dstanek.com twitter: https://twitter.com/dstanek -- https://mail.python.org/mailman/listinfo/python-list

Re: python to C code generator

2018-01-17 Thread David Palao
Hi, Have a look at Cython. Best 2018-01-17 12:04 GMT+01:00 kushal bhattacharya : > Hi, > Is there any python framework or any tool as which can generate C code from > python code as it is . > > Thanks, > Kushal > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.

RE: Changing calling sequence

2022-05-11 Thread David Raymond
>> I have a function that I use to retrieve daily data from a >> home-brew database. Its calling sequence is; >> >> def TempsOneDay( year, month, date ): >> >> After using it (and its friends) for a few years, I've come to >> realize that there are times where it would be advantageous to >> invok

RE: Changing calling sequence

2022-05-12 Thread David Raymond
>>def TempsOneDay(*dateComponents): >>if len(dateComponents) == 3: >>year, month, date = dateComponents >>elif len(dateComponents) == 1 and isinstance(dateComponents[0], >> datetime.date): >>year, month, date = (dateComponents[0].year, dateComponents[0].month, >> dateCompo

PYLAUNCH_DEBUG not printing info

2022-06-08 Thread Richard David
Why am I not getting debug output on my windows 10 machine: C:\temp>\Windows\py.exe -0 -V:3.11 *Python 3.11 (64-bit) -V:3.10 Python 3.10 (64-bit) C:\temp>set PYLAUNCH_DEBUG=1 C:\temp>\Windows\py.exe Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on

3.11.0b4?

2022-06-23 Thread Richard David
Is there a new scheduled date for releasing 3.11.0b4? Are there issues with b4 that have implications for b3? I realize it will be released when ready and am not trying to push or harass anyone involved. It just seems that versions are usually released on schedule so I'm wondering if there's s

Re: 3.11.0b4?

2022-06-24 Thread Richard David
On Thursday, June 23, 2022 at 9:15:19 AM UTC-4, Richard David wrote: > Is there a new scheduled date for releasing 3.11.0b4? Are there issues with > b4 that have implications for b3? > > I realize it will be released when ready and am not trying to push or harass > anyone in

Re: 3.11.0b4?

2022-06-24 Thread Richard David
On Friday, June 24, 2022 at 11:36:06 AM UTC-4, Mats Wichmann wrote: > On 6/23/22 07:14, Richard David wrote: > > Is there a new scheduled date for releasing 3.11.0b4? Are there issues with > > b4 that have implications for b3? > > > > I realize it will be released w

Pip upgrade causing issues in 3.10

2022-07-19 Thread David Raymond
So after a long while I'm finally getting around to upgrading to 3.10 on Windows from 3.9, and my first pip upgrade is causing issues with the installation. Problem seems to be that I run pip from a command prompt in the Scripts folder, and it seems pip is trying to completely remove the Script

RE: Parallel(?) programming with python

2022-08-08 Thread David Raymond
>> But, an easier and often >> better option for concurrent data access is use a (relational) >> database, then the appropriate transaction isolation levels >> when reading and/or writing. >> > > That would obviusly save some coding (but would introduce the need to > code the interaction with the d

Pythonic way to run the asyncio loop forever in python 3.10

2022-10-06 Thread David Jander
Python 3.11 seems to mitigate this problem by introducing the asyncio.Runner() context-manager. But for the time being for 3.10, I see no good solution. Best regards, -- David Jander -- https://mail.python.org/mailman/listinfo/python-list

RE: Find 6-letter words that are hidden (embedded) within

2023-02-24 Thread David Raymond
> Find 6-letter words that are hidden (embedded) within each row of letters. > The letters are in the correct order. > > 1. JSOYOMFUBELR > 2. SCDUARWDRLYE > 3. DASNAGEFERTY > 4. CLULOOTSCEHN > 5. USENEARSEYNE > The letters are in the correct order. S

RE: How to escape strings for re.finditer?

2023-02-28 Thread David Raymond
> I wrote my previous message before reading this.  Thank you for the test you > ran -- it answers the question of performance.  You show that re.finditer is > 30x faster, so that certainly recommends that over a simple loop, which > introduces looping overhead.  >>     def using_simple_loop(

RE: Debugging reason for python running unreasonably slow when adding numbers

2023-03-15 Thread David Raymond
> Or use the sum() builtin rather than reduce(), which was > *deliberately* removed from the builtins. The fact that you can get > sum() without importing, but have to go and reach for functools to get > reduce(), is a hint that you probably shouldn't use reduce when sum > will work. Out of curios

RE: Debugging reason for python running unreasonably slow when adding numbers

2023-03-15 Thread David Raymond
> Then I'm very confused as to how things are being done, so I will shut > up. There's not enough information here to give performance advice > without actually being a subject-matter expert already. Short version: In this specific case "weights" is a 5,147 element list of floats, and "input" is

RE: Problem with __sub__

2023-03-23 Thread David Raymond
I believe your problem is __rsub__, not __sub__. When you havethen that uses the "r" version of the operators. In your __rsub__ (used when you have - ) you instead return - which is backwards. Notice how the final return should also be -4,95 and not the +4,95 it's returning. > If on th

RE: Initialising a Config class

2023-04-11 Thread David Raymond
Not sure if I'm fully understanding the question. But one option instead of making everything class attributes is to just define __getattr__ for when it doesn't find an attribute. Won't work for every single valid section and option name (because of spaces, name overlaps, etc) but should cover

pip module not found

2023-05-12 Thread David John
Hi, I recently have been experiencing issues with the pip installation module. I have python version 3.11 installed. I've checked the directory installed in the systems variables window and nothing is amiss. Kindly assist. Regards, David -- https://mail.python.org/mailman/listinfo/python-list

Re: wordplay

2023-05-30 Thread David Dalton
In article , David Dalton wrote: > cODINg :-) Since Odin is described as the Sky Father, I think he is the one I call Cosma, not the one I call Gwydion or the avatar type who was the author of Havamal 138--141. c I take to represent light. g I take to represent gravity. -- ht

RE: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread David Raymond
In regards to the various comments about adding in print() calls what I've found myself doing is to basically always use the logging module, and use logging.debug() for those. Somewhere at the top of the script I'll have a line like... DEBUG = False ...and when initializing the handler to stdo

Re: .title() - annoying mistake

2021-03-20 Thread David Kolovratník
27; > > This is the "Dz" character. > > When you write that code to capitalize your book titles, you should be > calling .title() rather than .upper() if you are doing it right. It would be great to read this reasoning in the documentation. Cheers, David -- https://mail.python.org/mailman/listinfo/python-list

typing instance variable

2021-05-13 Thread David Kolovratník
lly declare instance variables in the class body attr: int # This is an instance variable with a default value charge_percent: int = 100 Why Python believes foo is class variable? python3 -V Python 3.6.8 Kind regards, David -- https://mail.python.org/mailman/listinfo/python-list

RE: on writing a while loop for rolling two dice

2021-08-30 Thread David Raymond
> def how_many_times(): > x, y = 0, 1 > c = 0 > while x != y: > c = c + 1 > x, y = roll() > return c, (x, y) Since I haven't seen it used in answers yet, here's another option using our new walrus operator def how_many_times(): roll_count = 1 while (rolls := roll())[0] !=

[Hint]: python simulator http

2021-09-22 Thread David Caul
Hi All, Making any simulator http request , response base simulator with some UI on browser , what are all things python package can support br David -- https://mail.python.org/mailman/listinfo/python-list

RE: frozenset can be altered by |=

2021-11-22 Thread David Raymond
>> (venv_3_10) marco@buzz:~$ python >> Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18) >> [GCC 10.1.1 20200718] on linux >> Type "help", "copyright", "credits" or "license" for more information. >> >>> a = frozenset((3, 4)) >> >>> a >> frozenset({3, 4}) >> >>> a |= {5,} >> >>> a

Error installing requirements

2022-02-18 Thread Saruni David
PS C:\Users\Nepapa David\cpims_api> pip install -r requirements/base.txt DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details ab

RE: One-liner to merge lists?

2022-02-22 Thread David Raymond
> Is there a simpler way? >>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']} >>> [a for b in d.values() for a in b] ['aaa', 'bbb', 'ccc', 'fff', 'ggg'] >>> -- https://mail.python.org/mailman/listinfo/python-list

ANN: parsita 1.0.0, a new parser combinator library

2016-10-03 Thread David Hagen
Parsita is a parser combinator library for Python. I wrote it because I missed the intuitive parser combinator library in Scala while trying to parse custom model file formats in Python. Parsita is focused on a clean grammar-like syntax, defining operators like `|` and `&` and functions like `o

Re: constructor classmethods

2016-11-07 Thread David Palao
>> >> If the class in question has legitimate, non-testing, reasons to specify >> different Queues, then make it a default argument instead: >> >> def __init__(self, ..., queue=None): >> if queue is None: >> queue = Queue() >> self.queue = queue > > I already stated that this is

Re: learning and experimenting python.

2016-12-30 Thread David Froger
Quoting einstein1...@gmail.com (2016-12-30 18:50:19) > Hello everyone, > I am the new comer and learner of python. > I have a doubt that when I type python and press enter it shows a prompt like > >>> > But why it is >>> ? > Is there any special reason? > Why it is not setted as @,& or any other sp

Re: Unable to Debug

2017-01-02 Thread David Froger
Hello Aritra, Your standard output and standard error are mixed (I don't know why), so error message is not immediate to read. It is: > Traceback (most recent call last): > File "C:/Users/Aritra Bhattacharjee/PycharmProjects/PythonWebModules/Web > Scraper.py", line 17, in > print(product_

working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread David D
I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run the code, it does exactly what I want, it returns the __str__ information. This all works great. BUT 1)

Python: How do I resolve oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available?

2017-02-04 Thread david . amadi
Hello All, I’m a newbie to python programming – got into it predominately for the purposes of machine learning and data mining and even though I’ve committed several weeks to learning the scripting language, I have struggled to fully grasp how it works. I’m looking to scrape title, video Id, v

Re: Python: How do I resolve oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available?

2017-02-05 Thread Amadi, David
a file defining the credentials. In the python script (link in the above line), you could only add the API Key, which I obtained and provided - but the script won't run. I look forward to hearing back from you. Regards, David On 5 February 2017 at 03:16, Deborah Swanson wrote: > david.am

Re: Python: How do I resolve oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available?

2017-02-05 Thread Amadi, David
piclient/discovery.py", line 270, in _retrieve_discovery_doc resp, content = http.request(actual_url) AttributeError: 'str' object has no attribute 'request' On 5 February 2017 at 19:58, Deborah Swanson wrote: > OK David, > > I'm also a Linux newbie and

Why is the use of an undefined name not a syntax error?

2018-04-01 Thread David Foster
mypy would eliminate more errors like misspelled method calls, type mismatch errors, etc. But if it is cheap to detect a wide variety of name errors at compile time, is there any particular reason it is not done? - David P.S. Here are some uncommon language features that interfere with identifying

Re: why does list's .remove() does not return an object?

2018-05-17 Thread David Stanek
ng that they want to be able to do some sort of method chaining like: the_list.remove(x).remove(y) Although the clarifying example was contrived and confusing. A more concrete example would be greatly appreciated. -- david stanek web: https://dstanek.com twitter: https://twitter.com/dstanek -- https://mail.python.org/mailman/listinfo/python-list

Multi-threading with a simple timer?

2018-07-02 Thread David D
Is there a SIMPLE method that I can have a TIMER count down at a user input prompt - if the user doesn't enter information within a 15 second period, it times out. I am going to be using pycharm and not the shell. Thanks in advance. -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >