Re: Is there a way to install ALL Python packages?

2015-07-21 Thread Laura Creighton
>pip can load a list of packages. This is used daily to build machines >with Python + a specified list. It would be an interesting project for >someone to make, publish, and update a 'sumo' list of the most useful >packages that can all be loaded together. > >-- >Terry Jan Reedy For a list o

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Laura Creighton
In a message of Mon, 20 Jul 2015 20:30:48 -0700, Rustom Mody writes: >BTW my boys have just mailed me their latest: > 九.九九 > >9.99 > >Can some unicode/Chinese literate person inform me whether >that ideograph is equiv

Re: Can I copy/paste Python code?

2015-07-21 Thread Laura Creighton
In a message of Mon, 20 Jul 2015 19:49:56 -0700, ryguy7272 writes: >I'm trying to copy some Python code from a PDF book that I'm reading. I want >to test out the code, and I can copy it, but when I paste it into the Shell, >everything is all screwed up because of the indentation. Every time I pa

Re: Should non-security 2.7 bugs be fixed?

2015-07-21 Thread Steven D'Aprano
On Tuesday 21 July 2015 13:58, Rick Johnson wrote: > But even if i am wrong, the worse thing i did was mis- > interpret his and another post. But since he still owes me > an apology for insulting my integrity, Someone insulted your integrity? Poor integrity, I hope it wasn't too upset. > i'd sa

Re: Can I copy/paste Python code?

2015-07-21 Thread Peter Heitzer
ryguy7272 wrote: >I'm trying to copy some Python code from a PDF book that I'm reading. I want >to test out the code, and I can copy it, but when I paste it into the Shell, >everything is all screwed up because of the indentation. Every time I paste in >any kind of code, it seems like everythi

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Steven D'Aprano
On Tuesday 21 July 2015 13:30, Rustom Mody wrote: > BTW my boys have just mailed me their latest: > 九.九九 > > 9.99 > > Can some unicode/Chinese literate person inform me whether > that ideograph is equivalent to roman '9' or roman 'nine'? > I don't speak or read Chinese, so I could be com

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Marko Rauhamaa
Laura Creighton : > In a message of Mon, 20 Jul 2015 20:30:48 -0700, Rustom Mody writes: > >>Can some unicode/Chinese literate person inform me whether that >>ideograph is equivalent to roman '9' or roman 'nine'? > > Ah, I don't understand you. What do you mean roman 'nine'? a phonetic > way of sa

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Chris Angelico
On Tue, Jul 21, 2015 at 7:10 PM, Marko Rauhamaa wrote: > This is getting deep. It is an embarrassing metamathematical fact that > numbers cannot be defined. At least, mathematicians gave up trying a > century ago. > >In mathematics, the essence of counting a set and finding a result n, >is

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Jul 21, 2015 at 7:10 PM, Marko Rauhamaa wrote: >> This is getting deep. It is an embarrassing metamathematical fact >> that numbers cannot be defined. At least, mathematicians gave up >> trying a century ago. >> >>In mathematics, the essence of counting a set and fi

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Mark Lawrence
On 21/07/2015 10:10, Marko Rauhamaa wrote: Laura Creighton : In a message of Mon, 20 Jul 2015 20:30:48 -0700, Rustom Mody writes: Can some unicode/Chinese literate person inform me whether that ideograph is equivalent to roman '9' or roman 'nine'? Ah, I don't understand you. What do you mea

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Steven D'Aprano
On Tuesday 21 July 2015 19:10, Marko Rauhamaa wrote: > This is getting deep. When things get too deep, stop digging. > It is an embarrassing metamathematical fact that > numbers cannot be defined. At least, mathematicians gave up trying a > century ago. That's not the case. It's not so much t

Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?]

2015-07-21 Thread Marko Rauhamaa
Steven D'Aprano : > That's not the case. It's not so much that they stopped trying (implying > failure), but that they succeeded, for some definition of success (see > below). > > The contemporary standard approach is from Zermelo-Fraenkel set theory: > define 0 as the empty set, and the succes

We're looking for a middle python developer in Moscow

2015-07-21 Thread pavel
Hello everybody! We're looking for a well-experienced python developer who'd like to participate in educational startup in Moscow, Russia. It's going to be a contractor's job position for 6 months with possible prolongation. Here is the link: http://edumate.ru Main milestones for work complet

Send data to asyncio coroutine

2015-07-21 Thread jcarmena
Hello, I'm trying to understand and link asyncio with ordinary coroutines. Now I just want to understand how to do this on asyncio: def foo(): data = yield 8 print(data) yield "bye" def bar(): f = foo() n = f.next() print(n) message = f.send("hello") print(me

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread tjohnson
On 7/20/2015 10:57 PM, ryguy7272 wrote: I'd like to install ALL Python packages on my machine. Even if it takes up 4-5GB, or more, I'd like to get everything, and then use it when I need it. Now, I'd like to import packages, like numpy and pandas, but nothing will install. I figure, if I ca

Re: Need Help w. Getting the Eclipse Python Add-On.

2015-07-21 Thread tjohnson
On 7/17/2015 2:22 PM, Steve Burrus wrote: I Need immediate Help w. Getting the Eclipse Python Add-On. I looked all around the Eclipse website to try to get this but didn't see the add-on for this. Can someone please help me to find it? Thanx. The link Jerry posted should point you in the right

Re: Can I copy/paste Python code?

2015-07-21 Thread Christian Gollwitzer
On 21.07.2015 04:55, Chris Angelico wrote: On Tue, Jul 21, 2015 at 12:49 PM, ryguy7272 wrote: I'm trying to copy some Python code from a PDF book that I'm reading. I want to test out the code, and I can copy it, but when I paste it into the Shell, everything is all screwed up because of the

Re: Send data to asyncio coroutine

2015-07-21 Thread Ian Kelly
On Tue, Jul 21, 2015 at 5:31 AM, wrote: > Hello, I'm trying to understand and link asyncio with ordinary coroutines. > Now I just want to understand how to do this on asyncio: > > > def foo(): > data = yield 8 > print(data) > yield "bye" > > def bar(): > f = foo() > n = f.nex

Re: Can I copy/paste Python code?

2015-07-21 Thread Chris Angelico
On Tue, Jul 21, 2015 at 10:29 PM, Christian Gollwitzer wrote: > On 21.07.2015 04:55, Chris Angelico wrote: >> >> On Tue, Jul 21, 2015 at 12:49 PM, ryguy7272 wrote: >>> >>> I'm trying to copy some Python code from a PDF book that I'm reading. I >>> want to test out the code, and I can copy it, bu

Re: Can I copy/paste Python code?

2015-07-21 Thread ryguy7272
On Monday, July 20, 2015 at 10:50:09 PM UTC-4, ryguy7272 wrote: > I'm trying to copy some Python code from a PDF book that I'm reading. I want > to test out the code, and I can copy it, but when I paste it into the Shell, > everything is all screwed up because of the indentation. Every time I pa

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread ryguy7272
On Monday, July 20, 2015 at 10:57:47 PM UTC-4, ryguy7272 wrote: > I'd like to install ALL Python packages on my machine. Even if it takes up > 4-5GB, or more, I'd like to get everything, and then use it when I need it. > Now, I'd like to import packages, like numpy and pandas, but nothing will

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread Todd
On Tue, Jul 21, 2015 at 2:10 PM, tjohnson wrote: > On 7/20/2015 10:57 PM, ryguy7272 wrote: > >> I'd like to install ALL Python packages on my machine. Even if it takes >> up 4-5GB, or more, I'd like to get everything, and then use it when I need >> it. Now, I'd like to import packages, like num

Where is the c source code of the import mechanism that ignores invalid directory?

2015-07-21 Thread Shiyao Ma
Hi, It looks to me that the import system of Python will ignore invalid directories and cache the result in memory. For example, the following code: paste here: https://bpaste.net/show/b144deb42620 #!/usr/bin/env python3 import sysimport osimport shutil sys.path.append("./test")shutil.rmtree("./

Re: Can I copy/paste Python code?

2015-07-21 Thread Ben Bacarisse
Christian Gollwitzer writes: > On 21.07.2015 04:55, Chris Angelico wrote: >> On Tue, Jul 21, 2015 at 12:49 PM, ryguy7272 wrote: >>> [...] Every time I paste in any kind of code, it seems >>> like everything is immediately left-justified, and then nothing >>> works. >> Sounds like a flaw in th

Re: Where is the c source code of the import mechanism that ignores invalid directory?

2015-07-21 Thread Mark Lawrence
On 21/07/2015 16:35, Shiyao Ma wrote: Hi, It looks to me that the import system of Python will ignore invalid directories and cache the result in memory. For example, the following code: paste here: https://bpaste.net/show/b144deb42620 #!/usr/bin/env python3 import sys import os import shu

Re: Where is the c source code of the import mechanism that ignores invalid directory?

2015-07-21 Thread Shiyao Ma
Yep. I followed from bltmodule.c(the import function) and got to the import.c file, and finally got lost. Regards. On Tue, Jul 21, 2015 at 12:16 PM, Mark Lawrence wrote: > On 21/07/2015 16:35, Shiyao Ma wrote: > >> Hi, >> >> It looks to me that the import system of Python will ignore invalid >

Re: Where is the c source code of the import mechanism that ignores invalid directory?

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 2:44 AM, Shiyao Ma wrote: > Yep. I followed from bltmodule.c(the import function) and got to the > import.c file, and finally got lost. > What version of CPython are you looking at? If it's a sufficiently recent version, you may want to look at importlib instead. https://

Re: Can I copy/paste Python code?

2015-07-21 Thread Oscar Benjamin
On Tue, 21 Jul 2015 at 17:16 Ben Bacarisse wrote: > Christian Gollwitzer writes: > > > On 21.07.2015 04:55, Chris Angelico wrote: > >> Sounds like a flaw in the PDF - it creates indentation in some way > >> other than leading spaces/tabs. > > > > PDF never uses tabs and spaces for indentation. I

Re: Integers with leading zeroes

2015-07-21 Thread Antoon Pardon
On 07/19/2015 07:39 AM, Steven D'Aprano wrote: > In Python 2, integer literals with leading zeroes are treated as octal, so > 09 is a syntax error and 010 is 8. > > This is confusing to those not raised on C-style octal literals, so in > Python 3 leading zeroes are prohibited in int literals. Octa

Re: Can I copy/paste Python code?

2015-07-21 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: >Actually, maybe don't use PDF at all. I keep having to help my Mum >deal with stupid problems with PDF documents she gets, and I'm never >sure whether the fault is with the PDF creation software, the human >operating said soft

Re: Proposed keyword to transfer control to another function

2015-07-21 Thread Antoon Pardon
On 07/19/2015 02:21 AM, Chris Angelico wrote: > On Sun, Jul 19, 2015 at 9:32 AM, Gregory Ewing > wrote: >> Personally I'd be fine with your initial syntax, but >> something else might be needed to get it past Guido. >> He didn't like my 'cocall f()' construct in PEP 3152, >> which is syntacticall

Re: Proposed keyword to transfer control to another function

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 3:33 AM, Antoon Pardon wrote: > On 07/19/2015 02:21 AM, Chris Angelico wrote: >> On Sun, Jul 19, 2015 at 9:32 AM, Gregory Ewing >> wrote: > >>> Personally I'd be fine with your initial syntax, but >>> something else might be needed to get it past Guido. >>> He didn't like

Re: Noob in Python. Problem with fairly simple test case

2015-07-21 Thread Jason P.
El miércoles, 15 de julio de 2015, 14:12:08 (UTC+2), Chris Angelico escribió: > On Wed, Jul 15, 2015 at 9:44 PM, Jason P. wrote: > > I can't understand very well what's happening. It seems that the main > > thread gets blocked listening to the web server. My intent was to spawn > > another proc

Re: Noob in Python. Problem with fairly simple test case

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 3:38 AM, Jason P. wrote: > Despite the impression that surely I gave, I'm quite familiar with > programming and general bug hunting rules. The problem is that I'm > inexperienced with Python and the subtle details of multiple threads ;) > Heh, it doesn't hurt to remind p

Re: Integers with leading zeroes

2015-07-21 Thread sohcahtoa82
On Tuesday, July 21, 2015 at 10:22:44 AM UTC-7, Antoon Pardon wrote: > On 07/19/2015 07:39 AM, Steven D'Aprano wrote: > > In Python 2, integer literals with leading zeroes are treated as octal, so > > 09 is a syntax error and 010 is 8. > > > > This is confusing to those not raised on C-style octal

Re: Integers with leading zeroes

2015-07-21 Thread Emile van Sebille
On 7/21/2015 10:58 AM, sohcahto...@gmail.com wrote: IMO, leading zeroes just looks like visual noise, and if I wanted to align numbers, I'd just use spaces. Aligning numbers using spaces doesn't always align -- using zeros does. Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Integers with leading zeroes

2015-07-21 Thread sohcahtoa82
On Tuesday, July 21, 2015 at 11:07:43 AM UTC-7, Emile van Sebille wrote: > On 7/21/2015 10:58 AM, sohcahto...@gmail.com wrote: > > > > IMO, leading zeroes just looks like visual noise, and if I wanted to align > > numbers, I'd just use spaces. > > > > Aligning numbers using spaces doesn't always

Re: Integers with leading zeroes

2015-07-21 Thread sohcahtoa82
On Tuesday, July 21, 2015 at 11:38:53 AM UTC-7, sohca...@gmail.com wrote: > On Tuesday, July 21, 2015 at 11:07:43 AM UTC-7, Emile van Sebille wrote: > > On 7/21/2015 10:58 AM, sohcahto...@gmail.com wrote: > > > > > > IMO, leading zeroes just looks like visual noise, and if I wanted to > > > align

Re: Can I copy/paste Python code?

2015-07-21 Thread Grant Edwards
On 2015-07-21, Laura Creighton wrote: > Lots of the problems are with the free reader, adobe acrobat. It is > designed so that the user is kept very much in a straight-jacket which > is a problem when your Mum needs, for instance, things to be in 36 point > for her to be able to read things at a

Re: Can I copy/paste Python code?

2015-07-21 Thread Mark Lawrence
On 21/07/2015 18:25, Laura Creighton wrote: In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: Actually, maybe don't use PDF at all. I keep having to help my Mum deal with stupid problems with PDF documents she gets, and I'm never sure whether the fault is with the PDF creat

Re: Can I copy/paste Python code?

2015-07-21 Thread Grant Edwards
On 2015-07-21, Mark Lawrence wrote: > On 21/07/2015 18:25, Laura Creighton wrote: > >> Lots of the problems are with the free reader, adobe acrobat. It is >> designed so that the user is kept very much in a straight-jacket which >> is a problem when your Mum needs, for instance, things to be in 3

Re: Can I copy/paste Python code?

2015-07-21 Thread Mark Lawrence
On 21/07/2015 21:32, Grant Edwards wrote: On 2015-07-21, Mark Lawrence wrote: On 21/07/2015 18:25, Laura Creighton wrote: Lots of the problems are with the free reader, adobe acrobat. It is designed so that the user is kept very much in a straight-jacket which is a problem when your Mum need

Re: Can I copy/paste Python code?

2015-07-21 Thread Emile van Sebille
On 7/21/2015 1:32 PM, Grant Edwards wrote: But, it apears foxit reader is Windows-only so it's a moot point for Linux/Unix/Mac users. I've been happy with https://wiki.gnome.org/Apps/Evince on linux. Emile -- https://mail.python.org/mailman/listinfo/python-list

Python Schduling

2015-07-21 Thread Madduri Anil kumar
Hello Experts, I am new to Python Programming.I have to work on Python. I have a requirement to scheduling the script for every one hour. could you please let me know which packages will be more helpful for Scheduling. if you post any samples it would be more helpful. Thanks & Regards, Anilkumar.

convert output to list(and nested dictionary)

2015-07-21 Thread max scalf
Hello all, For Each SecurityGroup, how can i convert that into a List that in turn will have a dictionary of the cidr block, protocol type and the port...so from output below, the SecurityGroup called "default" had 2 rules...allowing TCP port from 80 and 5500 to the source IP and then SecurityGrou

Re: Should non-security 2.7 bugs be fixed?

2015-07-21 Thread breamoreboy
On Tuesday, July 21, 2015 at 4:04:30 AM UTC+1, Rick Johnson wrote: > On Sunday, July 19, 2015 at 9:17:11 PM UTC-5, Rustom Mody wrote: > > > > List of python committers: > > - > > 11081 Guido van Rossum > > [snip: long list] > > Thanks for posting this list of names. I ha

Re: Python Schduling

2015-07-21 Thread Irmen de Jong
On 21-7-2015 19:52, Madduri Anil kumar wrote: > Hello Experts, > > I am new to Python Programming.I have to work on Python. > I have a requirement to scheduling the script for every one hour. > could you please let me know which packages will be more helpful for > Scheduling. > if you post any sa

Re: Can I copy/paste Python code?

2015-07-21 Thread Grant Edwards
On 2015-07-21, Emile van Sebille wrote: > On 7/21/2015 1:32 PM, Grant Edwards wrote: > >> But, it apears foxit reader is Windows-only so it's a moot point for >> Linux/Unix/Mac users. > > I've been happy with https://wiki.gnome.org/Apps/Evince on linux. I'm trying to switch from acroread to evinc

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread tjohnson
On 7/21/2015 11:19 AM, ryguy7272 wrote: On Monday, July 20, 2015 at 10:57:47 PM UTC-4, ryguy7272 wrote: I'd like to install ALL Python packages on my machine. Even if it takes up 4-5GB, or more, I'd like to get everything, and then use it when I need it. Now, I'd like to import packages, lik

Re: Can I copy/paste Python code?

2015-07-21 Thread Emile van Sebille
On 7/21/2015 2:47 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 1:32 PM, Grant Edwards wrote: But, it apears foxit reader is Windows-only so it's a moot point for Linux/Unix/Mac users. I've been happy with https://wiki.gnome.org/Apps/Evince on linux. I'm tr

Re: Can I copy/paste Python code?

2015-07-21 Thread Michael Torrie
On 07/21/2015 03:47 PM, Grant Edwards wrote: > I'm trying to switch from acroread to evince, bit it has a few serious > usability problems for me: > > 1) You can't copy/paste text from evince _at_all_. At least it works > right most of the time with acroread. I really like being able >

Re: Can I copy/paste Python code?

2015-07-21 Thread Gene Heskett
On Tuesday 21 July 2015 13:25:32 Laura Creighton wrote: > In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: > >Actually, maybe don't use PDF at all. I keep having to help my Mum > >deal with stupid problems with PDF documents she gets, and I'm never > >sure whether the fault i

Re: Should non-security 2.7 bugs be fixed?

2015-07-21 Thread Mark Lawrence
On 20/07/2015 03:36, Steven D'Aprano wrote: On Mon, 20 Jul 2015 06:21 am, breamore...@gmail.com wrote: All in all though I have to admit that overall it's a really onerous task. Once you've produced the patch you have to go to all the trouble of logging on to the issue tracker, finding the ap

Re: Can I copy/paste Python code?

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 8:36 AM, Michael Torrie wrote: > Sounds like Evince has really gone down hill since I last used Gnome. I > use Atril on Mate desktop and it works as well as Evince ever used to > for me, which is expected seeing as it was forked from Gnome 2 sources. > I have never had an

Re: Can I copy/paste Python code?

2015-07-21 Thread Grant Edwards
On 2015-07-21, Emile van Sebille wrote: > On 7/21/2015 2:47 PM, Grant Edwards wrote: >> On 2015-07-21, Emile van Sebille wrote: >>> On 7/21/2015 1:32 PM, Grant Edwards wrote: >>> But, it apears foxit reader is Windows-only so it's a moot point for Linux/Unix/Mac users. >>> >>> I've been

Re: Can I copy/paste Python code?

2015-07-21 Thread Grant Edwards
On 2015-07-21, Michael Torrie wrote: > On 07/21/2015 03:47 PM, Grant Edwards wrote: >> I'm trying to switch from acroread to evince, bit it has a few serious >> usability problems for me: >> >> 1) You can't copy/paste text from evince _at_all_. At least it works >> right most of the time wi

Re: convert output to list(and nested dictionary)

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 7:12 AM, max scalf wrote: > SecurityGroup:default sg-e1304484 inbound: IPPermissions:tcp(80-80) source: > [67.184.225.222/32] > > > > Here is the output i am looking for > > > rule1 = [{ > > 'cidr': '67.184.225.222/32', > > 'proto': 'tcp', > > 'port':

Re: Can I copy/paste Python code?

2015-07-21 Thread Steven D'Aprano
On Wed, 22 Jul 2015 03:25 am, Laura Creighton wrote: > Lots of the problems are with the free reader, adobe acrobat. It is > designed so that the user is kept very much in a straight-jacket which > is a problem when your Mum needs, for instance, things to be in 36 point > for her to be able to re

Re: Integers with leading zeroes

2015-07-21 Thread Steven D'Aprano
On Wed, 22 Jul 2015 03:21 am, Antoon Pardon wrote: > On 07/19/2015 07:39 AM, Steven D'Aprano wrote: >> In Python 2, integer literals with leading zeroes are treated as octal, >> so 09 is a syntax error and 010 is 8. >> >> This is confusing to those not raised on C-style octal literals, so in >> P

Re: convert output to list(and nested dictionary)

2015-07-21 Thread Pablo Lucena
​str.split and re are a nice quick way to do it: >>> def get_data(data): import re port_re = re.compile(r'(\w+)\((\S+-\S+)\)') cidr_re = re.compile(r'\[(.*?)\]') _, proto_port, cidr = data.rsplit(":", 2) port_match = port_re.search(proto_port) proto, port = port_match.group(1), port_match.group(2)

Re: Can I copy/paste Python code?

2015-07-21 Thread Michael Torrie
On 07/21/2015 06:12 PM, Grant Edwards wrote: > > I don't want to close the TOC panel. I want to collapse all the > entries in the TOC tree widget _in_ the TOC panel. Ahh. Atril does not do this either. It can collapse the TOC to the first level items but not the tree itself. I'm curious as to

Re: convert output to list(and nested dictionary)

2015-07-21 Thread Steven D'Aprano
On Wed, 22 Jul 2015 07:12 am, max scalf wrote: > Hello all, > > For Each SecurityGroup, how can i convert that into a List that in turn > will have a dictionary of the cidr block, protocol type and the port... Start with this: def sg_to_list(sg): return [rule_to_dict(r) for r in sg.rules]

Re: Integers with leading zeroes

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 10:55 AM, Steven D'Aprano wrote: >> Sometimes these numbers represent codeblocks of a fixed >> number of digits. Always writing those numbers with this >> number of digits helps being aware of this. It is also >> easier for when you need to know how many leading zero's >> s

Re: convert output to list(and nested dictionary)

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 11:03 AM, Pablo Lucena wrote: > str.split and re are a nice quick way to do it: > def get_data(data): > import re > port_re = re.compile(r'(\w+)\((\S+-\S+)\)') > cidr_re = re.compile(r'\[(.*?)\]') > _, proto_port, cidr = data.rsplit(":", 2) > port_match = port_re.searc

Re: Can I copy/paste Python code?

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 11:03 AM, Michael Torrie wrote: > On 07/21/2015 06:12 PM, Grant Edwards wrote: >> >> I don't want to close the TOC panel. I want to collapse all the >> entries in the TOC tree widget _in_ the TOC panel. > > Ahh. Atril does not do this either. It can collapse the TOC to t

Re: Should non-security 2.7 bugs be fixed?

2015-07-21 Thread Rick Johnson
On Tuesday, July 21, 2015 at 4:22:50 PM UTC-5, bream...@gmail.com wrote: > It was actually Rustom who posted inaccurate data as only > core-devs have commit rights. Well-well. We now find ourselves before the royal court of logic: If we are to take your statement as fact, then only two possibilit

Re: convert output to list(and nested dictionary)

2015-07-21 Thread max scalf
Thank you all. I have gotten some great response, so i am going to play around with this and see how it turns out. As Pablo pointed out, best way to learn is to try it out and see how it goes. Thanks again and i will keep the list posted. On Tue, Jul 21, 2015 at 8:03 PM, Pablo Lucena wrote: >

Re: Integers with leading zeroes

2015-07-21 Thread Steven D'Aprano
On Wed, 22 Jul 2015 11:10 am, Chris Angelico wrote: > On Wed, Jul 22, 2015 at 10:55 AM, Steven D'Aprano > wrote: >>> Sometimes these numbers represent codeblocks of a fixed >>> number of digits. Always writing those numbers with this >>> number of digits helps being aware of this. It is also >>>

Re: Is there a way to install ALL Python packages?

2015-07-21 Thread ryguy7272
On Monday, July 20, 2015 at 10:57:47 PM UTC-4, ryguy7272 wrote: > I'd like to install ALL Python packages on my machine. Even if it takes up > 4-5GB, or more, I'd like to get everything, and then use it when I need it. > Now, I'd like to import packages, like numpy and pandas, but nothing will

Re: Integers with leading zeroes

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 12:14 PM, Steven D'Aprano wrote: > On Wed, 22 Jul 2015 11:10 am, Chris Angelico wrote: > >> On Wed, Jul 22, 2015 at 10:55 AM, Steven D'Aprano >> wrote: Sometimes these numbers represent codeblocks of a fixed number of digits. Always writing those numbers with thi

Address field [was: Integers with leading zeroes]

2015-07-21 Thread Jason Friedman
> Of course, most of the > time, I advocate a single multi-line text field "Address", and let > people key them in free-form. No postcode field whatsoever. I'm curious about that statement. I could see accepting input as you describe above, but I'm thinking you'd want to *store* a postcode field.

Re: Address field [was: Integers with leading zeroes]

2015-07-21 Thread Chris Angelico
On Wed, Jul 22, 2015 at 2:31 PM, Jason Friedman wrote: >> Of course, most of the >> time, I advocate a single multi-line text field "Address", and let >> people key them in free-form. No postcode field whatsoever. > > I'm curious about that statement. > I could see accepting input as you describe

Re: Interactive, test-driven coding challenges (algorithms and data structures)

2015-07-21 Thread Orochi
On Monday, 13 July 2015 16:50:54 UTC+5:30, donne@gmail.com wrote: > Repo: > https://github.com/donnemartin/interactive-coding-challenges > > Shortlink: > https://bit.ly/git-code > > Hi Everyone, > > I created a number of interactive, test-driven coding challenges. I will > continue to add

Re: Should non-security 2.7 bugs be fixed?

2015-07-21 Thread Terry Reedy
On 7/21/2015 10:07 PM, Rick Johnson wrote: two possibilities exist: (a) Mark is a core dev who has committed patches and is a bully. (b) Mark is not a core dev, and therefor can not commit anything, therefor he's a bully *AND* a hypocrite! Which is it? Mark is not a core dev, ca