Re: Logging module stopped working

2017-10-17 Thread llanitedave
On Monday, October 16, 2017 at 11:58:12 PM UTC-7, Steve D'Aprano wrote: > On Tue, 17 Oct 2017 03:06 pm, llanitedave wrote: > > [...] > > I set up the logging code at the very beginning of the app, before any other > > work is done. Here's the relevant code: > > > > #!/usr/bin/env python3 > [...

Can't find latest version of 3.4.x on download page

2017-10-17 Thread Christopher Reimer
Greetings, I'm setting up different test environments for tox. I can't find Windows installer for the latest version of Python 3.4 on the download page. Versions 3.4.5 to 3.4.7 only have the source files available. Version 3.4.4 is the last version with Windows installers. Testing on Python 3.

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 8:24:52 PM UTC-5, Daniel Flick wrote: > On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > > Daniel Flick wrote: > > > > > On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > > >> > > >> Peter, I am not following. Are you sa

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 8:27:03 PM UTC-5, Daniel Flick wrote: > On Tuesday, October 17, 2017 at 8:24:52 PM UTC-5, Daniel Flick wrote: > > On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > > > Daniel Flick wrote: > > > > > > > On Tuesday, October 17, 2017 at 4:25:02 PM

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 5:01:13 PM UTC-5, Peter Otten wrote: > Daniel Flick wrote: > > > On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > >> > >> Peter, I am not following. Are you saying that there is a function that > >> returns the network only? network_address

Re: Test Bank for Campbell Biology 11th Edition by Urry, Cain

2017-10-17 Thread ihamidx0
On Wednesday, September 27, 2017 at 5:52:23 PM UTC-4, Test Banks wrote: > Greetings, > > You can get Test Bank for " Campbell Biology, 11 Edition by Lisa A. > Urry,Michael L. Cain,Steven A. Wasserman,Peter V. Minorsky,Jane B. Reece " at > very reasonable price. Our team is available 24/7 and 36

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Peter Otten
Daniel Flick wrote: > On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: >> >> Peter, I am not following. Are you saying that there is a function that >> returns the network only? network_address was giving me the mask >> attached to the end but maybe I was doing something wr

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > > Peter, I am not following. Are you saying that there is a function that > returns the network only? network_address was giving me the mask attached to > the end but maybe I was doing something wrong. > > For an input of

Re: Fwd: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Nathan Hilterbrand
Absolutely, Stefan! I like yours a lot better. I am an old perl hack that is still learning the ins and outs of Python, and this is just the sort of thing that I like to see. Thanks! On Tue, Oct 17, 2017 at 4:19 PM, Stefan Ram wrote: > Nathan Hilterbrand writes: > >I may have misunderstood w

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
Peter, I am not following. Are you saying that there is a function that returns the network only? network_address was giving me the mask attached to the end but maybe I was doing something wrong. For an input of LAN_IP=192.168.99.1/24 ipaddress.IPv4Interface(LAN_IP).ip returns 192.168.99.0/

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
I was hoping for something more like netaddr.network. Trying to save lots of code as this will be inside a Mako template and I don't want it to get messy. Sounds like the split function will allow me to chop off the /xx from the end of the string which gives me what I need. Off to read docu

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
On Tuesday, October 17, 2017 at 12:37:03 PM UTC-5, Rob Gaddi wrote: > On 10/17/2017 09:59 AM, Daniel Flick wrote: > > I am very new to Python and have been struggling to find some info on > > processing IP addresses. > > > > get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I c

Re: why del is not a function or method?

2017-10-17 Thread bartc
On 17/10/2017 21:05, Chris Angelico wrote: On Wed, Oct 18, 2017 at 3:19 AM, bartc wrote: On 17/10/2017 16:44, Terry Reedy wrote: In CPython left-hand expressions are not merely quoted for runtime evaluation and use. They are parsed at compile time and compiled to almost normal bytecode. The

Re: why del is not a function or method?

2017-10-17 Thread Chris Angelico
On Wed, Oct 18, 2017 at 3:19 AM, bartc wrote: > On 17/10/2017 16:44, Terry Reedy wrote: > >> In CPython left-hand expressions are not merely quoted for runtime >> evaluation and use. They are parsed at compile time and compiled to almost >> normal bytecode. The difference is that a load bytecode

Re: PEP 249 Compliant error handling

2017-10-17 Thread MRAB
On 2017-10-17 20:25, Israel Brewster wrote: On Oct 17, 2017, at 10:35 AM, MRAB > wrote: On 2017-10-17 18:26, Israel Brewster wrote: I have written and maintain a PEP 249 compliant (hopefully) DB API for the 4D database, and I've run into a situation where co

Fwd: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Nathan Hilterbrand
Hit wrong button before. -- Forwarded message -- From: Nathan Hilterbrand Date: Tue, Oct 17, 2017 at 2:22 PM Subject: Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25 To: Rob Gaddi I may have misunderstood what you were looking for, b

Re: [RELEASE] Python 3.7.0a2 is now available for testing

2017-10-17 Thread Ned Batchelder
On 10/17/17 3:35 PM, Ned Deily wrote: Python 3.7.0a2 is the second of four planned alpha previews of Python 3.7, the next feature release of Python. During the alpha phase, Python 3.7 remains under heavy development: additional features will be added and existing features may be modified or dele

Aw: Re: PEP 249 Compliant error handling

2017-10-17 Thread Karsten Hilbert
> That's certainly a possibility, if that behavior conforms to the DB API > "standards". My concern in this front is that in my experience working with > other PEP 249 modules (specifically psycopg2), I'm pretty sure that columns > designated as type VARCHAR or TEXT are returned as strings (unic

[RELEASE] Python 3.7.0a2 is now available for testing

2017-10-17 Thread Ned Deily
Python 3.7.0a2 is the second of four planned alpha previews of Python 3.7, the next feature release of Python. During the alpha phase, Python 3.7 remains under heavy development: additional features will be added and existing features may be modified or deleted. Please keep in mind that this is a

Re: PEP 249 Compliant error handling

2017-10-17 Thread Israel Brewster
> On Oct 17, 2017, at 10:35 AM, MRAB wrote: > > On 2017-10-17 18:26, Israel Brewster wrote: >> I have written and maintain a PEP 249 compliant (hopefully) DB API for the >> 4D database, and I've run into a situation where corrupted string data from >> the database can cause the module to error

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Abdur-Rahmaan Janhangeer
any idea why this is on spam ? Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 17 Oct 2017 21:00, "Daniel Flick" wrote: > I am very new to Python and have been struggling to find some info on > processing IP addresses. > > get_network returns 192.168.1.128/25 but I n

Re: how to read in the newsreader

2017-10-17 Thread Pete Forman
Thomas Jollans writes: > On 16/10/17 20:02, Pete Forman wrote: >> Thomas Jollans writes: >> >>> On 2017-10-16 08:48, Pete Forman wrote: Andrew Z writes: > hmm. i did do that. maybe just a delay. > I'll see how it will go tomorrow then. Thank you gents. > > On Mon, Oc

Re: PEP 249 Compliant error handling

2017-10-17 Thread MRAB
On 2017-10-17 18:26, Israel Brewster wrote: I have written and maintain a PEP 249 compliant (hopefully) DB API for the 4D database, and I've run into a situation where corrupted string data from the database can cause the module to error out. Specifically, when decoding the string, I get a "Uni

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Peter Otten
Daniel Flick wrote: > I am very new to Python and have been struggling to find some info on > processing IP addresses. > > get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I can > do this with netaddr but I am working with Mako templates and ipaddress is > a built in module so

PEP 249 Compliant error handling

2017-10-17 Thread Israel Brewster
I have written and maintain a PEP 249 compliant (hopefully) DB API for the 4D database, and I've run into a situation where corrupted string data from the database can cause the module to error out. Specifically, when decoding the string, I get a "UnicodeDecodeError: 'utf-16-le' codec can't deco

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Rob Gaddi
On 10/17/2017 09:59 AM, Daniel Flick wrote: I am very new to Python and have been struggling to find some info on processing IP addresses. get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I can do this with netaddr but I am working with Mako templates and ipaddress is a bui

Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Daniel Flick
I am very new to Python and have been struggling to find some info on processing IP addresses. get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I can do this with netaddr but I am working with Mako templates and ipaddress is a built in module so there are less dependencies.

Re: Logging module stopped working

2017-10-17 Thread llanitedave
Those are some good suggestions, I've found that I won't be able to work on it today, but I'll definitely follow up tomorrow. As for not showing all the code, the main window and its associated code are definitely there and working. I didn't post it because of all the setup code for fields and

Re: why del is not a function or method?

2017-10-17 Thread bartc
On 17/10/2017 16:44, Terry Reedy wrote: In CPython left-hand expressions are not merely quoted for runtime evaluation and use.  They are parsed at compile time and compiled to almost normal bytecode.  The difference is that a load bytecode is replace by a store bytecode (that takes a second ar

Re: why del is not a function or method?

2017-10-17 Thread Marko Rauhamaa
Terry Reedy : > On 10/17/2017 1:07 AM, Steve D'Aprano wrote: >> -- unless the interpreter > made del a special case, not a regular function. > > This is what Lisp does. Most functions are 'normal': unquoted argument > expressions are evaluated. Some are 'special': at least one of the > argument

Re: multiprocessing shows no benefit

2017-10-17 Thread Terry Reedy
On 10/17/2017 10:52 AM, Jason wrote: I've got problem that I thought would scale well across cores. What OS? def f(t): return t[0]-d[ t[1] ] d= {k: np.array(k) for k in entries_16k } e = np.array() pool.map(f, [(e, k) for k in d] *Every* multiprocessing example in the doc intentiona

Re: why del is not a function or method?

2017-10-17 Thread Terry Reedy
On 10/17/2017 1:07 AM, Steve D'Aprano wrote: The point is, if del were a function, then calling del(x) would pass the *value* of x into the function, not the name 'x' So we would have to quote either the entire rest of the statement, or each item separately, -- unless the interpreter

Re: multiprocessing shows no benefit

2017-10-17 Thread Thomas Nyberg
Could you post a full code snippet? If the lists of 16k numpy arrays are fixed (say you read them from a file), you could just generate random values that could be fed into the code as your list would. It's hard to say how things could be sped up without a bit more specificity. Cheers, Thomas --

multiprocessing shows no benefit

2017-10-17 Thread Jason
I've got problem that I thought would scale well across cores. def f(t): return t[0]-d[ t[1] ] d= {k: np.array(k) for k in entries_16k } e = np.array() pool.map(f, [(e, k) for k in d] At the heart of it is a list of ~16k numpy arrays (32 3D points) which are stored in a single dict. Using

Re: why del is not a function or method?

2017-10-17 Thread Thomas Jollans
On 2017-10-17 03:07, Steve D'Aprano wrote: > On Tue, 17 Oct 2017 08:57 am, Thomas Jollans wrote: > >> On 16/10/17 21:12, Stefan Ram wrote: >>> r...@zedat.fu-berlin.de (Stefan Ram) writes: »x = None« observably has not the same effect as »del x«: >>> >>> Paradoxically, /deleting/ a local var

Re: how to read in the newsreader

2017-10-17 Thread Thomas Jollans
On 17/10/17 00:55, Mikhail V wrote: > Thomas wrote: >> >> On 16/10/17 20:02, Pete Forman wrote: >>> Thomas Jollans writes: >>> ... > If you do stick with a digest then check your newsreader for a feature > to expand it. Then you can read and reply as if you were getting > individual po

Re: right list for SIGABRT python binary question ?

2017-10-17 Thread Karsten Hilbert
On Tue, Oct 17, 2017 at 12:04:09PM +1100, Steve D'Aprano wrote: > > is this the right list to ask for help in debugging a > > SIGABORT (?) happening on shutdown of a Python 2.7 script ? > > > > If not, which one is ? > > You should try here first. > > Please ensure you read and follow this firs

Re: Logging module stopped working

2017-10-17 Thread Steve D'Aprano
On Tue, 17 Oct 2017 03:06 pm, llanitedave wrote: [...] > I set up the logging code at the very beginning of the app, before any other > work is done. Here's the relevant code: > > #!/usr/bin/env python3 [... snip imports ...] > class MainWindow(QMainWindow): > def __init__(self): > s