!RE: Namedtuple problem #32.11.d

2017-06-07 Thread Deborah Swanson
Neil Cerutti wrote, on Wednesday, June 07, 2017 10:36 AM > > On 2017-06-06, Deborah Swanson wrote: > >> I too have sometimes started with a namedtuple and then found I > >> needed to make changes to the records. I typically abandon > namedtuple > >&g

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Richard Moseley wrote, on Tuesday, June 06, 2017 8:16 AM > > On 06/06/17 13:29, Neil Cerutti wrote: > > On 2017-06-06, Deborah Swanson wrote: > >> I have a list of namedtuples: > >> > >>[{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Neil Cerutti wrote, on Tuesday, June 06, 2017 5:29 AM > > On 2017-06-06, Deborah Swanson wrote: > > I have a list of namedtuples: > > > > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > > . . . > > {Record}(r0

RE: Namedtuple problem #32.11.d

2017-06-06 Thread Deborah Swanson
Peter Otten wrote, on Tuesday, June 06, 2017 1:31 AM > > Deborah Swanson wrote: > > > [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') > > Lovely column names ;) Not very sexy names, I agree ;) The columns do have real names. The first 10 are

Namedtuple problem #32.11.d

2017-06-05 Thread Deborah Swanson
I have a list of namedtuples: [{Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='') . . . {Record}(r0=v0, r1=v1,...,r10=v10,r11='',...r93='')] In the first section of code, I process some of the first 10 columns (r0=v0, r1=v1,...,r10=v10), and place the results in

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 1:15 AM > > Deborah Swanson wrote: > > I have already offered to do whatever you would like me to > do on this > > system > > If you wouldn't mind, I'd like to see the output from this command: > >

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 1:12 AM > > Deborah Swanson wrote: > > Why do you care so deeply what pip does on an operating > system that is > > no longer supported? > > Being pipless is a sufficiently distressing fate that we'd > like to

RE: How to install Python package from source on Windows

2017-06-01 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, June 01, 2017 12:59 AM > > Deborah Swanson wrote: > > I got one suggestion that I could just copy the files to "the > > appropriate directories", > > That was me, but I've just had a look at the source, and it > seems

RE: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
; [mailto:python-list-bounces+python=deborahswanson.net@python.o > rg] On Behalf Of breamore...@gmail.com > Sent: Tuesday, May 30, 2017 5:06 PM > To: python-list@python.org > Subject: Re: How to install Python package from source on Windows > > > On Tuesday, May 30, 2017 at 11

RE: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
ow to install Python package from source on Windows > > > On 30 May 2017 at 21:27, Deborah Swanson > wrote: > > I have already offered to do whatever you would like me to > do on this > > system - after I'm up and running on Linux. I need a functioning > >

RE: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
; > > On Wed, May 31, 2017 at 6:27 AM, Deborah Swanson > wrote: > > Please accept my word that the attempt to upgrade pip broke when it > > tried to install Visual Studio 2015, and I wouldn't even > have known to > > say that's what happened if I hadn&#

RE: Re: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
you think we disagree on. Deborah > -Original Message- > From: Paul Moore [mailto:p.f.mo...@gmail.com] > Sent: Tuesday, May 30, 2017 12:57 PM > To: pyt...@deborahswanson.net > Cc: python-list@python.org > Subject: Re: How to install Python package from source on Win

RE: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
.f.mo...@gmail.com] > Sent: Tuesday, May 30, 2017 11:01 AM > To: pyt...@deborahswanson.net; python-list@python.org > Subject: How to install Python package from source on Windows > > > On 30 May 2017 at 16:56, Deborah Swanson > wrote: > > I'm sorry people on the

RE: How to install Python package from source on Windows

2017-05-30 Thread Deborah Swanson
> -Original Message- > From: Deborah Swanson [mailto:pyt...@deborahswanson.net] > Sent: Tuesday, May 30, 2017 8:57 AM > To: 'Paul Moore' > Subject: RE: How to install Python package from source on Windows > > > I'm sorry people on the list someho

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Since none of you have XP SP2 with Anaconda3 Python 3.4.3, to either confirm or deny my results, and I no longer have the message with the traceback showing what happened, nothing anybody says at this point matters wrt to what happens in XP SP2. -- https://mail.python.org/mailman/listinfo/python-

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
breamore...@gmail.com wrote, on Thursday, May 25, 2017 3:23 PM > > On Thursday, May 25, 2017 at 10:32:56 PM UTC+1, Deborah Swanson wrote: > > > Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > > > I didn't see a traceback where you tried to upgrade pip

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
MRAB wrote, on Thursday, May 25, 2017 2:46 PM > > On 2017-05-25 21:24, Chris Angelico wrote: > > On Fri, May 26, 2017 at 6:16 AM, Deborah Swanson > > wrote: > >>> Anyway I can confirm that VS is not required for installing and > >>> using pip on XP,

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
> Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > I didn't see a traceback where you tried to upgrade pip to > > 9.0.1. It's a long thread. You just didn't find it. This is my last reply on this thread to anything to do with XP SP2 (observations in XP SP3 do not apply) or Visual Stu

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Michael Torrie wrote, on Thursday, May 25, 2017 1:57 PM > > On 05/25/2017 02:16 PM, Deborah Swanson wrote: > >> I just fired up my Windows XP SP3 virtual machine, which has > >> no development tools whatsoever on it (no VS, nothing). I > >> installed 32

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Michael Torrie wrote, on Thursday, May 25, 2017 12:12 PM > > On 05/25/2017 10:09 AM, Deborah Swanson wrote: > > Could be, maybe it's something they do for every > installation, whether > > it will use it or not. But it always breaks when it can't install > >

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Chris Angelico wrote, on Thursday, May 25, 2017 12:47 AM > > On Thu, May 25, 2017 at 4:57 PM, Deborah Swanson > wrote: > > Oh, what bliss it must be to run on a system that hasn't > been declared > > a pariah by everyone and his dog. (But yet it covers all >

RE: How to install Python package from source on Windows

2017-05-25 Thread Deborah Swanson
Gregory Ewing wrote, on Wednesday, May 24, 2017 10:58 PM > > Deborah Swanson wrote: > > > So now I'm pipless. > > You should be able to get it back using > > python -m ensurepip > > BTW, I don't know why upgrading pip would fail due to lack of

RE: How to install Python package from source on Windows

2017-05-24 Thread Deborah Swanson
eryk sun wrote, on Wednesday, May 24, 2017 6:32 PM > > On Thu, May 25, 2017 at 12:18 AM, Deborah Swanson > wrote: > > > > When I tried to upgrade pip it failed because it could neither find > > nor install Visual Studio 2015. > > Installing and upgrading

RE: How to install Python package from source on Windows

2017-05-24 Thread Deborah Swanson
Paul Moore wrote, on Wednesday, May 24, 2017 5:53 AM > On Monday, 15 May 2017 22:42:22 UTC+1, Deborah Swanson wrote: > > MRAB wrote, on Monday, May 15, 2017 12:44 PM > > > > > > On 2017-05-15 13:52, eryk sun wrote: > > > > On Mon, May 15, 2017 at

RE: Survey: improving the Python std lib docs

2017-05-18 Thread Deborah Swanson
> -Original Message- > From: Python-list > [mailto:python-list-bounces+python=deborahswanson.net@python.o > rg] On Behalf Of Gregory Ewing > Sent: Thursday, May 18, 2017 5:00 PM > To: python-list@python.org > Subject: Re: Survey: improving the Python std lib docs &g

RE: Survey: improving the Python std lib docs

2017-05-18 Thread Deborah Swanson
justin walters wrote, on Thursday, May 18, 2017 8:09 AM > To: python-list@python.org > Subject: Re: Survey: improving the Python std lib docs > > So, args can be treated as a simple (named)? tuple or a > simple dictionary. `*` unpacks a list or tuple and `**` > unpacks a dictionary. I'm sure it'

RE: Survey: improving the Python std lib docs

2017-05-18 Thread Deborah Swanson
to the Point(x=33, y=22). A trivial example that doesn't begin to hint at the poential powers of this kwarg. The inventory[partnum] example is also quite trivial compared to the kwarg use that Peter showed me. When I asked him for an explanation, this is what I and he he said: Deborah Swa

RE: Survey: improving the Python std lib docs

2017-05-17 Thread Deborah Swanson
Cem Karan wrote, on Wednesday, May 17, 2017 2:48 AM > > On May 16, 2017, at 12:36 PM, rzed wrote: > > > On Friday, May 12, 2017 at 6:02:58 AM UTC-4, Steve D'Aprano wrote: > >> One of the more controversial aspects of the Python > ecosystem is the > >> Python docs. Some people love them, and so

RE: How to install Python package from source on Windows

2017-05-17 Thread Deborah Swanson
> Chris Angelico wrote, on Tuesday, May 16, 2017 9:50 PM > > For the person who's using it, or for all the malware authors > > who are gleefully using your computer as their own > > playground? It certainly is a fine operating system for the latter. > > > > ChrisA > > Nobody's used my XP for a m

RE: How to install Python package from source on Windows

2017-05-17 Thread Deborah Swanson
Chris Angelico wrote, on Wednesday, May 17, 2017 12:02 AM > > On Wed, May 17, 2017 at 4:59 PM, Deborah Swanson > wrote: > > So perhaps now you might be agreeing with me that investing > in Windows > > and Visual Studio now is a shortsighted move that will > like

RE: How to install Python package from source on Windows

2017-05-17 Thread Deborah Swanson
Chris Angelico wrote, on Tuesday, May 16, 2017 11:36 PM > > On Wed, May 17, 2017 at 4:31 PM, Deborah Swanson > wrote: > > But the myth that modern Windows users are safe from > malware is just > > that, a myth. I have plenty of Microsoftie friends who tell me >

RE: How to install Python package from source on Windows

2017-05-16 Thread Deborah Swanson
Chris Angelico wrote, on Tuesday, May 16, 2017 9:50 PM > > On Wed, May 17, 2017 at 2:14 PM, Deborah Swanson > wrote: > > So please, all of you, stop beating me up about continuing > to use XP. > > It really is a fine operating system, but everyone else > wants to g

RE: How to install Python package from source on Windows

2017-05-16 Thread Deborah Swanson
Nathan Ernst wrote, on Tuesday, May 16, 2017 8:33 PM > Deborah, long term, you have to realize that if you insist on > sticking to WinXP, the rest of the world will, eventually, > leave you behind.Software vendors want to support the fewest > platforms/configurations as possible. XP is not sup

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Gregory Ewing wrote, on Monday, May 15, 2017 4:55 PM > > Deborah Swanson wrote: > > It continues to amaze me that Anaconda and Python.org, probably the > > two biggest distributors of official Python builds, are now relying on > > Visual C++. Why can't Python deve

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 2:58 PM > > On Tue, May 16, 2017 at 7:01 AM, Deborah Swanson > wrote: > > But I'm a little more mystified that official Python builds are > > leaning on Visual C++ (and that's what the crutch comment was > >

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
mparing apples to oranges. MSDOS is not a language. It is an operating system (albeit a bare-bones, single-user one). Regards, Nathan On Mon, May 15, 2017 at 4:01 PM, Deborah Swanson wrote: Chris Angelico wrote, on Monday, May 15, 2017 11:22 AM > > On Tue, May 16, 2017 at 4:12 AM, Debo

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
MRAB wrote, on Monday, May 15, 2017 12:44 PM > > On 2017-05-15 13:52, eryk sun wrote: > > On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson > > wrote: > >> > >> Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There > >> weren't a

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 11:22 AM > > On Tue, May 16, 2017 at 4:12 AM, Deborah Swanson > wrote: > > It continues to amaze me that Anaconda and Python.org, probably the > > two biggest distributors of official Python builds, are now relying on >

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
eryk sun wrote, on Monday, May 15, 2017 5:52 AM > > On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson > wrote: > > > > Where did you find recordclass-0.4.3-cp34-cp34m-win32.whl? There > > weren't any win32 builds on > https://pypi.python.org/pypi/recordclass

RE: How to install Python package from source on Windows

2017-05-15 Thread Deborah Swanson
Chris Angelico wrote, on Monday, May 15, 2017 1:02 AM > > On Mon, May 15, 2017 at 4:48 PM, Deborah Swanson > wrote: > > Chris Angelico wrote on Sunday, May 14, 2017 11:30 PM > >> > >> On Mon, May 15, 2017 at 4:28 PM, Deborah Swanson > >> wrote: >

RE: How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
Chris Angelico wrote on Sunday, May 14, 2017 11:30 PM > > On Mon, May 15, 2017 at 4:28 PM, Deborah Swanson > wrote: > > > > Again, maybe I should go back to Python 2 for this. > > Won't help. The same problems will exist. > > ChrisA > Good to

RE: How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
eryk sun wrote on Sunday, May 14, 2017 9:27 PM > > On Mon, May 15, 2017 at 4:19 AM, Deborah Swanson > wrote: > > Unfortunately I don't have Visual Studio 2015+ installed > and I can't > > install it on Windows XP SP2 (plus I really don't want to). >

RE: How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
eryk sun wrote, on Sunday, May 14, 2017 9:27 PM > > On Mon, May 15, 2017 at 4:19 AM, Deborah Swanson > wrote: > > Unfortunately I don't have Visual Studio 2015+ installed > and I can't > > install it on Windows XP SP2 (plus I really don't want to).

RE: How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
Chris Angelico wrote, on Sunday, May 14, 2017 9:56 PM > > On Mon, May 15, 2017 at 2:26 PM, eryk sun wrote: > > On Mon, May 15, 2017 at 4:19 AM, Deborah Swanson > > wrote: > >> Unfortunately I don't have Visual Studio 2015+ installed > and I can't &

RE: How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
eryk sun wrote, on Sunday, May 14, 2017 7:15 PM > > On Sun, May 14, 2017 at 8:46 PM, Deborah Swanson > wrote: > > I want to install the recordclass package: > > https://pypi.python.org/pypi/recordclass > > > > But they've only released wheel files for tw

How to install Python package from source on Windows

2017-05-14 Thread Deborah Swanson
I want to install the recordclass package: https://pypi.python.org/pypi/recordclass But they've only released wheel files for two platforms, macosx and win_amd64, neither of which will install on my system. I need win_x86 or intel_x86, which they don't provide. The only alternative to pip insta

RE: Bigotry (you win, I give up)

2017-04-20 Thread Deborah Swanson
And the moral to the story is: Don't worry. Be happy. And reach fot the stars (while still being mindful of those around you). -- https://mail.python.org/mailman/listinfo/python-list

RE: The belief that learning is more difficult for older people (was: Bigotry (you win, I give up))

2017-04-20 Thread Deborah Swanson
7;ve lived. Rustom Mody wrote, on Thursday, April 20, 2017 5:48 AM > > On Thursday, April 20, 2017 at 7:51:55 AM UTC+5:30, Ben Finney wrote: > > "Deborah Swanson" writes: > > > > > But this bit caught my eye because I hold the opposite > opinion about

RE: Bigotry (you win, I give up)

2017-04-19 Thread Deborah Swanson
> Rupee via Python-list writes: > > > I don't think stupid black people or senile old people should be > > allowable because those are not choosable *behaviors*. But is > > unable-to-learn old people a choosable behavior? You said that's ok. I've mostly been ignoring this thread and its predec

RE: Namedtuples: some unexpected inconveniences

2017-04-16 Thread Deborah Swanson
Peter Otten wrote, on Saturday, April 15, 2017 12:44 AM > > Deborah Swanson wrote: > > > I know it's your "ugly" answer, but can I ask what the '**' in > > > > fix = {label: max(values, key=len)} > > group[:] = [record._replace(**fix)

RE: Namedtuples: some unexpected inconveniences

2017-04-14 Thread Deborah Swanson
Roel Schroeven wrote, on Thursday, April 13, 2017 5:26 PM > > Gregory Ewing schreef op 13/04/2017 9:34: > > Deborah Swanson wrote: > >> Peter Otten wrote, on Wednesday, April 12, 2017 1:45 PM > >> > >>> Personally I would immediately discard the header

RE: Namedtuples: some unexpected inconveniences

2017-04-14 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, April 13, 2017 12:17 AM > > Deborah Swanson wrote: > > But I think you got it right in your last sentence below. defaultdict > > copied them because they were immutable, > > No, definitely not. A defaultdict will never take it upon &g

RE: Namedtuples: some unexpected inconveniences

2017-04-14 Thread Deborah Swanson
MRAB wrote, on Friday, April 14, 2017 2:19 PM > > In the line: > > values = {row[label] for row in group} > > 'group' is a list of records; row is a record (namedtuple). > > You can get the members of a namedtuple (also 'normal' tuple) by numeric > index, e.g. row[0], but the point of a n

RE: Namedtuples: some unexpected inconveniences

2017-04-14 Thread Deborah Swanson
fix = {label: max(values, key=len)} group[:] = [record._replace(**fix) for record in group] Peter Otten wrote, on Friday, April 14, 2017 2:16 PM > > def complete(group, label): > > values = {row[label] for row in group} > > # get "TypeError: tuple indices must be integers, not str" > > Ye

RE: Namedtuples: some unexpected inconveniences

2017-04-14 Thread Deborah Swanson
Peter, Retracing my steps to rewrite the getattr(row, label) code, this is what sent me down the rabbit hole in the first place. (I changed your 'rows' to 'records' just to use the same name everywhere, but all else is the same as you gave me.) I'd like you to look at it and see if you still think

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Roel Schroeven wrote, on Thursday, April 13, 2017 5:26 PM > > Gregory Ewing schreef op 13/04/2017 9:34: > > Deborah Swanson wrote: > >> Peter Otten wrote, on Wednesday, April 12, 2017 1:45 PM > >> > >>> Personally I would immediately discard the header

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, April 13, 2017 1:14 AM > > Deborah Swanson wrote: > > I don't exactly understand your point (2). If the > namedtuple does not > > have a label attribute, then getattr(record, label) will > get the error > > whether the nam

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, April 13, 2017 12:34 AM > > Deborah Swanson wrote: > > Peter Otten wrote, on Wednesday, April 12, 2017 1:45 PM > > > >> Personally I would immediately discard the header row once and for > >> all, not again and again on eve

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, April 13, 2017 12:36 AM > > If you want to be able to update your rows, you may find > this useful: > https://pypi.python.org/pypi/recordclass It's very similar to a namedtuple, but mutable. Looks like it should be a drop-in replacement. -- Greg Thanks Greg,

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Gregory Ewing wrote, on Thursday, April 13, 2017 12:17 AM > > Deborah Swanson wrote: > > But I think you got it right in your last sentence below. > defaultdict > > copied them because they were immutable, > > No, definitely not. A defaultdict will never take i

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Peter Otten wrote, on Thursday, April 13, 2017 12:17 AM > > Deborah Swanson wrote: > > > Peter Otten wrote, on Wednesday, April 12, 2017 11:35 PM > >> > >> Deborah Swanson wrote: > >> > >> > It's a small point, but I suspect getattr(r

RE: Swiss Ephemeris

2017-04-13 Thread Deborah Swanson
> > Rustom Mody wrote, on Monday, April 10, 2017 11:50 PM > > > > On Monday, April 10, 2017 at 11:26:47 AM UTC+5:30, Deborah Swanson > > wrote: > > > The great ancients were no less endowed with intelligence than we are, > > > they simply directed it t

RE: Swiss Ephemeris

2017-04-13 Thread Deborah Swanson
Rustom Mody wrote, on Monday, April 10, 2017 11:50 PM > > On Monday, April 10, 2017 at 11:26:47 AM UTC+5:30, Deborah Swanson wrote: > > The great ancients were no less endowed with intelligence than we are, > > they simply directed it to different ends. > > And just whe

RE: Namedtuples: some unexpected inconveniences

2017-04-13 Thread Deborah Swanson
Peter Otten wrote, on Wednesday, April 12, 2017 11:35 PM > > Deborah Swanson wrote: > > > It's a small point, but I suspect getattr(record, label) > would still > > fail, even if label's value is 'label' and only 'label', but what's &

RE: Visit All URLs with selenium python

2017-04-13 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 11:30 PM > > Here you can see now > > from selenium.webdriver.firefox.firefox_profile import FirefoxProfile > import random > from selenium import webdriver > from selenium.webdriver.common.keys import Keys > > browser.get('https://www.google.co.uk/

RE: Visit All URLs with selenium python

2017-04-12 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 11:05 PM > > Hi Deborah, >I checked again selecting css there found 11 URLS and I > printed it is printing all urls but it visits the first url not all.. Hmm. Sounds like you've changed your code in some way. Either changing the web page you're poi

RE: Visit All URLs with selenium python

2017-04-12 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 11:05 PM > > Hi Deborah, >I checked again selecting css there found 11 URLS and I > printed it is printing all urls but it visits the first url not all.. I'm just guessing again, but time.sleep(4) could be too long a time to sleep, especi

RE: Visit All URLs with selenium python

2017-04-12 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 11:03 PM > > from selenium.webdriver.firefox.firefox_profile import > FirefoxProfile import random from selenium import webdriver > from selenium.webdriver.common.keys import Keys Ok, that gives us a clue what you're working with, which will probably h

RE: Visit All URLs with selenium python

2017-04-12 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 9:49 PM > > browser.get('https://www.google.co.uk/search?q=Rashmi&oq=Rashm > i&aqs=chrome..69i57j69i60l3.6857j0j1&sourceid=chrome&ie=UTF-8# q=Rashmi+Custom+Tailors') > time.sleep(5) > > try: > p_links = > brow

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Deborah Swanson wrote, on Wednesday, April 12, 2017 4:29 PM > > Peter Otten wrote, on Wednesday, April 12, 2017 3:15 PM > > > > >> Indeed you cannot change the namedtuple's attributes. Like the > > >> "normal" tuple it is designed to be immu

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Peter Otten wrote, on Wednesday, April 12, 2017 3:15 PM > > Deborah Swanson wrote: > > >> >value = getattr(record, label) > >> > >> That should work. > > > > We may agree that it *should* work, by an intuitive grasp of how it > > shou

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Peter Otten wrote, on Wednesday, April 12, 2017 1:45 PM > > Deborah Swanson wrote: > > > I won't say the following points are categorically true, but I became > > convinced enough they were true in this instance that I abandoned the > > advised strategy. Which

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
> > On 2017-04-12 20:57, Deborah Swanson wrote: > > Are these bugs, or was there something I could have done to avoid > > these problems? Or are they just things you need to know > working with namedtuples? > > > > The list of namedtuples was created with: >

Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
I won't say the following points are categorically true, but I became convinced enough they were true in this instance that I abandoned the advised strategy. Which was to use defaultdict to group the list of namedtuples by one of the fields for the purpose of determining whether certain other field

RE: Swiss Ephemeris

2017-04-10 Thread Deborah Swanson
pdating to Win10 > > The idea is to create a full and complete program in Python > only, that would import stock data, generate planetary > coordinates, pre process train then predict > > I'll keep you updated > > Peter > > > > On 10 Apr 2017 9:10

RE: Swiss Ephemeris

2017-04-10 Thread Deborah Swanson
planetary positions. Whilst waiting for a solution can you advise of an efficient way of producing a a CSV file similar to the file attached, only planetary data required Many thanks Peter On 10 April 2017 at 02:52, Deborah Swanson wrote: Peter Henry wrote, on Sunday, April 09, 2017

RE: Swiss Ephemeris

2017-04-09 Thread Deborah Swanson
science by attempting to ressurrect it. The great ancients were no less endowed with intelligence than we are, they simply directed it to different ends. Rick Johnson wrote, on Sunday, April 09, 2017 9:00 PM > > On Sunday, April 9, 2017 at 8:52:44 PM UTC-5, Deborah Swanson wrote: > &g

RE: Swiss Ephemeris

2017-04-09 Thread Deborah Swanson
Peter Henry wrote, on Sunday, April 09, 2017 10:53 AM > > I have a package that has been altered to imported in to > python, however I tired to get is working but without success > I be missing something obvious > > The Swiss Ephemeris enable planetary coordinate to be > imported and used in

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
Rob Gaddi wrote, on Tuesday, April 04, 2017 3:56 PM > > On 04/04/2017 03:34 PM, Deborah Swanson wrote: > > Terry Reedy wrote, on Tuesday, April 04, 2017 11:04 AM > >> > >> I am sure that this is because list comprehensions were once thr only > >> comprehens

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
l of these concepts and code snippets to my study list. Thanks again Steve. ;) Deborah Steve D'Aprano wrote, on Monday, April 03, 2017 6:05 PM > > On Tue, 4 Apr 2017 03:27 am, Deborah Swanson wrote: > > > I'll admit that both dictionaries and comprehensions are still a

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
Terry Reedy wrote, on Tuesday, April 04, 2017 11:04 AM > > On 4/3/2017 2:35 AM, Gregory Ewing wrote: > > Deborah Swanson wrote: > > > >> Oh, come on. That's a fairly obscure citation in the docs, > one that > >> would take a good deal of experience an

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
o I need to backfill it now. I look forward to studying what you've written here as soon as I can. Deborah Steve D'Aprano wrote, on Monday, April 03, 2017 6:05 PM > > On Tue, 4 Apr 2017 03:27 am, Deborah Swanson wrote: > > > I'll admit that both dictionaries and c

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Gregory Ewing wrote, on Monday, April 03, 2017 4:23 PM > > Deborah Swanson wrote: > > I'd > > imagine that the old Google would have returned a good 10 pages or > > more (probably a lot more) of urls containing the phrase "dict > > comprehension"

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Gregory Ewing wrote, on Monday, April 03, 2017 4:23 PM > > Deborah Swanson wrote: > > All my guesses were based on the > > single variable (the most common type) examples I found. I just didn't > > think of putting a colon after 'label', and found nothing

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
e a web request, parse JSON or XML, handle datetimes). Remember: Python comes with batteries included. -Nate On Mon, Apr 3, 2017 at 5:09 PM, Deborah Swanson wrote: Nathan Ernst wrote, on April 03, 2017 1:59 PM > > I was a bit surprised when I looked at the language reference > for 3

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
list comprehensions in an article I'd read, and hardly understood the gist of it. But look at me now Ma, I've learned not only how to use list comprehensions but also a small tribe of other kinds of comprehensions! (If there's a moral to this story, heck if I know exactly what it i

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Jerry Hill wrote, on April 03, 2017 1:48 PM > > On Mon, Apr 3, 2017 at 10:30 AM, Deborah Swanson > wrote: > > Regular updates as the docs are updated would be a good > idea too. It's > > obvious that today's Google isn't up to it, although it > occur

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Rob Gaddi wrote, on April 03, 2017 10:38 AM > > On 04/03/2017 10:27 AM, Deborah Swanson wrote: > > Dennis Lee Bieber wrote, on April 03, 2017 9:35 AM > >> > >> On Mon, 3 Apr 2017 07:30:40 -0700, "Deborah Swanson" > >> declaimed the following: >

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Dennis Lee Bieber wrote, on April 03, 2017 9:35 AM > > On Mon, 3 Apr 2017 07:30:40 -0700, "Deborah Swanson" > declaimed the following: > > > > >Clearly there's more to be found in nooks, crannies and > byways in the > >docs than you'll get

RE: Two variable dictionary comprehension

2017-04-03 Thread Deborah Swanson
Gregory Ewing wrote, on April 02, 2017 11:35 PM > > Deborah Swanson wrote: > > > Oh, come on. That's a fairly obscure citation in the docs, one that > > would take a good deal of experience and time reading > through them to > > know was there, > > Yo

RE: Two variable dictionary comprehension

2017-04-02 Thread Deborah Swanson
Ben Finney wrote. on April 02, 2017 7:41 PM > > "Deborah Swanson" writes: > > > Chris Angelico wrote, on April 02, 2017 6:37 PM > > > > > > On Mon, Apr 3, 2017 at 11:26 AM, Deborah Swanson > > > > Maybe I'm having another "dum

RE: Two variable dictionary comprehension

2017-04-02 Thread Deborah Swanson
Ben Finney wrote, on April 02, 2017 6:38 PM > > "Deborah Swanson" writes: > > > It seems like this should be easy to rewrite as a dict > comprehension: > > > > records_idx = {} > > for idx, label in enumerate(records[0]): > >

RE: Two variable dictionary comprehension

2017-04-02 Thread Deborah Swanson
Chris Angelico wrote, on April 02, 2017 6:37 PM > > On Mon, Apr 3, 2017 at 11:26 AM, Deborah Swanson > wrote: > > It seems like this should be easy to rewrite as a dict > comprehension: > > > > records_idx = {} > > for idx, label in enumerate(record

Two variable dictionary comprehension

2017-04-02 Thread Deborah Swanson
It seems like this should be easy to rewrite as a dict comprehension: records_idx = {} for idx, label in enumerate(records[0]): records_idx[label] = idx Maybe I'm having another "dumb day", or maybe I've just been struggling with this (larger) problem for too long, but eveything I

RE: Developing a Python JIT and have trouble

2017-03-31 Thread Deborah Swanson
Yuheng Zou wrote, on Friday, March 31, 2017 6:52 AM > > I am building a Python JIT, so I want to change the > interp->eval_frame to my own function. > > I built a C++ library which contains EvalFrame function, and > then use dlopen and dlsym to use it. It looks like this: > > extern "C" PyObje

RE: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Deborah Swanson
filtered wrote, on March 27, 2017 9:09 PM > > Sorry but all your answers are pointless. > > I clearly asked about compiling PyUno MYSELF with a > self-compiled Python 3.6.1 installation. Is this so hard to > understand? Why do you give unrelated comments to a clear > questions? Sometimes it is

RE: Using/compiling pyuno with Python 3.6

2017-03-27 Thread Deborah Swanson
filtered wrote, on Monday, March 27, 2017 4:41 AM > > I am running CentOS 7.1 with LibreOffice 5.0.6.2. > > I have installed the official pyuno package from CentOS. > > I installed Python 3.6.1 from the sources and now I am trying > to import pyuno which fails with > > aj...@dev.zopyx.com:~/sr

RE: why and how to run forever and debug when error in for proc in psutil.process_iter()?

2017-03-25 Thread Deborah Swanson
Someone here can probably help you, but they'll need your Python version, operating system, and full traceback. They get tired of saying so. In this case, the full traceback is needed to see what went wrong and when (after which statements). Ho Yeung Lee wrote, on Saturday, March 25, 2017 1:38

RE: should i kill these two process with python?

2017-03-25 Thread Deborah Swanson
Chris Angelico wrote, on Saturday, March 25, 2017 1:53 AM > > On Sat, Mar 25, 2017 at 7:41 PM, Ho Yeung Lee > wrote: > > TCP127.0.0.1:1663 127.0.0.1:28091 > ESTABLISHED 9900 > > TCP127.0.0.1:28091127.0.0.1:1663 > ESTABLISHED 9532 > > > > above

RE: syntax error in first-time user script

2017-03-25 Thread Deborah Swanson
john polo wrote, on March 25, 2017 2:45 PM > > I had a misconception of how the Python interpreter works. If > I have a > script, call it example.py, in order to run it, I shouldn't be in the > interpreter? In other words, I should be at the Windows > command prompt, > for example > > C:/tes

  1   2   3   >